sound/soc/codecs/rt700.h

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

File Facts

System
Linux kernel
Corpus path
sound/soc/codecs/rt700.h
Extension
.h
Size
5787 bytes
Lines
172
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  rt700_priv {
	struct snd_soc_component *component;
	struct regmap *regmap;
	struct regmap *sdw_regmap;
	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;
	int jack_type;
	struct mutex disable_irq_lock; /* imp-def irq lock protection */
	bool disable_irq;
};

/* NID */
#define RT700_AUDIO_FUNCTION_GROUP			0x01
#define RT700_DAC_OUT1					0x02
#define RT700_DAC_OUT2					0x03
#define RT700_ADC_IN1					0x09
#define RT700_ADC_IN2					0x08
#define RT700_DMIC1					0x12
#define RT700_DMIC2					0x13
#define RT700_SPK_OUT					0x14
#define RT700_MIC2					0x19
#define RT700_LINE1					0x1a
#define RT700_LINE2					0x1b
#define RT700_BEEP					0x1d
#define RT700_SPDIF					0x1e
#define RT700_VENDOR_REGISTERS				0x20
#define RT700_HP_OUT					0x21
#define RT700_MIXER_IN1					0x22
#define RT700_MIXER_IN2					0x23
#define RT700_INLINE_CMD				0x55

/* Index (NID:20h) */
#define RT700_DAC_DC_CALI_CTL1				0x00
#define RT700_PARA_VERB_CTL				0x1a
#define RT700_COMBO_JACK_AUTO_CTL1				0x45
#define RT700_COMBO_JACK_AUTO_CTL2				0x46
#define RT700_INLINE_CMD_CTL				0x48
#define RT700_DIGITAL_MISC_CTRL4			0x4a
#define RT700_VREFOUT_CTL				0x6b
#define RT700_FSM_CTL				0x6f
#define RT700_IRQ_FLAG_TABLE1				0x80
#define RT700_IRQ_FLAG_TABLE2				0x81
#define RT700_IRQ_FLAG_TABLE3				0x82

/* Verb */
#define RT700_VERB_SET_CONNECT_SEL			0x3100
#define RT700_VERB_SET_EAPD_BTLENABLE			0x3c00
#define RT700_VERB_GET_CONNECT_SEL			0xb100
#define RT700_VERB_SET_POWER_STATE			0x3500
#define RT700_VERB_SET_CHANNEL_STREAMID			0x3600
#define RT700_VERB_SET_PIN_WIDGET_CONTROL		0x3700
#define RT700_VERB_SET_UNSOLICITED_ENABLE		0x3800
#define RT700_SET_AMP_GAIN_MUTE_H			0x7300
#define RT700_SET_AMP_GAIN_MUTE_L			0x8380
#define RT700_VERB_GET_PIN_SENSE			0xb900

#define RT700_READ_HDA_3				0x2012
#define RT700_READ_HDA_2				0x2013
#define RT700_READ_HDA_1				0x2014
#define RT700_READ_HDA_0				0x2015
#define RT700_PRIV_INDEX_W_H				0x7520
#define RT700_PRIV_INDEX_W_L				0x85a0
#define RT700_PRIV_DATA_W_H				0x7420
#define RT700_PRIV_DATA_W_L				0x84a0
#define RT700_PRIV_INDEX_R_H				0x9d20
#define RT700_PRIV_INDEX_R_L				0xada0
#define RT700_PRIV_DATA_R_H				0x9c20
#define RT700_PRIV_DATA_R_L				0xaca0
#define RT700_DAC_FORMAT_H				0x7203
#define RT700_DAC_FORMAT_L				0x8283
#define RT700_ADC_FORMAT_H				0x7209
#define RT700_ADC_FORMAT_L				0x8289
#define RT700_SET_AUDIO_POWER_STATE\
	(RT700_VERB_SET_POWER_STATE | RT700_AUDIO_FUNCTION_GROUP)
#define RT700_SET_PIN_DMIC1\
	(RT700_VERB_SET_PIN_WIDGET_CONTROL | RT700_DMIC1)
#define RT700_SET_PIN_DMIC2\
	(RT700_VERB_SET_PIN_WIDGET_CONTROL | RT700_DMIC2)
#define RT700_SET_PIN_SPK\
	(RT700_VERB_SET_PIN_WIDGET_CONTROL | RT700_SPK_OUT)
#define RT700_SET_PIN_HP\
	(RT700_VERB_SET_PIN_WIDGET_CONTROL | RT700_HP_OUT)
#define RT700_SET_PIN_MIC2\
	(RT700_VERB_SET_PIN_WIDGET_CONTROL | RT700_MIC2)
#define RT700_SET_PIN_LINE1\

Annotation

Implementation Notes