aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-02-25 07:06:13 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:42:51 -0400
commitdf7fa09cca9d80f746c29f95b09a7223f6c2f4e7 (patch)
treea90c6ceebf8b92eae2e4095a6147f7cc236b4fae /drivers
parent50144aeeb702ea105697ae5249f059ea3990b838 (diff)
V4L/DVB (10654): em28xx: VideoMate For You USB TV box requires tvaudio
As reported by Vitaly Wool <vital@embeddedalley.com>: > about half a year ago I posted the patch that basically enabled Compro > VideoMate For You USB TV box support. > The main problem is I couldn't get the sound working. > So I kind of decomposed the box and found out the audio decoder chip > used there was Philips TDA9874A. As far as I can see, it's not supported > within the em28xx suite although it is for other TV tuner drivers. A tvaudio modprobing confirms that tda9874a chip is accessible via i2c: tvaudio: TV audio decoder + audio/video mux driver tvaudio: known chips: tda9840, tda9873h, tda9874h/a, tda9850, tda9855, tea6300, tea6320, tea6420, tda8425, pic16c54 (PV951), ta8874z tvaudio' 1-0058: chip found @ 0xb0 tvaudio' 1-0058: tvaudio': chip_read2: reg254=0x11 tvaudio' 1-0058: tvaudio': chip_read2: reg255=0x2 tvaudio' 1-0058: tda9874a_checkit(): DIC=0x11, SIC=0x2. tvaudio' 1-0058: found tda9874a. tvaudio' 1-0058: tda9874h/a found @ 0xb0 (em28xx #0) tvaudio' 1-0058: tda9874h/a: chip_write: reg0=0x0 tvaudio' 1-0058: tda9874h/a: chip_write: reg1=0xc0 tvaudio' 1-0058: tda9874h/a: chip_write: reg2=0x2 tvaudio' 1-0058: tda9874h/a: chip_write: reg11=0x80 tvaudio' 1-0058: tda9874h/a: chip_write: reg12=0x0 tvaudio' 1-0058: tda9874h/a: chip_write: reg13=0x0 tvaudio' 1-0058: tda9874h/a: chip_write: reg14=0x1 tvaudio' 1-0058: tda9874h/a: chip_write: reg15=0x0 tvaudio' 1-0058: tda9874h/a: chip_write: reg16=0x14 tvaudio' 1-0058: tda9874h/a: chip_write: reg17=0x50 tvaudio' 1-0058: tda9874h/a: chip_write: reg18=0xf9 tvaudio' 1-0058: tda9874h/a: chip_write: reg19=0x80 tvaudio' 1-0058: tda9874h/a: chip_write: reg20=0x80 tvaudio' 1-0058: tda9874h/a: chip_write: reg24=0x80 tvaudio' 1-0058: tda9874h/a: chip_write: reg255=0x0 tvaudio' 1-0058: tda9874a_setup(): A2, B/G [0x00]. tvaudio' 1-0058: tda9874h/a: thread started] This patch automatically loads tvaudio when needed (currently, only with this board). Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/em28xx/em28xx-cards.c3
-rw-r--r--drivers/media/video/em28xx/em28xx.h6
2 files changed, 9 insertions, 0 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index 615cf362e79c..2b27460dae35 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -1244,6 +1244,7 @@ struct em28xx_board em28xx_boards[] = {
1244 .tuner_type = TUNER_LG_PAL_NEW_TAPC, 1244 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
1245 .tda9887_conf = TDA9887_PRESENT, 1245 .tda9887_conf = TDA9887_PRESENT,
1246 .decoder = EM28XX_TVP5150, 1246 .decoder = EM28XX_TVP5150,
1247 .adecoder = EM28XX_TVAUDIO,
1247 .input = { { 1248 .input = { {
1248 .type = EM28XX_VMUX_TELEVISION, 1249 .type = EM28XX_VMUX_TELEVISION,
1249 .vmux = TVP5150_COMPOSITE0, 1250 .vmux = TVP5150_COMPOSITE0,
@@ -1917,6 +1918,8 @@ void em28xx_card_setup(struct em28xx *dev)
1917 request_module("tvp5150"); 1918 request_module("tvp5150");
1918 if (dev->board.tuner_type != TUNER_ABSENT) 1919 if (dev->board.tuner_type != TUNER_ABSENT)
1919 request_module("tuner"); 1920 request_module("tuner");
1921 if (dev->board.adecoder == EM28XX_TVAUDIO)
1922 request_module("tvaudio");
1920#endif 1923#endif
1921 1924
1922 em28xx_config_tuner(dev); 1925 em28xx_config_tuner(dev);
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h
index 3e82d818c0cd..89a793cb8ca4 100644
--- a/drivers/media/video/em28xx/em28xx.h
+++ b/drivers/media/video/em28xx/em28xx.h
@@ -357,6 +357,11 @@ enum em28xx_decoder {
357 EM28XX_SAA711X, 357 EM28XX_SAA711X,
358}; 358};
359 359
360enum em28xx_adecoder {
361 EM28XX_NOADECODER = 0,
362 EM28XX_TVAUDIO,
363};
364
360struct em28xx_board { 365struct em28xx_board {
361 char *name; 366 char *name;
362 int vchannels; 367 int vchannels;
@@ -382,6 +387,7 @@ struct em28xx_board {
382 unsigned char xclk, i2c_speed; 387 unsigned char xclk, i2c_speed;
383 388
384 enum em28xx_decoder decoder; 389 enum em28xx_decoder decoder;
390 enum em28xx_adecoder adecoder;
385 391
386 struct em28xx_input input[MAX_EM28XX_INPUT]; 392 struct em28xx_input input[MAX_EM28XX_INPUT];
387 struct em28xx_input radio; 393 struct em28xx_input radio;