summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-04-17 18:38:53 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-17 18:38:53 -0300
commit834889a701686ac84ab1ee333232fcb447fce4e2 (patch)
tree350a33bb9d40e6cc3dfd2fc8ea7522cdff185bf6
parenta4c6b3f9f6156e89d7dd1ec89395aecaa95c44ef (diff)
downloadmediapointer-dvb-s2-834889a701686ac84ab1ee333232fcb447fce4e2.tar.gz
mediapointer-dvb-s2-834889a701686ac84ab1ee333232fcb447fce4e2.tar.bz2
em28xx: Sets frequency when changing to analog mode
From: Mauro Carvalho Chehab <mchehab@infradead.org> This will make tuner-xc2028 to change to analog, if needed. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-video.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c
index ba08b91d9..5e90dece9 100644
--- a/linux/drivers/media/video/em28xx/em28xx-video.c
+++ b/linux/drivers/media/video/em28xx/em28xx-video.c
@@ -588,6 +588,8 @@ static int
buffer_setup(struct videobuf_queue *vq, unsigned int *count, unsigned int *size)
{
struct em28xx_fh *fh = vq->priv_data;
+ struct em28xx *dev = fh->dev;
+ struct v4l2_frequency f;
*size = 16 * fh->dev->width * fh->dev->height >> 3;
if (0 == *count)
@@ -596,6 +598,14 @@ buffer_setup(struct videobuf_queue *vq, unsigned int *count, unsigned int *size)
if (*count < EM28XX_MIN_BUF)
*count = EM28XX_MIN_BUF;
+ dev->mode = EM28XX_ANALOG_MODE;
+
+ /* Ask tuner to go to analog mode */
+ memset (&f, 0, sizeof(f));
+ f.frequency = dev->ctl_freq;
+
+ em28xx_i2c_call_clients(dev, VIDIOC_S_FREQUENCY, &f);
+
return 0;
}