sound/soc/codecs/rt721-sdca.h

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

File Facts

System
Linux kernel
Corpus path
sound/soc/codecs/rt721-sdca.h
Extension
.h
Size
8165 bytes
Lines
275
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  rt721_sdca_priv {
	struct regmap *regmap;
	struct regmap *mbq_regmap;
	struct snd_soc_component *component;
	struct sdw_slave *slave;
	struct sdw_bus_params params;
	bool hw_init;
	bool first_hw_init;
	struct mutex calibrate_mutex;
	struct mutex disable_irq_lock;
	bool disable_irq;
	/* For Headset jack & Headphone */
	unsigned int scp_sdca_stat1;
	unsigned int scp_sdca_stat2;
	struct snd_soc_jack *hs_jack;
	struct delayed_work jack_detect_work;
	struct delayed_work jack_btn_check_work;
	int jack_type;
	int jd_src;
	bool fu0f_dapm_mute;
	bool fu0f_mixer_l_mute;
	bool fu0f_mixer_r_mute;
	/* For DMIC */
	bool fu1e_dapm_mute;
	bool fu1e_mixer_mute[4];
};

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

/* NID */
#define RT721_ANA_POW_PART			0x01
#define RT721_DAC_CTRL				0x04
#define RT721_JD_CTRL				0x09
#define RT721_CBJ_CTRL				0x0a
#define RT721_CAP_PORT_CTRL			0x0c
#define RT721_CLASD_AMP_CTRL			0x0d
#define RT721_BOOST_CTRL			0x0f
#define RT721_VENDOR_REG			0x20
#define RT721_RC_CALIB_CTRL			0x40
#define RT721_VENDOR_EQ_L			0x53
#define RT721_VENDOR_EQ_R			0x54
#define RT721_VENDOR_HP_CALI			0x56
#define RT721_VENDOR_CHARGE_PUMP		0x57
#define RT721_VENDOR_CLASD_CALI			0x58
#define RT721_VENDOR_IMS_DRE			0x5b
#define RT721_VENDOR_SPK_EFUSE			0x5c
#define RT721_VENDOR_LEVEL_CTRL			0x5d
#define RT721_VENDOR_ANA_CTL			0x5f
#define RT721_HDA_SDCA_FLOAT			0x61

/* Index (NID:01h) */
#define RT721_MBIAS_LV_CTRL2			0x07
#define RT721_VREF1_HV_CTRL1			0x0a
#define RT721_VREF2_LV_CTRL1			0x0b

/* Index (NID:04h) */
#define RT721_DAC_2CH_CTRL3			0x02
#define RT721_DAC_2CH_CTRL4			0x03

/* Index (NID:09h) */
#define RT721_JD_1PIN_GAT_CTRL2			0x07

/* Index (NID:0ah) */
#define RT721_CBJ_A0_GAT_CTRL1			0x04
#define RT721_CBJ_A0_GAT_CTRL2			0x05

/* Index (NID:0Ch) */
#define RT721_HP_AMP_2CH_CAL1			0x05
#define RT721_HP_AMP_2CH_CAL4			0x08
#define RT721_HP_AMP_2CH_CAL18			0x1b

/* Index (NID:0dh) */
#define RT721_CLASD_AMP_2CH_CAL			0x14

/* Index (NID:0fh) */
#define RT721_BST_4CH_TOP_GATING_CTRL1		0x05

/* Index (NID:20h) */
#define RT721_JD_PRODUCT_NUM			0x00
#define RT721_ANALOG_BIAS_CTL3			0x04
#define RT721_JD_CTRL1				0x09
#define RT721_LDO2_3_CTL1			0x0e
#define RT721_GPIO_PAD_CTRL5			0x13
#define RT721_LDO1_CTL				0x1a
#define RT721_HP_JD_CTRL			0x24

Annotation

Implementation Notes