Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions
tvaudio.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/videodev2.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/kthread.h>
#include <linux/freezer.h>
#include <media/tvaudio.h>
#include <media/v4l2-device.h>
#include <media/v4l2-chip-ident.h>
#include <media/i2c-addr.h>

Go to the source code of this file.

Data Structures

struct  AUDIOCMD
 
struct  CHIPDESC
 
struct  CHIPSTATE
 
struct  tda9874a_MODES
 

Macros

#define UNSET   (-1U)
 
#define MAXREGS   256
 
#define CHIP_HAS_VOLUME   1
 
#define CHIP_HAS_BASSTREBLE   2
 
#define CHIP_HAS_INPUTSEL   4
 
#define CHIP_NEED_CHECKMODE   8
 
#define TDA9840_SW   0x00
 
#define TDA9840_LVADJ   0x02
 
#define TDA9840_STADJ   0x03
 
#define TDA9840_TEST   0x04
 
#define TDA9840_MONO   0x10
 
#define TDA9840_STEREO   0x2a
 
#define TDA9840_DUALA   0x12
 
#define TDA9840_DUALB   0x1e
 
#define TDA9840_DUALAB   0x1a
 
#define TDA9840_DUALBA   0x16
 
#define TDA9840_EXTERNAL   0x7a
 
#define TDA9840_DS_DUAL   0x20 /* Dual sound identified */
 
#define TDA9840_ST_STEREO   0x40 /* Stereo sound identified */
 
#define TDA9840_PONRES   0x80 /* Power-on reset detected if = 1 */
 
#define TDA9840_TEST_INT1SN   0x1 /* Integration time 0.5s when set */
 
#define TDA9840_TEST_INTFU   0x02 /* Disables integrator function */
 
#define TDA9855_VR   0x00 /* Volume, right */
 
#define TDA9855_VL   0x01 /* Volume, left */
 
#define TDA9855_BA   0x02 /* Bass */
 
#define TDA9855_TR   0x03 /* Treble */
 
#define TDA9855_SW   0x04 /* Subwoofer - not connected on DTV2000 */
 
#define TDA9850_C4   0x04 /* Control 1 for TDA9850 */
 
#define TDA985x_C5   0x05 /* Control 2 for TDA9850, Control 1 for TDA9855 */
 
#define TDA985x_C6   0x06 /* Control 3 for TDA9850, Control 2 for TDA9855 */
 
#define TDA985x_C7   0x07 /* Control 4 for TDA9850, Control 3 for TDA9855 */
 
#define TDA985x_A1   0x08 /* Alignment 1 for both chips */
 
#define TDA985x_A2   0x09 /* Alignment 2 for both chips */
 
#define TDA985x_A3   0x0a /* Alignment 3 for both chips */
 
#define TDA9855_MUTE   1<<7 /* GMU, Mute at outputs */
 
#define TDA9855_AVL   1<<6 /* AVL, Automatic Volume Level */
 
#define TDA9855_LOUD   1<<5 /* Loudness, 1==off */
 
#define TDA9855_SUR   1<<3 /* Surround / Subwoofer 1==.5(L-R) 0==.5(L+R) */
 
#define TDA9855_EXT   1<<2 /* Selects inputs LIR and LIL. Pins 41 & 12 */
 
#define TDA9855_INT   0 /* Selects inputs LOR and LOL. (internal) */
 
#define TDA985x_SAP   3<<6 /* Selects SAP output, mute if not received */
 
#define TDA985x_MONOSAP   2<<6 /* Selects Mono on left, SAP on right */
 
#define TDA985x_STEREO   1<<6 /* Selects Stereo ouput, mono if not received */
 
#define TDA985x_MONO   0 /* Forces Mono output */
 
#define TDA985x_LMU   1<<3 /* Mute (LOR/LOL for 9855, OUTL/OUTR for 9850) */
 
#define TDA9855_TZCM   1<<5 /* If set, don't mute till zero crossing */
 
#define TDA9855_VZCM   1<<4 /* If set, don't change volume till zero crossing*/
 
#define TDA9855_LINEAR   0 /* Linear Stereo */
 
#define TDA9855_PSEUDO   1 /* Pseudo Stereo */
 
#define TDA9855_SPAT_30   2 /* Spatial Stereo, 30% anti-phase crosstalk */
 
#define TDA9855_SPAT_50   3 /* Spatial Stereo, 52% anti-phase crosstalk */
 
#define TDA9855_E_MONO   7 /* Forced mono - mono select elseware, so useless*/
 
#define TDA985x_STP   1<<5 /* Stereo Pilot/detect (read-only) */
 
#define TDA985x_SAPP   1<<6 /* SAP Pilot/detect (read-only) */
 
#define TDA985x_STS   1<<7 /* Stereo trigger 1= <35mV 0= <30mV (write-only)*/
 
#define TDA985x_ADJ   1<<7 /* Stereo adjust on/off (wideband and spectral */
 
#define TDA9873_SW   0x00 /* Switching */
 
#define TDA9873_AD   0x01 /* Adjust */
 
#define TDA9873_PT   0x02 /* Port */
 
#define TDA9873_INP_MASK   3
 
#define TDA9873_INTERNAL   0
 
#define TDA9873_EXT_STEREO   2
 
#define TDA9873_EXT_MONO   1
 
#define TDA9873_TR_MASK   (7 << 2)
 
#define TDA9873_TR_MONO   4
 
#define TDA9873_TR_STEREO   1 << 4
 
#define TDA9873_TR_REVERSE   ((1 << 3) | (1 << 2))
 
#define TDA9873_TR_DUALA   1 << 2
 
#define TDA9873_TR_DUALB   1 << 3
 
#define TDA9873_TR_DUALAB   0
 
#define TDA9873_GAIN_NORMAL   1 << 5
 
#define TDA9873_MUTE   1 << 6
 
#define TDA9873_AUTOMUTE   1 << 7
 
#define TDA9873_STEREO_ADJ   0x06 /* 0dB gain */
 
#define TDA9873_BG   0
 
#define TDA9873_M   1
 
#define TDA9873_DK1   2
 
#define TDA9873_DK2   3
 
#define TDA9873_DK3   4
 
#define TDA9873_I   5
 
#define TDA9873_IDR_NORM   0
 
#define TDA9873_IDR_FAST   1 << 7
 
