fixes autoconf-2.70 warnings. should be compatible down to autoconf-2.59.
BugLink: https://github.com/alsa-project/alsa-lib/pull/106
Signed-off-by: Ozkan Sezer <sezeroz@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
The application should know, that there is no special
initialization sequence. It's counterpart for
"ucm: return error if boot_list is empty".
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
If bootlist is empty, that means there is no BootSequence defined
in the ucm for this sound card, let set_boot_user() return error,
then alsactl could have chance to use non-ucm ways to initialize the
sound card.
BugLink: https://github.com/alsa-project/alsa-lib/pull/94
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Otherwise, there will be a "Digital Output(S/PDIF)-Cmedia Audio" from
Gnome UI, but there is no this physical interface on the card.
BugLink: https://github.com/alsa-project/alsa-lib/pull/122
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
The Dell Professional Sound Bar AE515 shows up in GNOME Settings with
a digital output that doesn't physically exist. Add it to the list
to suppress this.
BugLink: https://github.com/alsa-project/alsa-lib/pull/124
From: drjhe
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
The Plantronics Blackwire 3220 Series headset (USB ID 047f:c056) shows up
in GNOME Settings with a non-existent digital output. Add it to the list
to suppress this.
BugLink: https://github.com/alsa-project/alsa-lib/pull/126
From: drjhe
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Currently shared memory pointer is initialized to 0 and set to -1
in some, but not in all error paths.
In cleanup path of open the shm pointer is only compared to be non-NULL
before dereferencing it which leads to SEGFAULT in case it was set to -1.
This patch initializes pointer to -1 to have a unique identification
for invalid pointer and also checks for pointer being not -1 on
access in cleanup path.
Signed-off-by: Vanitha Channaiah <vanitha.channaiah@in.bosch.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit allows to define private alsa-lib's configuration. When
the configuration is present, the device values ("PlaybackCTL",
"CaptureCTL", "PlaybackMixer", "CaptureMixer", "CapturePCM")
are prefixed with '_ucmHEXA.' string where HEXA is replaced by the
unique hexadecimal number identifying the opened ucm manager handle.
Syntax 4
LibraryConfig.a_label.SubstiConfig {
# substituted library configuration like:
usr_share_dir "${ConfLibDir}"
}
LibraryConfig.b_label.Config {
# non-substituted library configuration like:
usr_share_dir "/usr/share/alsa"
}
The File counterparts:
LibraryConfig.c_label.SubstiFile "/some/path"
LibraryConfig.d_label.File "/some/path"
Note that for files the contents is substituted on the request,
but the file name is always substituted (useful for ${ConfDir} etc.).
The private configuration is not saved or preserved. It's life time
belongs to the opened ucm manager handle.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
It may be handy to put extra configurations or symlinks to
the global runtime directory. The configurations may be
created at boot / hotplug event by udev or other scripts.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This command create a new control using ID, description and value.
Syntax:
cset-new "name='ABCD',index=2 type=boolean,count=2 on,on"
cset-new "name='Enum' type=enum,labels='L1;L2;L3' 'L2'"
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
- add asserts to check if the unsigned integers are in the valid range
- replace tuple with set in the id description
- add const prefix for id1
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
The previous fix for memory leaks introduced a few regression.
The major one is the assert hit in the error path reaching with NULL
or uninitialized sub object. Also, in other code paths, it's possible
that an already released sub object gets freed again.
Fix those bugs by initializing the sub object properly and add a NULL
check before calling snd_config_delete().
Fixes: ad5f255b47 ("conf: fix memory leak on the error path in parse_args()")
Reported-and-tested-by: Mark Hills <mark@xwax.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This file is problematic for the git's tab checker.
The unexpand tool is used to convert initial spaces
to tabs.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Actually, the BootSequence is executed only when the driver controls
(identifiers or value types) are changed. It may be handy to have
also a sequence which is executed at _each_ boot without any condition.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
The internal represention of an array is:
{
0 value1
1 value2
2 value2
...
}
which is identicatal to shorter:
[
value1
value2
value3
]
Always print the short format. It's more optimized and readable.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Unify simple_none: base_len() exception handling:
1. In the "Input Source" and "3D Control" cases the base-name is the same
as the full-name and base_len() simply returns strlen(name).
Instead of returning 0 when the type is unknown, set the type to
CTL_SINGLE and return strlen(name). This allows removing the special
case for base_len() returning 0 in simple_event_add().
2. Move the special handling for "Capture Volume" and "Capture Switch"
from simple_event_add() to base_len(), so that we handle all exceptions
inside base_len(). Instead of handling some special cases in base_len()
and other special cases in simple_event_add().
[jk - moved the "Capture Volume" and "Capture Switch" to "Input Source"
exceptions]
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>