[alsa-devel] [RFC][PATCH 2/2 v3] ASoC: simple-card: add Device Tree support

Stephen Warren swarren at wwwdotorg.org
Wed Jan 30 21:14:07 CET 2013


On 01/30/2013 02:09 AM, Kuninori Morimoto wrote:
> Support for loading the simple-card module via devicetree.
> It requests cpu/codec information for probing.

> diff --git a/Documentation/devicetree/bindings/sound/simple-card.txt b/Documentation/devicetree/bindings/sound/simple-card.txt

> +Simple-Card:
> +
> +Required properties:
> +
> +- compatible			: "simple-audio"
> +- simple-audio,card-name	: simple-audio card name
> +- simple-audio,format		: see below
> +
> +Optional properties:
> +
> +- simple-audio,bitclock-inversion
> +- simple-audio,frame-inversion
> +
> +CPU / CODEC DAI is represented as a sub-node.
> +Then, sub-node name should be "simple-audio,cpu" or "simple-audio,codec".

Why require sub-nodes? it seem over-complex.

> +Required subnode properties:
> +- simple-audio,dev		: phandle for CPU/CODEC
> +
> +Optional subnode properties:
> +
> +- simple-audio,dai-name			: simple-audio CPU/CODEC DAI name

OK, I see those two are CPU-/CODEC-specific. However, you could easily
just have different property names for the two.

I assume you didn't like my idea of not putting the DAI names into the
DT, but using extra arguments after the phandles instead? Doing so would
be more alike most existing DT bindings.

> +- simple-audio,system-clock-frequency	: system clock rate
> +- simple-audio,frame-master
> +- simple-audio,bitclock-master

Aren't those a property of the CPU<->CODEC link, hence the clock
frequency is identical, and the two "master" properties are the inverse
of each-other in between CPU and CODEC. Specifying these right in the
top-level node seems simpler.


More information about the Alsa-devel mailing list