]> git.alsa-project.org Git - alsa-lib.git/log
alsa-lib.git
5 weeks agotest: update midifile library to ANSI C master
Adam Sampson [Sun, 6 Jul 2025 04:07:45 +0000 (05:07 +0100)]
test: update midifile library to ANSI C

The midifile library used by the playmidi1 program dates from 1989, and
used pre-ANSI function definitions and prototypes. GCC 15 now defaults
to C23 where () means the same as (void) in prototypes, which causes
type mismatch errors.

Update the code to use ANSI function definitions and prototypes, so
it'll compile happily as anything from ANSI C to C23. This revealed that
playmidi1's do_tempo had the wrong argument type, so correct that as
well.

Closes: https://github.com/alsa-project/alsa-lib/pull/463
Signed-off-by: Adam Sampson <ats@offog.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 weeks agoucm: use close_range on _GNU_SOURCE
Jochen Sprickerhof [Sun, 15 Jun 2025 08:10:52 +0000 (10:10 +0200)]
ucm: use close_range on _GNU_SOURCE

Closes: https://github.com/alsa-project/alsa-lib/pull/459
Signed-off-by: Jochen Sprickerhof <git@jochen.sprickerhof.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 weeks agoForce to use alphasort64() sorting function for Harmony OS
wyjstrong [Tue, 29 Jul 2025 06:58:43 +0000 (14:58 +0800)]
Force to use alphasort64() sorting function for Harmony OS

Closes: https://github.com/alsa-project/alsa-lib/pull/467
Signed-off-by: wyjstrong <wyjstrong@163.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 weeks agopcm: add a loop to snd_pcm_avail_delay() to avoid bogus delay values
Kai Vehmanen [Thu, 31 Jul 2025 12:37:33 +0000 (15:37 +0300)]
pcm: add a loop to snd_pcm_avail_delay() to avoid bogus delay values

snd_pcm_avail_delay() is expected to report avail and delay values
in atomic fashion. However the function does two separate syscalls
and it cannot guarantee the avail value is the same as was used
to calculate the delay. This is a problem as the reported delay is
always relative to avail frames value.

If application (like e.g. alsa_conformance_test) uses snd_pcm_avail_delay()
to estimate the effective play position, it can observe bogus delay
values (and effective play position going backwards) if
snd_pcm_avail_delay() is called during a DMA burst where hw_ptr
moves quickly.

This commit adds a loop similar to that used in snd_pcm_hw_htimestamp()
to wait until we get a stable avail reading, and only then extract
the delay. This will avoid bogus values if function is called during
DMA bursts.

Closes: https://github.com/alsa-project/alsa-lib/pull/469
Closes: https://github.com/alsa-project/alsa-lib/issues/468
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 months agoucm: regex: fix the error message (missing argument)
Jaroslav Kysela [Thu, 26 Jun 2025 09:33:15 +0000 (11:33 +0200)]
ucm: regex: fix the error message (missing argument)

Link: https://github.com/alsa-project/alsa-ucm-conf/pull/580
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 months agoconf: aliases: add hda-acpi -> HDA-Intel alias
Daniel Dadap [Thu, 15 May 2025 13:32:35 +0000 (08:32 -0500)]
conf: aliases: add hda-acpi -> HDA-Intel alias

The new snd_hda_acpi driver in Linux exposes the existing Azalia
interface to non-PCI devices advertised over ACPI. Add an alias
to the existing HDA-Intel configuration file so that devices using
this driver can be discovered properly.

Signed-off-by: Daniel Dadap <ddadap@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 months agomixer: bag - fix bag_del_all implementation (missing free)
Jaroslav Kysela [Fri, 9 May 2025 07:55:00 +0000 (09:55 +0200)]
mixer: bag - fix bag_del_all implementation (missing free)

The bag1_t structure must be freed, too.

Fixes: https://github.com/alsa-project/alsa-lib/issues/453
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agogithub: fix Fedora workflow (awk package dependency)
Jaroslav Kysela [Thu, 24 Apr 2025 13:16:12 +0000 (15:16 +0200)]
github: fix Fedora workflow (awk package dependency)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agoRevert "ucm: do not bump syntax version to 8"
Jaroslav Kysela [Thu, 24 Apr 2025 11:25:30 +0000 (13:25 +0200)]
Revert "ucm: do not bump syntax version to 8"

This reverts commit e51cba0973d97d8a4c3d2d5896b203d8c3628c89.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agoRelease v1.2.14 reltest v1.2.14
Jaroslav Kysela [Mon, 14 Apr 2025 16:42:04 +0000 (18:42 +0200)]
Release v1.2.14

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agoseq: seqmid - use correct snd_strlcat instead snd_strlcpy in update_group_ports()
Jaroslav Kysela [Mon, 14 Apr 2025 16:36:45 +0000 (18:36 +0200)]
seq: seqmid - use correct snd_strlcat instead snd_strlcpy in update_group_ports()

Fixes: a4e47461 ("seq: update_group_ports - rewrite blknames update")
Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agoadd snd_strlcat() function
Jaroslav Kysela [Mon, 14 Apr 2025 16:34:45 +0000 (18:34 +0200)]
add snd_strlcat() function

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agoucm: do not bump syntax version to 8
Jaroslav Kysela [Mon, 14 Apr 2025 07:44:40 +0000 (09:44 +0200)]
ucm: do not bump syntax version to 8

The new code for syntax 8 is not widely tested. Postpone it for next
alsa-lib release.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agorawmidi: ump - fix snd_ump_block_info_set_block_id double version #2
Jaroslav Kysela [Tue, 8 Apr 2025 14:27:42 +0000 (16:27 +0200)]
rawmidi: ump - fix snd_ump_block_info_set_block_id double version #2

