sound/soc/codecs/rt712-sdca.h

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

File Facts

System
Linux kernel
Corpus path
sound/soc/codecs/rt712-sdca.h
Extension
.h
Size
7625 bytes
Lines
262
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

struct  rt712_sdca_priv {
	struct regmap *regmap;
	struct regmap *mbq_regmap;
	struct snd_soc_component *component;
	struct snd_soc_component *dmic_component;
	struct sdw_slave *slave;
	struct sdw_bus_params params;
	bool hw_init;
	bool first_hw_init;
	struct snd_soc_jack *hs_jack;
	struct delayed_work jack_detect_work;
	struct delayed_work jack_btn_check_work;
	struct mutex calibrate_mutex; /* for headset calibration */
	struct mutex disable_irq_lock; /* SDCA irq lock protection */
	bool disable_irq;
	int jack_type;
	int jd_src;
	unsigned int scp_sdca_stat1;
	unsigned int scp_sdca_stat2;
	unsigned int hw_id;
	unsigned int version_id;
	bool dmic_function_found;
	bool fu0f_dapm_mute;
	bool fu0f_mixer_l_mute;
	bool fu0f_mixer_r_mute;
	bool fu1e_dapm_mute;
	bool fu1e_mixer_mute[4];
	bool fu05_dapm_mute;
	bool fu05_mixer_l_mute;
	bool fu05_mixer_r_mute;
};

struct rt712_dmic_kctrl_priv {
	unsigned int reg_base;
	unsigned int count;
	unsigned int max;
	unsigned int invert;
};

/* SDCA (Channel) */
#define CH_01	0x01
#define CH_02	0x02
#define CH_03	0x03
#define CH_04	0x04

/* NID */
#define RT712_VENDOR_REG			0x20
#define RT712_EQ_CTRL				0x53
#define RT712_CHARGE_PUMP			0x57
#define RT712_VENDOR_CALI			0x58
#define RT712_ULTRA_SOUND_DET			0x59
#define RT712_VENDOR_IMS_DRE			0x5b
#define RT712_VENDOR_ANALOG_CTL			0x5f
#define RT712_VENDOR_HDA_CTL			0x61

/* Index (NID:20h) */
#define RT712_JD_PRODUCT_NUM			0x00
#define RT712_ANALOG_BIAS_CTL3			0x04
#define RT712_JD_CTL1				0x09
#define RT712_IO_CTL				0x0c
#define RT712_LDO2_3_CTL1			0x0e
#define RT712_PARA_VERB_CTL			0x1a
#define RT712_CC_DET1				0x24
#define RT712_CLASSD_AMP_CTL1			0x37
#define RT712_CLASSD_AMP_CTL6			0x3c
#define RT712_COMBO_JACK_AUTO_CTL1		0x45
#define RT712_COMBO_JACK_AUTO_CTL2		0x46
#define RT712_COMBO_JACK_AUTO_CTL3		0x47
#define RT712_DIGITAL_MISC_CTRL4		0x4a
#define RT712_FSM_CTL				0x67
#define RT712_SW_CONFIG1			0x8a
#define RT712_SW_CONFIG2			0x8b

/* Index (NID:57h) */
#define RT712_HP_DET_CTL3			0x0c

/* Index (NID:58h) */
#define RT712_DAC_DC_CALI_CTL1			0x00
#define RT712_DAC_DC_CALI_CTL2			0x01

/* Index (NID:59h) */
#define RT712_ULTRA_SOUND_DETECTOR6		0x1e

/* Index (NID:5bh) */
#define RT712_IMS_DIGITAL_CTL1			0x00
#define RT712_IMS_DIGITAL_CTL5			0x05
#define RT712_SEL_VEE2_HP_CTL1			0x23
#define RT712_HP_DETECT_RLDET_CTL1		0x29
#define RT712_HP_DETECT_RLDET_CTL2		0x2a

Annotation

Implementation Notes