Commit graph

21 commits

Author SHA1 Message Date
Maciej Strozek
d4cf5da490 control: ucm: add ioctl to retrieve full card components
The fixed-size components field in SNDRV_CTL_IOCTL_CARD_INFO can be too
small on systems with many audio devices. The kernel [1] will provide a
new ioctl to read the full string while truncating the original in
card_info if it grows too big. Make sure the code falls back to original
if the new ioctl is not supported.

[1]: https://lore.kernel.org/all/20260122111249.67319-1-mstrozek@opensource.cirrus.com/
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
2026-01-22 11:17:37 +00:00
Jaroslav Kysela
47f4f9b73b coverity.com fixes - initial round
This commit tries to fix a bunch of issues found
by coverity.com.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-11-12 15:36:29 +01:00
Jaroslav Kysela
62c8e635dc replace SNDMSG,SYSMSG,SNDERR,SYSERR with new log macros
... with interface identifiers

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-11-07 18:09:26 +01:00
Jaroslav Kysela
e088d08c76 control: remap - improve sync feature
It may be useful to deactivate the sync mechanism for some configurations.
Create a new virtual boolean control for this.

Link: https://github.com/alsa-project/alsa-ucm-conf/pull/410
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-03-24 11:50:52 +01:00
Jaroslav Kysela
d5f19bcabc control: remap - add sync feature
For UCM, it may be required to sync multiple controls. The logic
is really simple - last write to any control in the group wins.

Link: https://github.com/alsa-project/alsa-ucm-conf/pull/410
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-03-21 10:39:09 +01:00
Jaroslav Kysela
42b8f1299f control: remap - separate event handling from map (preparation for sync)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-03-21 09:43:04 +01:00
Jaroslav Kysela
6855cb838d control: remap - add possibility to remap multiple source channels
For UCM (ASoC), there is a requirement to remap two stereo
controls to one stereo control (amplifiers).

Link: https://github.com/alsa-project/alsa-ucm-conf/pull/525
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-03-19 17:55:33 +01:00
Jaroslav Kysela
49295a4e17 control: remap - clarify comments and docs
Fix copy-n-paste errors.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2024-11-12 10:32:56 +01:00
Jaroslav Kysela
4e7a510095 control: remap - fix copy-n-paste in _snd_ctl_remap_open's comment
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2024-10-24 11:08:00 +02:00
Jaroslav Kysela
60d6fad711 control: remap - fix the endless loop in remap_numid_child_new()
Avoid the new numid search for the maped only controls.

Link: https://lore.kernel.org/alsa-devel/20231219164539.GB14858@ediswmail.ad.cirrus.com/
Reported-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-12-19 18:45:54 +01:00
borine
473a2eaba8 doxygen: control: silence 'not documented' item warnings
From: borine@github
Link: https://github.com/alsa-project/alsa-lib/pull/340
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-01 16:11:34 +02:00
Jaroslav Kysela
ad3a8b8b31 reshuffle included files to include config.h as first
config.h may contain defines like _FILE_OFFSET_BITS which influence
the system wide include files (off_t types, open -> open64 function
usage etc.).

Related: https://github.com/alsa-project/alsa-lib/pull/333
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 18:25:37 +02:00
Jaroslav Kysela
507d906abb pcm: add SND_CTL_EINTR open mode
Add possibility to return -EINTR instead waiting for the event. The
applications may want to handle -EINTR condition themselves.

BugLink: https://github.com/alsa-project/alsa-lib/issues/228
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-05-03 15:59:15 +02:00
Jaroslav Kysela
23a191a82c control: remap - assign right name to the child handle for no-op (2nd case)
Fixes: https://github.com/alsa-project/alsa-utils/issues/100
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-06-29 19:31:35 +02:00
Jaroslav Kysela
e47c11822d control: remap - assign right name to the child handle for no-op
Fixes: https://github.com/alsa-project/alsa-utils/issues/100
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-06-29 18:02:30 +02:00
Chih-Wei Huang
f4c061f349 control: remap - fix an infinite recursive call in the async callback
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>
2021-06-14 10:14:40 +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
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
3e731ff51e control: remap - don't allow I/O on renamed IDs
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-04-23 21:11:25 +02:00
Jaroslav Kysela
493a41bcad control: remap plugin - add docs
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-04-07 16:24:09 +02:00
Jaroslav Kysela
a64391a428 control: remap plugin - initial version
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-04-07 16:22:50 +02:00