diff options
author | Gerd Knorr <devnull@localhost> | 2004-08-26 10:59:39 +0000 |
---|---|---|
committer | Gerd Knorr <devnull@localhost> | 2004-08-26 10:59:39 +0000 |
commit | 84745973eae0afde332edbcc1a977612529b5415 (patch) | |
tree | 0dce8107c5ec9b0f5b479f40267c840927926e85 /linux/drivers/media/video | |
parent | bfe098ac63bdc53956e17b005d94470e65affcc3 (diff) | |
download | mediapointer-dvb-s2-84745973eae0afde332edbcc1a977612529b5415.tar.gz mediapointer-dvb-s2-84745973eae0afde332edbcc1a977612529b5415.tar.bz2 |
- cx88: Dvico FusionHDTV patches by Mac Michaels
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-cards.c | 46 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-tvaudio.c | 25 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-video.c | 40 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88.h | 4 |
4 files changed, 111 insertions, 4 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c index 4d1ab117a..c8f44c472 100644 --- a/linux/drivers/media/video/cx88/cx88-cards.c +++ b/linux/drivers/media/video/cx88/cx88-cards.c @@ -348,6 +348,48 @@ struct cx88_board cx88_boards[] = { .gpio0 = 0x000007f8, }, }, + [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD] = { + .name = "DViCO - FusionHDTV 3 Gold", + .tuner_type = TUNER_MICROTUNE_4042FI5, + /* + GPIO[0] resets DT3302 DTV receiver + 0 - reset asserted + 1 - normal operation + GPIO[1] mutes analog audio output connector + 0 - enable selected source + 1 - mute + GPIO[2] selects source for analog audio output connector + 0 - analog audio input connector on tab + 1 - analog DAC output from CX23881 chip + GPIO[3] selects RF input connector on tuner module + 0 - RF connector labeled CABLE + 1 - RF connector labeled ANT + */ + .input = {{ + .type = CX88_VMUX_TELEVISION, + .vmux = 0, + .gpio0 = 0x0f0d, + },{ + .type = CX88_VMUX_CABLE, + .vmux = 0, + .gpio0 = 0x0f05, + },{ + .type = CX88_VMUX_COMPOSITE1, + .vmux = 1, + .gpio0 = 0x0f00, + },{ + .type = CX88_VMUX_SVIDEO, + .vmux = 2, + .gpio0 = 0x0f00, + }}, + .dvb = 0, +#if 0 + .ts = { + .type = CX88_TS, + .gpio0 = 0x00000f01, /* Hooked to tuner reset bit */ + } +#endif + }, }; const unsigned int cx88_bcount = ARRAY_SIZE(cx88_boards); @@ -416,6 +458,10 @@ struct cx88_subid cx88_subids[] = { .subdevice = 0x08a6, .card = CX88_BOARD_KWORLD_DVB_T, },{ + .subvendor = 0x18ac, + .subdevice = 0xd810, + .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD, + },{ .subvendor = 0x18AC, .subdevice = 0xDB00, .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1, diff --git a/linux/drivers/media/video/cx88/cx88-tvaudio.c b/linux/drivers/media/video/cx88/cx88-tvaudio.c index 0929fa2a4..85823c20f 100644 --- a/linux/drivers/media/video/cx88/cx88-tvaudio.c +++ b/linux/drivers/media/video/cx88/cx88-tvaudio.c @@ -685,6 +685,15 @@ void cx88_get_stereo(struct cx88_core *core, struct v4l2_tuner *t) t->audmode = V4L2_TUNER_MODE_MONO; switch (core->tvaudio) { + case WW_BTSC: + t->capability = V4L2_TUNER_CAP_STEREO | + V4L2_TUNER_CAP_SAP; + t->rxsubchans = V4L2_TUNER_SUB_STEREO; + if (1 == pilot) { + /* SAP */ + t->rxsubchans |= V4L2_TUNER_SUB_SAP; + } + break; case WW_A2_BG: case WW_A2_DK: case WW_A2_M: @@ -718,6 +727,22 @@ void cx88_set_stereo(struct cx88_core *core, u32 mode) u32 mask = UNSET; switch (core->tvaudio) { + case WW_BTSC: + switch (mode) { + case V4L2_TUNER_MODE_MONO: + ctl = EN_BTSC_FORCE_MONO; + mask = 0x3f; + break; + case V4L2_TUNER_MODE_SAP: + ctl = EN_BTSC_FORCE_SAP; + mask = 0x3f; + break; + case V4L2_TUNER_MODE_STEREO: + ctl = EN_BTSC_AUTO_STEREO; + mask = 0x3f; + break; + } + break; case WW_A2_BG: case WW_A2_DK: case WW_A2_M: diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c index 31df4ae75..8d2de17a1 100644 --- a/linux/drivers/media/video/cx88/cx88-video.c +++ b/linux/drivers/media/video/cx88/cx88-video.c @@ -1,5 +1,5 @@ /* - * $Id: cx88-video.c,v 1.32 2004/08/25 14:47:53 kraxel Exp $ + * $Id: cx88-video.c,v 1.33 2004/08/26 10:59:39 kraxel Exp $ * * device driver for Conexant 2388x based TV cards * video4linux video interface @@ -1356,6 +1356,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file, [ CX88_VMUX_COMPOSITE4 ] = "Composite4", [ CX88_VMUX_SVIDEO ] = "S-Video", [ CX88_VMUX_TELEVISION ] = "Television", + [ CX88_VMUX_CABLE ] = "Cable TV", [ CX88_VMUX_DVB ] = "DVB", [ CX88_VMUX_DEBUG ] = "for debug only", }; @@ -1371,7 +1372,8 @@ static int video_do_ioctl(struct inode *inode, struct file *file, i->index = n; i->type = V4L2_INPUT_TYPE_CAMERA; strcpy(i->name,iname[INPUT(n)->type]); - if (CX88_VMUX_TELEVISION == INPUT(n)->type) + if ((CX88_VMUX_TELEVISION == INPUT(n)->type) || + (CX88_VMUX_CABLE == INPUT(n)->type)) i->type = V4L2_INPUT_TYPE_TUNER; for (n = 0; n < ARRAY_SIZE(tvnorms); n++) i->std |= tvnorms[n].id; @@ -1396,6 +1398,38 @@ static int video_do_ioctl(struct inode *inode, struct file *file, return 0; } + +#if 0 + /* needs review */ + case VIDIOC_G_AUDIO: + { + struct v4l2_audio *a = arg; + unsigned int n = a->index; + + memset(a,0,sizeof(*a)); + a->index = n; + switch (n) { + case 0: + if ((CX88_VMUX_TELEVISION == INPUT(n)->type) + || (CX88_VMUX_CABLE == INPUT(n)->type)) { + strcpy(a->name,"Television"); + // FIXME figure out if stereo received and set V4L2_AUDCAP_STEREO. + return 0; + } + break; + case 1: + if (CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD == core->board) { + strcpy(a->name,"Line In"); + a->capability = V4L2_AUDCAP_STEREO; + return 0; + } + break; + } + // Audio input not available. + return -EINVAL; + } +#endif + /* --- capture ioctls ---------------------------------------- */ case VIDIOC_ENUM_FMT: { @@ -1642,7 +1676,7 @@ static int radio_do_ioctl(struct inode *inode, struct file *file, { struct video_tuner vt; memset(&vt,0,sizeof(vt)); - cx8800_call_i2c_clients(dev,VIDIOCGTUNER,&vt); + cx88_call_i2c_clients(dev,VIDIOCGTUNER,&vt); t->signal = vt.signal; } #endif diff --git a/linux/drivers/media/video/cx88/cx88.h b/linux/drivers/media/video/cx88/cx88.h index d4fc1d58a..4abb91649 100644 --- a/linux/drivers/media/video/cx88/cx88.h +++ b/linux/drivers/media/video/cx88/cx88.h @@ -1,5 +1,5 @@ /* - * $Id: cx88.h,v 1.25 2004/08/25 14:47:54 kraxel Exp $ + * $Id: cx88.h,v 1.26 2004/08/26 10:59:39 kraxel Exp $ * * v4l2 device driver for cx2388x based TV cards * @@ -164,6 +164,7 @@ extern struct sram_channel cx88_sram_channels[]; #define CX88_BOARD_KWORLD_DVB_T 14 #define CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1 15 #define CX88_BOARD_KWORLD_LTV883 16 +#define CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD 17 enum cx88_itype { CX88_VMUX_COMPOSITE1 = 1, @@ -172,6 +173,7 @@ enum cx88_itype { CX88_VMUX_COMPOSITE4, CX88_VMUX_SVIDEO, CX88_VMUX_TELEVISION, + CX88_VMUX_CABLE, CX88_VMUX_DVB, CX88_VMUX_DEBUG, CX88_RADIO, |