Re: [PATCH 08/20] ASoC: soc-pcm.c: cleanup soc_get_playback_capture()

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

 



On 5/22/2023 6:35 AM, Kuninori Morimoto wrote:

Hi Amadeusz

Thank you for testing

I put the patchset to test and it fails to enumerate devices on our
platforms.

Bisect leads me to this patch, here is dmesg fragment:
(snip)
[   34.617601] avs_hdaudio avs_hdaudio.2: ASoC: Parent card not yet
available, widget card binding deferred
(snip)
[   34.619973]  probing-LINK: substream (null) has no playback, no capture

Hmm..  I tested it on my many type of connections,
but couldn't reproduce the error...

It seems you got [01/20] patch error = no playback, no capture.
This means has_playback/capture both flags are 0.

It seems you are using soc-topology.
Is it topology specific something ?

But hmm.. ?

static int soc_get_playback_capture(...)
{
	...
(A)	if (dai_link->dynamic || dai_link->no_pcm) {
		...
		if (dai_link->dpcm_playback) {
			...
(B)			for_each_rtd_cpu_dais(rtd, i, cpu_dai) {
				...
			}
			...
		}
		if (dai_link->dpcm_capture) {
			...
(B)			for_each_rtd_cpu_dais(rtd, i, cpu_dai) {
				...
			}
		}
		...
	}
}

It checks CPU (B) when no_pcm (A) on original.
But I think "no_pcm - CPU" is dummy DAI -> above check is no meaning.
After the patch, it checks both CPU/Codec.

no_pcm means that we are describing Back End, if you check any file in sound/soc/intel/avs/boards, they set link->no_pcm to 1 - those files describe card and BE (codec) configuration. Topology in case of our driver describe Front Ends (what is visible when you do "aplay -l"), as well as DSP path. Topology sets link->dynamic to 1 in soc_tplg_fe_link_create(). Do note that card and topology are loaded separately hence the "card binding deferred" message in dmesg above.

I wonder is your Codec which is connected to no_pcm DAI valid ?


I'm not sure what do you mean, if it is valid? It works fine before this patch ;)




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux