sound/soc/codecs/tfa9879.h

Source file repositories/reference/linux-study-clean/sound/soc/codecs/tfa9879.h

File Facts

System
Linux kernel
Corpus path
sound/soc/codecs/tfa9879.h
Extension
.h
Size
6031 bytes
Lines
198
Domain
Driver Families
Bucket
sound/soc
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef _TFA9879_H
#define _TFA9879_H

#define TFA9879_DEVICE_CONTROL		0x00
#define TFA9879_SERIAL_INTERFACE_1	0x01
#define TFA9879_PCM_IOM2_FORMAT_1	0x02
#define TFA9879_SERIAL_INTERFACE_2	0x03
#define TFA9879_PCM_IOM2_FORMAT_2	0x04
#define TFA9879_EQUALIZER_A1		0x05
#define TFA9879_EQUALIZER_A2		0x06
#define TFA9879_EQUALIZER_B1		0x07
#define TFA9879_EQUALIZER_B2		0x08
#define TFA9879_EQUALIZER_C1		0x09
#define TFA9879_EQUALIZER_C2		0x0a
#define TFA9879_EQUALIZER_D1		0x0b
#define TFA9879_EQUALIZER_D2		0x0c
#define TFA9879_EQUALIZER_E1		0x0d
#define TFA9879_EQUALIZER_E2		0x0e
#define TFA9879_BYPASS_CONTROL		0x0f
#define TFA9879_DYNAMIC_RANGE_COMPR	0x10
#define TFA9879_BASS_TREBLE		0x11
#define TFA9879_HIGH_PASS_FILTER	0x12
#define TFA9879_VOLUME_CONTROL		0x13
#define TFA9879_MISC_CONTROL		0x14
#define TFA9879_MISC_STATUS		0x15

/* TFA9879_DEVICE_CONTROL */
#define TFA9879_INPUT_SEL_MASK		0x0010
#define TFA9879_INPUT_SEL_SHIFT		4
#define TFA9879_OPMODE_MASK		0x0008
#define TFA9879_OPMODE_SHIFT		3
#define TFA9879_RESET_MASK		0x0002
#define TFA9879_RESET_SHIFT		1
#define TFA9879_POWERUP_MASK		0x0001
#define TFA9879_POWERUP_SHIFT		0

/* TFA9879_SERIAL_INTERFACE */
#define TFA9879_MONO_SEL_MASK		0x0c00
#define TFA9879_MONO_SEL_SHIFT		10
#define TFA9879_MONO_SEL_LEFT		0
#define TFA9879_MONO_SEL_RIGHT		1
#define TFA9879_MONO_SEL_BOTH		2
#define TFA9879_I2S_FS_MASK		0x03c0
#define TFA9879_I2S_FS_SHIFT		6
#define TFA9879_I2S_FS_8000		0
#define TFA9879_I2S_FS_11025		1
#define TFA9879_I2S_FS_12000		2
#define TFA9879_I2S_FS_16000		3
#define TFA9879_I2S_FS_22050		4
#define TFA9879_I2S_FS_24000		5
#define TFA9879_I2S_FS_32000		6
#define TFA9879_I2S_FS_44100		7
#define TFA9879_I2S_FS_48000		8
#define TFA9879_I2S_FS_64000		9
#define TFA9879_I2S_FS_88200		10
#define TFA9879_I2S_FS_96000		11
#define TFA9879_I2S_SET_MASK		0x0038
#define TFA9879_I2S_SET_SHIFT		3
#define TFA9879_I2S_SET_MSB_J_24	2
#define TFA9879_I2S_SET_I2S_24		3
#define TFA9879_I2S_SET_LSB_J_16	4
#define TFA9879_I2S_SET_LSB_J_18	5
#define TFA9879_I2S_SET_LSB_J_20	6
#define TFA9879_I2S_SET_LSB_J_24	7
#define TFA9879_SCK_POL_MASK		0x0004
#define TFA9879_SCK_POL_SHIFT		2
#define TFA9879_SCK_POL_NORMAL		0
#define TFA9879_SCK_POL_INVERSE		1
#define TFA9879_I_MODE_MASK		0x0003
#define TFA9879_I_MODE_SHIFT		0
#define TFA9879_I_MODE_I2S		0
#define TFA9879_I_MODE_PCM_IOM2_SHORT	1
#define TFA9879_I_MODE_PCM_IOM2_LONG	2

/* TFA9879_PCM_IOM2_FORMAT */
#define TFA9879_PCM_FS_MASK		0x0800
#define TFA9879_PCM_FS_SHIFT		11
#define TFA9879_A_LAW_MASK		0x0400
#define TFA9879_A_LAW_SHIFT		10
#define TFA9879_PCM_COMP_MASK		0x0200
#define TFA9879_PCM_COMP_SHIFT		9
#define TFA9879_PCM_DL_MASK		0x0100
#define TFA9879_PCM_DL_SHIFT		8
#define TFA9879_D1_SLOT_MASK		0x00f0
#define TFA9879_D1_SLOT_SHIFT		4
#define TFA9879_D2_SLOT_MASK		0x000f
#define TFA9879_D2_SLOT_SHIFT		0

/* TFA9879_EQUALIZER_X1 */
#define TFA9879_T1_MASK			0x8000

Annotation

Implementation Notes