]> git.alsa-project.org Git - alsa-lib.git/log
alsa-lib.git
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>
12 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>
12 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>
16 months agoucm: define and describe Syntax 7
Jaroslav Kysela [Wed, 24 Apr 2024 13:33:40 +0000 (15:33 +0200)]
ucm: define and describe Syntax 7

- for new macro argument substitution
- for new Path condition fields substitutions

Link: https://github.com/alsa-project/alsa-ucm-conf/pull/411
Link: https://github.com/alsa-project/alsa-lib/issues/395
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
16 months agoucm: raise error when macro argument is already defined (used)
Jaroslav Kysela [Wed, 24 Apr 2024 13:15:48 +0000 (15:15 +0200)]
ucm: raise error when macro argument is already defined (used)

Link: https://github.com/alsa-project/alsa-ucm-conf/pull/411
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
16 months agoucm: do argument value substitution for Macros
Jaroslav Kysela [Wed, 24 Apr 2024 13:08:48 +0000 (15:08 +0200)]
ucm: do argument value substitution for Macros

Link: https://github.com/alsa-project/alsa-ucm-conf/pull/411
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
16 months agoucm: fix Path condition - substitute Path
Jaroslav Kysela [Wed, 24 Apr 2024 12:47:27 +0000 (14:47 +0200)]
ucm: fix Path condition - substitute Path

Use the appropriate variable for access/eaccess call.

Fixes: https://github.com/alsa-project/alsa-lib/issues/395
Fixes: ef6463a2 ("ucm: fix Path condition - substitute Path and Mode fields")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
16 months agoucm: fix Path condition - substitute Path and Mode fields
Jaroslav Kysela [Wed, 24 Apr 2024 11:01:04 +0000 (13:01 +0200)]
ucm: fix Path condition - substitute Path and Mode fields

The Path and Mode fields should be also substituted for
the runtime evaluation. See Fixes.

Fixes: https://github.com/alsa-project/alsa-lib/issues/395
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
16 months agoconf: aliases: hdmi: Include unconditionally the
Peter Ujfalusi [Tue, 23 Apr 2024 07:09:46 +0000 (10:09 +0300)]
conf: aliases: hdmi: Include unconditionally the

The hdmi.conf contains the high level macro to be used by cards to create
the hdmi: device.
Instead of including it in different config files, include it in the main
aliases.conf and remove it's inclusion by other config files.

This change is needed to add support for the hdmi: device mapping via UCM.

Closes: https://github.com/alsa-project/alsa-lib/pull/393
Suggested-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
17 months agoGitHub Actions: Use actions/checkout@v4
Ryan Carsten Schmidt [Sat, 16 Mar 2024 08:34:32 +0000 (03:34 -0500)]
GitHub Actions: Use actions/checkout@v4

Fixes: #389
18 months agoconf: USB-Audio: Add Corsair HS60 Pro to the IEC958 blacklist
David Senoner [Mon, 26 Feb 2024 14:14:03 +0000 (15:14 +0100)]
conf: USB-Audio: Add Corsair HS60 Pro to the IEC958 blacklist

This device is just an external USB soundcard with a female 3.5mm jack
for a headset, no S/PDIF | IEC958 connector. Add it to the blacklist to
prevent it being opened.

Link: https://lore.kernel.org/alsa-devel/ZeWGbxZIc7AF96h0@m.b4.vu/
Signed-off-by: David Senoner <seda18@rolmail.net>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
18 months agoconf: USB-Audio: Add more Scarlett devices to the IEC958 blacklist
Geoffrey D. Bennett [Mon, 4 Mar 2024 08:29:35 +0000 (18:59 +1030)]
conf: USB-Audio: Add more Scarlett devices to the IEC958 blacklist

The Scarlett Solo and 2i2 don't have S/PDIF outputs.

Link: https://lore.kernel.org/alsa-devel/ZeWGbxZIc7AF96h0@m.b4.vu/
Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
18 months agopcm: extend doc for snd_pcm_hw_params_get_sbits()
Jaroslav Kysela [Mon, 26 Feb 2024 13:52:02 +0000 (14:52 +0100)]
pcm: extend doc for snd_pcm_hw_params_get_sbits()

Try to explain more the output value and its relation between
format and sample bits defined by the format.

Link: https://github.com/larsimmisch/pyalsaaudio/pull/146
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
18 months agopcm: clarify and fix default sbits (msbits) value for all formats
Jaroslav Kysela [Fri, 23 Feb 2024 20:50:01 +0000 (21:50 +0100)]
pcm: clarify and fix default sbits (msbits) value for all formats

As described in the kernel patch (link bellow), the significant (resolution)
bits should be related to the usable sample bits not the physical sample bits.

Link: https://lore.kernel.org/linux-sound/20240222173649.1447549-1-perex@perex.cz/
Link: https://github.com/larsimmisch/pyalsaaudio/pull/146
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
18 months agotests: latency.c - fix copy-n-paste typos (sw -> hw params) in error messages
Giulio Moro [Wed, 31 Jan 2024 19:54:30 +0000 (14:54 -0500)]
tests: latency.c - fix copy-n-paste typos (sw -> hw params) in error messages

Closes: https://github.com/alsa-project/alsa-lib/pull/384
Signed-off-by: Giulio Moro <giuliomoro@yahoo.it>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
18 months agopcm: ladspa - Skip missing ladspa directories
Marc Aldorasi [Fri, 23 Feb 2024 04:42:57 +0000 (23:42 -0500)]
pcm: ladspa - Skip missing ladspa directories

Closes: https://github.com/alsa-project/alsa-lib/pull/385
Signed-off-by: Marc Aldorasi <m101010a@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
18 months agopcm: snd_pcm_(physical_)format_width() - change documentation
Jaroslav Kysela [Thu, 22 Feb 2024 17:57:33 +0000 (18:57 +0100)]
pcm: snd_pcm_(physical_)format_width() - change documentation

The word "nominal" is not so correct here. Use similar
wording as we use in the kernel space (the bit-width of the format).

Link: https://github.com/larsimmisch/pyalsaaudio/pull/146
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
18 months agopcm: plug - add automatic conversion for iec958 subframe samples
Jaroslav Kysela [Fri, 9 Feb 2024 10:21:04 +0000 (11:21 +0100)]
pcm: plug - add automatic conversion for iec958 subframe samples

As Pavel noted, a possibility to automatically convert standard
linear samples to iec958 subframe format would be handy for latest
Raspberry HDMI driver.

Link: https://lore.kernel.org/alsa-devel/81b0be0a-5ab7-db91-21cb-0c59a55291e9@ivitera.com/
Suggested-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
19 months agotopology: correct version script path
Jan Palus [Tue, 30 Jan 2024 13:24:25 +0000 (14:24 +0100)]
topology: correct version script path

contrary to libasound, version script for libatopology is a regular
source file. while it's often the case that $(builddir) and $(srcdir)
point to the same directory, they don't always have to. therefore path
needs to point explicitly to $(srcdir) for Versions script in topology

Closes: https://github.com/alsa-project/alsa-lib/pull/383
Fixes: GH-382
Fixes: dc7da761f3a2 ("topology: separate Versions linker script")
Signed-off-by: Jan Palus <jpalus@fastmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
19 months agoRelease v1.2.11 v1.2.11
Jaroslav Kysela [Mon, 29 Jan 2024 16:16:07 +0000 (17:16 +0100)]
Release v1.2.11

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
19 months agopcm: document interaction of drain silence and sw silence
Zeno Endemann [Mon, 29 Jan 2024 14:02:44 +0000 (15:02 +0100)]
pcm: document interaction of drain silence and sw silence

I'm not sure this is the best way to describe the interaction, but I think
this needs to be mentioned in some form at least.