Define two different symbols with similar functionality.

Fix for:

  CC       ump.lo
/tmp/ccZKscpB.s: Assembler messages:
/tmp/ccZKscpB.s:18: Error: multiple versions [`snd_ump_block_info_set_block_id@@ALSA_1.2.13'|`snd_ump_block_info_set_block_id@ALSA_1.2.10'] for symbol `__snd_ump_block_info_set_block_id'
make[3]: *** [Makefile:392: ump.lo] Error 1

Fixes: 352cbc5e ("rawmidi: ump - fix snd_ump_block_info_set_block_id double version")
Link: https://github.com/alsa-project/alsa-lib/issues/422
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agopcm: hw: do not reset tstamp_type in SND_PCM_APPEND mode (#2)
Jaroslav Kysela [Tue, 8 Apr 2025 09:18:16 +0000 (11:18 +0200)]
pcm: hw: do not reset tstamp_type in SND_PCM_APPEND mode (#2)

This is basically redo of all changed and add appropriate conditions
to disable only ioctl calls, but preserve tstamp_type assignments.

Fixes: 15f2b276 ("pcm: hw: fix default timestamp type for O_APPPEND")
Fixes: 7e01443e ("pcm: hw: do not reset tstamp_type in SND_PCM_APPEND mode")
Link: https://github.com/alsa-project/alsa-lib/pull/450
Suggested-by: Signed-off-by: Kevin Groeneveld <kgroeneveld@lenbrook.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agopcm: hw: fix default timestamp type for O_APPPEND
Jaroslav Kysela [Mon, 7 Apr 2025 16:52:17 +0000 (18:52 +0200)]
pcm: hw: fix default timestamp type for O_APPPEND

Fixes: 7e01443e ("pcm: hw: do not reset tstamp_type in SND_PCM_APPEND mode")
Link: https://github.com/alsa-project/alsa-lib/pull/450
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agopcm: hw: do not reset tstamp_type in SND_PCM_APPEND mode
Kevin Groeneveld [Fri, 4 Apr 2025 19:59:59 +0000 (15:59 -0400)]
pcm: hw: do not reset tstamp_type in SND_PCM_APPEND mode

When the first client of plugins such as dshare open the hw device they set
a default tstamp_type in snd_pcm_direct_initialize_slave based on
tstamp_type from the config file. But when subsequent clients open the same
plugin the snd_pcm_hw_open_fd function clobbers this default.

Closes: https://github.com/alsa-project/alsa-lib/pull/450
Signed-off-by: Kevin Groeneveld <kgroeneveld@lenbrook.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agoseq: update_group_ports - rewrite blknames update
Jaroslav Kysela [Mon, 7 Apr 2025 16:45:42 +0000 (18:45 +0200)]
seq: update_group_ports - rewrite blknames update

Resolve the warning bellow and use more optimized calls.

seqmid.c: In function ‘update_group_ports’:
seqmid.c:672:45: warning: ‘%s’ directive output may be truncated writing up to 127 bytes into a region of size 61 [-Wformat-truncation=]
  672 |                                          ", %s", bp->name);
      |                                             ^~
seqmid.c:671:33: note: ‘snprintf’ output between 3 and 130 bytes into a destination of size 63
  671 |                                 snprintf(blknames + len, sizeof(blknames) - len,
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  672 |                                          ", %s", bp->name);
      |                                          ~~~~~~~~~~~~~~~~~

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agoDelete alsalisp code
Simon Howard [Wed, 2 Apr 2025 13:56:23 +0000 (09:56 -0400)]
Delete alsalisp code

Install of the alsalisp binary has been disabled since 2006 (in commit
8d382ccd), and building of it was disabled by default in 2018 (in commit
32ceab21), so it is reasonable to assume that nobody is using it.

Use within the alsa-lib project is limited to an aliases file that looks
like it is intended as an example, plus some very small .alisp files
associated with the SiS SI7018 PCI sound card which has not been
manufactured in years. These too have not been installed since 2018 when
commit 32ceab21 disabled building of the alsalisp binary.

In preparing this change, I searched the Github issue tracker for
"lisp", "alisp" and "alsalisp", and found no complaints about the above
changes. I also did a Github code search for projects that might be
including the `alisp.h` header and found none. Therefore I think this
code can be safely deleted and nobody is likely to object.

Closes: https://github.com/alsa-project/alsa-lib/pull/448
Signed-off-by: Simon Howard <fraggle@soulsphere.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agopcm: fix minor typos in doc
Felix Wolfsteller [Sat, 29 Mar 2025 22:40:31 +0000 (23:40 +0100)]
pcm: fix minor typos in doc

Closes: https://github.com/alsa-project/alsa-lib/pull/446
Signed-off-by: Felix Wolfsteller <felix.wolfsteller@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 months agoALSA: seq: Use SND_* instead of SNDRV_*
Takashi Iwai [Tue, 1 Apr 2025 06:02:51 +0000 (08:02 +0200)]
ALSA: seq: Use SND_* instead of SNDRV_*

The values SNDRV_XXX are used incorrectly in some code where they
should have been SND_XXX, due to copy&paste from the kernel code.

Practically seen there are no difference, and the code still works
fine, but those should be corrected for consistency.

Fixes: 6167b8ce3e80 ("seq: Add API helper functions for creating UMP Endpoint and Blocks")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
5 months agoALSA: seq: Add missing UMP EP cap bit at snd_seq_create_ump_endpoint()
Takashi Iwai [Tue, 1 Apr 2025 05:59:40 +0000 (07:59 +0200)]
ALSA: seq: Add missing UMP EP cap bit at snd_seq_create_ump_endpoint()

In snd_seq_create_ump_endpoint(), it was forgotten to give the UMP
Endpoint capability bit (SND_SEQ_PORT_CAP_UMP_ENDPOINT) to the port 0
("UMP 2.0").  This resulted in port 0 being a normal port for the
non-existing group.

Fixes: 6167b8ce3e80 ("seq: Add API helper functions for creating UMP Endpoint and Blocks")
Closes: https://github.com/alsa-project/alsa-lib/issues/447
Signed-off-by: Takashi Iwai <tiwai@suse.de>
5 months agocontrol: remap - improve sync feature
Jaroslav Kysela [Mon, 24 Mar 2025 10:49:31 +0000 (11:49 +0100)]
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>
5 months agoucm: add '${LibCaps}' substitution
Jaroslav Kysela [Fri, 21 Mar 2025 10:41:09 +0000 (11:41 +0100)]
ucm: add '${LibCaps}' substitution

It is a preparation for future checking of alsa-lib's extensions.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 months agoucm: remove @@LibraryVersion and @@SyntaxVersion variables
Jaroslav Kysela [Fri, 21 Mar 2025 10:26:28 +0000 (11:26 +0100)]
ucm: remove @@LibraryVersion and @@SyntaxVersion variables

It seems that version checking is more complicated:

Syntax is one-way settlement from the configuration files.
It cannot be conditional.

The library version string is hard to check with regex.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 months agocontrol: remap - add sync feature
Jaroslav Kysela [Thu, 20 Mar 2025 10:24:32 +0000 (11:24 +0100)]
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>
5 months agocontrol: remap - separate event handling from map (preparation for sync)
Jaroslav Kysela [Thu, 20 Mar 2025 11:44:28 +0000 (12:44 +0100)]
control: remap - separate event handling from map (preparation for sync)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 months agoseq: shuffle calloc arguments in snd_seq_hw_open (gcc warning)
Jaroslav Kysela [Fri, 21 Mar 2025 08:42:35 +0000 (09:42 +0100)]
seq: shuffle calloc arguments in snd_seq_hw_open (gcc warning)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 months agoseq: add more checks to snd_seq_hw_set_client_info for older kernels
Jaroslav Kysela [Thu, 20 Mar 2025 20:55:23 +0000 (21:55 +0100)]
seq: add more checks to snd_seq_hw_set_client_info for older kernels

The snd_seq_set_client_midi_version() should fail for older kernel
when applications are trying to configure new midi versions.

BugLink: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/4621
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 months agocontrol: remap - add possibility to remap multiple source channels
Jaroslav Kysela [Wed, 19 Mar 2025 16:55:33 +0000 (17:55 +0100)]
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>
5 months agoucm: format @@SyntaxVersion to 4 digits
Jaroslav Kysela [Wed, 19 Mar 2025 11:20:25 +0000 (12:20 +0100)]
ucm: format @@SyntaxVersion to 4 digits

It is better for regex matching.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 months agoucm: enhance documentation (sys-card + ranges + more)
Jaroslav Kysela [Wed, 19 Mar 2025 11:05:26 +0000 (12:05 +0100)]
ucm: enhance documentation (sys-card + ranges + more)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 months agoucm: add @@LibraryVersion and @@SyntaxVersion variables
Jaroslav Kysela [Wed, 19 Mar 2025 10:54:46 +0000 (11:54 +0100)]
ucm: add @@LibraryVersion and @@SyntaxVersion variables

It may be useful to check the current syntax version (and maybe
library version) when new features are added.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 months agoucm: add sys-card substitution
Jaroslav Kysela [Thu, 13 Mar 2025 16:46:58 +0000 (17:46 +0100)]
ucm: add sys-card substitution

It may be useful to check additional sysfs parameters like USB descriptors
to determine the exact hardware capabilities.

Introduce 'sys-card' substitution and 'sys' substitution to allow data
fetching from given range. Also, add conversion to hexadecimal format
when the source file has binary contents.

Example - fetch bytes from positions 0x10..0x15 (6 bytes):

  Define.Bytes1 "${sys-card:[type=hex,pos=0x10,size=6]device/../descriptors}"

Example - fetch one byte from position 0x22:

  Define.Bytes2 "${sys-card:[type=hex,pos=0x22]device/../descriptors}"

Replace type=hex or omit this variable settings to work with ASCII
characters.

Link: https://github.com/alsa-project/alsa-ucm-conf/issues/444
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
6 months agoseq: Fix typo of the group number in snd_seq_create_ump_endpoint()
Takashi Iwai [Sat, 1 Mar 2025 10:00:15 +0000 (11:00 +0100)]
seq: Fix typo of the group number in snd_seq_create_ump_endpoint()

The group number of UMP Endpoint client created by
snd_seq_create_ump_endpoint() is wrongly set due to a copy&paste
error.

Fixes: 6167b8ce3e80 ("seq: Add API helper functions for creating UMP Endpoint and Blocks")
Closes: https://github.com/alsa-project/alsa-lib/issues/440
Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 months agoseq: Fix bogus return of snd_seq_client_info_get_ump_conversion()
Takashi Iwai [Mon, 17 Feb 2025 11:06:09 +0000 (12:06 +0100)]
seq: Fix bogus return of snd_seq_client_info_get_ump_conversion()

snd_seq_client_info_get_ump_conversion() should have returned the
proper bit of group_filter bit field, but it just did return
midi_version field -- a stupid copy & paste error.  Let's fix it.

Fixes: 2aefb5c41cc0 ("seq: Add UMP support")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 months agoutils: add missing alsa-topology.pc.in to EXTRA_DIST
Jaroslav Kysela [Mon, 3 Feb 2025 10:54:06 +0000 (11:54 +0100)]
utils: add missing alsa-topology.pc.in to EXTRA_DIST

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
7 months agoseq: seq.c - fix calloc arguments
Jaroslav Kysela [Sun, 2 Feb 2025 21:27:29 +0000 (22:27 +0100)]
seq: seq.c - fix calloc arguments

The usage was inverted. The first argument is count of
elements, the second one is size of one element.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
7 months agoseq: seqmid - fix info->name is always true error
Jaroslav Kysela [Sun, 2 Feb 2025 21:26:39 +0000 (22:26 +0100)]
seq: seqmid - fix info->name is always true error

Replate pointer check to the zero string check as it
was the intention.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
7 months agoinclude: pcm extplug/ioplug: fix internal include
Jaroslav Kysela [Sun, 2 Feb 2025 21:00:54 +0000 (22:00 +0100)]
include: pcm extplug/ioplug: fix internal include

The header files are directly included when the alsa-lib is building.
Do not show warning.

Fixes: ea8972c8 ("include: prefer alsa/asoundlib.h for apps, dependency cleanups")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
7 months agodoc: fix permissions
Jaroslav Kysela [Sun, 2 Feb 2025 20:51:21 +0000 (21:51 +0100)]
doc: fix permissions

Doxygen create also subdirectories. Make sure that files
in those directories have required permissions.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
7 months agotest/playmidi1: fix compilation caused by conflict between midifile.h and ump_msg.h
Jaroslav Kysela [Sun, 2 Feb 2025 18:18:25 +0000 (19:18 +0100)]
test/playmidi1: fix compilation caused by conflict between midifile.h and ump_msg.h

It's a fast fix. The better way is to fix midifile.h or remote this example
(we have already some

Closes: https://github.com/alsa-project/alsa-lib/issues/436
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
7 months agoinclude/ump_msg.h: Fix endianness detection
Jaroslav Kysela [Sun, 2 Feb 2025 17:51:04 +0000 (18:51 +0100)]
include/ump_msg.h: Fix endianness detection

The SNDRV_BIG_ENDIAN_BITFIELD define is only available in the alsa-lib's
internal build process (include/local.h).

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
7 months agoinclude: prefer alsa/asoundlib.h for apps, dependency cleanups
Jaroslav Kysela [Sun, 2 Feb 2025 12:46:12 +0000 (13:46 +0100)]
include: prefer alsa/asoundlib.h for apps, dependency cleanups

Fixes several issues with header files:

- prefer alsa/asoundlib.h file for the alsa-lib core functionalities
  (use #warning to inform current and future developers, do the job)
- include alsa/asoundlib.h in headers for external plugins by default
- pcm_external.h: dependencies cleanup
- as benefit, the parsers in IDEs should get all information for individial
  header files (see PR#435)

This change was mainly tergetted to fix errors caused by wrong include order
(like for endianness detection, missing typedefs etc.).

Closes: https://github.com/alsa-project/alsa-lib/issues/431
Link: https://github.com/alsa-project/alsa-lib/pull/435
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
7 months agoseq: Define new events for UMP EP/FB change notifications
Takashi Iwai [Mon, 13 Jan 2025 14:34:49 +0000 (15:34 +0100)]
seq: Define new events for UMP EP/FB change notifications

Two new sequencer event types are added for notifications of UMP info
changes: SND_SEQ_EVENT_UMP_EP_CHANGE (68) and
SND_SEQ_EVENT_UMP_BLOCK_CHANGE (69).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 months agorawmidi: Make rawmidi flag bits doxygen-style comments
Takashi Iwai [Mon, 13 Jan 2025 14:27:36 +0000 (15:27 +0100)]
rawmidi: Make rawmidi flag bits doxygen-style comments

We forgot to put the markers in rawmidi info bit flags.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 months agorawmidi: Extensions for tied device and substream inactive flag
Takashi Iwai [Mon, 13 Jan 2025 14:24:11 +0000 (15:24 +0100)]
rawmidi: Extensions for tied device and substream inactive flag

This is the enhancements of rawmidi API for the new feature added in
6.14 kernel: the indication of a tied device and the inactive flag for
the selected substream.

The new function is added for obtaining the tied device,
snd_rawmidi_info_get_tied_device().

And the new bit flag is defined for indicating the inactive
substream, SNDRV_RAWMIDI_INFO_STREAM_INACTIVE, which is exposed via
snd_rawmidi_info_get_flags().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 months agoSync UAPI asequencer.h with 6.14 kernel
Takashi Iwai [Mon, 13 Jan 2025 14:07:23 +0000 (15:07 +0100)]
Sync UAPI asequencer.h with 6.14 kernel

There are the new event types for UMP EP and FB notifications as well
as the new struct for them.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 months agoSync UAPI asound.h with 6.14 kernel
Takashi Iwai [Mon, 13 Jan 2025 14:03:46 +0000 (15:03 +0100)]
Sync UAPI asound.h with 6.14 kernel

There is a small update of rawmidi API for supporting the UMP tied
device info and inactive flag.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 months agorawmidi: ump - fix snd_ump_block_info_set_block_id double version
Jaroslav Kysela [Mon, 25 Nov 2024 15:17:30 +0000 (16:17 +0100)]
rawmidi: ump - fix snd_ump_block_info_set_block_id double version

Fix mistake snd_ump_block_info_get_block_id / snd_ump_block_info_set_block_id .

Fixes: 76d2d285 ("rawmidi: ump - fix snd_ump_block_info_get_block_id double version")
Link: https://github.com/alsa-project/alsa-lib/issues/422
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
9 months agorawmidi: ump - fix snd_ump_block_info_get_block_id double version
Jaroslav Kysela [Mon, 25 Nov 2024 14:11:27 +0000 (15:11 +0100)]
rawmidi: ump - fix snd_ump_block_info_get_block_id double version

The changes for 1.2.13 in Versions.in.in file matches also old
1.2.10 function snd_ump_block_info_get_block_id:

1 Removed function:

  [D] 'function void snd_ump_block_info_set_block_id(snd_ump_block_info_t*, unsigned int)'    {snd_ump_block_info_set_block_id@@ALSA_1.2.10}

Add 1.2.10 symbol back, but keep 1.2.13 symbol as default.

Closes: https://github.com/alsa-project/alsa-lib/issues/422
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
9 months agoseq: include UMP headers
Takashi Iwai [Sun, 24 Nov 2024 08:33:16 +0000 (09:33 +0100)]
seq: include UMP headers

Some applications seem including alsa/seqmid.h individually, and this
got broken with the update of alsa-lib because now we have
dependencies to UMP stuff.  Include the necessary UMP headers
internally.  Also, add the inclusion of rawmidi.h in ump.h for similar
reasons.

Link: https://bugzilla.suse.com/show_bug.cgi?id=1233682
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 months agoconfigure: Make sequencer dependent on rawmidi
Takashi Iwai [Sun, 24 Nov 2024 08:32:29 +0000 (09:32 +0100)]
configure: Make sequencer dependent on rawmidi

The sequencer feature requires rawmidi implicitly, and it became more
obvious with UMP support.  Add the dependency check to configure
script.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 months agosrc/Versions.in.in: Update *_tempo_base name
Nicholas Vinson [Thu, 14 Nov 2024 12:49:53 +0000 (07:49 -0500)]
src/Versions.in.in: Update *_tempo_base name

Change @SYMBOL_PREFIX@snd_has_tempo_base to
@SYMBOL_PREFIX@snd_has_queue_tempo_base.

Starting with version 1.2.13, alsa-lib fails to link with ld.lld-19 due
to "version script assignment of 'ALSA_1.2.13' to symbol
'snd_seq_has_tempo_base' failed: symbol not defined".

Per commit 769d1db1b0a213a39c7e59c0d1d724e7f45b1ac3 the correct name for
the symbol is @SYMBOL_PREFIX@snd_has_queue_tempo_base; therefore, update
src/Vesions.in.in to match.

Fixes bug #420
Fixes Gentoo bug 943399 (https://bugs.gentoo.org/943399)

Closes: https://github.com/alsa-project/alsa-lib/pull/421
Signed-off-by: Nicholas Vinson <nvinson234@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
9 months agoRelease v1.2.13 v1.2.13
Jaroslav Kysela [Tue, 12 Nov 2024 09:36:52 +0000 (10:36 +0100)]
Release v1.2.13

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
9 months agocontrol: remap - clarify comments and docs
Jaroslav Kysela [Thu, 24 Oct 2024 09:08:00 +0000 (11:08 +0200)]
control: remap - clarify comments and docs

Fix copy-n-paste errors.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
10 months agocontrol: remap - fix copy-n-paste in _snd_ctl_remap_open's comment
Jaroslav Kysela [Thu, 24 Oct 2024 09:08:00 +0000 (11:08 +0200)]
control: remap - fix copy-n-paste in _snd_ctl_remap_open's comment

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
10 months agoconfigure: do allow to use --with-pic for static build
Jaroslav Kysela [Mon, 21 Oct 2024 07:31:12 +0000 (09:31 +0200)]
configure: do allow to use --with-pic for static build

Closes: https://github.com/alsa-project/alsa-lib/issues/411
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 months agoconfigure: bumb version to 1.2.13pre1 (for alsa-utils)
Jaroslav Kysela [Thu, 19 Sep 2024 09:55:58 +0000 (11:55 +0200)]
configure: bumb version to 1.2.13pre1 (for alsa-utils)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 months agopcm: close - deactivate async handler before snd_pcm_drop()
Jaroslav Kysela [Fri, 6 Sep 2024 10:56:16 +0000 (12:56 +0200)]
pcm: close - deactivate async handler before snd_pcm_drop()

It reduces probablity to activate the async handler when snd_pcm_close() is called.

Link: https://github.com/alsa-project/alsa-lib/issues/394
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 months agogithub: use upload-artifacts@v4
Jaroslav Kysela [Fri, 6 Sep 2024 10:53:03 +0000 (12:53 +0200)]
github: use upload-artifacts@v4

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 months agoFix TLV dB parser in case of used container
Arkadiusz Bokowy [Sat, 31 Aug 2024 18:31:02 +0000 (20:31 +0200)]
Fix TLV dB parser in case of used container

In case when dB information does not appear as the only TLV type in the
stream (it might be wrapped in a container, but the container can not
have any other type), the TLV parser fails to get the dB TLV pointer.

This commit fixes it by distinguishing between TLV parse error and dB
information not being found in a container (-ENOENT), so the parser can iterate
over all elements in the container.

Also, it fixes out-of-bounds read in case of malicious TLV record.

Closes: https://github.com/alsa-project/alsa-lib/pull/409
Signed-off-by: Arkadiusz Bokowy <arkadiusz.bokowy@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 months agopcm: dmix: Don't clear scpm->info flag
Takashi Iwai [Fri, 6 Sep 2024 08:15:46 +0000 (10:15 +0200)]
pcm: dmix: Don't clear scpm->info flag

spcm->info bits should be a copy of the slave PCM info as is.
While we clear the unsupported SND_PCM_INFO_PAUSE bit there, it should
be rather cleared only for the exposed info to apps, not spcm->info.

Fixes: 982786e9ebff ("Fix bogus pause flag on dmix")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 months agopcm: dmix: Fix resume with multiple instances
Takashi Iwai [Fri, 6 Sep 2024 08:05:56 +0000 (10:05 +0200)]
pcm: dmix: Fix resume with multiple instances

The fix for PCM dmix suspend/resume checks spcm->info bit of
SND_PCM_INFO_RESUME for applying a workaround for drivers with the
full resume support.  This assumed that scpm->info is exposed from the
underlying slave PCM device.

The above is true for the first opened instance, but for the second
opened instance, it's a copy from the saved data in shmem.  And, we
dropped SND_PCM_INFO_RESUME bit there to assure not to expose the full
resume capability to applications.  This resulted in the
inconsistencies, and when the second instance is resumed at first, it
misses the snd_pcm_resume() call, hence the driver doesn't react
properly any longer.

For addressing it, we keep SND_PCM_INFO_RESUME bit in shmptr->s.info
bits as is, while dropping the bit exposed to apps in
snd_pcm_direct_hw_refine() and *_hw_params() callbacks.

Fixes: 6d1d620eadf3 ("pcm: dmix: resume workaround for buggy driver")
Reported-and-tested-by: Chancel Liu <chancel.liu@nxp.com>
Closes: https://lore.kernel.org/DB9PR04MB94988752ED7C43B399E0BC00E3942@DB9PR04MB9498.eurprd04.prod.outlook.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 months agoFixes: 5600b901 ("async: snd_async_del_handler - move clear signal using sigaction...
Jaroslav Kysela [Fri, 6 Sep 2024 07:58:47 +0000 (09:58 +0200)]
Fixes: 5600b901 ("async: snd_async_del_handler - move clear signal using sigaction as last")
A wrong list head is used to check if the given list with async handlers
is empty. Correct this.

Link: https://github.com/alsa-project/alsa-lib/issues/394
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 months agosrc/Versions.in: Add the new snd_pcm_hw_params_get_sync for 1.2.13
Takashi Iwai [Tue, 20 Aug 2024 14:20:15 +0000 (16:20 +0200)]
src/Versions.in: Add the new snd_pcm_hw_params_get_sync for 1.2.13

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 months agoSync UAPI asound.h and asequencer.h with 6.12 kernel
Takashi Iwai [Tue, 20 Aug 2024 12:27:13 +0000 (14:27 +0200)]
Sync UAPI asound.h and asequencer.h with 6.12 kernel

The recent upstream kernel received a few features and extended /
cleaned up the asound.h and asequencer.h uapi files:
- ALSA: pcm: Introduce MSBITS subformat interface
- ALSA: pcm: clarify and fix default msbits value for all formats
- ALSA: pcm: reinvent the stream synchronization ID API
- ALSA: timer: Introduce virtual userspace-driven timers

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 months agopcm: implement snd_pcm_hw_params_get_sync() and obsolete snd_pcm_info_get_sync()
Jaroslav Kysela [Tue, 20 Aug 2024 13:33:45 +0000 (15:33 +0200)]
pcm: implement snd_pcm_hw_params_get_sync() and obsolete snd_pcm_info_get_sync()

Use the new clock source mechanism to get information about
similar PCM clock sources for PCM streams.

Link: https://lore.kernel.org/linux-sound/20240625172836.589380-1-perex@perex.cz/
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 months agoump_msg: Add missing definition for Set Key Signature Message
Takashi Iwai [Tue, 20 Aug 2024 07:36:27 +0000 (09:36 +0200)]
ump_msg: Add missing definition for Set Key Signature Message

The Set Key Signature message was missing at the time we defined
for Flex Data types.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 months ago.gitignore: Add test/umpinfo
Takashi Iwai [Thu, 15 Aug 2024 14:43:10 +0000 (16:43 +0200)]
.gitignore: Add test/umpinfo

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 months agotest: Add an example program to inquire UMP Endpoint and Block info
Takashi Iwai [Thu, 15 Aug 2024 14:36:18 +0000 (16:36 +0200)]
test: Add an example program to inquire UMP Endpoint and Block info

Provide an example program to inquire UMP Endpoint and Block info in
various APIs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 months agocontrol: Make ump_{endpoint|block}_info calls optional
Takashi Iwai [Thu, 15 Aug 2024 14:25:11 +0000 (16:25 +0200)]
control: Make ump_{endpoint|block}_info calls optional

Add the NULL check for ump_endpoint_info and ump_block_info calls.
Those can be NULl depending on the target.

Fixes: 81b0cf46d16a ("control: Add UMP Endpoint and Block info query support")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 months agoseq: Correct a typo in documentation
Takashi Iwai [Wed, 7 Aug 2024 13:50:21 +0000 (15:50 +0200)]
seq: Correct a typo in documentation

The right function name is snd_seq_has_queue_tempo_base().

Fixes: 24c7f4273394 ("seq: Add API functions to set different tempo base values")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 months agoseq: Add snd_seq_{get|set}_ump_is_midi1() API functions
Takashi Iwai [Wed, 7 Aug 2024 13:46:31 +0000 (15:46 +0200)]
seq: Add snd_seq_{get|set}_ump_is_midi1() API functions

Implement the API function calls corresponding to the new sequencer
port flag bit that has been added recently to the kernel.
A UMP MIDI 2.0 device allow to have an optional MIDI 1.0 port while
speaking in MIDI 2.0 protocol for other UMP Groups.  The new seq port
flag indicates that.

This is rather a minor difference, and since ALSA sequencer core
covers the all conversions, usually you don't have to worry about it
at all.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 months agoseq: Avoid strlcat()
Takashi Iwai [Wed, 31 Jul 2024 09:14:08 +0000 (11:14 +0200)]
seq: Avoid strlcat()

strlcat() isn't available in every system, so better to avoid it.
Rewrite the code without strlcat().

Fixes: 6167b8ce3e80 ("seq: Add API helper functions for creating UMP Endpoint and Blocks")
Link: https://lore.kernel.org/0796c157-1ac3-47a3-9d54-ba86f59d64d5@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 months agoump_msg: Define types for UMP Mixed Data Set messages
Takashi Iwai [Sun, 28 Jul 2024 08:24:18 +0000 (10:24 +0200)]
ump_msg: Define types for UMP Mixed Data Set messages

Mixed Data Set messages is another messages of the type 5
(SND_UMP_MSG_TYPE_EXTENDED_DATA) with the status 8 and 9.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 months agoump_msg: Add a new helper snd_ump_get_byte()
Takashi Iwai [Sun, 28 Jul 2024 08:46:11 +0000 (10:46 +0200)]
ump_msg: Add a new helper snd_ump_get_byte()

For making it easier to extract a byte from the UMP packet no matter
which endian is used, introduce a new helper function
snd_ump_get_byte().  It'll be useful for retrieving SysEx byte or a
name string.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 months agoump_msg: Correct a typo in snd_ump_msg_flex_data_t definition.
Takashi Iwai [Fri, 19 Jul 2024 12:30:12 +0000 (14:30 +0200)]
ump_msg: Correct a typo in snd_ump_msg_flex_data_t definition.

There was a typo in snd_ump_msg_flex_data_t definition; it should be
"set_metronome".

Fixes: 30f8ba74c5a2 ("ump_msg: Add definitions for Utility, Stream and Flex Data messages")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 months agoseq: Fix wrong FB direction at snd_seq_create_ump_block()
Takashi Iwai [Tue, 9 Jul 2024 05:23:23 +0000 (07:23 +0200)]
seq: Fix wrong FB direction at snd_seq_create_ump_block()

snd_seq_create_ump_block() receives a snd_ump_block_info_t data at the
creation of a FB and updates its associated sequencer port, but it
handled the port direction incorrectly.  The UMP / port direction
means the connectivity, but the current code translated other way
round.  The correct translation should be that input = receiver, i.e.
a writable port for applications, and output = source, a readable port
for applications.

This patch corrects the translation, and add more comments to the
direction definition.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 months agoseq: Add API functions to set different tempo base values
Takashi Iwai [Wed, 3 Jul 2024 13:00:20 +0000 (15:00 +0200)]
seq: Add API functions to set different tempo base values

MIDI2 Set Tempo message uses 10ns-based values, and we need to update
the API to change the base time unit.

This patch adds a few new API functions:
- snd_seq_has_queue_tempo_base() returns 1 if the client supports a
  new tempo-base value; if 0, it's an old system and application has
  to use the tempo in the fixed 1us unit
- the tempo base can be changed with
  snd_seq_queue_tempo_set_tempo_base(), provided in nsec unit;
  the value has to be either 10 or 1000 (or 0 as default, equivalent
  with 1000)

The protocol version is checked and fallback to the fixed 1us base for
the old clients.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 months agoump: Add a function to provide the packet word length of a UMP type
Takashi Iwai [Thu, 4 Jul 2024 07:53:20 +0000 (09:53 +0200)]
ump: Add a function to provide the packet word length of a UMP type

Add a helper function to return the number of words of a given UMP
packet type.  Used for parsing MIDI Clip File stream, for example.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 months agoump_msg: Drop unsuitable comments
Takashi Iwai [Thu, 4 Jul 2024 07:47:09 +0000 (09:47 +0200)]
ump_msg: Drop unsuitable comments

There were some leftover comments from the old code that don't fit any
longer.  Drop them.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 months agoump_msg: Add definitions for Utility, Stream and Flex Data messages
Takashi Iwai [Thu, 4 Jul 2024 07:44:53 +0000 (09:44 +0200)]
ump_msg: Add definitions for Utility, Stream and Flex Data messages

This patch provides more struct / union definitions for UMP Utility,
Stream and Flex Data messages, provided in the new UMP v1.1
specification.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 months agoump_msg: Fix the wrong snd_ump_msg_system_t argument in little-endian
Takashi Iwai [Wed, 26 Jun 2024 14:53:17 +0000 (16:53 +0200)]
ump_msg: Fix the wrong snd_ump_msg_system_t argument in little-endian

For the little-endian format, the parameters are stored incorrectly
in snd_ump_msg_system_t type.  Swap the both parameter positions to
correct to the right positions.

Fixes: 040356ecf06b ("ump: Add helpers to parse / set UMP packet data")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 months agosrc/Versions.in: Add guards for sequencer and rawmidi syms
Takashi Iwai [Wed, 26 Jun 2024 09:46:35 +0000 (11:46 +0200)]
src/Versions.in: Add guards for sequencer and rawmidi syms

Similarly like PCM and others, add the ifdef guards for new symbols
for sequencer and rawmidi interfaces.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 months agosrc/Versions.in: Add new seq / rawmidi functions for UMP
Takashi Iwai [Wed, 26 Jun 2024 09:39:06 +0000 (11:39 +0200)]
src/Versions.in: Add new seq / rawmidi functions for UMP

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 months agoump: Add descriptions for UMP RawMidi interface
Takashi Iwai [Wed, 26 Jun 2024 09:23:34 +0000 (11:23 +0200)]
ump: Add descriptions for UMP RawMidi interface

Also update doxygen config accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 months agoump_msg.h: Fix doxygen comments
Takashi Iwai [Wed, 26 Jun 2024 09:22:06 +0000 (11:22 +0200)]
ump_msg.h: Fix doxygen comments

Correct the lack of markers and missing comments for some unions.

Fixes: 040356ecf06b ("ump: Add helpers to parse / set UMP packet data")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 months agoseq: Correct section descriptions for UMP
Takashi Iwai [Wed, 26 Jun 2024 09:20:18 +0000 (11:20 +0200)]
seq: Correct section descriptions for UMP

The usage of \section and \subsection were wrong in the previous
commit, where the tags were missing.

Fixes: 3390f31664d4 ("seq: Add description about MIDI 2.0 and UMP handling")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 months agoseq: Add description about MIDI 2.0 and UMP handling
Takashi Iwai [Tue, 25 Jun 2024 08:46:01 +0000 (10:46 +0200)]
seq: Add description about MIDI 2.0 and UMP handling

Add more description of the new ALSA sequencer features for MIDI 2.0
and UMP handling.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 months agoump: Fix doxygen error for snd_ump_endpoint_info_set_protocol()
Takashi Iwai [Tue, 25 Jun 2024 08:44:41 +0000 (10:44 +0200)]
ump: Fix doxygen error for snd_ump_endpoint_info_set_protocol()

Fix a typo that caused a doxygen error.

Fixes: 6767f623ca05 ("ump: Add missing *_set variants for snd_ump_endpoint_info and snd_ump_block_info")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 months agoconf: fix snd_config_substitute (for src->parent)
Jaroslav Kysela [Fri, 21 Jun 2024 14:30:06 +0000 (16:30 +0200)]
conf: fix snd_config_substitute (for src->parent)

If source configuration node has a parent set, it must be always
detached to avoid memory corruptions.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
14 months agoAdd test/seq-ump-example to .gitignore
Takashi Iwai [Wed, 19 Jun 2024 15:25:23 +0000 (17:25 +0200)]
Add test/seq-ump-example to .gitignore

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 months agotest: Add an example program to create a virtual UMP Endpoint
Takashi Iwai [Wed, 19 Jun 2024 15:22:15 +0000 (17:22 +0200)]
test: Add an example program to create a virtual UMP Endpoint

Provide an example program to demonstrate how to create a UMP Endpoint
and Blocks, i.e. a virtual UMP device.

It's a simple filtering application that just haves the incoming note
on/off velocity and sends out to the output.  The UMP Endpoint and
Block attributes can be adjusted via command-line options.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 months agoseq: Add API helper functions for creating UMP Endpoint and Blocks
Takashi Iwai [Wed, 19 Jun 2024 12:35:36 +0000 (14:35 +0200)]
seq: Add API helper functions for creating UMP Endpoint and Blocks

For making it easer for applications to create a virtual UMP Endpoint
and UMP blocks, add two API helper functions.

snd_seq_create_ump_endpoint() creates (unsurprisingly) a UMP Endpoint,
based on the given snd_ump_endpoint_info_t information.  The number of
(max) UMP groups belonging to this Endpoint has to be specified.
This function sets up the Endpoint info on the sequencer client, and
creates a MIDI 2.0 UMP port as well as UMP Group ports automatically.
The name of the sequencer client is updated from the Endpoint name,
too.

After creating a UMP Endpoint, create each UMP Block via
snd_seq_create_ump_block() function with a snd_ump_block_info_t info.
The associated groups for each block have to be specified there.
The port names and capability bits are updated accordingly after
setting each block information.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 months agoump: Add missing *_set variants for snd_ump_endpoint_info and snd_ump_block_info
Takashi Iwai [Tue, 18 Jun 2024 13:16:23 +0000 (15:16 +0200)]
ump: Add missing *_set variants for snd_ump_endpoint_info and snd_ump_block_info

The API functions to fill the data on snd_ump_endpoint_info and
snd_ump_block_info were missing.  Let's add them.

They can be used to construct a virtual UMP endpoint and block.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 months agoRelease v1.2.12 v1.2.12
Jaroslav Kysela [Mon, 10 Jun 2024 09:18:34 +0000 (11:18 +0200)]
Release v1.2.12

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
14 months agouse-case.h: add DisplayPort to HDMI device description
Jaroslav Kysela [Mon, 10 Jun 2024 07:06:33 +0000 (09:06 +0200)]
use-case.h: add DisplayPort to HDMI device description

Link: https://github.com/alsa-project/alsa-ucm-conf/pull/423
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 months agoasync: snd_async_del_handler - move clear signal using sigaction as last
Jaroslav Kysela [Tue, 4 Jun 2024 09:17:57 +0000 (11:17 +0200)]
async: snd_async_del_handler - move clear signal using sigaction as last

Improve the shutdown order for the asynchronous users. There may be
unhandled signals, because the signal is reset before signal deactivation
using fnctl (O_ASYNC).

Closes: https://github.com/alsa-project/alsa-lib/issues/394
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 months agoucm: doc - add Variant and Macro to the evaluation order
Jaroslav Kysela [Tue, 14 May 2024 13:28:41 +0000 (15:28 +0200)]
ucm: doc - add Variant and Macro to the evaluation order

Signed-off-by: Jaroslav Kysela <perex@perex.cz>