[PATCH v1 1/2] ASoC: simple-card: Support custom DAI system clock IDs

Mark Brown broonie at kernel.org
Wed Oct 26 17:11:42 CEST 2022


On Wed, Oct 26, 2022 at 03:42:31PM +0100, Aidan MacDonald wrote:
> Mark Brown <broonie at kernel.org> writes:

> > There is a strong case for saying that all the clocking in CODECs might
> > fit into the clock API, especially given the whole DT thing.

> The ASoC APIs don't speak "struct clk", which seems (to me) like a
> prerequisite before we can think about doing anything with clocks.

Right, they probably should.

> Even if ASoC began to use the clock API for codec clocking, it's not
> clear how you maintain backward compatibility with the existing
> simple-card bindings. You'd have to go over all DAIs and mimic the
> effects of "snd_soc_dai_set_sysclk(dai, 0, freq, dir)" because there
> could be a device tree relying on it somewhere.

Of course, you'd need to define bindings for devices with multiple
clocks such that things continue to work out compatibly.

> So... given you're already stuck maintaining .set_sysclk() behavior
> forever, is there much harm in exposing the sysclock ID to the DT?

Yes, it's ABI and the more baked in this stuff gets the more issues we
have when trying to integrate with the wider clock tree in the system -
for example when devices are able to output their system clock to be
used as a master clock for a device which can use the clock API as an
input.  It's fine in kernel but we should be trying to keep it out of
ABI.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20221026/e7e35040/attachment-0001.sig>


More information about the Alsa-devel mailing list