Closes: https://github.com/alsa-project/alsa-lib/pull/381
Signed-off-by: Zeno Endemann <zeno.endemann@mailbox.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
19 months agotopology: fix Versions file
Jaroslav Kysela [Mon, 29 Jan 2024 16:12:32 +0000 (17:12 +0100)]
topology: fix Versions file

The exported symbols were tagged with ALSA_0.9 version previously.
We cannot use a different version (regressions).

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
19 months agoheaders: avoid c++ keyword
Tim Blechmann [Mon, 5 Dec 2022 06:42:58 +0000 (14:42 +0800)]
headers: avoid c++ keyword

`class` is a c++ keyword, let's try not to use them in public headers

Closes: https://github.com/alsa-project/alsa-lib/pull/286
Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
19 months agopcm: route plugin: allocate temporary array on stack only one time
Jaroslav Kysela [Wed, 24 Jan 2024 17:20:44 +0000 (18:20 +0100)]
pcm: route plugin: allocate temporary array on stack only one time

Fixes: https://github.com/alsa-project/alsa-lib/pull/363
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
19 months agopcm: sofvol plugin: fix signed overflow
q66 [Thu, 7 Sep 2023 21:13:01 +0000 (23:13 +0200)]
pcm: sofvol plugin: fix signed overflow

This fixes functionality on specific setups with UBSan.

Closes: https://github.com/alsa-project/alsa-lib/pull/351
Signed-off-by: q66 <q66@chimera-linux.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
19 months agoadd back Versions source file to EXTRA_DIST to fix packaging
Jaroslav Kysela [Wed, 24 Jan 2024 17:08:09 +0000 (18:08 +0100)]
add back Versions source file to EXTRA_DIST to fix packaging

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
19 months agoconf: pcm: Set C-Media USB 7.1 sound card (ICUSBAUDIO7D) to six_channel for surround40
Ryan Underwood [Sat, 13 May 2023 22:16:34 +0000 (17:16 -0500)]
conf: pcm: Set C-Media USB 7.1 sound card (ICUSBAUDIO7D) to six_channel for surround40

This 7.1 analog sound card identifies as the following:
0d8c:0102 C-Media Electronics, Inc. CM106 Like Sound Device (lsusb)
 1 [ICUSBAUDIO7D   ]: USB-Audio - ICUSBAUDIO7D (/proc/asound/cards)

It has the following four-channel analog stream layout:
  Interface 1
    Altset 3
    Format: S16_LE
    Channels: 4
    Endpoint: 6 OUT (ADAPTIVE)
    Rates: 44100, 48000
    Bits: 16
    Channel map: FL FR FC LFE
(/proc/asound/card1/stream0)

This layout makes it impossible to play audio to the surround (SL/SR)
speakers plugged into the "Surround" jack in 4 channel mode.  Instead,
set six_channel so that the six-channel layout will be used to access
those speakers:
  Interface 1
    Altset 4
    Format: S16_LE
    Channels: 6
    Endpoint: 6 OUT (ADAPTIVE)
    Rates: 44100, 48000
    Bits: 16
    Channel map: FL FR FC LFE SL SR

Tested with speaker-test -Dsurround40:CARD=ICUSBAUDIO7D,DEV=0 -c4

The speaker system that required surround40 in order to downmix LFE into
the front/rear mix is a Klipsch ProMedia v.2-400, which has 4 speakers
and a subwoofer with an internal crossover, connected via front and rear
stereo analog cables.

Closes: https://github.com/alsa-project/alsa-lib/pull/319
Signed-off-by: Ryan Underwood <nemesis@icequake.net>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
19 months ago.gitignore: add src/Versions.in to ignore file list
Jaroslav Kysela [Wed, 24 Jan 2024 16:58:48 +0000 (17:58 +0100)]
.gitignore: add src/Versions.in to ignore file list

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
19 months agosrc/Versions.in: Add guards for pcm and timer syms
Nicholas Vinson [Thu, 4 Jan 2024 01:24:36 +0000 (20:24 -0500)]
src/Versions.in: Add guards for pcm and timer syms

