The patch number 10654 was added via Mauro Carvalho Chehab <mche...@redhat.com>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        Linux Media Mailing List <linux-me...@vger.kernel.org>

------

From: Mauro Carvalho Chehab  <mche...@redhat.com>
em28xx: VideoMate For You USB TV box  requires tvaudio


As reported by Vitaly Wool <vi...@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).

Priority: normal

Signed-off-by: Mauro Carvalho Chehab <mche...@redhat.com>


---

 linux/drivers/media/video/em28xx/em28xx-cards.c |    3 +++
 linux/drivers/media/video/em28xx/em28xx.h       |    6 ++++++
 2 files changed, 9 insertions(+)

diff -r 359d95e1d541 -r a1e426060311 
linux/drivers/media/video/em28xx/em28xx-cards.c
--- a/linux/drivers/media/video/em28xx/em28xx-cards.c   Wed Feb 18 09:49:37 
2009 -0300
+++ b/linux/drivers/media/video/em28xx/em28xx-cards.c   Wed Feb 25 09:06:13 
2009 -0300
@@ -1309,6 +1309,7 @@ struct em28xx_board em28xx_boards[] = {
                .tuner_type   = TUNER_LG_PAL_NEW_TAPC,
                .tda9887_conf = TDA9887_PRESENT,
                .decoder      = EM28XX_TVP5150,
+               .adecoder     = EM28XX_TVAUDIO,
                .input        = { {
                        .type     = EM28XX_VMUX_TELEVISION,
                        .vmux     = TVP5150_COMPOSITE0,
@@ -1986,6 +1987,8 @@ void em28xx_card_setup(struct em28xx *de
                request_module("tvp5150");
        if (dev->board.tuner_type != TUNER_ABSENT)
                request_module("tuner");
+       if (dev->board.adecoder == EM28XX_TVAUDIO)
+               request_module("tvaudio");
 #endif
 
        em28xx_config_tuner(dev);
diff -r 359d95e1d541 -r a1e426060311 linux/drivers/media/video/em28xx/em28xx.h
--- a/linux/drivers/media/video/em28xx/em28xx.h Wed Feb 18 09:49:37 2009 -0300
+++ b/linux/drivers/media/video/em28xx/em28xx.h Wed Feb 25 09:06:13 2009 -0300
@@ -358,6 +358,11 @@ enum em28xx_decoder {
        EM28XX_SAA711X,
 };
 
+enum em28xx_adecoder {
+       EM28XX_NOADECODER = 0,
+       EM28XX_TVAUDIO,
+};
+
 struct em28xx_board {
        char *name;
        int vchannels;
@@ -383,6 +388,7 @@ struct em28xx_board {
        unsigned char xclk, i2c_speed;
 
        enum em28xx_decoder decoder;
+       enum em28xx_adecoder adecoder;
 
        struct em28xx_input       input[MAX_EM28XX_INPUT];
        struct em28xx_input       radio;


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/a1e4260603116cc6520491b827f64d5f07b338fb

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to