From 6d51b4bb1117c23b5210503f9ec98c1bad1230e0 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Sun, 9 Mar 2025 13:04:36 +0200 Subject: [PATCH] spa: acp: be more noisy when UCM profiles fail to be supported Generally ALSA UCM profiles should all work as they're supposed to be device-specific, so be more noisy when the profile fails to be supported due to the PCM device failing to open. Some logging on the probe outcome in failure case also makes spa-acp-tool etc. log output easier to read. --- spa/plugins/alsa/acp/alsa-ucm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spa/plugins/alsa/acp/alsa-ucm.c b/spa/plugins/alsa/acp/alsa-ucm.c index 77e476eb8..f64c573a4 100644 --- a/spa/plugins/alsa/acp/alsa-ucm.c +++ b/spa/plugins/alsa/acp/alsa-ucm.c @@ -2548,7 +2548,7 @@ static void ucm_probe_profile_set(pa_alsa_ucm_config *ucm, pa_alsa_profile_set * pa_log_info("Set ucm verb to %s", verb_name); if ((snd_use_case_set(ucm->ucm_mgr, "_verb", verb_name)) < 0) { - pa_log("Failed to set verb %s", verb_name); + pa_log("Profile '%s': failed to set verb %s", p->name, verb_name); p->supported = false; continue; } @@ -2565,6 +2565,8 @@ static void ucm_probe_profile_set(pa_alsa_ucm_config *ucm, pa_alsa_profile_set * m->output_pcm = mapping_open_pcm(ucm, m, SND_PCM_STREAM_PLAYBACK, false); if (!m->output_pcm) { + pa_log_info("Profile '%s' mapping '%s': output PCM open failed", + p->name, m->name); p->supported = false; break; } @@ -2583,6 +2585,8 @@ static void ucm_probe_profile_set(pa_alsa_ucm_config *ucm, pa_alsa_profile_set * m->input_pcm = mapping_open_pcm(ucm, m, SND_PCM_STREAM_CAPTURE, false); if (!m->input_pcm) { + pa_log_info("Profile '%s' mapping '%s': input PCM open failed", + p->name, m->name); p->supported = false; break; } @@ -2591,6 +2595,7 @@ static void ucm_probe_profile_set(pa_alsa_ucm_config *ucm, pa_alsa_profile_set * if (!p->supported) { profile_finalize_probing(p); + pa_log_info("Profile %s not supported", p->name); continue; }