#define TDA9873_PORTS   3
 
#define TDA9873_TST_PORT   1 << 2
 
#define TDA9873_MOUT_MONO   0
 
#define TDA9873_MOUT_FMONO   0
 
#define TDA9873_MOUT_DUALA   0
 
#define TDA9873_MOUT_DUALB   1 << 3
 
#define TDA9873_MOUT_ST   1 << 4
 
#define TDA9873_MOUT_EXTM   ((1 << 4) | (1 << 3))
 
#define TDA9873_MOUT_EXTL   1 << 5
 
#define TDA9873_MOUT_EXTR   ((1 << 5) | (1 << 3))
 
#define TDA9873_MOUT_EXTLR   ((1 << 5) | (1 << 4))
 
#define TDA9873_MOUT_MUTE   ((1 << 5) | (1 << 4) | (1 << 3))
 
#define TDA9873_PONR   0 /* Power-on reset detected if = 1 */
 
#define TDA9873_STEREO   2 /* Stereo sound is identified */
 
#define TDA9873_DUAL   4 /* Dual sound is identified */
 
#define TDA9874A_AGCGR   0x00 /* AGC gain */
 
#define TDA9874A_GCONR   0x01 /* general config */
 
#define TDA9874A_MSR   0x02 /* monitor select */
 
#define TDA9874A_C1FRA   0x03 /* carrier 1 freq. */
 
#define TDA9874A_C1FRB   0x04 /* carrier 1 freq. */
 
#define TDA9874A_C1FRC   0x05 /* carrier 1 freq. */
 
#define TDA9874A_C2FRA   0x06 /* carrier 2 freq. */
 
#define TDA9874A_C2FRB   0x07 /* carrier 2 freq. */
 
#define TDA9874A_C2FRC   0x08 /* carrier 2 freq. */
 
#define TDA9874A_DCR   0x09 /* demodulator config */
 
#define TDA9874A_FMER   0x0a /* FM de-emphasis */
 
#define TDA9874A_FMMR   0x0b /* FM dematrix */
 
#define TDA9874A_C1OLAR   0x0c /* ch.1 output level adj. */
 
#define TDA9874A_C2OLAR   0x0d /* ch.2 output level adj. */
 
#define TDA9874A_NCONR   0x0e /* NICAM config */
 
#define TDA9874A_NOLAR   0x0f /* NICAM output level adj. */
 
#define TDA9874A_NLELR   0x10 /* NICAM lower error limit */
 
#define TDA9874A_NUELR   0x11 /* NICAM upper error limit */
 
#define TDA9874A_AMCONR   0x12 /* audio mute control */
 
#define TDA9874A_SDACOSR   0x13 /* stereo DAC output select */
 
#define TDA9874A_AOSR   0x14 /* analog output select */
 
#define TDA9874A_DAICONR   0x15 /* digital audio interface config */
 
#define TDA9874A_I2SOSR   0x16 /* I2S-bus output select */
 
#define TDA9874A_I2SOLAR   0x17 /* I2S-bus output level adj. */
 
#define TDA9874A_MDACOSR   0x18 /* mono DAC output select (tda9874a) */
 
#define TDA9874A_ESP   0xFF /* easy standard progr. (tda9874a) */
 
#define TDA9874A_DSR   0x00 /* device status */
 
#define TDA9874A_NSR   0x01 /* NICAM status */
 
#define TDA9874A_NECR   0x02 /* NICAM error count */
 
#define TDA9874A_DR1   0x03 /* add. data LSB */
 
#define TDA9874A_DR2   0x04 /* add. data MSB */
 
#define TDA9874A_LLRA   0x05 /* monitor level read-out LSB */
 
#define TDA9874A_LLRB   0x06 /* monitor level read-out MSB */
 
#define TDA9874A_SIFLR   0x07 /* SIF level */
 
#define TDA9874A_TR2   252 /* test reg. 2 */
 
#define TDA9874A_TR1   253 /* test reg. 1 */
 
#define TDA9874A_DIC   254 /* device id. code */
 
#define TDA9874A_SIC   255 /* software id. code */
 
#define TDA9875_MUT   0x12 /*General mute (value --> 0b11001100*/
 
#define TDA9875_CFG   0x01 /* Config register (value --> 0b00000000 */
 
#define TDA9875_DACOS   0x13 /*DAC i/o select (ADC) 0b0000100*/
 
#define TDA9875_LOSR   0x16 /*Line output select regirter 0b0100 0001*/
 
#define TDA9875_CH1V   0x0c /*Channel 1 volume (mute)*/
 
#define TDA9875_CH2V   0x0d /*Channel 2 volume (mute)*/
 
#define TDA9875_SC1   0x14 /*SCART 1 in (mono)*/
 
#define TDA9875_SC2   0x15 /*SCART 2 in (mono)*/
 
#define TDA9875_ADCIS   0x17 /*ADC input select (mono) 0b0110 000*/
 
#define TDA9875_AER   0x19 /*Audio effect (AVL+Pseudo) 0b0000 0110*/
 
#define TDA9875_MCS   0x18 /*Main channel select (DAC) 0b0000100*/
 
#define TDA9875_MVL   0x1a /* Main volume gauche */
 
#define TDA9875_MVR   0x1b /* Main volume droite */
 
#define TDA9875_MBA   0x1d /* Main Basse */
 
#define TDA9875_MTR   0x1e /* Main treble */
 
#define TDA9875_ACS   0x1f /* Auxiliary channel select (FM) 0b0000000*/
 
#define TDA9875_AVL   0x20 /* Auxiliary volume gauche */
 
#define TDA9875_AVR   0x21 /* Auxiliary volume droite */
 
#define TDA9875_ABA   0x22 /* Auxiliary Basse */
 
#define TDA9875_ATR   0x23 /* Auxiliary treble */
 
#define TDA9875_MSR   0x02 /* Monitor select register */
 
#define TDA9875_C1MSB   0x03 /* Carrier 1 (FM) frequency register MSB */
 
#define TDA9875_C1MIB   0x04 /* Carrier 1 (FM) frequency register (16-8]b */
 
#define TDA9875_C1LSB   0x05 /* Carrier 1 (FM) frequency register LSB */
 
#define TDA9875_C2MSB   0x06 /* Carrier 2 (nicam) frequency register MSB */
 
