--- bttv-cards.c 2005-01-04 05:35:26.000000000 +0900 +++ linux/drivers/media/video/bttv-cards.c 2005-01-04 05:35:05.000000000 +0900 @@ -63,6 +63,7 @@ static void fv2000s_audio(struct bttv *btv, struct video_audio *v, int set); static void windvr_audio(struct bttv *btv, struct video_audio *v, int set); static void adtvk503_audio(struct bttv *btv, struct video_audio *v, int set); +static void smartvision_audio(struct bttv *btv, struct video_audio *v, int set); static void rv605_muxsel(struct bttv *btv, unsigned int input); static void eagle_muxsel(struct bttv *btv, unsigned int input); static void xguard_muxsel(struct bttv *btv, unsigned int input); @@ -71,6 +72,7 @@ static void PXC200_muxsel(struct bttv *btv, unsigned int input); + static int terratec_active_radio_upgrade(struct bttv *btv); static int tea5757_read(struct bttv *btv); static int tea5757_write(struct bttv *btv, int value); @@ -279,7 +281,7 @@ { 0x40111554, BTTV_PV_BT878P_9B, "Prolink Pixelview PV-BT" }, { 0x17de0a01, BTTV_KWORLD, "Mecer TV/FM/Video Tuner" }, - + { 0x80bb1033, BTTV_SMARTVISION, "NEC SmartVision" }, // likely broken, vendor id doesn't match the other magic views ... //{ 0xa0fca04f, BTTV_MAGICTVIEW063, "Guillemot Maxi TV Video 3" }, @@ -288,7 +290,7 @@ { 0x002611bd, BTTV_TWINHAN_DST, "Pinnacle PCTV SAT CI" }, { 0x00011822, BTTV_TWINHAN_DST, "Twinhan VisionPlus DVB-T" }, { 0xfc00270f, BTTV_TWINHAN_DST, "ChainTech digitop DST-1000 DVB-S" }, - + { 0, -1, NULL } }; @@ -2012,6 +2014,21 @@ .tuner_type = TUNER_PHILIPS_PAL, .has_remote = 1, .has_radio = 1, +},{ + .name = "PK-UG-X024", + .video_inputs = 2, + .audio_inputs = 1, + .tuner = 0, + .svhs = 2, + .gpiomask = 0x31f, + .muxsel = {2, 3, 1, 0}, + .audiomux = {0, 0, 0x101, 0, 1}, + .no_msp34xx = 1, + .needs_tvaudio = 0, + .pll = PLL_28, + .tuner_type = TUNER_ALPS_TSCH4_NTSC, + .audio_hook = smartvision_audio, + }}; const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards); @@ -4023,6 +4040,33 @@ printk(KERN_DEBUG "bttv%d: setting input channel to:%d\n", btv->c.nr,(int)mux); } +/* the following was added for private use by yoshino@rita.karing.jp */ +static void smartvision_audio(struct bttv *btv, struct video_audio *v, int set) +{ + + unsigned int con = 0xffffff; + if (set) { + + if (v->mode & VIDEO_SOUND_LANG2) + con = 0x00000018; + if (v->mode & VIDEO_SOUND_LANG1) + con = 0x00000000; + if (v->mode & VIDEO_SOUND_STEREO) + con = 0x00000000; + if (v->mode & VIDEO_SOUND_MONO) + con = 0x00000004; + + if (con != 0xffffff) { + gpio_bits(0x31f, con); + if (bttv_gpio) + bttv_gpio_tracking(btv, "smartvision"); + } else { + v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO | + VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; + } + } + +} /* * Local variables: * c-basic-offset: 8 --- bttv.h 2005-01-04 05:35:30.000000000 +0900 +++ linux/drivers/media/video/bttv.h 2005-01-04 05:35:05.000000000 +0900 @@ -124,6 +124,7 @@ #define BTTV_SIMUS_GVC1100 0x74 #define BTTV_NGSTV_PLUS 0x75 #define BTTV_LMLBT4 0x76 +#define BTTV_SMARTVISION 0x79 /* i2c address list */ #define I2C_TSA5522 0xc2 --- tuner.c 2005-01-04 05:35:37.000000000 +0900 +++ linux/drivers/media/video/tuner.c 2005-01-04 05:35:05.000000000 +0900 @@ -247,6 +247,9 @@ { "Microtune 4049 FM5",Microtune,PAL, 16*141.00,16*464.00,0xa0,0x90,0x30,0x8e,623}, + { "Alps TSCH4", Alps, NTSC, + 16*137.25,16*385.25,0x04,0x02,0x01,0x8e,732}, + }; #define TUNERS ARRAY_SIZE(tuners) --- tuner.h 2005-01-04 05:35:40.000000000 +0900 +++ linux/drivers/media/video/tuner.h 2005-01-04 05:35:05.000000000 +0900 @@ -70,6 +70,7 @@ #define TUNER_PHILIPS_FM1236_MK3 43 #define TUNER_PHILIPS_4IN1 44 /* ATI TV Wonder Pro - Conexant */ #define TUNER_MICROTUNE_4049FM5 45 +#define TUNER_ALPS_TSCH4_NTSC 48 #define NOTUNER 0 #define PAL 1 /* PAL_BG */