[alsa-devel] Question about TDM "slot"

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Thu Nov 19 01:33:47 CET 2015


Hi Mark

Thank you for your help.
But I still want to ask about TDM settings

> > Thanks. We can have total channel number.
> > Then do we have common DT settings/method to indicate below ?
> 
> There's some stuff already supported for simple-card - see
> snd_soc_of_parse_tdm_slot().  This won't cover all uses but it should be
> good for simple uses.

In my check, it is caring about
 - tdm slot		: total channel number
 - tdm slot width	: bit width for each channel (?)
 - tdm tx/rx mask	: active slot (?)

tx/rx mask seems care about active/non-active.
We can use it if it sends 6ch sound by using 8ch slot (?).

But it doesn't care about dai connection (?) (= I mean 6ch x 1 or 2ch x 3 etc)
"simple card" should be simple, but CPU/Codec need this "dai connection" information ?
Otherwise, my CPU/Codec can't setup for TDM (= 6ch x 1 or 2ch x 3 etc).
I guess this can be common method, but what do you think ?

And this snd_soc_of_parse_tdm_slot() is called under asoc_simple_card_sub_parse_of().
This means DT is like this ?

	sound {
		compatible = "simple-audio-card";
		...

		cpu {
			sound-dai = <&xxx>;
			dai-tdm-slot-xxx = <xx>;
			dai-tdm-slot-xxx = <xx>;
		};
		codec {
			sound-dai = <&xxx>;
			dai-tdm-slot-xxx = <xx>;
			dai-tdm-slot-xxx = <xx>;
		};
	};

But I wonder it should be this ?

	sound {
		compatible = "simple-audio-card";
		...

		dai-tdm-slot-xxx = <xx>;
		dai-tdm-slot-xxx = <xx>;

		cpu {
			sound-dai = <&xxx>;
		};
		codec {
			sound-dai = <&xxx>;
		};
	};

In my check this "dai-tdm-slot-xxx" is implemented, but no one is using ?
${LINUX}/Documentation/devicetree/bindings/sound/st,sti-asoc-card.txt
is including dai-tdm-slot-width, but it seems it is ignored today ?

I would like to expand dai-tdm-slot-xxx
  1) use common settings for both CPU/Codec
  2) add dai connect information

Best regards
---
Kuninori Morimoto


More information about the Alsa-devel mailing list