We need a boot synchronization for multiple UCM cards where linking
is expected like AMD ACP or Intel AVS drivers. This method is
using a timestamp file which can be created and modified during
the boot process (e.g. from the alsactl tool).
The goal is to return a valid UCM configuration for standard
applications combining multiple ALSA cards into one UCM configuration
and cover the time window when all cards have not been probed yet.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Ensure the SND_CTL_TLV_DB_GAIN_MUTE value is returned when the calculated
gain equals the minimum dB value for the SNDRV_CTL_TLVT_DB_MINMAX_MUTE type.
The previous check based solely on the volume value could miss cases where
the linear calculation resulted in the minimum gain.
Closes: https://github.com/alsa-project/alsa-lib/pull/478
Signed-off-by: qaqland <anguoli@uniontech.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
It was missing closing brackets since its introduction.
Closes: https://github.com/alsa-project/alsa-lib/pull/470
Fixes: 4dfa8f08fb ("conf/cards: add support for pistachio-card.")
Signed-off-by: Olivier Blin <olivier.blin@softathome.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
It is necessary to reset the state logic before each verb variant
is parsed. So save the original variable list and macros and
restore them before each parser iteration.
BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/633
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Examples:
"debug" - Set global level to debug
"3" - Set global level to 3 (info)
"info,pcm:debug" - Set global to info, pcm to debug
"error,mixer:5,pcm:4" - Set global to error, mixer to 5 (trace), pcm to 4 (debug)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Add priority level and interface classifiers. Define macros
for all priority level types to keep the callers more readable.
Ensure the compatibility with previous logging mechanism.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
The origin of this define is in include/alsa/sound/uapi/asound.h included from
include/local.h. Skip redefinition in the internal build.
Fixes: e6d0db9d ("rawmidi: Fix the prefix of the inactive stream flag")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This reverts commit ddfc32abf5.
It was not a correct fix. The private values may differ (multiple
instances for e.g. USB sound cards). This fix prevents to load
private configurations for other instances.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
I copied SNDRV_RAWMIDI_INFO_STREAM_INACTIVE definition as is from the
kernel uapi header, but for alsa-lib, it should have been changed to
SND_ prefix instead.
Put the correct definition while keeping the old SNDRV_ definition for
compatibility (that might be already used by applications).
Fixes: 137eca7720 ("rawmidi: Extensions for tied device and substream inactive flag")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The midifile library used by the playmidi1 program dates from 1989, and
used pre-ANSI function definitions and prototypes. GCC 15 now defaults
to C23 where () means the same as (void) in prototypes, which causes
type mismatch errors.
Update the code to use ANSI function definitions and prototypes, so
it'll compile happily as anything from ANSI C to C23. This revealed that
playmidi1's do_tempo had the wrong argument type, so correct that as
well.
Closes: https://github.com/alsa-project/alsa-lib/pull/463
Signed-off-by: Adam Sampson <ats@offog.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>