[PATCH v2 3/9] ASoC: audio-graph: Identify 'no_pcm' DAI links for DPCM

Sameer Pujar spujar at nvidia.com
Tue Aug 25 05:25:56 CEST 2020


Hi Morimoto-san,

>> (snip)
>>> +static bool soc_component_is_pcm(struct snd_soc_dai_link_component 
>>> *dlc)
>>> +{
>>> +     struct snd_soc_dai *dai = snd_soc_find_dai(dlc);
>>> +
>>> +     if (dai && (dai->component->driver->pcm_construct ||
>>> +                 dai->driver->pcm_new))
>>> +             return true;
>>> +
>>> +     return false;
>>> +}
>> This snd_soc_find_dai() will indicate WARNING
>> if .config has CONFIG_LOCKDEP for me.
>>
>> Maybe implement it at soc-core.c with client_mutex lock
>> is needed.

I tried testing this with LOCKDEP config enabled at my end. It seems I 
don't see warning originated from above function. Are you suggesting 
that, in general, snd_soc_find_dai() should be called with client_mutex 
held?

However I do see below warning and stack which is not related to above 
function call.
   dump_backtrace+0x0/0x1c0
   show_stack+0x18/0x28
   dump_stack+0xc8/0x128
   __warn+0xa0/0x15c
   report_bug+0xc8/0x180
   bug_handler+0x20/0x80
   brk_handler+0x6c/0xc0
   do_debug_exception+0xd8/0x1f0
   el1_sync_handler+0x98/0x128
   el1_sync+0x7c/0x100
   snd_soc_find_dai+0x10c/0x120 [snd_soc_core]
   snd_soc_dai_link_set_capabilities+0xc0/0x168 [snd_soc_core]
   graph_dai_link_of_dpcm+0x3a4/0x410 [snd_soc_audio_graph_card]
   graph_for_each_link+0x174/0x220 [snd_soc_audio_graph_card]
   graph_probe+0x174/0x270 [snd_soc_audio_graph_card]

May be *snd_soc_dai_link_set_capabilities**()* requires similar fix?


Thanks,
Sameer


More information about the Alsa-devel mailing list