sta350_set_dai_sysclk(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 🌈


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