sound/soc/codecs/wcd934x.c
Source file repositories/reference/linux-study-clean/sound/soc/codecs/wcd934x.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/codecs/wcd934x.c- Extension
.c- Size
- 194053 bytes
- Lines
- 5920
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/cleanup.hlinux/clk.hlinux/clk-provider.hlinux/interrupt.hlinux/kernel.hlinux/mfd/wcd934x/registers.hlinux/mfd/wcd934x/wcd934x.hlinux/module.hlinux/mutex.hlinux/of_clk.hlinux/of.hlinux/platform_device.hlinux/regmap.hlinux/slab.hlinux/slimbus.hsound/pcm_params.hsound/soc.hsound/soc-dapm.hsound/tlv.hwcd-clsh-v2.hwcd-common.hwcd-mbhc-v2.hdt-bindings/sound/qcom,wcd934x.h
Detected Declarations
struct wcd934x_slim_chstruct interp_sample_ratestruct wcd934x_mbhc_zdet_paramstruct wcd_slim_codec_dai_datastruct wcd934x_codecstruct wcd_iir_filter_ctlfunction wcd934x_set_sido_input_srcfunction wcd934x_enable_ana_bias_and_sysclkfunction wcd934x_disable_ana_bias_and_syclkfunction __wcd934x_cdc_mclk_enablefunction wcd934x_codec_enable_mclkfunction wcd934x_get_versionfunction wcd934x_enable_efuse_sensingfunction wcd934x_swrm_clockfunction wcd934x_set_prim_interpolator_ratefunction list_for_each_entryfunction wcd934x_set_mix_interpolator_ratefunction list_for_each_entryfunction wcd934x_set_interpolator_ratefunction wcd934x_set_decimator_ratefunction list_for_each_entryfunction wcd934x_slim_set_hw_paramsfunction wcd934x_hw_paramsfunction wcd934x_hw_freefunction wcd934x_triggerfunction wcd934x_set_channel_mapfunction wcd934x_get_channel_mapfunction swclk_gate_enablefunction swclk_gate_disablefunction swclk_gate_is_enabledfunction swclk_recalc_ratefunction wcd934x_init_dmicfunction wcd934x_hw_initfunction wcd934x_comp_initfunction wcd934x_slim_irq_handlerfunction for_each_set_bitfunction wcd934x_mbhc_clk_setupfunction wcd934x_mbhc_mbhc_bias_controlfunction wcd934x_mbhc_program_btn_thrfunction wcd934x_mbhc_micb_en_statusfunction wcd934x_mbhc_hph_l_pull_up_controlfunction wcd934x_micbias_controlfunction wcd934x_mbhc_request_micbiasfunction wcd934x_mbhc_micb_ramp_controlfunction wcd934x_mbhc_micb_adjust_voltagefunction wcd934x_mbhc_micb_ctrl_threshold_micfunction wcd934x_mbhc_get_result_paramsfunction wcd934x_mbhc_zdet_ramp
Annotated Snippet
struct wcd934x_slim_ch {
u32 ch_num;
u16 port;
u16 shift;
struct list_head list;
};
static const struct wcd934x_slim_ch wcd934x_tx_chs[WCD934X_TX_MAX] = {
WCD934X_SLIM_TX_CH(0),
WCD934X_SLIM_TX_CH(1),
WCD934X_SLIM_TX_CH(2),
WCD934X_SLIM_TX_CH(3),
WCD934X_SLIM_TX_CH(4),
WCD934X_SLIM_TX_CH(5),
WCD934X_SLIM_TX_CH(6),
WCD934X_SLIM_TX_CH(7),
WCD934X_SLIM_TX_CH(8),
WCD934X_SLIM_TX_CH(9),
WCD934X_SLIM_TX_CH(10),
WCD934X_SLIM_TX_CH(11),
WCD934X_SLIM_TX_CH(12),
WCD934X_SLIM_TX_CH(13),
WCD934X_SLIM_TX_CH(14),
WCD934X_SLIM_TX_CH(15),
};
static const struct wcd934x_slim_ch wcd934x_rx_chs[WCD934X_RX_MAX] = {
WCD934X_SLIM_RX_CH(0), /* 16 */
WCD934X_SLIM_RX_CH(1), /* 17 */
WCD934X_SLIM_RX_CH(2),
WCD934X_SLIM_RX_CH(3),
WCD934X_SLIM_RX_CH(4),
WCD934X_SLIM_RX_CH(5),
WCD934X_SLIM_RX_CH(6),
WCD934X_SLIM_RX_CH(7),
WCD934X_SLIM_RX_CH(8),
WCD934X_SLIM_RX_CH(9),
WCD934X_SLIM_RX_CH(10),
WCD934X_SLIM_RX_CH(11),
WCD934X_SLIM_RX_CH(12),
};
/* Codec supports 2 IIR filters */
enum {
IIR0 = 0,
IIR1,
IIR_MAX,
};
/* Each IIR has 5 Filter Stages */
enum {
BAND1 = 0,
BAND2,
BAND3,
BAND4,
BAND5,
BAND_MAX,
};
enum {
COMPANDER_1, /* HPH_L */
COMPANDER_2, /* HPH_R */
COMPANDER_3, /* LO1_DIFF */
COMPANDER_4, /* LO2_DIFF */
COMPANDER_5, /* LO3_SE - not used in Tavil */
COMPANDER_6, /* LO4_SE - not used in Tavil */
COMPANDER_7, /* SWR SPK CH1 */
COMPANDER_8, /* SWR SPK CH2 */
COMPANDER_MAX,
};
enum {
INTn_1_INP_SEL_ZERO = 0,
INTn_1_INP_SEL_DEC0,
INTn_1_INP_SEL_DEC1,
INTn_1_INP_SEL_IIR0,
INTn_1_INP_SEL_IIR1,
INTn_1_INP_SEL_RX0,
INTn_1_INP_SEL_RX1,
INTn_1_INP_SEL_RX2,
INTn_1_INP_SEL_RX3,
INTn_1_INP_SEL_RX4,
INTn_1_INP_SEL_RX5,
INTn_1_INP_SEL_RX6,
INTn_1_INP_SEL_RX7,
};
enum {
INTn_2_INP_SEL_ZERO = 0,
INTn_2_INP_SEL_RX0,
Annotation
- Immediate include surface: `linux/cleanup.h`, `linux/clk.h`, `linux/clk-provider.h`, `linux/interrupt.h`, `linux/kernel.h`, `linux/mfd/wcd934x/registers.h`, `linux/mfd/wcd934x/wcd934x.h`, `linux/module.h`.
- Detected declarations: `struct wcd934x_slim_ch`, `struct interp_sample_rate`, `struct wcd934x_mbhc_zdet_param`, `struct wcd_slim_codec_dai_data`, `struct wcd934x_codec`, `struct wcd_iir_filter_ctl`, `function wcd934x_set_sido_input_src`, `function wcd934x_enable_ana_bias_and_sysclk`, `function wcd934x_disable_ana_bias_and_syclk`, `function __wcd934x_cdc_mclk_enable`.
- Atlas domain: Driver Families / sound/soc.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- 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.