sound/soc/codecs/cs42l43.h
Source file repositories/reference/linux-study-clean/sound/soc/codecs/cs42l43.h
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/codecs/cs42l43.h- Extension
.h- Size
- 3916 bytes
- Lines
- 147
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/completion.hlinux/mutex.hlinux/types.hlinux/workqueue.hsound/pcm.h
Detected Declarations
struct clkstruct devicestruct snd_soc_componentstruct snd_soc_jackstruct cs42l43struct cs42l43_codecfunction cs42l43_sdw_add_peripheral
Annotated Snippet
struct cs42l43_codec {
struct device *dev;
struct cs42l43 *core;
struct snd_soc_component *component;
struct irq_domain *dom;
unsigned int shutter_irqs[4];
struct clk *mclk;
int n_slots;
int slot_width;
int tx_slots[CS42L43_ASP_MAX_CHANNELS];
int rx_slots[CS42L43_ASP_MAX_CHANNELS];
struct snd_pcm_hw_constraint_list constraint;
u32 eq_coeffs[CS42L43_N_EQ_COEFFS];
unsigned int refclk_src;
unsigned int refclk_freq;
struct completion pll_ready;
unsigned int decim_cache[6];
unsigned int adc_ena;
unsigned int hp_ena;
struct completion hp_startup;
struct completion hp_shutdown;
struct completion spkr_shutdown;
struct completion spkl_shutdown;
struct completion spkr_startup;
struct completion spkl_startup;
// Lock to ensure speaker VU updates don't clash
struct mutex spk_vu_lock;
// Lock for all jack detect operations
struct mutex jack_lock;
struct snd_soc_jack *jack_hp;
bool use_ring_sense;
unsigned int tip_debounce_ms;
unsigned int tip_fall_db_ms;
unsigned int tip_rise_db_ms;
unsigned int bias_low;
unsigned int bias_sense_ua;
unsigned int bias_ramp_ms;
unsigned int detect_us;
unsigned int buttons[CS42L43_N_BUTTONS];
struct delayed_work tip_sense_work;
struct delayed_work bias_sense_timeout;
struct completion type_detect;
struct completion load_detect;
bool load_detect_running;
bool button_detect_running;
bool jack_present;
int jack_override;
bool suspend_jack_debounce;
struct delayed_work hp_ilimit_clear_work;
bool hp_ilimited;
int hp_ilimit_count;
struct snd_kcontrol *kctl[7];
};
#if IS_REACHABLE(CONFIG_SND_SOC_CS42L43_SDW)
int cs42l43_sdw_add_peripheral(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai);
int cs42l43_sdw_remove_peripheral(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai);
int cs42l43_sdw_set_stream(struct snd_soc_dai *dai, void *sdw_stream, int direction);
#else
static inline int cs42l43_sdw_add_peripheral(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{
return -EINVAL;
}
#define cs42l43_sdw_remove_peripheral NULL
#define cs42l43_sdw_set_stream NULL
#endif
int cs42l43_set_jack(struct snd_soc_component *component,
Annotation
- Immediate include surface: `linux/completion.h`, `linux/mutex.h`, `linux/types.h`, `linux/workqueue.h`, `sound/pcm.h`.
- Detected declarations: `struct clk`, `struct device`, `struct snd_soc_component`, `struct snd_soc_jack`, `struct cs42l43`, `struct cs42l43_codec`, `function cs42l43_sdw_add_peripheral`.
- Atlas domain: Driver Families / sound/soc.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.