Configure script allows for the disabling of the pcm module. When
disabled, the pcm symbols will not be available. Add guards to remove
symbols from version map when not present.

Closes: https://github.com/alsa-project/alsa-lib/pull/376
Signed-off-by: Nicholas Vinson <nvinson234@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
19 months agosrc/Versions.in: Add guards for opt. alisp symbols
Nicholas Vinson [Mon, 1 Jan 2024 21:10:47 +0000 (16:10 -0500)]
src/Versions.in: Add guards for opt. alisp symbols

Add guards for optional alisp symbols. This ensures that the Versions
file does not contain undefined symbols when building alisp support is
disabled.

Fixes Gentoo bugs 914511 (https://bugs.gentoo.org/914511),
    914643 (https://bugs.gentoo.org/914643),
    and 919417 (https://bugs.gentoo.org/919417).

Fixes bug #305
Fixes alsa_lisp symbol error reported in bug #356

Closes: https://github.com/alsa-project/alsa-lib/pull/376
Fixes: https://github.com/alsa-project/alsa-lib/issues/305
Link: https://github.com/alsa-project/alsa-lib/issues/356
Signed-off-by: Nicholas Vinson <nvinson234@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
19 months agoconfigure.ac: Update AC_OUTPUT() function
Nicholas Vinson [Sun, 7 Jan 2024 03:54:56 +0000 (22:54 -0500)]
configure.ac: Update AC_OUTPUT() function

Modern autoconf practice says AC_OUTPUT() should be called with no
arguments and generated configuration files should be specified by
calling AC_CONFIG_FILES() before AC_OUTPUT().

Update configure.ac to follow this practice.

Closes: https://github.com/alsa-project/alsa-lib/pull/376
Signed-off-by: Nicholas Vinson <nvinson234@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
19 months agotopology: separate Versions linker script
Jaroslav Kysela [Tue, 23 Jan 2024 15:16:41 +0000 (16:16 +0100)]
topology: separate Versions linker script

A slightly different solution is preferred than PR recommends (bellow).
Only symbols with snd_ prefix should be public. Create a minimal Versions
file for libatopology.

Link: https://github.com/alsa-project/alsa-lib/pull/376
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
19 months agoseq: Add snd_seq_ump_ev_clear()
Takashi Iwai [Mon, 13 Nov 2023 11:51:56 +0000 (12:51 +0100)]
seq: Add snd_seq_ump_ev_clear()

Like snd_seq_ev_clear(), let's add a helper to clear the event record
for a UMP-capable sequencer event.

While we're at it, change snd_seq_ev_clear() to be a static inline
function, so that we make sure that the proper pointer type is
passed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
20 months agopcm: documentation improvement mostly regarding samples and frames
Zeno Endemann [Mon, 1 Jan 2024 16:59:46 +0000 (17:59 +0100)]
pcm: documentation improvement mostly regarding samples and frames

In some places samples and frames are used interchangeably, which may
be a little confusing, so update it to say 'frames' where it could matter.

Closes: https://github.com/alsa-project/alsa-lib/pull/375
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
20 months agopcm: handle start_treshold in snd_pcm_write_areas more robustly
Jaroslav Kysela [Tue, 2 Jan 2024 10:16:26 +0000 (11:16 +0100)]
pcm: handle start_treshold in snd_pcm_write_areas more robustly

The start_treshold is defined as unsigned, so fix the condition
to allow using values avobe LONG_MAX.

Also, fix the documentation for the 64-bit platforms (INTMAX -> LONG_MAX).

Fixes: https://github.com/alsa-project/alsa-lib/issues/374
Signed-off-by: Jaroslav Kysela <perex@perex.cz>