#define TDA9875_C2MIB   0x07 /* Carrier 2 (nicam) frequency register (16-8]b */
 
#define TDA9875_C2LSB   0x08 /* Carrier 2 (nicam) frequency register LSB */
 
#define TDA9875_DCR   0x09 /* Demodulateur configuration regirter*/
 
#define TDA9875_DEEM   0x0a /* FM de-emphasis regirter*/
 
#define TDA9875_FMAT   0x0b /* FM Matrix regirter*/
 
#define TDA9875_MUTE_ON   0xff /* general mute */
 
#define TDA9875_MUTE_OFF   0xcc /* general no mute */
 
#define TEA6300_VL   0x00 /* volume left */
 
#define TEA6300_VR   0x01 /* volume right */
 
#define TEA6300_BA   0x02 /* bass */
 
#define TEA6300_TR   0x03 /* treble */
 
#define TEA6300_FA   0x04 /* fader control */
 
#define TEA6300_S   0x05 /* switch register */
 
#define TEA6300_S_SA   0x01 /* stereo A input */
 
#define TEA6300_S_SB   0x02 /* stereo B */
 
#define TEA6300_S_SC   0x04 /* stereo C */
 
#define TEA6300_S_GMU   0x80 /* general mute */
 
#define TEA6320_V   0x00 /* volume (0-5)/loudness off (6)/zero crossing mute(7) */
 
#define TEA6320_FFR   0x01 /* fader front right (0-5) */
 
#define TEA6320_FFL   0x02 /* fader front left (0-5) */
 
#define TEA6320_FRR   0x03 /* fader rear right (0-5) */
 
#define TEA6320_FRL   0x04 /* fader rear left (0-5) */
 
#define TEA6320_BA   0x05 /* bass (0-4) */
 
#define TEA6320_TR   0x06 /* treble (0-4) */
 
#define TEA6320_S   0x07 /* switch register */
 
#define TEA6320_S_SA   0x07 /* stereo A input */
 
#define TEA6320_S_SB   0x06 /* stereo B */
 
#define TEA6320_S_SC   0x05 /* stereo C */
 
#define TEA6320_S_SD   0x04 /* stereo D */
 
#define TEA6320_S_GMU   0x80 /* general mute */
 
#define TEA6420_S_SA   0x00 /* stereo A input */
 
#define TEA6420_S_SB   0x01 /* stereo B */
 
#define TEA6420_S_SC   0x02 /* stereo C */
 
#define TEA6420_S_SD   0x03 /* stereo D */
 
#define TEA6420_S_SE   0x04 /* stereo E */
 
#define TEA6420_S_GMU   0x05 /* general mute */
 
#define TDA8425_VL   0x00 /* volume left */
 
#define TDA8425_VR   0x01 /* volume right */
 
#define TDA8425_BA   0x02 /* bass */
 
#define TDA8425_TR   0x03 /* treble */
 
#define TDA8425_S1   0x08 /* switch functions */
 
#define TDA8425_S1_OFF   0xEE /* audio off (mute on) */
 
#define TDA8425_S1_CH1   0xCE /* audio channel 1 (mute off) - "linear stereo" mode */
 
#define TDA8425_S1_CH2   0xCF /* audio channel 2 (mute off) - "linear stereo" mode */
 
#define TDA8425_S1_MU   0x20 /* mute bit */
 
#define TDA8425_S1_STEREO   0x18 /* stereo bits */
 
#define TDA8425_S1_STEREO_SPATIAL   0x18 /* spatial stereo */
 
#define TDA8425_S1_STEREO_LINEAR   0x08 /* linear stereo */
 
#define TDA8425_S1_STEREO_PSEUDO   0x10 /* pseudo stereo */
 
#define TDA8425_S1_STEREO_MONO   0x00 /* forced mono */
 
#define TDA8425_S1_ML   0x06 /* language selector */
 
#define TDA8425_S1_ML_SOUND_A   0x02 /* sound a */
 
#define TDA8425_S1_ML_SOUND_B   0x04 /* sound b */
 
#define TDA8425_S1_ML_STEREO   0x06 /* stereo */
 
#define TDA8425_S1_IS   0x01 /* channel selector */
 
#define PIC16C54_REG_KEY_CODE   0x01 /* Not use. */
 
#define PIC16C54_REG_MISC   0x02
 
#define PIC16C54_MISC_RESET_REMOTE_CTL   0x01 /* bit 0, Reset to receive the key */
 
#define PIC16C54_MISC_MTS_MAIN   0x02 /* bit 1 */
 
#define PIC16C54_MISC_MTS_SAP   0x04 /* bit 2 */
 
#define PIC16C54_MISC_MTS_BOTH   0x08 /* bit 3 */
 
#define PIC16C54_MISC_SND_MUTE   0x10 /* bit 4, Mute Audio(Line-in and Tuner) */
 
#define PIC16C54_MISC_SND_NOTMUTE   0x20 /* bit 5 */
 
#define PIC16C54_MISC_SWITCH_TUNER   0x40 /* bit 6 , Switch to Line-in */
 
#define PIC16C54_MISC_SWITCH_LINE   0x80 /* bit 7 , Switch to Tuner */
 
#define TA8874Z_LED_STE   0x80
 
#define TA8874Z_LED_BIL   0x40
 
#define TA8874Z_LED_EXT   0x20
 
#define TA8874Z_MONO_SET   0x10
 
#define TA8874Z_MUTE   0x08
 
#define TA8874Z_F_MONO   0x04
 
#define TA8874Z_MODE_SUB   0x02
 
#define TA8874Z_MODE_MAIN   0x01
 
#define TA8874Z_SEPARATION   0x3f
 
#define TA8874Z_SEPARATION_DEFAULT   0x10
 
#define TA8874Z_B1   0x80
 
#define TA8874Z_B0   0x40
 
#define TA8874Z_CHAG_FLAG   0x20
 

Typedefs

typedef int(* getvalue )(int)
 
typedef int(* checkit )(struct CHIPSTATE *)
 
typedef int(* initialize )(struct CHIPSTATE *)
 
typedef int(* getrxsubchans )(struct CHIPSTATE *)
 
typedef void(* setaudmode )(struct CHIPSTATE *, int mode)
 
typedef struct AUDIOCMD audiocmd
 

