sound/soc/codecs/rt711.h

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

File Facts

System
Linux kernel
Corpus path
sound/soc/codecs/rt711.h
Extension
.h
Size
8563 bytes
Lines
252
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  rt711_priv {
	struct regmap *regmap;
	struct regmap *sdw_regmap;
	struct snd_soc_component *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 work_struct calibration_work;
	struct mutex calibrate_mutex; /* for headset calibration */
	int jack_type, jd_src;
	struct mutex disable_irq_lock; /* imp-def irq lock protection */
	bool disable_irq;
};

/* NID */
#define RT711_AUDIO_FUNCTION_GROUP			0x01
#define RT711_DAC_OUT2					0x03
#define RT711_ADC_IN1					0x09
#define RT711_ADC_IN2					0x08
#define RT711_DMIC1					0x12
#define RT711_DMIC2					0x13
#define RT711_MIC2					0x19
#define RT711_LINE1					0x1a
#define RT711_LINE2					0x1b
#define RT711_BEEP					0x1d
#define RT711_VENDOR_REG				0x20
#define RT711_HP_OUT					0x21
#define RT711_MIXER_IN1					0x22
#define RT711_MIXER_IN2					0x23
#define RT711_INLINE_CMD				0x55
#define RT711_VENDOR_CALI				0x58
#define RT711_VENDOR_IMS_DRE			0x5b

/* Index (NID:20h) */
#define RT711_DAC_DC_CALI_CTL1				0x00
#define RT711_JD_CTL1				0x08
#define RT711_JD_CTL2				0x09
#define RT711_JD_CTL4				0x0b
#define RT711_CC_DET1				0x11
#define RT711_PARA_VERB_CTL				0x1a
#define RT711_COMBO_JACK_AUTO_CTL1				0x45
#define RT711_COMBO_JACK_AUTO_CTL2				0x46
#define RT711_INLINE_CMD_CTL				0x48
#define RT711_DIGITAL_MISC_CTRL4			0x4a
#define RT711_VREFOUT_CTL				0x6b
#define RT711_FSM_CTL				0x6f
#define RT711_IRQ_FLAG_TABLE1				0x80
#define RT711_IRQ_FLAG_TABLE2				0x81
#define RT711_IRQ_FLAG_TABLE3				0x82
#define RT711_TX_RX_MUX_CTL				0x91

/* Index (NID:5bh) */
#define RT711_IMS_DIGITAL_CTL1				0x00
#define RT711_HP_IMS_RESULT_L				0x20
#define RT711_HP_IMS_RESULT_R				0x21

/* Verb */
#define RT711_VERB_SET_CONNECT_SEL			0x3100
#define RT711_VERB_SET_EAPD_BTLENABLE			0x3c00
#define RT711_VERB_GET_CONNECT_SEL			0xb100
#define RT711_VERB_SET_POWER_STATE			0x3500
#define RT711_VERB_SET_CHANNEL_STREAMID			0x3600
#define RT711_VERB_SET_PIN_WIDGET_CONTROL		0x3700
#define RT711_VERB_SET_UNSOLICITED_ENABLE		0x3800
#define RT711_SET_AMP_GAIN_MUTE_H			0x7300
#define RT711_SET_AMP_GAIN_MUTE_L			0x8380
#define RT711_VERB_GET_POWER_STATE			0xb500
#define RT711_VERB_GET_CHANNEL_STREAMID			0xb600
#define RT711_VERB_GET_PIN_SENSE			0xb900
#define RT711_FUNC_RESET			0xff01

#define RT711_READ_HDA_3				0x2012
#define RT711_READ_HDA_2				0x2013
#define RT711_READ_HDA_1				0x2014
#define RT711_READ_HDA_0				0x2015
#define RT711_PRIV_INDEX_W_H				0x7500
#define RT711_PRIV_INDEX_W_L				0x8580
#define RT711_PRIV_DATA_W_H				0x7400
#define RT711_PRIV_DATA_W_L				0x8480
#define RT711_PRIV_INDEX_R_H				0x9d00
#define RT711_PRIV_INDEX_R_L				0xad80
#define RT711_PRIV_DATA_R_H				0x9c00
#define RT711_PRIV_DATA_R_L				0xac80
#define RT711_DAC_FORMAT_H				0x7203
#define RT711_DAC_FORMAT_L				0x8283
#define RT711_ADC1_FORMAT_H				0x7209

Annotation

Implementation Notes