summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2008-12-20 08:43:34 -0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-20 08:43:34 -0200
commit86e292e82d505fb16fd1e283905a65c5c603ec16 (patch)
tree0e3ed9ac4b5efae28dc1461e928666bb45f4c013
parent1e0f865674f729f9f5e346a2f0f77bc3b297c51b (diff)
downloadmediapointer-dvb-s2-86e292e82d505fb16fd1e283905a65c5c603ec16.tar.gz
mediapointer-dvb-s2-86e292e82d505fb16fd1e283905a65c5c603ec16.tar.bz2
em28xx: Fix a bug that were putting xc2028/3028 tuner to sleep
From: Mauro Carvalho Chehab <mchehab@redhat.com> The changeset 78aa52a159cf introduced a bug on em28xx: buffer setup should be awaking xc3028. Instead, since we didn't specify the tuner mode, the device were going to sleep, due to the lack of tuner mode when asking tuner to handle VIDIOC_S_FREQUENCY: xc2028 0-0061: Device is Xceive 3028 version 1.0, firmware version 2.7 xc2028 0-0061: divisor= 00 00 14 d0 (freq=83.250) xc2028 0-0061: Putting xc2028/3028 into poweroff mode. xc2028 0-0061: Printing sleep stack trace: Pid: 10936, comm: mplayer Tainted: P M 2.6.27.8 #1 Call Trace: [<ffffffffa0b759ea>] xc2028_sleep+0x89/0x1ab [tuner_xc2028] [<ffffffffa0b48fb9>] tuner_s_frequency+0xf5/0x165 [tuner] Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-video.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c
index 78eb335a5..6e4ee2d96 100644
--- a/linux/drivers/media/video/em28xx/em28xx-video.c
+++ b/linux/drivers/media/video/em28xx/em28xx-video.c
@@ -397,9 +397,10 @@ buffer_setup(struct videobuf_queue *vq, unsigned int *count, unsigned int *size)
if (*count < EM28XX_MIN_BUF)
*count = EM28XX_MIN_BUF;
- /* Ask tuner to go to analog mode */
+ /* Ask tuner to go to analog or radio mode */
memset(&f, 0, sizeof(f));
f.frequency = dev->ctl_freq;
+ f.type = fh->radio ? V4L2_TUNER_RADIO : V4L2_TUNER_ANALOG_TV;
em28xx_i2c_call_clients(dev, VIDIOC_S_FREQUENCY, &f);