Re: [PATCH] ASoC: meson: aiu: fix duplicate debugfs directory error

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

 



On Tue, Mar 08, 2022 at 08:00:14PM +0100, Heiner Kallweit wrote:
> On a S905W-based system I get the following error:
> debugfs: Directory 'c1105400.audio-controller' with parent 'P230-Q200' already present!
> 
> Turned out that multiple components having the same name triggers this
> error in soc_init_component_debugfs(). With the patch the error is
> gone and that's the debugfs entries.

Hi Heiner,

Thanks for the patches!

This one has been bugging me for quite some time, I'm glad you took time
to fix it.

I'm sure Martin and the BayLibre folks will soon review both of your patches,
just wanted to thank you.

> 
> /sys/kernel/debug/asoc/P230-Q200/aiu_acodec:c1105400.audio-controller
> /sys/kernel/debug/asoc/P230-Q200/aiu_hdmi:c1105400.audio-controller
> /sys/kernel/debug/asoc/P230-Q200/aiu_cpu:c1105400.audio-controller
> 
> Because debugfs is affected only, this may not be something for stable.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@xxxxxxxxx>
> ---
>  sound/soc/meson/aiu.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/sound/soc/meson/aiu.c b/sound/soc/meson/aiu.c
> index d299a70db..c1a2aea5f 100644
> --- a/sound/soc/meson/aiu.c
> +++ b/sound/soc/meson/aiu.c
> @@ -68,6 +68,20 @@ int aiu_of_xlate_dai_name(struct snd_soc_component *component,
>  
>  	*dai_name = dai->driver->name;
>  
> +	switch (component_id) {
> +	case AIU_CPU:
> +		component->debugfs_prefix = "aiu_cpu";
> +		break;
> +	case AIU_HDMI:
> +		component->debugfs_prefix = "aiu_hdmi";
> +		break;
> +	case AIU_ACODEC:
> +		component->debugfs_prefix = "aiu_acodec";
> +		break;
> +	default:
> +		break;
> +	}
> +
>  	return 0;
>  }
>  
> -- 
> 2.35.1
> 



[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