aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-04-17 20:38:53 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 13:09:41 -0400
commitd2d9fbfd732f49999a2a94f2479934488fe3ea9d (patch)
tree460ea206c0fcf560f914bc91c40db6b3afbbdc66 /drivers/media/video
parent52284c3e47bf502aaff72ab2ede509193b628b1b (diff)
V4L/DVB (7600): em28xx: Sets frequency when changing to analog mode
This will make tuner-xc2028 to change to analog, if needed. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/em28xx/em28xx-video.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
index 362251838d4b..72a7633b6452 100644
--- a/drivers/media/video/em28xx/em28xx-video.c
+++ b/drivers/media/video/em28xx/em28xx-video.c
@@ -560,6 +560,8 @@ static int
560buffer_setup(struct videobuf_queue *vq, unsigned int *count, unsigned int *size) 560buffer_setup(struct videobuf_queue *vq, unsigned int *count, unsigned int *size)
561{ 561{
562 struct em28xx_fh *fh = vq->priv_data; 562 struct em28xx_fh *fh = vq->priv_data;
563 struct em28xx *dev = fh->dev;
564 struct v4l2_frequency f;
563 565
564 *size = 16 * fh->dev->width * fh->dev->height >> 3; 566 *size = 16 * fh->dev->width * fh->dev->height >> 3;
565 if (0 == *count) 567 if (0 == *count)
@@ -568,6 +570,14 @@ buffer_setup(struct videobuf_queue *vq, unsigned int *count, unsigned int *size)
568 if (*count < EM28XX_MIN_BUF) 570 if (*count < EM28XX_MIN_BUF)
569 *count = EM28XX_MIN_BUF; 571 *count = EM28XX_MIN_BUF;
570 572
573 dev->mode = EM28XX_ANALOG_MODE;
574
575 /* Ask tuner to go to analog mode */
576 memset (&f, 0, sizeof(f));
577 f.frequency = dev->ctl_freq;
578
579 em28xx_i2c_call_clients(dev, VIDIOC_S_FREQUENCY, &f);
580
571 return 0; 581 return 0;
572} 582}
573 583