Commit graph

4539 commits

Author SHA1 Message Date
Tony Wasserka
00da3feace ucm: mark internal functions static
From: Tony Wasserka /neobrain@github/
Fixes: https://github.com/alsa-project/alsa-lib/pull/335
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-01 16:40:56 +02:00
Jaroslav Kysela
9ed626d472 topology: fix src/mixer/mixer.c return value warning
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-01 16:27:43 +02:00
Jaroslav Kysela
70d4e042dc dogyxen: fix topology.h warnings
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-01 16:27:15 +02:00
borine
2714f438cb doxygen: fix broken examples links
From: borine@github
Link: https://github.com/alsa-project/alsa-lib/pull/340
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-01 16:12:32 +02:00
borine
08e79fc5a3 doxygen: include docs for shmarea functions
From: borine@github
Link: https://github.com/alsa-project/alsa-lib/pull/340
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-01 16:12:24 +02:00
borine
731253e82a doxygen: conf: do not hide PCM specific function
From: borine@github
Link: https://github.com/alsa-project/alsa-lib/pull/340
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-01 16:12:20 +02:00
borine
bbe38d055f doxygen: silence warning from asoundlib.h
From: borine@github
Link: https://github.com/alsa-project/alsa-lib/pull/340
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-01 16:12:16 +02:00
borine
cde0e819f7 doxygen: ucm: silence warnings
Removes duplicate documentation blocks and fixes 'not documented' warnings

From: borine@github
Link: https://github.com/alsa-project/alsa-lib/pull/340
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-01 16:12:10 +02:00
borine
220377a2dd doxygen: topology: silence 'not documented' warnings
From: borine@github
Link: https://github.com/alsa-project/alsa-lib/pull/340
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-01 16:12:06 +02:00
borine
c4680ed458 doxygen: global: silence 'not documented' warnings
From: borine@github
Link: https://github.com/alsa-project/alsa-lib/pull/340
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-01 16:12:02 +02:00
borine
382c700dfe doxygen: namehint: silence 'not documented' warnings
Also creates a new module within the Configuration interface
documentation in which to present the name hint docs.

From: borine@github
Link: https://github.com/alsa-project/alsa-lib/pull/340
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-01 16:11:51 +02:00
borine
47228e4e6e doxygen: seq: silence 'not documented' warnings
From: borine@github
Link: https://github.com/alsa-project/alsa-lib/pull/340
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-01 16:11:47 +02:00
borine
9cb4414e3b doxygen: conf: silence 'not documented' warnings
From: borine@github
Link: https://github.com/alsa-project/alsa-lib/pull/340
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-01 16:11:43 +02:00
borine
72e72ed029 doxygen: rawmidi: silence 'not documented' warnings
From: borine@github
Link: https://github.com/alsa-project/alsa-lib/pull/340
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-01 16:11:39 +02:00
borine
473a2eaba8 doxygen: control: silence 'not documented' item warnings
From: borine@github
Link: https://github.com/alsa-project/alsa-lib/pull/340
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-01 16:11:34 +02:00
borine
23931800da doxygen: pcm: silence 'not documented' warnings
From: borine@github
Link: https://github.com/alsa-project/alsa-lib/pull/340
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-01 16:11:30 +02:00
borine
6a0a316bfb doxygen: include external control docs
From: borine@github
Link: https://github.com/alsa-project/alsa-lib/pull/340
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-01 16:11:26 +02:00
borine
f53fd880f0 doxygen: fix inadvertent link requests
From: borine@github
Link: https://github.com/alsa-project/alsa-lib/pull/340
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-01 16:11:22 +02:00
borine
57959cef8f doxygen: fix list indentation errors
From: borine@github
Link: https://github.com/alsa-project/alsa-lib/pull/340
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-01 16:11:15 +02:00
borine
e72c605179 doxygen: escape xml tags
From: borine@github
Link: https://github.com/alsa-project/alsa-lib/pull/340
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-01 16:11:09 +02:00
borine
df0feab38f doxygen: fix image path
From: borine@github
Link: https://github.com/alsa-project/alsa-lib/pull/340
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-01 16:11:03 +02:00
borine
9505cfdb46 doxygen: fix broken parameter name tags
From: borine@github
Link: https://github.com/alsa-project/alsa-lib/pull/340
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-01 16:10:55 +02:00
borine
f39256a9b0 doxygen: Fix missing group end markers
From: borine@github
Link: https://github.com/alsa-project/alsa-lib/pull/340
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-01 16:10:16 +02:00
Jaroslav Kysela
ad3a8b8b31 reshuffle included files to include config.h as first
config.h may contain defines like _FILE_OFFSET_BITS which influence
the system wide include files (off_t types, open -> open64 function
usage etc.).