Functions

 module_param (debug, int, 0644)
 
 MODULE_DESCRIPTION ("device driver for various i2c TV sound decoder / audiomux chips")
 
 MODULE_AUTHOR ("Eric Sandeen, Steve VanDeBogart, Greg Alexander, Gerd Knorr")
 
 MODULE_LICENSE ("GPL")
 
 module_param (tda9874a_SIF, int, 0444)
 
 module_param (tda9874a_AMSEL, int, 0444)
 
 module_param (tda9874a_STD, int, 0444)
 
 module_param (tda8425, int, 0444)
 
 module_param (tda9840, int, 0444)
 
 module_param (tda9850, int, 0444)
 
 module_param (tda9855, int, 0444)
 
 module_param (tda9873, int, 0444)
 
 module_param (tda9874a, int, 0444)
 
 module_param (tda9875, int, 0444)
 
 module_param (tea6300, int, 0444)
 
 module_param (tea6320, int, 0444)
 
 module_param (tea6420, int, 0444)
 
 module_param (pic16c54, int, 0444)
 
 module_param (ta8874z, int, 0444)
 
 MODULE_DEVICE_TABLE (i2c, tvaudio_id)
 
 module_i2c_driver (tvaudio_driver)
 

Macro Definition Documentation

#define CHIP_HAS_BASSTREBLE   2

Definition at line 86 of file tvaudio.c.

#define CHIP_HAS_INPUTSEL   4

Definition at line 87 of file tvaudio.c.

#define CHIP_HAS_VOLUME   1

Definition at line 85 of file tvaudio.c.

#define CHIP_NEED_CHECKMODE   8

Definition at line 88 of file tvaudio.c.

#define MAXREGS   256

Definition at line 60 of file tvaudio.c.

#define PIC16C54_MISC_MTS_BOTH   0x08 /* bit 3 */

Definition at line 1332 of file tvaudio.c.

#define PIC16C54_MISC_MTS_MAIN   0x02 /* bit 1 */

Definition at line 1330 of file tvaudio.c.

#define PIC16C54_MISC_MTS_SAP   0x04 /* bit 2 */

Definition at line 1331 of file tvaudio.c.

#define PIC16C54_MISC_RESET_REMOTE_CTL   0x01 /* bit 0, Reset to receive the key */

Definition at line 1328 of file tvaudio.c.

#define PIC16C54_MISC_SND_MUTE   0x10 /* bit 4, Mute Audio(Line-in and Tuner) */

Definition at line 1333 of file tvaudio.c.

#define PIC16C54_MISC_SND_NOTMUTE   0x20 /* bit 5 */

Definition at line 1334 of file tvaudio.c.

#define PIC16C54_MISC_SWITCH_LINE   0x80 /* bit 7 , Switch to Tuner */

Definition at line 1336 of file tvaudio.c.

#define PIC16C54_MISC_SWITCH_TUNER   0x40 /* bit 6 , Switch to Line-in */

Definition at line 1335 of file tvaudio.c.

#define PIC16C54_REG_KEY_CODE   0x01 /* Not use. */

Definition at line 1324 of file tvaudio.c.

#define PIC16C54_REG_MISC   0x02

Definition at line 1325 of file tvaudio.c.

#define TA8874Z_B0   0x40

Definition at line 1358 of file tvaudio.c.

#define TA8874Z_B1   0x80

Definition at line 1357 of file tvaudio.c.

#define TA8874Z_CHAG_FLAG   0x20

Definition at line 1359 of file tvaudio.c.

#define TA8874Z_F_MONO   0x04

Definition at line 1347 of file tvaudio.c.

#define TA8874Z_LED_BIL   0x40

Definition at line 1343 of file tvaudio.c.

#define TA8874Z_LED_EXT   0x20

Definition at line 1344 of file tvaudio.c.

#define TA8874Z_LED_STE   0x80

Definition at line 1342 of file tvaudio.c.

#define TA8874Z_MODE_MAIN   0x01

Definition at line 1349 of file tvaudio.c.

#define TA8874Z_MODE_SUB   0x02

Definition at line 1348 of file tvaudio.c.

#define TA8874Z_MONO_SET   0x10

Definition at line 1345 of file tvaudio.c.

#define TA8874Z_MUTE   0x08

Definition at line 1346 of file tvaudio.c.

#define TA8874Z_SEPARATION   0x3f

Definition at line 1353 of file tvaudio.c.

#define TA8874Z_SEPARATION_DEFAULT   0x10

Definition at line 1354 of file tvaudio.c.

#define TDA8425_BA   0x02 /* bass */

Definition at line 1265 of file tvaudio.c.

#define TDA8425_S1   0x08 /* switch functions */

Definition at line 1267 of file tvaudio.c.

#define TDA8425_S1_CH1   0xCE /* audio channel 1 (mute off) - "linear stereo" mode */

Definition at line 1270 of file tvaudio.c.

#define TDA8425_S1_CH2   0xCF /* audio channel 2 (mute off) - "linear stereo" mode */

Definition at line 1271 of file tvaudio.c.

#define TDA8425_S1_IS   0x01 /* channel selector */

Definition at line 1282 of file tvaudio.c.

#define TDA8425_S1_ML   0x06 /* language selector */

Definition at line 1278 of file tvaudio.c.

#define TDA8425_S1_ML_SOUND_A   0x02 /* sound a */

Definition at line 1279 of file tvaudio.c.

#define TDA8425_S1_ML_SOUND_B   0x04 /* sound b */

Definition at line 1280 of file tvaudio.c.

#define TDA8425_S1_ML_STEREO   0x06 /* stereo */

Definition at line 1281 of file tvaudio.c.

#define TDA8425_S1_MU   0x20 /* mute bit */

Definition at line 1272 of file tvaudio.c.

#define TDA8425_S1_OFF   0xEE /* audio off (mute on) */

Definition at line 1269 of file tvaudio.c.

#define TDA8425_S1_STEREO   0x18 /* stereo bits */

Definition at line 1273 of file tvaudio.c.

#define TDA8425_S1_STEREO_LINEAR   0x08 /* linear stereo */

Definition at line 1275 of file tvaudio.c.

#define TDA8425_S1_STEREO_MONO   0x00 /* forced mono */

Definition at line 1277 of file tvaudio.c.

#define TDA8425_S1_STEREO_PSEUDO   0x10 /* pseudo stereo */

Definition at line 1276 of file tvaudio.c.

