sta350_set_dai_sysclk(9)
π sta350_set_dai_sysclk(9) β configure MCLK β¨
okay so you're in the Kernel API Manual bestie, and this page is all about sta350_set_dai_sysclk β the little function that handles MCLK configuration for the STA350 codec. it's giving very niche, very iconic, very "iykyk" π
πΈ NAME πΈ
sta350_set_dai_sysclk β configure MCLK. that's it, that's the whole vibe π
β¨ SYNOPSIS β¨
int sta350_set_dai_sysclk (struct snd_soc_dai *codec_dai , int clk_id ,
unsigned int freq , int dir );
no cap, that's the exact signature β copy it character for character or the compiler will absolutely humble you π
π¦ ARGUMENTS π¦
codec_daiβ the codec DAI, bestie. the main character of this parameter list πclk_idβ the clock ID. and honestly? it's ignored. not me passing whatever, it does not care πfreqβ the MCLK input frequency, aka the number that actually matters here βdirβ the clock direction. also ignored, so don't stress about it π
π DESCRIPTION π
so the whole point: the value of MCLK is what determines which sample rates the STA350 supports, based on the mcs_ratio_table. that's the core tea ββ¨
β οΈ and this part is important, bestie: this function must be called by the machine driver's 'startup' function. if you don't, the list of supported sample rates won't be available in time for ALSA. not a suggestion, not a maybe β it's a must π«Ά
π SEE ALSO π
- Kernel file
./sound/soc/codecs/sta350.cβ the source, go read it, it ate π sta350_set_dai_fmt(9)sta350_hw_params(9)sta350_set_bias_level(9)
and that's the page, bestie π¦π it lives in ./sound/soc/codecs, dated October 2026 β periodt, go configure some MCLK β¨ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms