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

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

 



Hi Sameer

>             +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;
>             +}
(snip)
> 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?

Hmm ? strange...

snd_soc_find_dai() is using lockdep_assert_held()

	struct snd_soc_dai *snd_soc_find_dai(...)
	{
		...
=>		lockdep_assert_held(&client_mutex);
		...
	}

and lockdep_assert_held() will indicate WARN_ON()

	-- lockdep.h --
	...
	#ifdef CONFIG_LOCKDEP
	...
	#define lockdep_assert_held(l)	do {				\
=>			WARN_ON(debug_locks && !lockdep_is_held(l));	\
		} while (0)

> May be snd_soc_dai_link_set_capabilities() requires similar fix?

Yes, I'm posting fixup patch.

	https://patchwork.kernel.org/patch/11719919/

Thank you for your help !!

Best regards
---
Kuninori Morimoto



[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux