[alsa-devel] [PATCH] ASoC: dmic codec: Support for DT

Peter Ujfalusi peter.ujfalusi at ti.com
Wed May 9 13:28:23 CEST 2012

On 05/08/2012 03:58 PM, Mark Brown wrote:
> On Tue, May 08, 2012 at 02:55:57PM +0300, Peter Ujfalusi wrote:
>> +dmic_codec: dmic_codec at 0 { /* generic DMIC codec */
>> +	compatible = "generic,dmic-codec";
>> +};
> Why is this called "dmic-codec" and not "dmic"?

This is a really good question. Should have been "dmic".

> We probably need to have a think about this in the context of the
> handling of random on-board passive components in general - things
> like jacks and so on - is the most sensible thing to have a
> platform device for everything, or is that getting too noisy?

It is true that there's no real device (in a sense that it is not
programmable at least via the current dmic-codec.c driver) behind of the
dmic codec as such.
However in our setup it is a vital part of the audio setup since the CPU
dai (omap4-dmic) need to be connected to _somthing_ in order to have a link.
It could be argued that if the SW has no control over a component there
should not be dts section for it either. However when we move to the
audio machine driver level (or audio setup description) we are going to
have quiet different looking (I would say confusing) implementation
among devices, platforms.

For example tegra-seaboard have this for the link:

nvidia,i2s-controller = <&tegra_i2s1>;
nvidia,audio-codec = <&wm8903>;

It is clearly tells me that i2s1 is connected to wm8903 codec.

Now without dts entry for dmic codec on omap4:

dai-link,dai = <&dmic>;

In the background we create the device for the dmic at runtime but it
does not help the readability of the dts file. Especially if someone is
looking at the tegra version at the same type.

I would prefer to have something like this in our dts for audio support:

dai-link,dai = <&dmic>;
dai-link,codec = <&dmic_codec>;

I might be as well just plain wrong here.


More information about the Alsa-devel mailing list