1
0
Fork 0
Commit graph

2070 commits

Author SHA1 Message Date
Konsta
6a4bf9f6b9 Merge tag 'v1.2.16' of https://github.com/alsa-project/alsa-utils into android-16.0
Some checks failed
Build alsa-utils / fedora_latest_build (push) Has been cancelled
Build alsa-utils / ubuntu_last_build (push) Has been cancelled
Release v1.2.16

Core
 - Release v1.2.16
 - INSTALL: update compilation from git sources
 - configure: update to autoconf v2.72
ALSA Control (alsactl)
 - aplay, alsactl, topology: fix discards const from pointer target
 - Remove more generated files on "make clean"
Speaker Test
 - speaker-test: extend MAX_CHANNELS from 16 to 32
 - speaker-test: fix segfault with more than 16 channels
aconnect
 - aconnect: fix error handler for alsa-lib <= 1.2.15
alsa-info.sh
 - alsa-info.sh: remove some bashisms to allow run with busybox
alsaloop
 - alsaloop: parse_config(): align optstring order with the long options
 - alsaloop: parse_config(): handle long form --wake option
 - alsaloop: parse_config(): drop unused 'F' option
 - alsaloop: parse_config(): handle short form -B / -E options
alsatplg (topology)
 - aplay, alsactl, topology: fix discards const from pointer target
amixer
 - amixer: always use line buffering for (s)events
 - amixer: document --file option in man page
 - amixer: support --file option
 - amixer: support infinite line length for --stdin option
aplay/arecord
 - aplay, alsactl, topology: fix discards const from pointer target
 - Remove more generated files on "make clean"
 - aplay: use snprintf instead of sprintf in device_list()
gitcompile
 - gitcompile: extensions for gettext and error handling
 - configure: update to autoconf v2.72

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2026-06-18 13:48:05 +03:00
Jaroslav Kysela
9feb22ba45 Release v1.2.16
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2026-06-01 10:24:44 +02:00
Jaroslav Kysela
d0bdee7a32 aconnect: fix error handler for alsa-lib <= 1.2.15
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2026-06-01 10:23:03 +02:00
Anton Khirnov
bcbdf24e01 amixer: always use line buffering for (s)events
Line buffering is the obviously correct mode for (s)events, but block
buffering would typically be used when piping its output to another
program.

Closes: https://github.com/alsa-project/alsa-utils/pull/306
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2026-05-25 12:15:57 +02:00
Rudi Heitbaum
5b44c57e89 alsa-info.sh: remove some bashisms to allow run with busybox
Closes: https://github.com/alsa-project/alsa-utils/pull/316
Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2026-05-25 12:05:44 +02:00
Peter Korsgaard
884247144d alsaloop: parse_config(): align optstring order with the long options
The 'd' and 'm' options were not in the same order as the long options.  Fix
that.

No functional change, but makes it easier to ensure they are kept in sync.

Closes: https://github.com/alsa-project/alsa-utils/pull/317
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2026-05-25 11:54:34 +02:00
Peter Korsgaard
cdc401783b alsaloop: parse_config(): handle long form --wake option
The usage info documents a long form --wake option:

"-W,--wake      process wake timeout in ms\n"

But it wasn't handled:

alsaloop --wake 42
alsaloop: unrecognized option '--wake'

Fix that.

Closes: https://github.com/alsa-project/alsa-utils/pull/317
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2026-05-25 11:54:34 +02:00
Peter Korsgaard
5a8e040840 alsaloop: parse_config(): drop unused 'F' option
It is not documented in the usage info, no corresponding long option and is
not handled in the parsing, so drop it from the optstring.

Closes: https://github.com/alsa-project/alsa-utils/pull/317
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2026-05-25 11:54:34 +02:00
Peter Korsgaard
d4a4054bc7 alsaloop: parse_config(): handle short form -B / -E options
The usage info documents both short and long form arguments for these:

"-B,--buffer    buffer size in frames\n"
"-E,--period    period size in frames\n"