#define TDA8425_S1_STEREO_SPATIAL   0x18 /* spatial stereo */

Definition at line 1274 of file tvaudio.c.

#define TDA8425_TR   0x03 /* treble */

Definition at line 1266 of file tvaudio.c.

#define TDA8425_VL   0x00 /* volume left */

Definition at line 1263 of file tvaudio.c.

#define TDA8425_VR   0x01 /* volume right */

Definition at line 1264 of file tvaudio.c.

#define TDA9840_DS_DUAL   0x20 /* Dual sound identified */

Definition at line 382 of file tvaudio.c.

#define TDA9840_DUALA   0x12

Definition at line 376 of file tvaudio.c.

#define TDA9840_DUALAB   0x1a

Definition at line 378 of file tvaudio.c.

#define TDA9840_DUALB   0x1e

Definition at line 377 of file tvaudio.c.

#define TDA9840_DUALBA   0x16

Definition at line 379 of file tvaudio.c.

#define TDA9840_EXTERNAL   0x7a

Definition at line 380 of file tvaudio.c.

#define TDA9840_LVADJ   0x02

Definition at line 370 of file tvaudio.c.

#define TDA9840_MONO   0x10

Definition at line 374 of file tvaudio.c.

#define TDA9840_PONRES   0x80 /* Power-on reset detected if = 1 */

Definition at line 384 of file tvaudio.c.

#define TDA9840_ST_STEREO   0x40 /* Stereo sound identified */

Definition at line 383 of file tvaudio.c.

#define TDA9840_STADJ   0x03

Definition at line 371 of file tvaudio.c.

#define TDA9840_STEREO   0x2a

Definition at line 375 of file tvaudio.c.

#define TDA9840_SW   0x00

Definition at line 369 of file tvaudio.c.

#define TDA9840_TEST   0x04

Definition at line 372 of file tvaudio.c.

#define TDA9840_TEST_INT1SN   0x1 /* Integration time 0.5s when set */

Definition at line 386 of file tvaudio.c.

#define TDA9840_TEST_INTFU   0x02 /* Disables integrator function */

Definition at line 387 of file tvaudio.c.

#define TDA9850_C4   0x04 /* Control 1 for TDA9850 */

Definition at line 455 of file tvaudio.c.

#define TDA9855_AVL   1<<6 /* AVL, Automatic Volume Level */

Definition at line 495 of file tvaudio.c.

#define TDA9855_BA   0x02 /* Bass */

Definition at line 450 of file tvaudio.c.

#define TDA9855_E_MONO   7 /* Forced mono - mono select elseware, so useless*/

Definition at line 524 of file tvaudio.c.

#define TDA9855_EXT   1<<2 /* Selects inputs LIR and LIL. Pins 41 & 12 */

Definition at line 501 of file tvaudio.c.

#define TDA9855_INT   0 /* Selects inputs LOR and LOL. (internal) */

Definition at line 502 of file tvaudio.c.

#define TDA9855_LINEAR   0 /* Linear Stereo */

Definition at line 520 of file tvaudio.c.

#define TDA9855_LOUD   1<<5 /* Loudness, 1==off */

Definition at line 496 of file tvaudio.c.

#define TDA9855_MUTE   1<<7 /* GMU, Mute at outputs */

Definition at line 494 of file tvaudio.c.

#define TDA9855_PSEUDO   1 /* Pseudo Stereo */

Definition at line 521 of file tvaudio.c.

#define TDA9855_SPAT_30   2 /* Spatial Stereo, 30% anti-phase crosstalk */

Definition at line 522 of file tvaudio.c.

#define TDA9855_SPAT_50   3 /* Spatial Stereo, 52% anti-phase crosstalk */

Definition at line 523 of file tvaudio.c.

#define TDA9855_SUR   1<<3 /* Surround / Subwoofer 1==.5(L-R) 0==.5(L+R) */

Definition at line 497 of file tvaudio.c.

#define TDA9855_SW   0x04 /* Subwoofer - not connected on DTV2000 */

Definition at line 452 of file tvaudio.c.

#define TDA9855_TR   0x03 /* Treble */

Definition at line 451 of file tvaudio.c.

#define TDA9855_TZCM   1<<5 /* If set, don't mute till zero crossing */

Definition at line 518 of file tvaudio.c.

#define TDA9855_VL   0x01 /* Volume, left */

Definition at line 449 of file tvaudio.c.

#define TDA9855_VR   0x00 /* Volume, right */

Definition at line 448 of file tvaudio.c.

#define TDA9855_VZCM   1<<4 /* If set, don't change volume till zero crossing*/

Definition at line 519 of file tvaudio.c.

#define TDA985x_A1   0x08 /* Alignment 1 for both chips */

Definition at line 461 of file tvaudio.c.

#define TDA985x_A2   0x09 /* Alignment 2 for both chips */

Definition at line 462 of file tvaudio.c.

#define TDA985x_A3   0x0a /* Alignment 3 for both chips */

Definition at line 463 of file tvaudio.c.

#define TDA985x_ADJ   1<<7 /* Stereo adjust on/off (wideband and spectral */

Definition at line 543 of file tvaudio.c.

#define TDA985x_C5   0x05 /* Control 2 for TDA9850, Control 1 for TDA9855 */

Definition at line 458 of file tvaudio.c.

#define TDA985x_C6   0x06 /* Control 3 for TDA9850, Control 2 for TDA9855 */

Definition at line 459 of file tvaudio.c.

#define TDA985x_C7   0x07 /* Control 4 for TDA9850, Control 3 for TDA9855 */

Definition at line 460 of file tvaudio.c.

#define TDA985x_LMU   1<<3 /* Mute (LOR/LOL for 9855, OUTL/OUTR for 9850) */

Definition at line 515 of file tvaudio.c.

#define TDA985x_MONO   0 /* Forces Mono output */

Definition at line 514 of file tvaudio.c.

#define TDA985x_MONOSAP   2<<6 /* Selects Mono on left, SAP on right */

Definition at line 512 of file tvaudio.c.

#define TDA985x_SAP   3<<6 /* Selects SAP output, mute if not received */

Definition at line 511 of file tvaudio.c.

#define TDA985x_SAPP   1<<6 /* SAP Pilot/detect (read-only) */

Definition at line 536 of file tvaudio.c.

