Re: [PATCH v2 0/6] ASoC: extra format on each DAI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 28/12/2024 10:18 pm, Stephen Gordon wrote:
On 27/12/2024 11:21 pm, Stephen Gordon wrote:
On 23/12/2024 1:01 pm, Kuninori Morimoto wrote:


[   27.333830] asoc-audio-graph-card2 soc@107c000000:sound: probe with
driver asoc-audio-graph-card2 failed with error -12

In turn, this is because the linked list of siblings is actually in reverse order due to the way populate_node() (drivers/of/fdt.c) adds them.

It looks like the node order is fixed up later...
https://github.com/torvalds/linux/blob/fc033cf25e612e840e545f8d5ad2edd6ba613ed5/drivers/of/fdt.c#L330

However drivers/ot/dynamic.c uses similar node insertion code, but without any reordering. I guess this is what is used on my machine (Raspberry Pi 5) - perhaps your DT is just built differently :)

I get a playback DAI visible in aplay, however the capture DAI is not visible in arecord. If I swap the order of the codec ports in multi/ ports, then I get a capture DAI visible in arecord, but the playback DAI is missing :)

This was because of the playback-only and capture-only flags in my previous DTS. These flags are actually on the dai_link, so specifying this flag on a port/endpoint affects the whole link. Since I specified both, whichever one is processed last takes effect.

I think we should either:
- Make this a flag at the link level
	e.g. 	links = <&link0 PLAYBACK_ONLY>
or
- Document the behaviour

Anyway, once I removed those flags, the DTS works, as long as the CPU port is listed _last_ inside the 'multi' node. This is equivalent to a requirement to list the CPU port _first_ on other platforms.

gordoste@rpi5:~/i2smulti $ diff graph-working.dts graph-broken.dts
48,50c48,50
< port@0 { reg = <0>; link_dac: endpoint { remote-endpoint = <&codec_dac>; };}; < port@1 { reg = <1>; link_adc: endpoint { remote-endpoint = <&codec_adc>; };}; < port@2 { reg = <2>; link_cpu: endpoint { remote-endpoint = <&cpu_i2s>; };};
---
> port@0 { reg = <0>; link_cpu: endpoint { remote-endpoint = <&cpu_i2s>; };}; > port@1 { reg = <1>; link_dac: endpoint { remote-endpoint = <&codec_dac>; };}; > port@2 { reg = <2>; link_adc: endpoint { remote-endpoint = <&codec_adc>; };};


Regards
Stephen




[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux