diff options
author | Sascha Sommer <saschasommer@freenet.de> | 2007-11-03 14:05:07 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 16:01:56 -0500 |
commit | 4362559d826b369df41fc74df4c5db6061962dce (patch) | |
tree | f43952936259592026e948e9335870c35c61c469 /drivers/media/video/em28xx | |
parent | 5a80415bcabf2b59e8c34db6e743c54582cfd3c2 (diff) |
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 <saschasommer@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/em28xx')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-cards.c | 23 | ||||
-rw-r--r-- | 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 e1e7510146e1..ae6634156e76 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[] = { | |||
328 | .amux = 1, | 328 | .amux = 1, |
329 | }}, | 329 | }}, |
330 | }, | 330 | }, |
331 | [EM2800_BOARD_VGEAR_POCKETTV] = { | ||
332 | .name = "V-Gear PocketTV", | ||
333 | .is_em2800 = 1, | ||
334 | .vchannels = 3, | ||
335 | .norm = VIDEO_MODE_PAL, | ||
336 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, | ||
337 | .tda9887_conf = TDA9887_PRESENT, | ||
338 | .has_tuner = 1, | ||
339 | .decoder = EM28XX_SAA7113, | ||
340 | .input = {{ | ||
341 | .type = EM28XX_VMUX_TELEVISION, | ||
342 | .vmux = SAA7115_COMPOSITE2, | ||
343 | .amux = 0, | ||
344 | },{ | ||
345 | .type = EM28XX_VMUX_COMPOSITE1, | ||
346 | .vmux = SAA7115_COMPOSITE0, | ||
347 | .amux = 1, | ||
348 | },{ | ||
349 | .type = EM28XX_VMUX_SVIDEO, | ||
350 | .vmux = SAA7115_SVIDEO3, | ||
351 | .amux = 1, | ||
352 | }}, | ||
353 | }, | ||
331 | [EM2820_BOARD_PROLINK_PLAYTV_USB2] = { | 354 | [EM2820_BOARD_PROLINK_PLAYTV_USB2] = { |
332 | .name = "Pixelview Prolink PlayTV USB 2.0", | 355 | .name = "Pixelview Prolink PlayTV USB 2.0", |
333 | .vchannels = 3, | 356 | .vchannels = 3, |
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h index 65670ae2945b..70fddd45d1f7 100644 --- a/drivers/media/video/em28xx/em28xx.h +++ b/drivers/media/video/em28xx/em28xx.h | |||
@@ -47,6 +47,7 @@ | |||
47 | #define EM2820_BOARD_KWORLD_PVRTV2800RF 12 | 47 | #define EM2820_BOARD_KWORLD_PVRTV2800RF 12 |
48 | #define EM2880_BOARD_TERRATEC_PRODIGY_XS 13 | 48 | #define EM2880_BOARD_TERRATEC_PRODIGY_XS 13 |
49 | #define EM2820_BOARD_PROLINK_PLAYTV_USB2 14 | 49 | #define EM2820_BOARD_PROLINK_PLAYTV_USB2 14 |
50 | #define EM2800_BOARD_VGEAR_POCKETTV 15 | ||
50 | 51 | ||
51 | #define UNSET -1 | 52 | #define UNSET -1 |
52 | 53 | ||
@@ -335,6 +336,9 @@ extern struct em28xx_board em28xx_boards[]; | |||
335 | extern struct usb_device_id em28xx_id_table[]; | 336 | extern struct usb_device_id em28xx_id_table[]; |
336 | extern const unsigned int em28xx_bcount; | 337 | extern const unsigned int em28xx_bcount; |
337 | 338 | ||
339 | /* em2800 registers */ | ||
340 | #define EM2800_AUDIOSRC_REG 0x08 | ||
341 | |||
338 | /* em28xx registers */ | 342 | /* em28xx registers */ |
339 | #define CHIPID_REG 0x0a | 343 | #define CHIPID_REG 0x0a |
340 | #define USBSUSP_REG 0x0c /* */ | 344 | #define USBSUSP_REG 0x0c /* */ |
@@ -390,6 +394,8 @@ extern const unsigned int em28xx_bcount; | |||
390 | #define VIDEO_AC97 0x14 | 394 | #define VIDEO_AC97 0x14 |
391 | 395 | ||
392 | /* register settings */ | 396 | /* register settings */ |
397 | #define EM2800_AUDIO_SRC_TUNER 0x0d | ||
398 | #define EM2800_AUDIO_SRC_LINE 0x0c | ||
393 | #define EM28XX_AUDIO_SRC_TUNER 0xc0 | 399 | #define EM28XX_AUDIO_SRC_TUNER 0xc0 |
394 | #define EM28XX_AUDIO_SRC_LINE 0x80 | 400 | #define EM28XX_AUDIO_SRC_LINE 0x80 |
395 | 401 | ||
@@ -411,6 +417,12 @@ extern const unsigned int em28xx_bcount; | |||
411 | 417 | ||
412 | inline static int em28xx_audio_source(struct em28xx *dev, int input) | 418 | inline static int em28xx_audio_source(struct em28xx *dev, int input) |
413 | { | 419 | { |
420 | if(dev->is_em2800){ | ||
421 | u8 tmp = EM2800_AUDIO_SRC_TUNER; | ||
422 | if(input == EM28XX_AUDIO_SRC_LINE) | ||
423 | tmp = EM2800_AUDIO_SRC_LINE; | ||
424 | em28xx_write_regs(dev, EM2800_AUDIOSRC_REG, &tmp, 1); | ||
425 | } | ||
414 | return em28xx_write_reg_bits(dev, AUDIOSRC_REG, input, 0xc0); | 426 | return em28xx_write_reg_bits(dev, AUDIOSRC_REG, input, 0xc0); |
415 | } | 427 | } |
416 | 428 | ||