#define TDA985x_STEREO   1<<6 /* Selects Stereo ouput, mono if not received */

Definition at line 513 of file tvaudio.c.

#define TDA985x_STP   1<<5 /* Stereo Pilot/detect (read-only) */

Definition at line 535 of file tvaudio.c.

#define TDA985x_STS   1<<7 /* Stereo trigger 1= <35mV 0= <30mV (write-only)*/

Definition at line 537 of file tvaudio.c.

#define TDA9873_AD   0x01 /* Adjust */

Definition at line 597 of file tvaudio.c.

#define TDA9873_AUTOMUTE   1 << 7

Definition at line 640 of file tvaudio.c.

#define TDA9873_BG   0

Definition at line 659 of file tvaudio.c.

#define TDA9873_DK1   2

Definition at line 661 of file tvaudio.c.

#define TDA9873_DK2   3

Definition at line 662 of file tvaudio.c.

#define TDA9873_DK3   4

Definition at line 663 of file tvaudio.c.

#define TDA9873_DUAL   4 /* Dual sound is identified */

Definition at line 707 of file tvaudio.c.

#define TDA9873_EXT_MONO   1

Definition at line 611 of file tvaudio.c.

#define TDA9873_EXT_STEREO   2

Definition at line 610 of file tvaudio.c.

#define TDA9873_GAIN_NORMAL   1 << 5

Definition at line 638 of file tvaudio.c.

#define TDA9873_I   5

Definition at line 664 of file tvaudio.c.

#define TDA9873_IDR_FAST   1 << 7

Definition at line 669 of file tvaudio.c.

#define TDA9873_IDR_NORM   0

Definition at line 668 of file tvaudio.c.

#define TDA9873_INP_MASK   3

Definition at line 608 of file tvaudio.c.

#define TDA9873_INTERNAL   0

Definition at line 609 of file tvaudio.c.

#define TDA9873_M   1

Definition at line 660 of file tvaudio.c.

#define TDA9873_MOUT_DUALA   0

Definition at line 695 of file tvaudio.c.

#define TDA9873_MOUT_DUALB   1 << 3

Definition at line 696 of file tvaudio.c.

#define TDA9873_MOUT_EXTL   1 << 5

Definition at line 699 of file tvaudio.c.

#define TDA9873_MOUT_EXTLR   ((1 << 5) | (1 << 4))

Definition at line 701 of file tvaudio.c.

#define TDA9873_MOUT_EXTM   ((1 << 4) | (1 << 3))

Definition at line 698 of file tvaudio.c.

#define TDA9873_MOUT_EXTR   ((1 << 5) | (1 << 3))

Definition at line 700 of file tvaudio.c.

#define TDA9873_MOUT_FMONO   0

Definition at line 694 of file tvaudio.c.

#define TDA9873_MOUT_MONO   0

Definition at line 693 of file tvaudio.c.

#define TDA9873_MOUT_MUTE   ((1 << 5) | (1 << 4) | (1 << 3))

Definition at line 702 of file tvaudio.c.

#define TDA9873_MOUT_ST   1 << 4

Definition at line 697 of file tvaudio.c.

#define TDA9873_MUTE   1 << 6

Definition at line 639 of file tvaudio.c.

#define TDA9873_PONR   0 /* Power-on reset detected if = 1 */

Definition at line 705 of file tvaudio.c.

#define TDA9873_PORTS   3

Definition at line 681 of file tvaudio.c.

#define TDA9873_PT   0x02 /* Port */

Definition at line 598 of file tvaudio.c.

#define TDA9873_STEREO   2 /* Stereo sound is identified */

Definition at line 706 of file tvaudio.c.

#define TDA9873_STEREO_ADJ   0x06 /* 0dB gain */

Definition at line 648 of file tvaudio.c.

#define TDA9873_SW   0x00 /* Switching */

Definition at line 596 of file tvaudio.c.

#define TDA9873_TR_DUALA   1 << 2

Definition at line 628 of file tvaudio.c.

#define TDA9873_TR_DUALAB   0

Definition at line 630 of file tvaudio.c.

#define TDA9873_TR_DUALB   1 << 3

Definition at line 629 of file tvaudio.c.

#define TDA9873_TR_MASK   (7 << 2)

Definition at line 624 of file tvaudio.c.

#define TDA9873_TR_MONO   4

Definition at line 625 of file tvaudio.c.

#define TDA9873_TR_REVERSE   ((1 << 3) | (1 << 2))

Definition at line 627 of file tvaudio.c.

#define TDA9873_TR_STEREO   1 << 4

Definition at line 626 of file tvaudio.c.

#define TDA9873_TST_PORT   1 << 2

Definition at line 684 of file tvaudio.c.

#define TDA9874A_AGCGR   0x00 /* AGC gain */

Definition at line 785 of file tvaudio.c.

#define TDA9874A_AMCONR   0x12 /* audio mute control */

Definition at line 803 of file tvaudio.c.

#define TDA9874A_AOSR   0x14 /* analog output select */

Definition at line 805 of file tvaudio.c.

#define TDA9874A_C1FRA   0x03 /* carrier 1 freq. */

Definition at line 788 of file tvaudio.c.

#define TDA9874A_C1FRB   0x04 /* carrier 1 freq. */

Definition at line 789 of file tvaudio.c.

#define TDA9874A_C1FRC   0x05 /* carrier 1 freq. */

Definition at line 790 of file tvaudio.c.

#define TDA9874A_C1OLAR   0x0c /* ch.1 output level adj. */

Definition at line 797 of file tvaudio.c.

#define TDA9874A_C2FRA   0x06 /* carrier 2 freq. */

Definition at line 791 of file tvaudio.c.

#define TDA9874A_C2FRB   0x07 /* carrier 2 freq. */

Definition at line 792 of file tvaudio.c.

#define TDA9874A_C2FRC   0x08 /* carrier 2 freq. */

Definition at line 793 of file tvaudio.c.

#define TDA9874A_C2OLAR   0x0d /* ch.2 output level adj. */

Definition at line 798 of file tvaudio.c.

#define TDA9874A_DAICONR   0x15 /* digital audio interface config */

Definition at line 806 of file tvaudio.c.

#define TDA9874A_DCR   0x09 /* demodulator config */

Definition at line 794 of file tvaudio.c.

#define TDA9874A_DIC   254 /* device id. code */

