[PATCH alsa-utils] alsactl: Add --quiet option to suppress alsa-lib error messages

Jaroslav Kysela perex at perex.cz
Thu Oct 28 12:25:03 CEST 2021


On 28. 10. 21 8:18, Takashi Iwai wrote:
> On Wed, 27 Oct 2021 19:25:29 +0200,
> Jaroslav Kysela wrote:
>>
>> On 27. 10. 21 16:40, Takashi Iwai wrote:
>>> alsactl prints error messages from alsa-lib as is, and it's rather
>>> annoying to see the error messages like
>>>
>>>     alsactl[xxx]: alsa-lib parser.c:242:(error_node) UCM is not supported for this HDA model (HDA Intel PCH...)
>>>     alsactl[xxx]: alsa-lib main.c:1405:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -6
>>>
>>> that are recorded in the syslog at each boot.
>>>
>>> This patch adds --quiet (or -q) option to suppress those error
>>> messages from alsa-lib, and applies to the systemd services as
>>> default.
>>
>> The fix is inaccurate as it's just a warning not an error.
> 
> But it says "error" :)
> 
>> The
>> question is, how to signal those warnings to users to eliminate the
>> confusion.
>>
>> The suppression of all alsa-lib errors does not seem like a good idea to me.
> 
> At least the messages that are no real errors should not be shown in
> that way.  It's nothing but confusing.

 From the UCM perspective, it's an error, because the configuration is 
missing. UCM does not know anything about the legacy fallback. But yes, we 
should not confuse users. I tried to fix this in another way. It should hide 
only those specific messages.

https://github.com/alsa-project/alsa-utils/commit/af62c72e2d6db960405eb1bd8d50206d1600c392

https://github.com/alsa-project/alsa-lib/commit/23198a72cd4f8f8759e650362b4adb485fc9fb12

					Jaroslav

-- 
Jaroslav Kysela <perex at perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.


More information about the Alsa-devel mailing list