But the short form was missing from the optstring so it wasn't accepted:

alsaloop -B 123 -E 42
alsaloop: invalid option -- 'B'
alsaloop: invalid option -- 'E'

Fix that.

Closes: https://github.com/alsa-project/alsa-utils/pull/317
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2026-05-25 11:54:34 +02:00
Jaroslav Kysela
d875e571d1 speaker-test: extend MAX_CHANNELS from 16 to 32
Add channel names and WAV filenames for channels 17-32 to support
up to 32-channel speaker testing.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2026-05-25 11:47:36 +02:00
Geoffrey D. Bennett
7c664bce14 speaker-test: fix segfault with more than 16 channels
get_channel_name() was accessing the channel_name array without bounds
checking. When using more than 16 channels without a channel map, it
would read past the end of the array and crash.

Closes: https://github.com/alsa-project/alsa-utils/pull/319
Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2026-05-25 11:40:47 +02:00
Jaroslav Kysela
f3e849b63a amixer: document --file option in man page
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2026-05-25 11:39:14 +02:00
Mikhail Ivashinenko
04fedaa233 amixer: support --file option
Allows to read commands directly from file.
Refactor exec_stdin() to exec_file() function to support generic files.

Closes: https://github.com/alsa-project/alsa-utils/pull/321
Signed-off-by: Mikhail Ivashinenko <miuivashinenko@salutedevices.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2026-05-25 11:34:09 +02:00
Mikhail Ivashinenko
aae3f6d787 amixer: support infinite line length for --stdin option
Closes: https://github.com/alsa-project/alsa-utils/pull/321
Signed-off-by: Mikhail Ivashinenko <miuivashinenko@salutedevices.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2026-05-25 11:34:09 +02:00
Rudi Heitbaum
e73462beaf aplay, alsactl, topology: fix discards const from pointer target
Since glibc-2.43:

For ISO C23, the functions bsearch, memchr, strchr, strpbrk, strrchr,
strstr, wcschr, wcspbrk, wcsrchr, wcsstr and wmemchr that return pointers
into their input arrays now have definitions as macros that return a
pointer to a const-qualified type when the input argument is a pointer
to a const-qualified type.

https://lists.gnu.org/archive/html/info-gnu/2026-01/msg00005.html

Closes: https://github.com/alsa-project/alsa-utils/pull/322
Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2026-05-25 11:30:25 +02:00
Michael Biebl
a886daa313 Remove more generated files on "make clean"
Closes: https://github.com/alsa-project/alsa-utils/pull/328
Signed-off-by: Michael Biebl <biebl@debian.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2026-05-25 11:21:38 +02:00
Jaroslav Kysela
3774d41b95 INSTALL: update compilation from git sources
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2026-05-25 11:15:03 +02:00
Jaroslav Kysela
4391f98f7f gitcompile: extensions for gettext and error handling
The gettextize script tends to suggest some solutions, but we
are using them already.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2026-05-11 18:08:10 +02:00
Jaroslav Kysela
89501d4cfb configure: update to autoconf v2.72
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2026-05-11 17:28:20 +02:00
Nishant Kumar Singh
e731e5a7c7 aplay: use snprintf instead of sprintf in device_list()
sprintf() does not perform bounds checking. Replace it with snprintf()
using sizeof(name) to follow safer coding practices and make the buffer
size explicit, consistent with how similar fixes have been applied
elsewhere in the codebase

Signed-off-by: Nishant Kumar Singh <nishantsingh2jan1998@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-04-11 10:08:52 +02:00
Konsta
86e58921c5 Merge tag 'v1.2.15.2' of https://github.com/alsa-project/alsa-utils into android-16.0
Release v1.2.15.2

Core
 - Release v1.2.15.2
ALSA Control (alsactl)
 - alsactl: fix sequence to clean card specific config files for UCM
 - alsactl: add missing call to clean card specific config files
alsaloop
 - alsaloop: only log xrun debug messages when verbose