Related: https://github.com/alsa-project/alsa-lib/pull/333
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 18:25:37 +02:00
Jaroslav Kysela
6142ff0ca7 configure: add AC_SYS_LARGEFILE
The support for the large files may be disabled using
--disable-largefile configure parameter.

Related: https://github.com/alsa-project/alsa-lib/pull/333
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 17:04:58 +02:00
Takashi Iwai
dc1e683cc2 seq: Fix wrong seq version update at snd_seq_hw_get_client_info()
snd_seq_hw_get_client_info() calls mistakenly update_midi_version()
that leads to the update of seq->version from another client info.
It may lead to the inconsistent packet size calculation and the
unaligned read, eventually a program may hit segfault.

Drop the incorrect call of update_midi_version() for fixing it.

Fixes: 2aefb5c41c ("seq: Add UMP support")
Closes: https://github.com/alsa-project/alsa-utils/issues/232
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-26 21:38:13 +02:00
Takashi Iwai
91bbe55894 seq: Add overflow check in snd_seq_ev_set_ump_data()
It's better to add a sanity check than sorry for breaking.
Now the function return -EINVAL.

Closes: https://github.com/alsa-project/alsa-lib/issues/346
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-24 19:24:03 +02:00
Jaroslav Kysela
ec20272797 test: oldapi - fix the clang-16 compilation error
Fixes: https://github.com/alsa-project/alsa-lib/issues/323
From: Fabio Scaccabarozzi
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-22 16:52:15 +02:00
Takashi Iwai
403d687b95 rawmidi: Suppress error messages for non-fatal errors
Align the behavior of rawmidi errors at open & co with PCM, i.e. use
SYSMSG() instead of SYSERR() for suppressing the error messages as
default.

Closes: https://github.com/alsa-project/alsa-lib/issues/344
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-22 14:29:03 +02:00
Takashi Iwai
58da05803b seq: ump: Fix typo in function name containing "group"
In a couple places the function names were misspelled as "gruop"
instead of "group".  Fix them.

Reported-by: Jean-Michaël Celerier <jeanmichael.celerier@gmail.com>
Fixes: https://github.com/alsa-project/alsa-lib/pull/337
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-07-28 17:35:02 +02:00
Dan Cross
b7389e2e2e pcm: hw: fix minor bug in sw_params ioctl
Commit 2115cdb added a new call to the `SNDRV_PCM_IOCTL_SW_PARAMS`
ioctl on line 675 of src/pcm/pcm_hw.c, but passed the `sw_params`
argument by value; this should be passed by pointer.

I ran across this in the context of the direwolf software modem
for amateur radio; debugging details are in
https://groups.io/g/direwolf/message/8286

Fixes: https://github.com/alsa-project/alsa-lib/pull/330

Signed-off-by: Dan Cross <cross@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-06-15 07:51:11 +02:00
Takashi Iwai
77247f51c4 seq: Add UMP 1.1 features
Add APIs for groupless message filtering.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-12 10:14:23 +02:00
Takashi Iwai
80e20a1052 ump: Add UMP 1.1 features
Add a few new features for UMP 1.1:
- New attributes in UMP Endpoint and Block info
- Static block bit flag for EP info

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-12 10:14:20 +02:00
Takashi Iwai
517957a24b uapi: Update rawmidi API to 2.0.4
Sync with the kernel change of rawmidi API for supporting UMP 1.1
features.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-12 10:14:17 +02:00
Takashi Iwai
2aefb5c41c seq: Add UMP support
This patch adds the basic support of UMP on ALSA sequencer API.
An extended event type, snd_seq_ump_event_t, is defined.  It's
compatible with the existing type, snd_seq_event_t, but it has a
larger payload of 16 bytes instead of 12 bytes, for holding the full
128bit UMP packet.

