aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMichael Hunold <hunold@linuxtv.org>2006-03-14 00:20:41 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-14 10:57:17 -0500
commit6acaba8e22bb355409e06d9e7ce4e7bef1bcaa04 (patch)
treec5c4aaafb6bf8fe51f0dd060dc9ce5fd7c779892 /drivers/media
parent3cb4f09fc2e98bbf26f8c900a94bf3910cd4d823 (diff)
[PATCH] Restore tuning capabilities in V4L2 MXB driver
The behaviour of the all-in-one Video4Linux tuner driver apparently changed. It now wants to know the tv standard, otherwise it refuses to tune. Restore tuning functionality in my driver for the "Multimedia eXtension Board". The all-in-one tuner driver apparently changed its behaviour. Signed-off-by: Michael Hunold <hunold@linuxtv.org> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: Johannes Stezenbach <js@linuxtv.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/mxb.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/media/video/mxb.c b/drivers/media/video/mxb.c
index 8416ceff524b..41715cacf926 100644
--- a/drivers/media/video/mxb.c
+++ b/drivers/media/video/mxb.c
@@ -1,7 +1,7 @@
1/* 1/*
2 mxb - v4l2 driver for the Multimedia eXtension Board 2 mxb - v4l2 driver for the Multimedia eXtension Board
3 3
4 Copyright (C) 1998-2003 Michael Hunold <michael@mihu.de> 4 Copyright (C) 1998-2006 Michael Hunold <michael@mihu.de>
5 5
6 Visit http://www.mihu.de/linux/saa7146/mxb/ 6 Visit http://www.mihu.de/linux/saa7146/mxb/
7 for further details about this card. 7 for further details about this card.
@@ -327,6 +327,7 @@ static int mxb_init_done(struct saa7146_dev* dev)
327 struct video_decoder_init init; 327 struct video_decoder_init init;
328 struct i2c_msg msg; 328 struct i2c_msg msg;
329 struct tuner_setup tun_setup; 329 struct tuner_setup tun_setup;
330 v4l2_std_id std = V4L2_STD_PAL_BG;
330 331
331 int i = 0, err = 0; 332 int i = 0, err = 0;
332 struct tea6415c_multiplex vm; 333 struct tea6415c_multiplex vm;
@@ -361,6 +362,9 @@ static int mxb_init_done(struct saa7146_dev* dev)
361 mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_FREQUENCY, 362 mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_FREQUENCY,
362 &mxb->cur_freq); 363 &mxb->cur_freq);
363 364
365 /* set a default video standard */
366 mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_STD, &std);
367
364 /* mute audio on tea6420s */ 368 /* mute audio on tea6420s */
365 mxb->tea6420_1->driver->command(mxb->tea6420_1,TEA6420_SWITCH, &TEA6420_line[6][0]); 369 mxb->tea6420_1->driver->command(mxb->tea6420_1,TEA6420_SWITCH, &TEA6420_line[6][0]);
366 mxb->tea6420_2->driver->command(mxb->tea6420_2,TEA6420_SWITCH, &TEA6420_line[6][1]); 370 mxb->tea6420_2->driver->command(mxb->tea6420_2,TEA6420_SWITCH, &TEA6420_line[6][1]);
@@ -921,17 +925,21 @@ static int std_callback(struct saa7146_dev* dev, struct saa7146_standard *std)
921 int one = 1; 925 int one = 1;
922 926
923 if(V4L2_STD_PAL_I == std->id ) { 927 if(V4L2_STD_PAL_I == std->id ) {
928 v4l2_std_id std = V4L2_STD_PAL_I;
924 DEB_D(("VIDIOC_S_STD: setting mxb for PAL_I.\n")); 929 DEB_D(("VIDIOC_S_STD: setting mxb for PAL_I.\n"));
925 /* set the 7146 gpio register -- I don't know what this does exactly */ 930 /* set the 7146 gpio register -- I don't know what this does exactly */
926 saa7146_write(dev, GPIO_CTRL, 0x00404050); 931 saa7146_write(dev, GPIO_CTRL, 0x00404050);
927 /* unset the 7111 gpio register -- I don't know what this does exactly */ 932 /* unset the 7111 gpio register -- I don't know what this does exactly */
928 mxb->saa7111a->driver->command(mxb->saa7111a,DECODER_SET_GPIO, &zero); 933 mxb->saa7111a->driver->command(mxb->saa7111a,DECODER_SET_GPIO, &zero);
934 mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_STD, &std);
929 } else { 935 } else {
936 v4l2_std_id std = V4L2_STD_PAL_BG;
930 DEB_D(("VIDIOC_S_STD: setting mxb for PAL/NTSC/SECAM.\n")); 937 DEB_D(("VIDIOC_S_STD: setting mxb for PAL/NTSC/SECAM.\n"));
931 /* set the 7146 gpio register -- I don't know what this does exactly */ 938 /* set the 7146 gpio register -- I don't know what this does exactly */
932 saa7146_write(dev, GPIO_CTRL, 0x00404050); 939 saa7146_write(dev, GPIO_CTRL, 0x00404050);
933 /* set the 7111 gpio register -- I don't know what this does exactly */ 940 /* set the 7111 gpio register -- I don't know what this does exactly */
934 mxb->saa7111a->driver->command(mxb->saa7111a,DECODER_SET_GPIO, &one); 941 mxb->saa7111a->driver->command(mxb->saa7111a,DECODER_SET_GPIO, &one);
942 mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_STD, &std);
935 } 943 }
936 return 0; 944 return 0;
937} 945}