aplay/arecord
 - aplay: add support for G.711 A_LAW enconding in AU file format

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2026-01-21 12:35:46 +02:00
Jaroslav Kysela
ed63d017e0 Release v1.2.15.2
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2026-01-08 15:27:59 +01:00
Peter Korsgaard
c38f4bb0d1 alsaloop: only log xrun debug messages when verbose
Xruns can happen quite often (E.G. continuously when using alsaloop to/from
the UAC gadget driver without a connected host), so only log the debug
messages when verbose logging has been requested to not flood the logs.

Closes: https://github.com/alsa-project/alsa-utils/pull/302
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2026-01-08 14:20:14 +01:00
Christophe Leroy
502340490f aplay: add support for G.711 A_LAW enconding in AU file format
At the time being, aplay only supports G.711 µ-law, 8-bits PCM and
16-bits PCM encodings for the AU format while the AU format supports
many more.

In Europe the most G.711 used encoding is the A-law, which is also
part of the encodings supported by the AU file format.

Add support for that encoding in aplay.

Closes: https://github.com/alsa-project/alsa-utils/pull/297
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2026-01-08 14:16:34 +01:00
Jaroslav Kysela
254528c427 alsactl: fix sequence to clean card specific config files for UCM
For UCM, card-specific config files should be removed only when the fixed
boot flag is set or if the card is not the primary card in a given card
group.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2026-01-01 18:41:22 +01:00
Jaroslav Kysela
120568fbb5 alsactl: add missing call to clean card specific config files
The card specific configuration files created at runtime must
be removed before UCM fixed boot sequence in the standard
restore operation.

Fixes: https://github.com/alsa-project/alsa-lib/issues/492
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2026-01-01 17:53:55 +01:00
Konsta
c1f0920da1 Merge tag 'v1.2.15.1' of https://github.com/alsa-project/alsa-utils into android-16.0
Release v1.2.15.1

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-12-31 15:22:26 +02:00
Jaroslav Kysela
7b97437d78 Release v1.2.15.1
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-12-19 11:32:02 +01:00
Bard Liao
a12ec83fa9 aplay: add missing break before the default case
Add the break before the default case back. Otherwise, all cases will
fall into the default/error case.

Closes: https://github.com/alsa-project/alsa-utils/pull/315
Fixes: e78583ab7c ("aplay: reorganize format handling in begin_wave()")
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-12-16 15:09:02 +01:00
Rudi Heitbaum
10587067fc alsactl: fix build when in subdirectory
create the conf directory as part of the edit recipe

Closes: https://github.com/alsa-project/alsa-utils/pull/311
Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-12-08 15:51:01 +01:00
Jaroslav Kysela
e4de863382 Release v1.2.15
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-12-07 20:42:00 +01:00
Jaroslav Kysela
2440724b5d alsactl: fix error message arguments (remove card)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-12-07 10:31:09 +01:00
Achill Gilgenast
6ffd9ede13 configure: Allow systemd service installation without systemd.pc
If the systemdsystemunitdir got passed anyway as a variable, we don't
need the systemd.pc dependency anymore and allow building without a
systemd build-dependency.

Relevant in Alpine Linux, where we allowed systemd services to be
(sub-)packaged (e.g. for downstreams like postmarketOS), but don't have
systemd pacakged in Alpine itself, yet.

Closes: https://github.com/alsa-project/alsa-utils/pull/309
Signed-off-by: Achill Gilgenast <achill@achill.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-12-05 19:20:18 +01:00
qaqland
5910fb39b5 alsactl: fix error handling in check_control_cdev()
Closes: https://github.com/alsa-project/alsa-utils/pull/310
Signed-off-by: qaqland <anguoli@uniontech.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-12-05 19:16:16 +01:00
Jaroslav Kysela
e78583ab7c aplay: reorganize format handling in begin_wave()
Use strictly snd_pcm_format_physical_width/snd_pcm_format_width functions
to determine the sample bit width.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-12-05 19:16:14 +01:00
Jaroslav Kysela
e5316c1aa6 Revert "aplay: fix S24_LE wav header"
This reverts commit 9cdcbe0e93.

