summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Release v1.2.5.1v1.2.5.1Jaroslav Kysela2021-06-141-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* control: remap - fix an infinite recursive call in the async callbackChih-Wei Huang2021-06-141-1/+1
| | | | | | | | | The function snd_ctl_remap_async will call itself infinitely. Looks like a typo. Fixes: a64391a42 ("control: remap plugin - initial version") Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* Fix EXPORT_SYMBOL attribute for clangChih-Wei Huang2021-06-141-0/+4
| | | | | | | | | | Clang doesn't have the externally_visible attribute. src/pcm/pcm.c:1503:1: error: unknown attribute 'externally_visible' ignored [-Werror,-Wunknown-attributes] #define EXPORT_SYMBOL __attribute__((visibility("default"),externally_visible)) ^ Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* configure: check if eaccess() is availableChih-Wei Huang2021-06-143-0/+9
| | | | | | | | | | | To fix the build error on Android: src/ucm/parser.c:2521:7: error: implicit declaration of function 'eaccess' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (eaccess(filename, R_OK)) ^ src/ucm/parser.c:2521:7: note: did you mean 'access'? Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ucm: include sys/wait.h to fix build on AndroidChih-Wei Huang2021-06-141-0/+1
| | | | | | | | | | | | | | src/ucm/main.c:788:8: error: implicit declaration of function 'WIFSIGNALED' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (WIFSIGNALED(err)) { ^ src/ucm/main.c:790:10: error: implicit declaration of function 'WIFEXITED' is invalid in C99 [-Werror,-Wimplicit-function-declaration] } if (WIFEXITED(err)) { ^ src/ucm/main.c:791:34: error: implicit declaration of function 'WEXITSTATUS' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (ignore_error == false && WEXITSTATUS(err) != 0) { Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ucm_exec.c: Include limits.h explicitly to fix build on muslAndreas Müller2021-06-041-0/+1
| | | | | | | | | | | | | | | | | 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>
* ucm: compound_merge() - fix use after free (and logic)Jaroslav Kysela2021-06-031-3/+5
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ucm: fix possible memory leak in parse_verb_file()Jaroslav Kysela2021-06-031-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* pcm: direct - remove dead codeJaroslav Kysela2021-06-031-2/+0
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* conf: snd_config_get_card() remove unused assignmentJaroslav Kysela2021-06-031-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ucm: fix out-of-array access in rval_device_lookup_init()Jaroslav Kysela2021-06-021-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ucm: check error value in parse_lookup_query()Jaroslav Kysela2021-06-021-1/+5
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ucm: fix possible NULL pointer dereference in uc_mgr_exec()Jaroslav Kysela2021-06-021-1/+5
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ucm: find_exec() - fix memory leak (dir)Jaroslav Kysela2021-06-021-0/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ucm: fix if_eval_path() - access NULL pointerJaroslav Kysela2021-06-021-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ucm: fix use after free in if_eval_regex_match()Jaroslav Kysela2021-06-021-1/+2
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ucm: fix error path in execute_cfgsave()Jaroslav Kysela2021-06-021-1/+3
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* timer: remove dead code in _snd_timer_hw_open()Jaroslav Kysela2021-06-021-2/+0
|
* pcm: softvol - fix early exit in add_tlv_info()Jaroslav Kysela2021-06-021-2/+2
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* pcm: remove extra NULL checks in snd_pcm_dshare_open()Jaroslav Kysela2021-06-021-8/+5
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* pcm: remove extra NULL checks in snd_pcm_dsnoop_open()Jaroslav Kysela2021-06-021-8/+5
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* pcm: remove extra NULL checks in snd_pcm_dmix_open()Jaroslav Kysela2021-06-021-7/+4
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* pcm: direct - fix pcmp error path in _snd_pcm_direct_new()Jaroslav Kysela2021-06-021-9/+12
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* control: remap - fix uninitialized value in parse_map_vindex()Jaroslav Kysela2021-06-021-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* conf: remove dead code in snd_config_get_card()Jaroslav Kysela2021-06-021-3/+3
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ucm: fix _alibpref string (add '.' delimiter to the end)Jaroslav Kysela2021-06-021-2/+2
| | | | | Fixes: 0e4ba2ea ("ucm: add _alibpref to get the private device prefix") Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ucm: add _alibpref to get the private device prefixJaroslav Kysela2021-06-022-0/+22
| | | | | | | 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>
* conf: fix load_for_all_cards()Jaroslav Kysela2021-06-021-5/+28
| | | | | | | | | | | | 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>
* Release v1.2.5v1.2.5Jaroslav Kysela2021-05-271-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* pcm: hw - correct the comment in snd_pcm_hw_state()Jaroslav Kysela2021-05-271-2/+2
| | | | | Fixes: c7a939ee ("pcm: hw - fix again snd_pcm_hw_state() when the driver was disconnected") Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* pcm: hw - fix again snd_pcm_hw_state() when the driver was disconnectedJaroslav Kysela2021-05-271-3/+4
| | | | | Fixes: 2c8e31f5 ("pcm: hw - fix snd_pcm_hw_state()") Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* seq: fix snd_seq_parse_address()Jaroslav Kysela2021-05-261-12/+30
| | | | | | | | 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>
* topology/pcm.c: remove duplicated AC97 hw formatChao Song2021-05-261-4/+0
| | | | | | | | 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>
* include: try to fix the out-of-source-tree buildJaroslav Kysela2021-05-251-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* include: fix out-of-source-tree buildJaroslav Kysela2021-05-251-5/+12
| | | | | | | | | | | | | | | | | | | | | 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>
* pcm: hw - fix snd_pcm_hw_state()Jaroslav Kysela2021-05-251-3/+3
| | | | | | | | 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>
* ucm: compound_merge - use snd_config_merge()Jaroslav Kysela2021-05-241-7/+30
| | | | | | | 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>
* conf: snd_config_merge() - substitute non-compound config handlesJaroslav Kysela2021-05-241-9/+13
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* conf: snd_config_merge() - merge (concat) correctly arraysJaroslav Kysela2021-05-241-1/+29
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* conf: return count of items in snd_config_is_array()Jaroslav Kysela2021-05-241-3/+4
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ucm: recognize first '-' character as ignore error for exec/shellJaroslav Kysela2021-05-181-4/+11
| | | | | | It may be useful to ignore the returned errors (like modprobe etc). Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* conf: print quoted string more wiselyJaroslav Kysela2021-05-181-9/+12
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ucm: cfg-save - allow to save the sub-tree including root keysJaroslav Kysela2021-05-182-6/+20
| | | | | | | 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>
* ucm: libconfig - merge not override itemsJaroslav Kysela2021-05-181-2/+2
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ucm: libconfig parser - fix memory leaksJaroslav Kysela2021-05-181-7/+3
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* conf: fix snd_config_merge() - merge schemaJaroslav Kysela2021-05-181-2/+11
| | | | | | All child compounds must be traversed and merged. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* control: remap - add no-op when the remapping is not activeJaroslav Kysela2021-05-171-4/+12
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ucm: add cfg-save commandJaroslav Kysela2021-05-174-0/+56
| | | | | | | | | | | | | 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>
* ucm: fix memory leak in execute_cset()Jaroslav Kysela2021-05-141-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ucm: parse LibraryConfig also in the toplevel fileJaroslav Kysela2021-05-131-2/+12
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>