sound/soc/mediatek/mt8196/mt8196-nau8825.c
Source file repositories/reference/linux-study-clean/sound/soc/mediatek/mt8196/mt8196-nau8825.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/mediatek/mt8196/mt8196-nau8825.c- Extension
.c- Size
- 24810 bytes
- Lines
- 871
- 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/input.hlinux/module.hlinux/of_device.hlinux/pm_runtime.hsound/soc.hsound/jack.hsound/pcm_params.hmt8196-afe-common.h../../codecs/nau8825.h../../codecs/rt5682s.h../common/mtk-soc-card.h../common/mtk-dsp-sof-common.h../common/mtk-soundcard-driver.h../common/mtk-afe-platform-driver.h
Detected Declarations
enum mt8196_jacksfunction mt8196_nau8825_i2s_hw_paramsfunction mt8196_dptx_hw_paramsfunction mt8196_hw_params_fixupfunction mt8196_sof_be_hw_paramsfunction mt8196_dumb_amp_initfunction mt8196_dptx_codec_initfunction mt8196_hdmi_codec_initfunction mt8196_headset_codec_initfunction mt8196_headset_codec_exitfunction mt8196_nau8825_hw_paramsfunction mt8196_rt5682s_i2s_hw_paramsfunction mt8196_nau8825_soc_card_probefunction for_each_card_prelinksfunction strcmp
Annotated Snippet
if (cmpnt_afe) {
dev_info(rtd->dev, "component->name: %s\n", cmpnt_afe->name);
break;
}
}
if (cmpnt_afe && !pm_runtime_active(cmpnt_afe->dev)) {
dev_err(rtd->dev, "afe pm runtime is not active!!\n");
return -EINVAL;
}
return 0;
}
static const struct snd_soc_ops mt8196_sof_be_ops = {
.hw_params = mt8196_sof_be_hw_params,
};
static const struct sof_conn_stream g_sof_conn_streams[] = {
{
.sof_link = "AFE_SOF_DL1",
.sof_dma = SOF_DMA_DL1,
.stream_dir = SNDRV_PCM_STREAM_PLAYBACK
},
{
.sof_link = "AFE_SOF_DL_24CH",
.sof_dma = SOF_DMA_DL_24CH,
.stream_dir = SNDRV_PCM_STREAM_PLAYBACK
},
{
.sof_link = "AFE_SOF_UL0",
.sof_dma = SOF_DMA_UL0,
.stream_dir = SNDRV_PCM_STREAM_CAPTURE
},
{
.sof_link = "AFE_SOF_UL1",
.sof_dma = SOF_DMA_UL1,
.stream_dir = SNDRV_PCM_STREAM_CAPTURE
},
{
.sof_link = "AFE_SOF_UL2",
.sof_dma = SOF_DMA_UL2,
.stream_dir = SNDRV_PCM_STREAM_CAPTURE
},
};
/* FE */
SND_SOC_DAILINK_DEFS(playback1,
DAILINK_COMP_ARRAY(COMP_CPU("DL1")),
DAILINK_COMP_ARRAY(COMP_DUMMY()),
DAILINK_COMP_ARRAY(COMP_EMPTY()));
SND_SOC_DAILINK_DEFS(playback_24ch,
DAILINK_COMP_ARRAY(COMP_CPU("DL_24CH")),
DAILINK_COMP_ARRAY(COMP_DUMMY()),
DAILINK_COMP_ARRAY(COMP_EMPTY()));
SND_SOC_DAILINK_DEFS(capture0,
DAILINK_COMP_ARRAY(COMP_CPU("UL0")),
DAILINK_COMP_ARRAY(COMP_DUMMY()),
DAILINK_COMP_ARRAY(COMP_EMPTY()));
SND_SOC_DAILINK_DEFS(capture1,
DAILINK_COMP_ARRAY(COMP_CPU("UL1")),
DAILINK_COMP_ARRAY(COMP_DUMMY()),
DAILINK_COMP_ARRAY(COMP_EMPTY()));
SND_SOC_DAILINK_DEFS(capture2,
DAILINK_COMP_ARRAY(COMP_CPU("UL2")),
DAILINK_COMP_ARRAY(COMP_DUMMY()),
DAILINK_COMP_ARRAY(COMP_EMPTY()));
SND_SOC_DAILINK_DEFS(playback_hdmi,
DAILINK_COMP_ARRAY(COMP_CPU("HDMI")),
DAILINK_COMP_ARRAY(COMP_DUMMY()),
DAILINK_COMP_ARRAY(COMP_EMPTY()));
SND_SOC_DAILINK_DEFS(playback2,
DAILINK_COMP_ARRAY(COMP_CPU("DL2")),
DAILINK_COMP_ARRAY(COMP_DUMMY()),
DAILINK_COMP_ARRAY(COMP_EMPTY()));
SND_SOC_DAILINK_DEFS(capture_cm0,
DAILINK_COMP_ARRAY(COMP_CPU("UL_CM0")),
DAILINK_COMP_ARRAY(COMP_DUMMY()),
DAILINK_COMP_ARRAY(COMP_EMPTY()));
/* BE */
SND_SOC_DAILINK_DEFS(ap_dmic,
DAILINK_COMP_ARRAY(COMP_CPU("AP_DMIC")),
DAILINK_COMP_ARRAY(COMP_DUMMY()),
DAILINK_COMP_ARRAY(COMP_EMPTY()));
SND_SOC_DAILINK_DEFS(ap_dmic_ch34,
DAILINK_COMP_ARRAY(COMP_CPU("AP_DMIC_CH34")),
DAILINK_COMP_ARRAY(COMP_DUMMY()),
DAILINK_COMP_ARRAY(COMP_EMPTY()));
SND_SOC_DAILINK_DEFS(ap_dmic_multich,
DAILINK_COMP_ARRAY(COMP_CPU("AP_DMIC_MULTICH")),
Annotation
- Immediate include surface: `linux/input.h`, `linux/module.h`, `linux/of_device.h`, `linux/pm_runtime.h`, `sound/soc.h`, `sound/jack.h`, `sound/pcm_params.h`, `mt8196-afe-common.h`.
- Detected declarations: `enum mt8196_jacks`, `function mt8196_nau8825_i2s_hw_params`, `function mt8196_dptx_hw_params`, `function mt8196_hw_params_fixup`, `function mt8196_sof_be_hw_params`, `function mt8196_dumb_amp_init`, `function mt8196_dptx_codec_init`, `function mt8196_hdmi_codec_init`, `function mt8196_headset_codec_init`, `function mt8196_headset_codec_exit`.
- 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.