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>
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>
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>
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>
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: 6167b8ce3e ("seq: Add API helper functions for creating UMP Endpoint and Blocks")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
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: 6167b8ce3e ("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>
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>
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>
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>
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>
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>
The group number of UMP Endpoint client created by
snd_seq_create_ump_endpoint() is wrongly set due to a copy&paste
error.
Fixes: 6167b8ce3e ("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>
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: 2aefb5c41c ("seq: Add UMP support")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
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>
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>
Doxygen create also subdirectories. Make sure that files
in those directories have required permissions.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
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>
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>
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>
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>
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>
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>
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>
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>
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 769d1db1b0 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>
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>
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: 982786e9eb ("Fix bogus pause flag on dmix")
Signed-off-by: Takashi Iwai <tiwai@suse.de>