diff mbox series

ASoC: soc-core.c: Log components string to help with UCM profile development

Message ID 20231021211710.115239-1-hdegoede@redhat.com (mailing list archive)
State New, archived
Headers show
Series ASoC: soc-core.c: Log components string to help with UCM profile development | expand

Commit Message

Hans de Goede Oct. 21, 2023, 9:17 p.m. UTC
Various ASoC board/card drivers use a components string to communicate
to userspace which output (speakers / headphones) and input (internal mic /
headset mic) routes have been setup by the card driver so that the UCM
profiles can dynamically adjust to this.

ATM it is sort of hard to figure out what the component string has
actually been set to by the kernel. Log the components string set on
the snd_soc_card to help with UCM profile development.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
An alternative solution would be to add this to the asoc debugfs.
---
 sound/soc/soc-core.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jaroslav Kysela Oct. 22, 2023, 9:21 a.m. UTC | #1
On 21. 10. 23 23:17, Hans de Goede wrote:
> Various ASoC board/card drivers use a components string to communicate
> to userspace which output (speakers / headphones) and input (internal mic /
> headset mic) routes have been setup by the card driver so that the UCM
> profiles can dynamically adjust to this.
> 
> ATM it is sort of hard to figure out what the component string has
> actually been set to by the kernel. Log the components string set on
> the snd_soc_card to help with UCM profile development.

I don't think that it's hard to invoke command like 'amixer -c 0 info' to view 
the components string.

					Jaroslav
Hans de Goede Oct. 22, 2023, 12:52 p.m. UTC | #2
Hi Jaroslav,

On 10/22/23 11:21, Jaroslav Kysela wrote:
> On 21. 10. 23 23:17, Hans de Goede wrote:
>> Various ASoC board/card drivers use a components string to communicate
>> to userspace which output (speakers / headphones) and input (internal mic /
>> headset mic) routes have been setup by the card driver so that the UCM
>> profiles can dynamically adjust to this.
>>
>> ATM it is sort of hard to figure out what the component string has
>> actually been set to by the kernel. Log the components string set on
>> the snd_soc_card to help with UCM profile development.
> 
> I don't think that it's hard to invoke command like 'amixer -c 0 info' to view the components string.

Ah I wasn't aware that this info could be easily retrieved with
'amixer -c # info'.

But since I know now I don't need this patch anymore, so lets drop this patch.

Regards,

Hans
diff mbox series

Patch

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index cc442c52cdea..7d199251c6c5 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2154,6 +2154,7 @@  static int snd_soc_bind_card(struct snd_soc_card *card)
 				card->name, ret);
 			goto probe_end;
 		}
+		dev_info(card->dev, "components: %s\n", card->components);
 	}
 
 	ret = snd_soc_card_late_probe(card);