Andreas Müller
abe805ed6c
ucm_exec.c: Include limits.h explicitly to fix build on musl
...
Fixes:
| ../../../alsa-lib-1.2.5/src/ucm/ucm_exec.c: In function 'find_exec':
| ../../../alsa-lib-1.2.5/src/ucm/ucm_exec.c:43:18: error: 'PATH_MAX' undeclared (first use in this function)
| 43 | char bin[PATH_MAX];
| | ^~~~~~~~
| ../../../alsa-lib-1.2.5/src/ucm/ucm_exec.c:43:18: note: each undeclared identifier is reported only once for each function it appears in
| ../../../alsa-lib-1.2.5/src/ucm/ucm_exec.c: In function 'uc_mgr_exec':
| ../../../alsa-lib-1.2.5/src/ucm/ucm_exec.c:177:18: error: 'PATH_MAX' undeclared (first use in this function)
| 177 | char bin[PATH_MAX];
| | ^~~~~~~~
Fixes: https://github.com/alsa-project/alsa-lib/pull/145
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-06-04 09:26:36 +02:00
Jaroslav Kysela
0325f4357d
ucm: compound_merge() - fix use after free (and logic)
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-06-03 09:00:51 +02:00
Jaroslav Kysela
e213309060
ucm: fix possible memory leak in parse_verb_file()
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-06-03 07:30:27 +02:00
Jaroslav Kysela
a154cb2904
pcm: direct - remove dead code
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-06-03 07:29:43 +02:00
Jaroslav Kysela
42c0ccf327
conf: snd_config_get_card() remove unused assignment
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-06-03 07:29:11 +02:00
Jaroslav Kysela
30d1d256e7
ucm: fix out-of-array access in rval_device_lookup_init()
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-06-02 20:01:08 +02:00
Jaroslav Kysela
64a6d4d1e8
ucm: check error value in parse_lookup_query()
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-06-02 19:59:10 +02:00
Jaroslav Kysela
26ab7fc3e4
ucm: fix possible NULL pointer dereference in uc_mgr_exec()
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-06-02 19:58:04 +02:00
Jaroslav Kysela
7fcb1aadd5
ucm: find_exec() - fix memory leak (dir)
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-06-02 19:56:13 +02:00
Jaroslav Kysela
7764e3e621
ucm: fix if_eval_path() - access NULL pointer
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-06-02 19:53:24 +02:00
Jaroslav Kysela
9b71d53bde
ucm: fix use after free in if_eval_regex_match()
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-06-02 19:52:12 +02:00
Jaroslav Kysela
200d18cda7
ucm: fix error path in execute_cfgsave()
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-06-02 19:51:13 +02:00
Jaroslav Kysela
cf3846d460
timer: remove dead code in _snd_timer_hw_open()
2021-06-02 19:50:17 +02:00
Jaroslav Kysela
eabadf545c
pcm: softvol - fix early exit in add_tlv_info()
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-06-02 19:49:29 +02:00
Jaroslav Kysela
74c6382df6
pcm: remove extra NULL checks in snd_pcm_dshare_open()
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-06-02 19:46:58 +02:00
Jaroslav Kysela
01a45aec6f
pcm: remove extra NULL checks in snd_pcm_dsnoop_open()
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-06-02 19:39:32 +02:00
Jaroslav Kysela
eb95cad4e2
pcm: remove extra NULL checks in snd_pcm_dmix_open()
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-06-02 19:37:53 +02:00
Jaroslav Kysela
2fee6af9b6
pcm: direct - fix pcmp error path in _snd_pcm_direct_new()
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-06-02 19:35:44 +02:00
Jaroslav Kysela
013ec607db
control: remap - fix uninitialized value in parse_map_vindex()
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-06-02 19:28:32 +02:00
Jaroslav Kysela
2a1dafdbe5
conf: remove dead code in snd_config_get_card()
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-06-02 19:27:27 +02:00
Jaroslav Kysela
9621d0bff2
ucm: fix _alibpref string (add '.' delimiter to the end)
...
Fixes: 0e4ba2ea ("ucm: add _alibpref to get the private device prefix")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-06-02 11:21:54 +02:00
Jaroslav Kysela
0e4ba2ea8c
ucm: add _alibpref to get the private device prefix
...
It may be useful to get the device prefix for the local configuration.
Link: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1251
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-06-02 11:09:46 +02:00
Jaroslav Kysela
ddfc32abf5
conf: fix load_for_all_cards()
...
The 63f7745b commit is loading the driver specific configuration
multiple times which ends with the array merges (see the bug).
Introduce the loaded compound which traces the already loaded
driver configurations and skip the multiple load requests.
Fixes: https://github.com/alsa-project/alsa-lib/issues/143
Fixes: 63f7745b ("conf: extend load_for_all_cards hook (id/value table)")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-06-02 08:49:32 +02:00
Jaroslav Kysela
9f16fa5729
Release v1.2.5
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-05-27 23:30:16 +02:00
Jaroslav Kysela
1e56b1031f
pcm: hw - correct the comment in snd_pcm_hw_state()
...
Fixes: c7a939ee ("pcm: hw - fix again snd_pcm_hw_state() when the driver was disconnected")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-05-27 23:28:20 +02:00
Jaroslav Kysela
c7a939ee31
pcm: hw - fix again snd_pcm_hw_state() when the driver was disconnected
...
Fixes: 2c8e31f5 ("pcm: hw - fix snd_pcm_hw_state()")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-05-27 22:01:38 +02:00
Jaroslav Kysela
c8f608d674
seq: fix snd_seq_parse_address()
...
Use safe_strtol() for the integer conversion. Also accept
client name in "" or '' notation.
BugLink: https://github.com/alsa-project/alsa-utils/issues/90
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-05-26 17:29:48 +02:00
Chao Song
aa70b19d4c
topology/pcm.c: remove duplicated AC97 hw format
...
Remove the second occurrence of AC97 hardware format
from audio hardware format array.
Signed-off-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-05-26 10:19:15 +02:00
Jaroslav Kysela
f9bb2487ac
include: try to fix the out-of-source-tree build
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-05-25 17:13:06 +02:00
Jaroslav Kysela
b0e99e4cfe
include: fix out-of-source-tree build
...
Fixes:
cd alsa-lib
if test -r Makefile; then
make distclean
fi
mkdir build
cd build
../configure
make
Note:
The srcdir is used for the symlinks to generated include files :-(
I've not found a better (easy) way to fix this.
Fixes: https://github.com/alsa-project/alsa-lib/issues/136
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-05-25 16:43:25 +02:00
Jaroslav Kysela
2c8e31f509
pcm: hw - fix snd_pcm_hw_state()
...
The pcm status function should not return an error code.
Return always only the mmaped status.
Fixes: https://github.com/alsa-project/alsa-lib/issues/137
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-05-25 15:30:45 +02:00
Jaroslav Kysela
6b72840569
ucm: compound_merge - use snd_config_merge()
...
It's useful to do the full tree merge (append).
Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/92
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-05-24 12:14:47 +02:00
Jaroslav Kysela
b623b5dfed
conf: snd_config_merge() - substitute non-compound config handles
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-05-24 12:14:47 +02:00
Jaroslav Kysela
6a944d1b2a
conf: snd_config_merge() - merge (concat) correctly arrays
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-05-24 12:14:45 +02:00
Jaroslav Kysela
e3edbf6e3b
conf: return count of items in snd_config_is_array()
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-05-24 09:27:17 +02:00
Jaroslav Kysela
3fd1de5cbe
ucm: recognize first '-' character as ignore error for exec/shell
...
It may be useful to ignore the returned errors (like modprobe etc).
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-05-18 16:37:17 +02:00
Jaroslav Kysela
8eaa03b7c9
conf: print quoted string more wisely
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-05-18 13:17:13 +02:00
Jaroslav Kysela
0ee4642a69
ucm: cfg-save - allow to save the sub-tree including root keys
...
The leading '+' in the keys specification add the key prefix
(sub-tree root identification) to the saved configuration.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-05-18 12:33:43 +02:00
Jaroslav Kysela
225d3aecb6
ucm: libconfig - merge not override items
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-05-18 11:30:21 +02:00
Jaroslav Kysela
b2b3658fb9
ucm: libconfig parser - fix memory leaks
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-05-18 11:30:21 +02:00
Jaroslav Kysela
4522e2008f
conf: fix snd_config_merge() - merge schema
...
All child compounds must be traversed and merged.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-05-18 11:30:15 +02:00
Jaroslav Kysela
d6f9e9f590
control: remap - add no-op when the remapping is not active
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-05-17 17:03:39 +02:00
Jaroslav Kysela
5e7c507152
ucm: add cfg-save command
...
Allow to save whole (or partial) local UCM alsa library configuration
to a file.
Syntax (saves key1.key2 sub-tree):
Sequence [
cfg-save "/tmp/my-file.conf:key1.key2"
]
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-05-17 16:49:46 +02:00
Jaroslav Kysela
f821f09727
ucm: fix memory leak in execute_cset()
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-05-14 12:49:14 +02:00
Jaroslav Kysela
d9658b7509
ucm: parse LibraryConfig also in the toplevel file
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-05-13 18:28:20 +02:00
Jaroslav Kysela
ffb401ba22
conf: load the card specific configurations to the config sub-tree
...
The /var/lib/alsa/card<CARDNO>.conf.d configurations are loaded
to the cards.<CARDNO> tree only (overwrite mode).
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-05-13 11:04:33 +02:00
Jaroslav Kysela
1aef5a8f8a
conf: add snd_config_make_path() function
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-05-13 11:02:41 +02:00
Jaroslav Kysela
3050af4b90
conf: add snd_config_is_empty() function
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-05-13 10:59:47 +02:00
Jaroslav Kysela
da33eda632
pcm: fix open in direct plugins - wrong pointer assignment
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-05-13 10:18:27 +02:00
Jaroslav Kysela
15b59a5647
conf: _snd_config_evaluate - remove 'delete compound members' call
...
With the recent snd_config_substitute() fix, remove the duplicate
code.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-05-12 12:13:31 +02:00