summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/em28xx/em28xx.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-11-03 19:05:07 +0100
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-11-03 19:05:07 +0100
commit62af2ba09181e8b6c7db6fc777770860ae7674b5 (patch)
tree566f6decd361de45d8dd00bb0c776d8e4c66de98 /linux/drivers/media/video/em28xx/em28xx.h
parenta66f6aab3859293e78effa93f7824c3aa0c75e33 (diff)
downloadmediapointer-dvb-s2-62af2ba09181e8b6c7db6fc777770860ae7674b5.tar.gz
mediapointer-dvb-s2-62af2ba09181e8b6c7db6fc777770860ae7674b5.tar.bz2
em28xx: add support for vgear pockettv
From: Sascha Sommer <saschasommer@freenet.de> 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 <saschasommer@freenet.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/em28xx/em28xx.h')
-rw-r--r--linux/drivers/media/video/em28xx/em28xx.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx.h b/linux/drivers/media/video/em28xx/em28xx.h
index 4b4eaa43c..e23760122 100644
--- a/linux/drivers/media/video/em28xx/em28xx.h
+++ b/linux/drivers/media/video/em28xx/em28xx.h
@@ -50,6 +50,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
@@ -342,6 +343,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 /* */
@@ -397,6 +401,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
@@ -418,6 +424,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);
}