Messages in this thread Patch in this message |  | | Date | Thu, 3 Jun 1999 05:08:50 +0000 (UTC) | | From | Adam Fritzler <> | | Subject | [bttv patch] AVEC InterCapture support |
| |
This patch adds support for the Alps TSBH1 tuner and the bt848-based AVEC InterCapture board, including very limited support for the TEA6320 audio fader/mux.
Patch is against the 2.3.5 kernel.
mid
--- Adam Fritzler { mid@auk.cx, afritz@iname.com} http://www.auk.cx/~mid/ "Behold the power of cheese." -- National Dairy Council
diff -r -u linux-ia32/2.3.5.clean/drivers/char/bttv.c linux/drivers/char/bttv.c --- linux-ia32/2.3.5.clean/drivers/char/bttv.c Wed Jun 2 22:14:48 1999 +++ linux/drivers/char/bttv.c Wed Jun 2 22:05:36 1999 @@ -1,3 +1,4 @@ + /* bttv - Bt848 frame grabber driver @@ -545,6 +546,8 @@ { 3, 4, 0, 2, 0x01e000, { 2, 0, 1, 1}, {0x01c000, 0, 0x018000, 0x014000, 0x002000, 0 }}, /* "Leadtek WinView 601", */ { 3, 1, 0, 2, 0x8300f8, { 2, 3, 1, 1,0}, {0x4fa007,0xcfa007,0xcfa007,0xcfa007,0xcfa007,0xcfa007}}, + /* AVEC Intercapture */ + { 3, 1, 9, 2, 0, { 2, 3, 1, 1}, { 0, 0, 0, 0, 0}}, }; #define TVCARDS (sizeof(tvcards)/sizeof(tvcard)) @@ -2900,6 +2903,18 @@ I2CWrite(bus, I2C_TEA6300, TEA6300_SW, 0x01, 1); /* mute off input A */ } +static void init_tea6320(struct i2c_bus *bus) +{ + I2CWrite(bus, I2C_TEA6300, TEA6320_V, 0x28, 1); /* master volume */ + I2CWrite(bus, I2C_TEA6300, TEA6320_FFL, 0x28, 1); /* volume left 0dB */ + I2CWrite(bus, I2C_TEA6300, TEA6320_FFR, 0x28, 1); /* volume right 0dB */ + I2CWrite(bus, I2C_TEA6300, TEA6320_FRL, 0x28, 1); /* volume rear left 0dB */ + I2CWrite(bus, I2C_TEA6300, TEA6320_FRR, 0x28, 1); /* volume rear right 0dB */ + I2CWrite(bus, I2C_TEA6300, TEA6320_BA, 0x11, 1); /* bass 0dB */ + I2CWrite(bus, I2C_TEA6300, TEA6320_TR, 0x11, 1); /* treble 0dB */ + I2CWrite(bus, I2C_TEA6300, TEA6320_S, TEA6320_S_GMU, 1); /* mute off input A */ +} + static void init_tda8425(struct i2c_bus *bus) { I2CWrite(bus, I2C_TDA8425, TDA8425_VL, 0xFC, 1); /* volume left 0dB */ @@ -3027,9 +3042,16 @@ if (I2CRead(&(btv->i2c), I2C_TEA6300) >=0) { + if(btv->type==BTTV_AVEC_INTERCAP) + { + printk(KERN_INFO "bttv%d: fader chip: TEA6320\n",btv->nr); + btv->audio_chip = TEA6320; + init_tea6320(&(btv->i2c)); + } else { printk(KERN_INFO "bttv%d: fader chip: TEA6300\n",btv->nr); btv->audio_chip = TEA6300; init_tea6300(&(btv->i2c)); + } } else printk(KERN_INFO "bttv%d: NO fader chip: TEA6300\n",btv->nr); @@ -3073,6 +3095,9 @@ case BTTV_WINVIEW_601: strcpy(btv->video_dev.name,"BT848(Leadtek WinView 601)"); break; + case BTTV_AVEC_INTERCAP: + strcpy(btv->video_dev.name,"(AVEC Intercapture)"); + break; } printk("%s\n",btv->video_dev.name); audio(btv, AUDIO_MUTE); diff -r -u linux-ia32/2.3.5.clean/drivers/char/bttv.h linux/drivers/char/bttv.h --- linux-ia32/2.3.5.clean/drivers/char/bttv.h Wed Jun 2 22:14:48 1999 +++ linux/drivers/char/bttv.h Wed Jun 2 21:37:55 1999 @@ -211,6 +211,7 @@ #define BTTV_ZOLTRIX 0x0f #define BTTV_PIXVIEWPLAYTV 0x10 #define BTTV_WINVIEW_601 0x11 +#define BTTV_AVEC_INTERCAP 0x12 #define AUDIO_TUNER 0x00 #define AUDIO_RADIO 0x01 @@ -225,6 +226,7 @@ #define TDA8425 0x02 #define TDA9840 0x03 #define TEA6300 0x04 +#define TEA6320 0x05 #define I2C_TSA5522 0xc2 #define I2C_TDA9840 0x84 @@ -233,7 +235,7 @@ #define I2C_HAUPEE 0xa0 #define I2C_STBEE 0xae #define I2C_VHX 0xc0 -#define I2C_TEA6300 0x80 +#define I2C_TEA6300 0x80 /* same as TEA6320 */ #define TDA9840_SW 0x00 #define TDA9840_LVADJ 0x02 @@ -260,6 +262,22 @@ #define TEA6300_TR 0x03 /* treble control */ #define TEA6300_FA 0x04 /* fader control */ #define TEA6300_SW 0x05 /* mute and source switch */ + + +#define TEA6320_V 0x00 +#define TEA6320_FFR 0x01 /* volume front right */ +#define TEA6320_FFL 0x02 /* volume front left */ +#define TEA6320_FRR 0x03 /* volume rear right */ +#define TEA6320_FRL 0x04 /* volume rear left */ +#define TEA6320_BA 0x05 /* bass */ +#define TEA6320_TR 0x06 /* treble */ +#define TEA6320_S 0x07 /* switch register */ + /* values for those registers: */ +#define TEA6320_S_SA 0x01 /* stereo A input */ +#define TEA6320_S_SB 0x02 /* stereo B */ +#define TEA6320_S_SC 0x04 /* stereo C */ +#define TEA6320_S_GMU 0x80 /* general mute */ + #define PT2254_L_CHANEL 0x10 #define PT2254_R_CHANEL 0x08 diff -r -u linux-ia32/2.3.5.clean/drivers/char/tuner.c linux/drivers/char/tuner.c --- linux-ia32/2.3.5.clean/drivers/char/tuner.c Sun Jan 17 19:28:06 1999 +++ linux/drivers/char/tuner.c Wed Jun 2 20:50:16 1999 @@ -84,7 +84,9 @@ // 16*170.00,16*450.00,0xa0,0x90,0x30,0x8e,0xc2,623}, 16*170.00,16*450.00,0x02,0x04,0x01,0x8e,0xc2,623}, {"Temic 4036 FY5 NTSC", TEMIC, NTSC, - 16*157.25,16*463.25,0xa0,0x90,0x30,0x8e,0xc2,732}, + 16*157.25,16*463.25,0xa0,0x90,0x30,0x8e,0xc2,732}, + {"Alps HSBH1", TEMIC, NTSC, + 16*137.25,16*385.25,0x01,0x02,0x08,0x8e,0xc2,732}, }; /* ---------------------------------------------------------------------- */ diff -r -u linux-ia32/2.3.5.clean/drivers/char/tuner.h linux/drivers/char/tuner.h --- linux-ia32/2.3.5.clean/drivers/char/tuner.h Sun Nov 8 15:36:46 1998 +++ linux/drivers/char/tuner.h Wed Jun 2 20:51:25 1999 @@ -31,6 +31,7 @@ #define TUNER_TEMIC_NTSC 6 #define TUNER_TEMIC_PAL_I 7 #define TUNER_TEMIC_4036FY5_NTSC 8 +#define TUNER_ALPS_TSBH1_NTSC 9 #define NOTUNER 0 #define PAL 1
|  |