sound/soc/sof/mediatek/mt8195/mt8195-clk.c
Source file repositories/reference/linux-study-clean/sound/soc/sof/mediatek/mt8195/mt8195-clk.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/sof/mediatek/mt8195/mt8195-clk.c- Extension
.c- Size
- 4161 bytes
- Lines
- 166
- 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/clk.hlinux/io.hlinux/string_choices.hmt8195.hmt8195-clk.h../adsp_helper.h../../sof-audio.h
Detected Declarations
function mt8195_adsp_init_clockfunction adsp_enable_all_clockfunction adsp_disable_all_clockfunction adsp_default_clk_initfunction adsp_clock_onfunction adsp_clock_off
Annotated Snippet
if (ret) {
dev_err(dev, "failed to set dsp_sel to clk26m: %d\n", ret);
return ret;
}
ret = clk_set_parent(priv->clk[CLK_TOP_AUDIO_LOCAL_BUS],
priv->clk[CLK_TOP_MAINPLL_D7_D2]);
if (ret) {
dev_err(dev, "set audio_local_bus failed %d\n", ret);
return ret;
}
ret = clk_set_parent(priv->clk[CLK_TOP_AUDIO_H],
priv->clk[CLK_TOP_CLK26M]);
if (ret) {
dev_err(dev, "set audio_h_sel failed %d\n", ret);
return ret;
}
ret = adsp_enable_all_clock(sdev);
if (ret) {
dev_err(dev, "failed to adsp_enable_clock: %d\n", ret);
return ret;
}
} else {
adsp_disable_all_clock(sdev);
}
return 0;
}
int adsp_clock_on(struct snd_sof_dev *sdev)
{
/* Open ADSP clock */
return adsp_default_clk_init(sdev, 1);
}
int adsp_clock_off(struct snd_sof_dev *sdev)
{
/* Close ADSP clock */
return adsp_default_clk_init(sdev, 0);
}
Annotation
- Immediate include surface: `linux/clk.h`, `linux/io.h`, `linux/string_choices.h`, `mt8195.h`, `mt8195-clk.h`, `../adsp_helper.h`, `../../sof-audio.h`.
- Detected declarations: `function mt8195_adsp_init_clock`, `function adsp_enable_all_clock`, `function adsp_disable_all_clock`, `function adsp_default_clk_init`, `function adsp_clock_on`, `function adsp_clock_off`.
- 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.