• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/media/video/em28xx/

Lines Matching refs:fh

682 	struct em28xx_fh *fh = vq->priv_data;
683 struct em28xx *dev = fh->dev;
686 *size = (fh->dev->width * fh->dev->height * dev->format->depth + 7)
698 f.type = fh->radio ? V4L2_TUNER_RADIO : V4L2_TUNER_ANALOG_TV;
708 struct em28xx_fh *fh = vq->priv_data;
709 struct em28xx *dev = fh->dev;
736 struct em28xx_fh *fh = vq->priv_data;
738 struct em28xx *dev = fh->dev;
741 buf->vb.size = (fh->dev->width * fh->dev->height * dev->format->depth
789 struct em28xx_fh *fh = vq->priv_data;
790 struct em28xx *dev = fh->dev;
804 struct em28xx_fh *fh = vq->priv_data;
805 struct em28xx *dev = (struct em28xx *)fh->dev;
852 static int res_get(struct em28xx_fh *fh, unsigned int bit)
854 struct em28xx *dev = fh->dev;
856 if (fh->resources & bit)
868 fh->resources |= bit;
875 static int res_check(struct em28xx_fh *fh, unsigned int bit)
877 return fh->resources & bit;
885 static void res_free(struct em28xx_fh *fh, unsigned int bits)
887 struct em28xx *dev = fh->dev;
889 BUG_ON((fh->resources & bits) != bits);
892 fh->resources &= ~bits;
898 static int get_ressource(struct em28xx_fh *fh)
900 switch (fh->type) {
1019 struct em28xx_fh *fh = priv;
1020 struct em28xx *dev = fh->dev;
1055 struct em28xx_fh *fh = priv;
1056 struct em28xx *dev = fh->dev;
1127 struct em28xx_fh *fh = priv;
1128 struct em28xx *dev = fh->dev;
1139 if (videobuf_queue_is_busy(&fh->vb_vidq)) {
1155 struct em28xx_fh *fh = priv;
1156 struct em28xx *dev = fh->dev;
1170 struct em28xx_fh *fh = priv;
1171 struct em28xx *dev = fh->dev;
1202 struct em28xx_fh *fh = priv;
1203 struct em28xx *dev = fh->dev;
1222 struct em28xx_fh *fh = priv;
1223 struct em28xx *dev = fh->dev;
1249 struct em28xx_fh *fh = priv;
1250 struct em28xx *dev = fh->dev;
1275 struct em28xx_fh *fh = priv;
1276 struct em28xx *dev = fh->dev;
1285 struct em28xx_fh *fh = priv;
1286 struct em28xx *dev = fh->dev;
1308 struct em28xx_fh *fh = priv;
1309 struct em28xx *dev = fh->dev;
1351 struct em28xx_fh *fh = priv;
1352 struct em28xx *dev = fh->dev;
1378 struct em28xx_fh *fh = priv;
1379 struct em28xx *dev = fh->dev;
1412 struct em28xx_fh *fh = priv;
1413 struct em28xx *dev = fh->dev;
1442 struct em28xx_fh *fh = priv;
1443 struct em28xx *dev = fh->dev;
1486 struct em28xx_fh *fh = priv;
1487 struct em28xx *dev = fh->dev;
1510 struct em28xx_fh *fh = priv;
1511 struct em28xx *dev = fh->dev;
1531 struct em28xx_fh *fh = priv;
1532 struct em28xx *dev = fh->dev;
1535 f->type = fh->radio ? V4L2_TUNER_RADIO : V4L2_TUNER_ANALOG_TV;
1545 struct em28xx_fh *fh = priv;
1546 struct em28xx *dev = fh->dev;
1556 if (unlikely(0 == fh->radio && f->type != V4L2_TUNER_ANALOG_TV))
1558 if (unlikely(1 == fh->radio && f->type != V4L2_TUNER_RADIO))
1587 struct em28xx_fh *fh = priv;
1588 struct em28xx *dev = fh->dev;
1602 struct em28xx_fh *fh = priv;
1603 struct em28xx *dev = fh->dev;
1658 struct em28xx_fh *fh = priv;
1659 struct em28xx *dev = fh->dev;
1698 struct em28xx_fh *fh = priv;
1699 struct em28xx *dev = fh->dev;
1718 struct em28xx_fh *fh = priv;
1719 struct em28xx *dev = fh->dev;
1726 if (unlikely(type != fh->type))
1729 em28xx_videodbg("vidioc_streamon fh=%p t=%d fh->res=%d dev->res=%d\n",
1730 fh, type, fh->resources, dev->resources);
1732 if (unlikely(!res_get(fh, get_ressource(fh))))
1735 if (fh->type == V4L2_BUF_TYPE_VIDEO_CAPTURE)
1736 rc = videobuf_streamon(&fh->vb_vidq);
1737 else if (fh->type == V4L2_BUF_TYPE_VBI_CAPTURE)
1738 rc = videobuf_streamon(&fh->vb_vbiq);
1746 struct em28xx_fh *fh = priv;
1747 struct em28xx *dev = fh->dev;
1754 if (fh->type != V4L2_BUF_TYPE_VIDEO_CAPTURE &&
1755 fh->type != V4L2_BUF_TYPE_VBI_CAPTURE)
1757 if (type != fh->type)
1760 em28xx_videodbg("vidioc_streamoff fh=%p t=%d fh->res=%d dev->res=%d\n",
1761 fh, type, fh->resources, dev->resources);
1763 if (fh->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) {
1764 videobuf_streamoff(&fh->vb_vidq);
1765 res_free(fh, EM28XX_RESOURCE_VIDEO);
1766 } else if (fh->type == V4L2_BUF_TYPE_VBI_CAPTURE) {
1767 videobuf_streamoff(&fh->vb_vbiq);
1768 res_free(fh, EM28XX_RESOURCE_VBI);
1777 struct em28xx_fh *fh = priv;
1778 struct em28xx *dev = fh->dev;
1819 struct em28xx_fh *fh = priv;
1820 struct em28xx *dev = fh->dev;
1843 struct em28xx_fh *fh = priv;
1844 struct em28xx *dev = fh->dev;
1866 struct em28xx_fh *fh = priv;
1867 struct em28xx *dev = fh->dev;
1894 struct em28xx_fh *fh = priv;
1895 struct em28xx *dev = fh->dev;
1922 struct em28xx_fh *fh = priv;
1923 struct em28xx *dev = fh->dev;
1930 if (fh->type == V4L2_BUF_TYPE_VIDEO_CAPTURE)
1931 return videobuf_reqbufs(&fh->vb_vidq, rb);
1933 return videobuf_reqbufs(&fh->vb_vbiq, rb);
1939 struct em28xx_fh *fh = priv;
1940 struct em28xx *dev = fh->dev;
1947 if (fh->type == V4L2_BUF_TYPE_VIDEO_CAPTURE)
1948 return videobuf_querybuf(&fh->vb_vidq, b);
1950 int result = videobuf_querybuf(&fh->vb_vbiq, b);
1959 struct em28xx_fh *fh = priv;
1960 struct em28xx *dev = fh->dev;
1967 if (fh->type == V4L2_BUF_TYPE_VIDEO_CAPTURE)
1968 return videobuf_qbuf(&fh->vb_vidq, b);
1970 return videobuf_qbuf(&fh->vb_vbiq, b);
1975 struct em28xx_fh *fh = priv;
1976 struct em28xx *dev = fh->dev;
1983 if (fh->type == V4L2_BUF_TYPE_VIDEO_CAPTURE)
1984 return videobuf_dqbuf(&fh->vb_vidq, b, file->f_flags &
1987 return videobuf_dqbuf(&fh->vb_vbiq, b, file->f_flags &
1994 struct em28xx_fh *fh = priv;
1996 if (fh->type == V4L2_BUF_TYPE_VIDEO_CAPTURE)
1997 return videobuf_cgmbuf(&fh->vb_vidq, mbuf, 8);
1999 return videobuf_cgmbuf(&fh->vb_vbiq, mbuf, 8);
2075 static int radio_s_audio(struct file *file, void *fh,
2081 static int radio_s_input(struct file *file, void *fh, unsigned int i)
2115 struct em28xx_fh *fh;
2137 fh = kzalloc(sizeof(struct em28xx_fh), GFP_KERNEL);
2138 if (!fh) {
2143 fh->dev = dev;
2144 fh->radio = radio;
2145 fh->type = fh_type;
2146 filp->private_data = fh;
2148 if (fh->type == V4L2_BUF_TYPE_VIDEO_CAPTURE && dev->users == 0) {
2159 if (fh->radio) {
2171 videobuf_queue_vmalloc_init(&fh->vb_vidq, &em28xx_video_qops,
2174 sizeof(struct em28xx_buffer), fh);
2176 videobuf_queue_vmalloc_init(&fh->vb_vbiq, &em28xx_vbi_qops,
2180 sizeof(struct em28xx_buffer), fh);
2230 struct em28xx_fh *fh = filp->private_data;
2231 struct em28xx *dev = fh->dev;
2236 if (res_check(fh, EM28XX_RESOURCE_VIDEO)) {
2237 videobuf_stop(&fh->vb_vidq);
2238 res_free(fh, EM28XX_RESOURCE_VIDEO);
2241 if (res_check(fh, EM28XX_RESOURCE_VBI)) {
2242 videobuf_stop(&fh->vb_vbiq);
2243 res_free(fh, EM28XX_RESOURCE_VBI);
2272 videobuf_mmap_free(&fh->vb_vidq);
2273 videobuf_mmap_free(&fh->vb_vbiq);
2274 kfree(fh);
2288 struct em28xx_fh *fh = filp->private_data;
2289 struct em28xx *dev = fh->dev;
2297 if (fh->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) {
2301 return videobuf_read_stream(&fh->vb_vidq, buf, count, pos, 0,
2306 if (fh->type == V4L2_BUF_TYPE_VBI_CAPTURE) {
2307 if (!res_get(fh, EM28XX_RESOURCE_VBI))
2310 return videobuf_read_stream(&fh->vb_vbiq, buf, count, pos, 0,
2323 struct em28xx_fh *fh = filp->private_data;
2324 struct em28xx *dev = fh->dev;
2331 if (fh->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) {
2332 if (!res_get(fh, EM28XX_RESOURCE_VIDEO))
2334 return videobuf_poll_stream(filp, &fh->vb_vidq, wait);
2335 } else if (fh->type == V4L2_BUF_TYPE_VBI_CAPTURE) {
2336 if (!res_get(fh, EM28XX_RESOURCE_VBI))
2338 return videobuf_poll_stream(filp, &fh->vb_vbiq, wait);
2349 struct em28xx_fh *fh = filp->private_data;
2350 struct em28xx *dev = fh->dev;
2357 if (fh->type == V4L2_BUF_TYPE_VIDEO_CAPTURE)
2358 rc = videobuf_mmap_mapper(&fh->vb_vidq, vma);
2359 else if (fh->type == V4L2_BUF_TYPE_VBI_CAPTURE)
2360 rc = videobuf_mmap_mapper(&fh->vb_vbiq, vma);