[PATCH] ALSA: core: sysfs: show components string
Takashi Sakamoto
o-takashi at sakamocchi.jp
Tue Mar 24 10:01:53 CET 2020
On Tue, Mar 24, 2020 at 12:12:15AM -0500, Pierre-Louis Bossart wrote:
> when people report that their microphone is not reported by PulseAudio/UCM,
> it's very helpful to know what UCM was supposed to use in the first place.
> We don't have a debugger or step-by-step mechanisms to figure out what the
> configurations are.
If I get your intension correctly, the addition of sysfs node is just to
investigate which use-case configuration is applied in cases that people
get issues. If so, it's really exaggerative in a point of the concept of
sysfs.
I have two alternatives. If it's possible to focus on ALSA SoC part only,
addition of node to debugfs is reasonable for this purpose.
Another alternative is to change output of 'cards' node of procfs. The
latter is commonly available for all cases. For example:
diff --git a/sound/core/init.c b/sound/core/init.c
index b02a99766351..9a04974c1d19 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -805,6 +805,8 @@ static void snd_card_info_read(struct snd_info_entry *entry,
card->shortname);
snd_iprintf(buffer, " %s\n",
card->longname);
+ snd_iprintf(buffer, " %s\n",
+ card->component);
}
mutex_unlock(&snd_card_mutex);
}
(If you're investigating to use rules of udevd for automated application
of UCM-based operation, there's a space to investigate the merit to expose
information via sysfs node. But actually you're not...)
Regards
Takashi Sakamoto
More information about the Alsa-devel
mailing list