Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4362559d826b369df41fc74df4c5db6061962dce
Commit:     4362559d826b369df41fc74df4c5db6061962dce
Parent:     5a80415bcabf2b59e8c34db6e743c54582cfd3c2
Author:     Sascha Sommer <[EMAIL PROTECTED]>
AuthorDate: Sat Nov 3 15:05:07 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Fri Jan 25 19:01:56 2008 -0200

    V4L/DVB (6539): em28xx: add support for vgear pockettv
    
    attached patch adds support for the vgear pockettv.
    It seems to require a write to another register for audio to work.
    I checked my old cinergydrv and we did the same register write there. I
    therefore enabled it for all em2800 based devices.
    
    Signed-off-by: Sascha Sommer <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/video/em28xx/em28xx-cards.c |   23 +++++++++++++++++++++++
 drivers/media/video/em28xx/em28xx.h       |   12 ++++++++++++
 2 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/em28xx/em28xx-cards.c 
b/drivers/media/video/em28xx/em28xx-cards.c
index e1e7510..ae66341 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -328,6 +328,29 @@ struct em28xx_board em28xx_boards[] = {
                        .amux     = 1,
                }},
        },
+       [EM2800_BOARD_VGEAR_POCKETTV] = {
+               .name         = "V-Gear PocketTV",
+               .is_em2800    = 1,
+               .vchannels    = 3,
+               .norm         = VIDEO_MODE_PAL,
+               .tuner_type   = TUNER_LG_PAL_NEW_TAPC,
+               .tda9887_conf = TDA9887_PRESENT,
+               .has_tuner    = 1,
+               .decoder      = EM28XX_SAA7113,
+               .input          = {{
+                       .type     = EM28XX_VMUX_TELEVISION,
+                       .vmux     = SAA7115_COMPOSITE2,
+                       .amux     = 0,
+               },{
+                       .type     = EM28XX_VMUX_COMPOSITE1,
+                       .vmux     = SAA7115_COMPOSITE0,
+                       .amux     = 1,
+               },{
+                       .type     = EM28XX_VMUX_SVIDEO,
+                       .vmux     = SAA7115_SVIDEO3,
+                       .amux     = 1,
+               }},
+       },
        [EM2820_BOARD_PROLINK_PLAYTV_USB2] = {
                .name         = "Pixelview Prolink PlayTV USB 2.0",
                .vchannels    = 3,
diff --git a/drivers/media/video/em28xx/em28xx.h 
b/drivers/media/video/em28xx/em28xx.h
index 65670ae..70fddd4 100644
--- a/drivers/media/video/em28xx/em28xx.h
+++ b/drivers/media/video/em28xx/em28xx.h
@@ -47,6 +47,7 @@
 #define EM2820_BOARD_KWORLD_PVRTV2800RF                12
 #define EM2880_BOARD_TERRATEC_PRODIGY_XS       13
 #define EM2820_BOARD_PROLINK_PLAYTV_USB2       14
+#define EM2800_BOARD_VGEAR_POCKETTV             15
 
 #define UNSET -1
 
@@ -335,6 +336,9 @@ extern struct em28xx_board em28xx_boards[];
 extern struct usb_device_id em28xx_id_table[];
 extern const unsigned int em28xx_bcount;
 
+/* em2800 registers */
+#define EM2800_AUDIOSRC_REG 0x08
+
 /* em28xx registers */
 #define CHIPID_REG     0x0a
 #define USBSUSP_REG    0x0c    /* */
@@ -390,6 +394,8 @@ extern const unsigned int em28xx_bcount;
 #define VIDEO_AC97     0x14
 
 /* register settings */
+#define EM2800_AUDIO_SRC_TUNER  0x0d
+#define EM2800_AUDIO_SRC_LINE   0x0c
 #define EM28XX_AUDIO_SRC_TUNER 0xc0
 #define EM28XX_AUDIO_SRC_LINE  0x80
 
@@ -411,6 +417,12 @@ extern const unsigned int em28xx_bcount;
 
 inline static int em28xx_audio_source(struct em28xx *dev, int input)
 {
+       if(dev->is_em2800){
+               u8 tmp = EM2800_AUDIO_SRC_TUNER;
+               if(input == EM28XX_AUDIO_SRC_LINE)
+                       tmp = EM2800_AUDIO_SRC_LINE;
+               em28xx_write_regs(dev, EM2800_AUDIOSRC_REG, &tmp, 1);
+       }
        return em28xx_write_reg_bits(dev, AUDIOSRC_REG, input, 0xc0);
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to