Definition at line 823 of file tvaudio.c.

#define TDA9874A_DR1   0x03 /* add. data LSB */

Definition at line 816 of file tvaudio.c.

#define TDA9874A_DR2   0x04 /* add. data MSB */

Definition at line 817 of file tvaudio.c.

#define TDA9874A_DSR   0x00 /* device status */

Definition at line 813 of file tvaudio.c.

#define TDA9874A_ESP   0xFF /* easy standard progr. (tda9874a) */

Definition at line 810 of file tvaudio.c.

#define TDA9874A_FMER   0x0a /* FM de-emphasis */

Definition at line 795 of file tvaudio.c.

#define TDA9874A_FMMR   0x0b /* FM dematrix */

Definition at line 796 of file tvaudio.c.

#define TDA9874A_GCONR   0x01 /* general config */

Definition at line 786 of file tvaudio.c.

#define TDA9874A_I2SOLAR   0x17 /* I2S-bus output level adj. */

Definition at line 808 of file tvaudio.c.

#define TDA9874A_I2SOSR   0x16 /* I2S-bus output select */

Definition at line 807 of file tvaudio.c.

#define TDA9874A_LLRA   0x05 /* monitor level read-out LSB */

Definition at line 818 of file tvaudio.c.

#define TDA9874A_LLRB   0x06 /* monitor level read-out MSB */

Definition at line 819 of file tvaudio.c.

#define TDA9874A_MDACOSR   0x18 /* mono DAC output select (tda9874a) */

Definition at line 809 of file tvaudio.c.

#define TDA9874A_MSR   0x02 /* monitor select */

Definition at line 787 of file tvaudio.c.

#define TDA9874A_NCONR   0x0e /* NICAM config */

Definition at line 799 of file tvaudio.c.

#define TDA9874A_NECR   0x02 /* NICAM error count */

Definition at line 815 of file tvaudio.c.

#define TDA9874A_NLELR   0x10 /* NICAM lower error limit */

Definition at line 801 of file tvaudio.c.

#define TDA9874A_NOLAR   0x0f /* NICAM output level adj. */

Definition at line 800 of file tvaudio.c.

#define TDA9874A_NSR   0x01 /* NICAM status */

Definition at line 814 of file tvaudio.c.

#define TDA9874A_NUELR   0x11 /* NICAM upper error limit */

Definition at line 802 of file tvaudio.c.

#define TDA9874A_SDACOSR   0x13 /* stereo DAC output select */

Definition at line 804 of file tvaudio.c.

#define TDA9874A_SIC   255 /* software id. code */

Definition at line 824 of file tvaudio.c.

#define TDA9874A_SIFLR   0x07 /* SIF level */

Definition at line 820 of file tvaudio.c.

#define TDA9874A_TR1   253 /* test reg. 1 */

Definition at line 822 of file tvaudio.c.

#define TDA9874A_TR2   252 /* test reg. 2 */

Definition at line 821 of file tvaudio.c.

#define TDA9875_ABA   0x22 /* Auxiliary Basse */

Definition at line 1123 of file tvaudio.c.

#define TDA9875_ACS   0x1f /* Auxiliary channel select (FM) 0b0000000*/

Definition at line 1120 of file tvaudio.c.

#define TDA9875_ADCIS   0x17 /*ADC input select (mono) 0b0110 000*/

Definition at line 1113 of file tvaudio.c.

#define TDA9875_AER   0x19 /*Audio effect (AVL+Pseudo) 0b0000 0110*/

Definition at line 1114 of file tvaudio.c.

#define TDA9875_ATR   0x23 /* Auxiliary treble */

Definition at line 1124 of file tvaudio.c.

#define TDA9875_AVL   0x20 /* Auxiliary volume gauche */

Definition at line 1121 of file tvaudio.c.

#define TDA9875_AVR   0x21 /* Auxiliary volume droite */

Definition at line 1122 of file tvaudio.c.

#define TDA9875_C1LSB   0x05 /* Carrier 1 (FM) frequency register LSB */

Definition at line 1129 of file tvaudio.c.

#define TDA9875_C1MIB   0x04 /* Carrier 1 (FM) frequency register (16-8]b */

Definition at line 1128 of file tvaudio.c.

#define TDA9875_C1MSB   0x03 /* Carrier 1 (FM) frequency register MSB */

Definition at line 1127 of file tvaudio.c.

#define TDA9875_C2LSB   0x08 /* Carrier 2 (nicam) frequency register LSB */

Definition at line 1132 of file tvaudio.c.

#define TDA9875_C2MIB   0x07 /* Carrier 2 (nicam) frequency register (16-8]b */

Definition at line 1131 of file tvaudio.c.

#define TDA9875_C2MSB   0x06 /* Carrier 2 (nicam) frequency register MSB */

Definition at line 1130 of file tvaudio.c.

#define TDA9875_CFG   0x01 /* Config register (value --> 0b00000000 */

Definition at line 1104 of file tvaudio.c.

#define TDA9875_CH1V   0x0c /*Channel 1 volume (mute)*/

Definition at line 1108 of file tvaudio.c.

#define TDA9875_CH2V   0x0d /*Channel 2 volume (mute)*/

Definition at line 1109 of file tvaudio.c.

#define TDA9875_DACOS   0x13 /*DAC i/o select (ADC) 0b0000100*/

Definition at line 1105 of file tvaudio.c.

#define TDA9875_DCR   0x09 /* Demodulateur configuration regirter*/

Definition at line 1133 of file tvaudio.c.

#define TDA9875_DEEM   0x0a /* FM de-emphasis regirter*/

Definition at line 1134 of file tvaudio.c.

#define TDA9875_FMAT   0x0b /* FM Matrix regirter*/

Definition at line 1135 of file tvaudio.c.

#define TDA9875_LOSR   0x16 /*Line output select regirter 0b0100 0001*/

Definition at line 1106 of file tvaudio.c.

#define TDA9875_MBA   0x1d /* Main Basse */

Definition at line 1118 of file tvaudio.c.

#define TDA9875_MCS   0x18 /*Main channel select (DAC) 0b0000100*/

Definition at line 1115 of file tvaudio.c.

#define TDA9875_MSR   0x02 /* Monitor select register */

Definition at line 1126 of file tvaudio.c.

#define TDA9875_MTR   0x1e /* Main treble */

