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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/pm.hlinux/regmap.hlinux/soundwire/sdw.hlinux/soundwire/sdw_type.hsound/soc.hlinux/workqueue.h
Detected Declarations
struct rt712_sdca_privstruct rt712_dmic_kctrl_privenum rt712_sdca_jd_srcenum rt712_sdca_hw_idenum rt712_sdca_version
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
- Immediate include surface: `linux/pm.h`, `linux/regmap.h`, `linux/soundwire/sdw.h`, `linux/soundwire/sdw_type.h`, `sound/soc.h`, `linux/workqueue.h`.
- Detected declarations: `struct rt712_sdca_priv`, `struct rt712_dmic_kctrl_priv`, `enum rt712_sdca_jd_src`, `enum rt712_sdca_hw_id`, `enum rt712_sdca_version`.
- Atlas domain: Driver Families / sound/soc.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.