The new snd_seq_ump_event_t must have the bit SND_SEQ_EVENT_UMP in the
event flags.

A few new API functions have been added such as
snd_seq_ump_event_output() and snd_seq_ump_event_input() for
reading/writing this new event object.

The support of UMP in the sequencer client is switched by the function
snd_seq_client_set_midi_version().  It can switch from the default
legacy MIDI to UMP MIDI 1.0 or 2.0 on the fly.

The automatic event conversion among UMP and legacy clients can be
suppressed via snd_seq_client_set_ump_conversion().

The inquiry of the associated UMP Endpoints and UMP Blocks can be done
via snd_seq_get_ump_endpoint_info() and snd_seq_get_ump_block_info().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-06 15:13:27 +02:00
Takashi Iwai
c40dc19a57 uapi: Update asequencer.h definitions for 1.0.3
Updated from kernel for supporting UMP on sequencer API.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-06 15:13:27 +02:00
Takashi Iwai
e80ee6ae75 ump: Add helpers for handling SysEx data
Yet a few more helpers for handling SysEx data with UMP packets.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-06 15:13:27 +02:00
Takashi Iwai
040356ecf0 ump: Add helpers to parse / set UMP packet data
This patch defines the structs / unions that can be used for encoding
and decoding UMP packets, as well as inline helper functions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-06 15:13:27 +02:00
Takashi Iwai
81b0cf46d1 control: Add UMP Endpoint and Block info query support
Add functions to query the UMP Endpoint and Block info via control
interface.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-06 15:13:27 +02:00
Takashi Iwai
8bc10c83b1 control: Add UMP device query support
Add a function to query the next available UMP device via control
interface, just like the existing one for rawmidi.  As the UMP rawmidi
is compatible with the standard rawmidi, no extra helper for the
rawmidi_info is present.  Ditto for the preferred subdevice, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-06 15:13:27 +02:00
Takashi Iwai
f47763d2c1 ump: Add initial support
This patch adds the initial support for UMP rawmidi access.
It's merely the wrapper for the standard rawmidi to access to the UMP
rawmidi device.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-06 15:13:27 +02:00
Takashi Iwai
6627953de0 rawmidi: Add UMP ioctl support
Just implement internal callbacks for two new ioctls for UMP
(ump_endpoint_info and ump_block_info).  No public API functions are
added yet here.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-06 15:13:27 +02:00
Takashi Iwai
a034b84705 uapi: Update control API to 2.0.9
Copied from the kernel uapi header for control API.
A few new ioctls have been added for the support of UMP next device
and inquiries of UMP Endpoint and Block info.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-06 15:13:27 +02:00
Takashi Iwai
c86a4f5cf6 uapi: Update rawmidi API to 2.0.3
Copied from the kernel uapi header for rawmidi API.
A few new structs and constants for UMP are defined in addition to a
few new ioctls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-06 15:13:27 +02:00
Jaroslav Kysela
cbdb428ab9 remove extra trailing new line in SNDMSG and SNDERR calls
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-06-06 13:47:41 +02:00
Jaroslav Kysela
325210acc8 usecase: add CaptureMicInfoFile field to documentation
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-05-16 15:57:15 +02:00
Jaroslav Kysela
55cdf2fd63 include: fix SND_DLSYM_BUILD_VERSION() for static build
Correct the dlsym_name string for nested macros. See Fixes:.

Fixes: https://github.com/alsa-project/alsa-lib/issues/316
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-05-16 09:16:12 +02:00
Jaroslav Kysela
3661bdae35 pcm: hw - prevent divide by zero for broken apps
Fixes: https://github.com/alsa-project/alsa-lib/issues/318
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-05-16 08:59:20 +02:00
Jaroslav Kysela
904f0f7e7a Release v1.2.9
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-05-04 09:16:16 +02:00
Jaroslav Kysela
58077e2f0d pcm: hw: fix the silence size setup in drain
The silence size cannot exceed the silence threshold. Move the check
from the manual condition to the common code. This may happen for
small ring buffers (where the 1/10th second is too large).

Suggested-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-05-03 22:27:40 +02:00