sound/soc/mediatek/mt8186/mt8186-dai-pcm.c
Source file repositories/reference/linux-study-clean/sound/soc/mediatek/mt8186/mt8186-dai-pcm.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/mediatek/mt8186/mt8186-dai-pcm.c- Extension
.c- Size
- 11403 bytes
- Lines
- 420
- 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.
- 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/regmap.hsound/pcm_params.hmt8186-afe-common.hmt8186-afe-gpio.hmt8186-interconnection.h
Detected Declarations
struct mtk_afe_pcm_privenum aud_tx_lch_rptenum aud_vbt_16k_modeenum aud_ext_modemenum aud_pcm_sync_typeenum aud_bt_modeenum aud_pcm_afifo_srcenum aud_pcm_clock_sourceenum aud_pcm_wlenenum aud_pcm_24bitenum aud_pcm_modeenum aud_pcm_fmtenum aud_bclk_out_invenum aud_lrclk_out_invenum aud_pcm_enfunction mtk_pcm_en_eventfunction mtk_dai_pcm_hw_paramsfunction mtk_dai_pcm_set_fmtfunction mt8186_dai_pcm_register
Annotated Snippet
struct mtk_afe_pcm_priv {
unsigned int id;
unsigned int fmt;
unsigned int bck_invert;
unsigned int lck_invert;
};
enum aud_tx_lch_rpt {
AUD_TX_LCH_RPT_NO_REPEAT = 0,
AUD_TX_LCH_RPT_REPEAT = 1
};
enum aud_vbt_16k_mode {
AUD_VBT_16K_MODE_DISABLE = 0,
AUD_VBT_16K_MODE_ENABLE = 1
};
enum aud_ext_modem {
AUD_EXT_MODEM_SELECT_INTERNAL = 0,
AUD_EXT_MODEM_SELECT_EXTERNAL = 1
};
enum aud_pcm_sync_type {
/* bck sync length = 1 */
AUD_PCM_ONE_BCK_CYCLE_SYNC = 0,
/* bck sync length = PCM_INTF_CON1[9:13] */
AUD_PCM_EXTENDED_BCK_CYCLE_SYNC = 1
};
enum aud_bt_mode {
AUD_BT_MODE_DUAL_MIC_ON_TX = 0,
AUD_BT_MODE_SINGLE_MIC_ON_TX = 1
};
enum aud_pcm_afifo_src {
/* slave mode & external modem uses different crystal */
AUD_PCM_AFIFO_ASRC = 0,
/* slave mode & external modem uses the same crystal */
AUD_PCM_AFIFO_AFIFO = 1
};
enum aud_pcm_clock_source {
AUD_PCM_CLOCK_MASTER_MODE = 0,
AUD_PCM_CLOCK_SLAVE_MODE = 1
};
enum aud_pcm_wlen {
AUD_PCM_WLEN_PCM_32_BCK_CYCLES = 0,
AUD_PCM_WLEN_PCM_64_BCK_CYCLES = 1
};
enum aud_pcm_24bit {
AUD_PCM_24BIT_PCM_16_BITS = 0,
AUD_PCM_24BIT_PCM_24_BITS = 1
};
enum aud_pcm_mode {
AUD_PCM_MODE_PCM_MODE_8K = 0,
AUD_PCM_MODE_PCM_MODE_16K = 1,
AUD_PCM_MODE_PCM_MODE_32K = 2,
AUD_PCM_MODE_PCM_MODE_48K = 3,
};
enum aud_pcm_fmt {
AUD_PCM_FMT_I2S = 0,
AUD_PCM_FMT_EIAJ = 1,
AUD_PCM_FMT_PCM_MODE_A = 2,
AUD_PCM_FMT_PCM_MODE_B = 3
};
enum aud_bclk_out_inv {
AUD_BCLK_OUT_INV_NO_INVERSE = 0,
AUD_BCLK_OUT_INV_INVERSE = 1
};
enum aud_lrclk_out_inv {
AUD_LRCLK_OUT_INV_NO_INVERSE = 0,
AUD_LRCLK_OUT_INV_INVERSE = 1
};
enum aud_pcm_en {
AUD_PCM_EN_DISABLE = 0,
AUD_PCM_EN_ENABLE = 1
};
/* dai component */
static const struct snd_kcontrol_new mtk_pcm_1_playback_ch1_mix[] = {
SOC_DAPM_SINGLE_AUTODISABLE("ADDA_UL_CH1 Switch", AFE_CONN7,
I_ADDA_UL_CH1, 1, 0),
SOC_DAPM_SINGLE_AUTODISABLE("DL2_CH1 Switch", AFE_CONN7,
Annotation
- Immediate include surface: `linux/regmap.h`, `sound/pcm_params.h`, `mt8186-afe-common.h`, `mt8186-afe-gpio.h`, `mt8186-interconnection.h`.
- Detected declarations: `struct mtk_afe_pcm_priv`, `enum aud_tx_lch_rpt`, `enum aud_vbt_16k_mode`, `enum aud_ext_modem`, `enum aud_pcm_sync_type`, `enum aud_bt_mode`, `enum aud_pcm_afifo_src`, `enum aud_pcm_clock_source`, `enum aud_pcm_wlen`, `enum aud_pcm_24bit`.
- 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.