psc_i2s_set_sysclk(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– psc_i2s_set_sysclk β€” like, the whole kernel API manual vibe πŸ’–

okay so bestie, you're reading the psc_i2s_set_sysclk(9) page from the Kernel API Manual and honestly? it's short, it's sweet, and it's giving "one job, done right" energy. let's get into it πŸŽ€


✨ NAME ✨

psc_i2s_set_sysclk β€” set the clock frequency and direction. that's it. that's the whole thing. slay πŸ’…


✨ SYNOPSIS ✨

int psc_i2s_set_sysclk (struct snd_soc_dai *cpu_dai , int clk_id ,
unsigned int freq , int dir );

so it's an int-returning function, four args, all listed above β€” screenshot that, it's iconic πŸ“Έ


✨ ARGUMENTS ✨

  • cpu_dai β€” the DAI runtime data pointer. it's the whole context for what you're poking at, so like… give it the respect it deserves πŸ’–
  • clk_id β€” reserved, should be zero. that means be a good citizen and pass 0, no cap πŸ™
  • freq β€” the frequency of the given clock ID… and currently it's ignored. yes bestie, it's a decorative argument rn, she's just standing there being pretty 🌸
  • dir β€” either SND_SOC_CLOCK_IN (clock slave) or SND_SOC_CLOCK_OUT (clock master). those are the two vibes ⭐

✨ DESCRIPTION ✨

so this function is called by the machine driver to tell us what the clock frequency and direction are. that's the whole point of her existence ✨

but here's the tea πŸ“: currently we only support operating as a clock slave β€” that's SND_SOC_CLOCK_IN. and we genuinely don't care about the frequency, like at all, lowkey irrelevant. so if you roll up with a dir that is not SND_SOC_CLOCK_IN, she's gonna return an error at you. respectfully. 🫢

ngl the vibe check here is strict: SND_SOC_CLOCK_IN or nothing. clock master energy is not accepted in this house πŸ’€

✨ RETURN ✨

  • 0 on success πŸŽ‰
  • -EINVAL on failure 😭

that's the whole menu, bestie, two options only.


✨ SEE ALSO ✨

go read them, they're all part of the same friend group πŸ’œ


and that's the page, bestie!! no cap, you're now fully caught up πŸ¦‹ β€” this one's from ./sound/soc/fsl, dated October 2026, and the page itself is psc_i2s_set_sysclk(9). periodt πŸ’…βœ¨πŸ‘‘

πŸ“¦ where this page comes from