[alsa-devel] ASoC: new ac97 bus and codec clock

Rob Herring robh+dt at kernel.org
Wed Jun 20 19:16:15 CEST 2018


On Wed, Jun 20, 2018 at 11:04 AM, Robert Jarzmik <robert.jarzmik at free.fr> wrote:
> Rob Herring <robh+dt at kernel.org> writes:
>
>> On Wed, Jun 20, 2018 at 8:52 AM, Robert Jarzmik <robert.jarzmik at free.fr> wrote:
>>> Rob Herring <robh+dt at kernel.org> writes:
> Hi Rob,
>
>>>         wm9713 at 0 {
>>
>> audio-codec at 0
> Sure.
>
>>>                 reg = <0>; /* Codex index (between 0 and 3) */
>>>                 compatible = "ac97-codec";
>>
>> This should be something with 'wm9713' in it or if there are ID
>> registers you can base it on that.
> Well, let's discuss that.
> If I take as an example sdio, in mmc-card.txt, the compatible string is
> "mmc-card", which describes the "kind" of subnode it is, not _exactly_ the
> subnode it is.

"mmc-card" is only for memory cards which are pretty much all the same
and rarely have a node, but SDIO devices always have a specific
compatible.

Does AC97 specify a common programming model? That's were a common
compatible is used (though experience has proven things like
"generic-ehci" are don't work).

It's generally a bad design to mix different types of subnodes, so I
was assuming all child nodes would be the same type. For example, you
can only have 1 address space (i.e. reg definition). If you need
different types, you need to add a level of nodes.

>
> If the purpose for this compatible string is to filter the child nodes which are
> only ac97 codecs, so that the ac97 framework can act upon them (ie. acquire the
> clock for example), then wm9713 is too specific ... That won't work for another
> device with an Analog Devices AD1835 for example.

Are there ID registers? If so, then just construct a compatible string
from them and just find the compatible child node. See USB bindings
for an example using VID/PID.

Rob


More information about the Alsa-devel mailing list