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

Sebastian Hesselbarth sebastian.hesselbarth at gmail.com
Thu Sep 12 13:31:19 CEST 2013


On 09/11/13 02:40, Kuninori Morimoto wrote:
> Support for loading the simple-card module via devicetree.
> It requests cpu/codec information,
> and .of_xlate_dai_name support on each component driver.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
> ---
[...]
> diff --git a/Documentation/devicetree/bindings/sound/simple-card.txt b/Documentation/devicetree/bindings/sound/simple-card.txt
> new file mode 100644
> index 0000000..d1a0c89
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/simple-card.txt
> @@ -0,0 +1,73 @@
> +Simple-Card:
> +
> +Required properties:
> +
> +- compatible				: "simple-audio"
> +- simple-audio,card-name		: simple-audio card name
> +- simple-audio,format			: see below
> +- simple-audio,cpu			: CPU sub-node, see below
> +- simple-audio,codec			: CODEC sub-node, see below
> +
> +Optional properties:
> +
> +- simple-audio,system-clock-frequency	: system clock rate if it is connected to both CPU/CODEC
> +
> +Required cpu/codec subnode properties:
> +
> +- sound-dai				: phandle and port for CPU/CODEC
> +- #sound-dai-cells			: sound-dai phandle's node

IMHO, "sound-dai" is too ASoC specific for this property name.
To make it more generic, what about e.g. "sound-link" and
"#sound-link-cells" instead?

> +- frame-master				: frame master
> +- bitclock-master			: bitclock master
> +
> +Optional subnode properties:
> +
> +- bitclock-inversion			: if CPU/CODEC needs clock inversion
> +- frame-inversion			: if CPU/CODEC needs frame inversion
> +- system-clock-frequency		: system clock rate for each CPU/CODEC

Instead of "system-clock-frequency" use standard property name
"clock-frequency". In the driver, you can check for this property
and use it, if no common clocks are available on the arch running.

Sebastian


More information about the Alsa-devel mailing list