It causes regression (see Link). The physical sample width is stored
in byte_p_spl.

Closes: https://github.com/alsa-project/alsa-utils/issues/308
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-12-05 11:26:26 +01:00
Jaroslav Kysela
1ad1825076 alsactl: ucm: restore controls for other cards in group
When the primary card restores controls, all other cards
in the card group should do this operation, too.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-12-04 15:08:14 +01:00
Jaroslav Kysela
f047a8a669 alsactl: move udev/systemd files to conf subdirectory
It is a cleanup to not mix C source code with system configuration files.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-12-04 15:08:14 +01:00
Jaroslav Kysela
bd1643809e alsactl: update state file correctly when initialization failed
There was missing continue statement to save the correct state reporting.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-12-04 15:08:14 +01:00
Jaroslav Kysela
3f66770aa9 alsactl: fix state restore to handle dynamic user control elements
Track user control elements separately and adjust control
count difference checking to account for dynamic user elements.
Prevents false positives in re-init detection when only user
controls have changed.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-12-04 15:08:14 +01:00
Jaroslav Kysela
8a71ec4b73 alsactl: add systemd service to handle deferred card initialization
Add alsa-card-wait@.service to handle cards in waiting state.
Update udev rules to use --export and trigger the wait service
when ALSA_CARD_STATE=waiting. Service runs "alsactl wrestore"
for deferred card initialization.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-12-04 15:08:14 +01:00
Jaroslav Kysela
8d46253ac3 alsactl: ucm: add wrestore command and wait_for_card() for boot synchronization
Implement wait.c with wait_for_card() function to monitor Boot control
element and wait for card readiness using event-based polling.

Add "wrestore" command to wait for card ready state before restore.
Add FLAG_UCM_WAIT flag and move DEFAULT_SYNC_TIME to alsactl.h.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-12-04 15:08:14 +01:00
Jaroslav Kysela
82caf6e7f3 alsactl: add -Y option to export card states as key=value pairs
Add export.c with support for exporting card states as key=value pairs.
Exports ALSA_CARD_NUMBER/ALSA_CARD_STATE for single cards, or
ALSA_CARD#_STATE for multiple cards. States: active, skip, waiting.

Add -Y (--export) option to restore command for state export.

This feature is designed for udev IMPORT{program} use.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-12-04 15:08:14 +01:00
Jaroslav Kysela
bdf5c13778 alsactl: ucm: implement boot parameters and card group sync infrastructure
Implement boot parameter management for multi-card synchronization.

Add boot_params.c with read/write functions for Boot control element,
card group configuration file support, and validity checking.
Extend init_ucm.c with boot/restore logic and card state handling.

Add -G (group-file) and -m (force-ucm-restore) command line options.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-12-04 15:08:14 +01:00
Takashi Iwai
241fd2aecc amidi: Ignore inactive MIDI ports as default at listing
When listing the devices, currently we show all MIDI ports including
inactive ones.  But those inactive ports are rarely useful, and it'd
be more convenient to filter them out.

This patch introduces the filtering of inactive ports at listing
devices via amidi -l option.  When user needs to scan all MIDI ports
including inactive ports, pass the new option -x in addition.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-11-13 18:12:16 +01:00
Jaroslav Kysela
007a74a867 github: coverity.yml - run at 4am on Sunday
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-11-13 15:09:44 +01:00
Jaroslav Kysela
685a8667ad alsactl: free scandir list in snd_card_clean_cfgdir
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-11-13 10:13:44 +01:00
Jaroslav Kysela
04ffa6a091 github: add coverity.yml (coverity.com) workflow
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-11-12 16:40:22 +01:00
Jaroslav Kysela
4b87eb4feb aconnect: add support for new log handler (alsa-lib 1.2.15)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-11-07 17:11:16 +01:00
Jaroslav Kysela
55017b0222 alsamixer: add support for new log handler (alsa-lib 1.2.15)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-11-07 17:04:53 +01:00