Definition at line 1119 of file tvaudio.c.

#define TDA9875_MUT   0x12 /*General mute (value --> 0b11001100*/

Definition at line 1103 of file tvaudio.c.

#define TDA9875_MUTE_OFF   0xcc /* general no mute */

Definition at line 1139 of file tvaudio.c.

#define TDA9875_MUTE_ON   0xff /* general mute */

Definition at line 1138 of file tvaudio.c.

#define TDA9875_MVL   0x1a /* Main volume gauche */

Definition at line 1116 of file tvaudio.c.

#define TDA9875_MVR   0x1b /* Main volume droite */

Definition at line 1117 of file tvaudio.c.

#define TDA9875_SC1   0x14 /*SCART 1 in (mono)*/

Definition at line 1110 of file tvaudio.c.

#define TDA9875_SC2   0x15 /*SCART 2 in (mono)*/

Definition at line 1111 of file tvaudio.c.

#define TEA6300_BA   0x02 /* bass */

Definition at line 1210 of file tvaudio.c.

#define TEA6300_FA   0x04 /* fader control */

Definition at line 1212 of file tvaudio.c.

#define TEA6300_S   0x05 /* switch register */

Definition at line 1213 of file tvaudio.c.

#define TEA6300_S_GMU   0x80 /* general mute */

Definition at line 1218 of file tvaudio.c.

#define TEA6300_S_SA   0x01 /* stereo A input */

Definition at line 1215 of file tvaudio.c.

#define TEA6300_S_SB   0x02 /* stereo B */

Definition at line 1216 of file tvaudio.c.

#define TEA6300_S_SC   0x04 /* stereo C */

Definition at line 1217 of file tvaudio.c.

#define TEA6300_TR   0x03 /* treble */

Definition at line 1211 of file tvaudio.c.

#define TEA6300_VL   0x00 /* volume left */

Definition at line 1208 of file tvaudio.c.

#define TEA6300_VR   0x01 /* volume right */

Definition at line 1209 of file tvaudio.c.

#define TEA6320_BA   0x05 /* bass (0-4) */

Definition at line 1225 of file tvaudio.c.

#define TEA6320_FFL   0x02 /* fader front left (0-5) */

Definition at line 1222 of file tvaudio.c.

#define TEA6320_FFR   0x01 /* fader front right (0-5) */

Definition at line 1221 of file tvaudio.c.

#define TEA6320_FRL   0x04 /* fader rear left (0-5) */

Definition at line 1224 of file tvaudio.c.

#define TEA6320_FRR   0x03 /* fader rear right (0-5) */

Definition at line 1223 of file tvaudio.c.

#define TEA6320_S   0x07 /* switch register */

Definition at line 1227 of file tvaudio.c.

#define TEA6320_S_GMU   0x80 /* general mute */

Definition at line 1233 of file tvaudio.c.

#define TEA6320_S_SA   0x07 /* stereo A input */

Definition at line 1229 of file tvaudio.c.

#define TEA6320_S_SB   0x06 /* stereo B */

Definition at line 1230 of file tvaudio.c.

#define TEA6320_S_SC   0x05 /* stereo C */

Definition at line 1231 of file tvaudio.c.

#define TEA6320_S_SD   0x04 /* stereo D */

Definition at line 1232 of file tvaudio.c.

#define TEA6320_TR   0x06 /* treble (0-4) */

Definition at line 1226 of file tvaudio.c.

#define TEA6320_V   0x00 /* volume (0-5)/loudness off (6)/zero crossing mute(7) */

Definition at line 1220 of file tvaudio.c.

#define TEA6420_S_GMU   0x05 /* general mute */

Definition at line 1240 of file tvaudio.c.

#define TEA6420_S_SA   0x00 /* stereo A input */

Definition at line 1235 of file tvaudio.c.

#define TEA6420_S_SB   0x01 /* stereo B */

Definition at line 1236 of file tvaudio.c.

#define TEA6420_S_SC   0x02 /* stereo C */

Definition at line 1237 of file tvaudio.c.

#define TEA6420_S_SD   0x03 /* stereo D */

Definition at line 1238 of file tvaudio.c.

#define TEA6420_S_SE   0x04 /* stereo E */

Definition at line 1239 of file tvaudio.c.

#define UNSET   (-1U)

Definition at line 55 of file tvaudio.c.

Typedef Documentation

typedef int(* checkit)(struct CHIPSTATE *)

Definition at line 64 of file tvaudio.c.

typedef int(* getrxsubchans)(struct CHIPSTATE *)

Definition at line 66 of file tvaudio.c.

typedef int(* getvalue)(int)

Definition at line 63 of file tvaudio.c.

typedef int(* initialize)(struct CHIPSTATE *)

Definition at line 65 of file tvaudio.c.

typedef void(* setaudmode)(struct CHIPSTATE *, int mode)

Definition at line 67 of file tvaudio.c.

Function Documentation

MODULE_AUTHOR ( "Eric  Sandeen,
Steve  VanDeBogart,
Greg  Alexander,
Gerd Knorr"   
)
MODULE_DESCRIPTION ( "device driver for various i2c TV sound decoder / audiomux chips )
MODULE_DEVICE_TABLE ( i2c  ,
tvaudio_id   
)
module_i2c_driver ( tvaudio_driver  )
MODULE_LICENSE ( "GPL"  )
module_param ( debug  ,
int  ,
0644   
)
module_param ( tda9874a_SIF  ,
int  ,
0444   
)
module_param ( tda9874a_AMSEL  ,
int  ,
0444   
)
module_param ( tda9874a_STD  ,
int  ,
0444   
)
module_param ( tda8425  ,
int  ,
0444   
)
module_param ( tda9840  ,
int  ,
0444   
)
module_param ( tda9850  ,
int  ,
0444   
)
module_param ( tda9855  ,
int  ,
0444   
)
module_param ( tda9873  ,
int  ,
0444   
)
module_param ( tda9874a  ,
int  ,
0444   
)
module_param ( tda9875  ,
int  ,
0444   
)
module_param ( tea6300  ,
int  ,
0444   
)
module_param ( tea6320  ,
int  ,
0444   
)
module_param ( tea6420  ,
int  ,
0444   
)
module_param ( pic16c54  ,
int  ,
0444   
)
module_param ( ta8874z  ,
int  ,
0444   
)