sound/soc/mediatek/mt8195/mt8195-mt6359.c
Source file repositories/reference/linux-study-clean/sound/soc/mediatek/mt8195/mt8195-mt6359.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/mediatek/mt8195/mt8195-mt6359.c- Extension
.c- Size
- 45444 bytes
- Lines
- 1582
- 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/input.hlinux/module.hlinux/of.hlinux/pm_runtime.hsound/jack.hsound/pcm_params.hsound/rt5682.hsound/soc.h../../codecs/mt6359.h../../codecs/rt1011.h../../codecs/rt5682.h../common/mtk-afe-platform-driver.h../common/mtk-dsp-sof-common.h../common/mtk-soc-card.h../common/mtk-soundcard-driver.hmt8195-afe-clk.hmt8195-afe-common.h
Detected Declarations
struct mt8195_mt6359_privenum mt8195_jacksfunction mt8195_mt6359_mtkaif_calibrationfunction mt8195_mt6359_initfunction mt8195_hdmitx_dptx_startupfunction mt8195_dptx_hw_paramsfunction mt8195_dptx_codec_initfunction mt8195_hdmi_codec_initfunction mt8195_dptx_hw_params_fixupfunction mt8195_rt5682_etdm_hw_paramsfunction mt8195_rt5682_initfunction mt8195_rt1011_etdm_hw_paramsfunction for_each_rtd_codec_daisfunction mt8195_sof_be_hw_paramsfunction mt8195_rt1011_initfunction mt8195_dumb_amp_initfunction mt8195_rt1019_initfunction mt8195_max98390_initfunction mt8195_etdm_hw_params_fixupfunction mt8195_set_bias_level_postfunction mt8195_dai_link_fixupfunction mt8195_mt6359_legacy_probefunction for_each_card_prelinksfunction strcmpfunction mt8195_mt6359_soc_card_probefunction for_each_card_prelinksfunction strcmpfunction strcmp
Annotated Snippet
struct mt8195_mt6359_priv {
struct clk *i2so1_mclk;
};
enum mt8195_jacks {
MT8195_JACK_HEADSET,
MT8195_JACK_DP,
MT8195_JACK_HDMI,
MT8195_JACK_MAX,
};
/* Headset jack detection DAPM pins */
static struct snd_soc_jack_pin mt8195_jack_pins[] = {
{
.pin = "Headphone",
.mask = SND_JACK_HEADPHONE,
},
{
.pin = "Headset Mic",
.mask = SND_JACK_MICROPHONE,
},
};
static const struct snd_soc_dapm_widget mt8195_mt6359_widgets[] = {
SND_SOC_DAPM_HP("Headphone", NULL),
SND_SOC_DAPM_MIC("Headset Mic", NULL),
SND_SOC_DAPM_MIXER(SOF_DMA_DL2, SND_SOC_NOPM, 0, 0, NULL, 0),
SND_SOC_DAPM_MIXER(SOF_DMA_DL3, SND_SOC_NOPM, 0, 0, NULL, 0),
SND_SOC_DAPM_MIXER(SOF_DMA_UL4, SND_SOC_NOPM, 0, 0, NULL, 0),
SND_SOC_DAPM_MIXER(SOF_DMA_UL5, SND_SOC_NOPM, 0, 0, NULL, 0),
};
static const struct snd_soc_dapm_route mt8195_mt6359_routes[] = {
/* SOF Uplink */
{SOF_DMA_UL4, NULL, "O034"},
{SOF_DMA_UL4, NULL, "O035"},
{SOF_DMA_UL5, NULL, "O036"},
{SOF_DMA_UL5, NULL, "O037"},
/* SOF Downlink */
{"I070", NULL, SOF_DMA_DL2},
{"I071", NULL, SOF_DMA_DL2},
{"I020", NULL, SOF_DMA_DL3},
{"I021", NULL, SOF_DMA_DL3},
};
static const struct snd_kcontrol_new mt8195_mt6359_controls[] = {
SOC_DAPM_PIN_SWITCH("Headphone"),
SOC_DAPM_PIN_SWITCH("Headset Mic"),
};
static const struct snd_soc_dapm_widget mt8195_dual_speaker_widgets[] = {
SND_SOC_DAPM_SPK("Left Spk", NULL),
SND_SOC_DAPM_SPK("Right Spk", NULL),
};
static const struct snd_kcontrol_new mt8195_dual_speaker_controls[] = {
SOC_DAPM_PIN_SWITCH("Left Spk"),
SOC_DAPM_PIN_SWITCH("Right Spk"),
};
static const struct snd_soc_dapm_widget mt8195_speaker_widgets[] = {
SND_SOC_DAPM_SPK("Ext Spk", NULL),
};
static const struct snd_kcontrol_new mt8195_speaker_controls[] = {
SOC_DAPM_PIN_SWITCH("Ext Spk"),
};
static const struct snd_soc_dapm_route mt8195_rt5682_routes[] = {
/* headset */
{ "Headphone", NULL, "HPOL" },
{ "Headphone", NULL, "HPOR" },
{ "IN1P", NULL, "Headset Mic" },
};
static const struct snd_soc_dapm_route mt8195_rt1011_routes[] = {
{ "Left Spk", NULL, "Left SPO" },
{ "Right Spk", NULL, "Right SPO" },
};
static const struct snd_soc_dapm_route mt8195_rt1019_routes[] = {
{ "Ext Spk", NULL, "Speaker" },
};
static const struct snd_soc_dapm_route mt8195_max98390_routes[] = {
{ "Left Spk", NULL, "Left BE_OUT" },
{ "Right Spk", NULL, "Right BE_OUT" },
};
#define CKSYS_AUD_TOP_CFG 0x032c
Annotation
- Immediate include surface: `linux/input.h`, `linux/module.h`, `linux/of.h`, `linux/pm_runtime.h`, `sound/jack.h`, `sound/pcm_params.h`, `sound/rt5682.h`, `sound/soc.h`.
- Detected declarations: `struct mt8195_mt6359_priv`, `enum mt8195_jacks`, `function mt8195_mt6359_mtkaif_calibration`, `function mt8195_mt6359_init`, `function mt8195_hdmitx_dptx_startup`, `function mt8195_dptx_hw_params`, `function mt8195_dptx_codec_init`, `function mt8195_hdmi_codec_init`, `function mt8195_dptx_hw_params_fixup`, `function mt8195_rt5682_etdm_hw_params`.
- 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.