[alsa-devel] Generic clock divider indices
zonque at gmail.com
Thu Jun 6 15:44:04 CEST 2013
Hi Mark, Liam,
we're using generic ASoC platform code for some audio devices, which is
agnostic of the actual Codecs that it deals with, as the information is
provided by DT nodes only.
That works very well so far, but I'm now facing a case where I need to
pass a special clock divider information down to the codec driver. The
fact that the IDs of the dividers can be arbitrarily defined by the
drivers leads to the unfortunate situation that I now have to make the
platform code aware of the codec drivers again.
Would it be an idea to define some commonly used dividers in the core?
If they start at 0x80000000, they won't collide with existing ones, and
we could simply add them as alternative case statements to existing drivers.
Some commonly used ones I can think of are
MCLK / BCLK
MCLK / LRCLK
BCLK / LRCLK
That way, platform code could just pass the values dows to the codec
drivers, whether or not they know what to do with it.
What do you think?
More information about the Alsa-devel