Commit graph

3818 commits

Author SHA1 Message Date
Jaroslav Kysela
21e2fc3857 test: pcm_min - add snd_pcm_drain() call and indentation fixes
Fixes: https://github.com/alsa-project/alsa-lib/issues/46
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-05-03 20:07:55 +02:00
sylvain.bertrand@gmail.com
29041c5220 fix infinite draining of the rate plugin in SND_PCM_NONBLOCK mode
The draining function of the rate plugin does not handle properly the
SND_PCM_NONBLOCK case. It can write data to the slave plugin each time the
function is called, but does not update its internal state in order to
reach a stopping condition. Use a last_commit_ptr workaround to reach such
condition.

Signed-off-by: Sylvain BERTRAND <sylvain.bertrand@legeek.net>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-04-30 14:25:10 +02:00
Amadeusz Sławiński
496e239e65 topology: Use bool parser to parse boolean value
It should be safe to change this as correct values with int would be 0
or 1 and bool parser handles them correctly.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-04-30 14:21:29 +02:00
Jaroslav Kysela
4327660c71 use-case.h: add USB as allowed device name
Some USB devices are really generic where the
PCM stream can be routed to different paths.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-04-28 12:59:13 +02:00
Jaroslav Kysela
a43074ba17 pcm: rate - fix the remaining size calculation in snd_pcm_rate_drain()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-04-23 13:43:32 +02:00
Ivan Mironov
c996c9f52c conf: USB-Audio: Fix S/PDIF output of ASUS Xonar AE
ASUS Xonar AE is a PCI-Express card containing USB controller:

	USB controller [0c03]: ASMedia Technology Inc. ASM1042A USB 3.0 Host Controller [1b21:1142]

and the actual USB sound card:

	ID 0b05:180f ASUSTek Computer, Inc. XONAR SOUND CARD

As other Xonar USB sound cards, it uses second device for digital
output.

Signed-off-by: Ivan Mironov <mironov.ivan@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-04-17 14:03:35 +02:00
sylvain.bertrand@gmail.com
d12df1dc9c pcm: dmix: fix sw_params handling of timestamp types in direct plugins
In pcms using direct plugins (dmix/dsnoop/dshare), the timestamp type could
be different from the terminating hw plugin, then the kernel driver.

Be sure such pcms have plugins using consistently the same timestamp type.

signed-off-by: Sylvain Bertrand <sylvain.bertrand@legeek.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-04-17 11:17:02 +02:00
Jaroslav Kysela
fb48ad9e4f ucm: fix copy-n-paste typo (RemoveDevice list)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-04-06 17:20:24 +02:00
Jaroslav Kysela
c9605484d1 ucm: fix the device remove operation
- allow to remove device only from conflicting lists
- unify the error codes when the device is not found (ENODEV)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-04-06 13:25:46 +02:00
Jaroslav Kysela
341326c21e usecase: allow indexes also for modifier names
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-04-03 18:00:51 +02:00
Jonas Holmberg
3b46b03f09 pcm: add chmap option to route plugin
Add a config definition "chmap" to override the channel maps in the same
way as in the hw and null plugins.

Signed-off-by: Jonas Holmberg <jonashg@axis.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-03-31 22:32:41 +02:00
Jaroslav Kysela
bca39e99d0 conf: fix namehint for pcm.front and pcm.iec958
As suggested in:

Fixes: https://github.com/alsa-project/alsa-lib/issues/39

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-03-27 18:14:02 +01:00
Jaroslav Kysela
d434638a68 namehint: remember the direction from the upper levels
The current code resets the direction info for each level.
Simply remove this code.

Fixes: https://github.com/alsa-project/alsa-lib/issues/39

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-03-27 11:59:55 +01:00
Jaroslav Kysela
6137d263f3 ucm: fix uc_mgr_scan_master_configs()
Skip the lookup, if the top level filename does not exist.

Fixes: https://github.com/alsa-project/alsa-ucm-conf/issues/16

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-03-17 16:21:46 +01:00
Jaroslav Kysela
79102bf264 ucm: clarify the index syntax for the device names
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-03-17 10:21:10 +01:00
Jaroslav Kysela
caf77a93ce topology: add back asrc to widget_map in dapm.c
Fixes: aa1bac2d04 ("topology: add snd_tplg_save()")
BugLink: https://github.com/thesofproject/sof/issues/2543

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-03-13 17:07:36 +01:00
Tanu Kaskinen
9ed3c65e15 conf: USB-Audio: Add C-Media USB Headphone Set to the IEC958 blacklist
Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/317

Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-03-13 10:09:18 +01:00
Jaroslav Kysela
1654f38a29 configure: add --embed for python3-config (python 3.8)
Fixes: https://github.com/alsa-project/alsa-lib/issues/33

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-03-04 11:28:53 +01:00
be-marc
c7efaef195 Change PCM device number of Asus Xonar U5
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-03-03 13:30:39 +01:00
Jaroslav Kysela
09e78da4ca conf: namehint - add omit_noargs to the hint section
Do not list simple surround devices in the namehint function by default.

Fixes: https://github.com/alsa-project/alsa-lib/issues/27

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-03-02 09:45:55 +01:00
Jaroslav Kysela
27c7927842 conf: change the order of PCM devices in alsa.conf
Appearently, some applications use the first device for probe or so.

Fixes: https://github.com/alsa-project/alsa-lib/issues/27

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-02-29 10:31:03 +01:00
Jaroslav Kysela
717a8425ff Release v1.2.2
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-02-19 10:35:39 +01:00
Jaroslav Kysela
e006811e94 github build.yml: cosmetic changes
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-02-18 19:46:42 +01:00
Jaroslav Kysela
78fea15390 alsa.m4: another fix to not link all binaries with -latopology
Preserve LIBS when the -latopology is tested. It's added later.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-02-18 19:45:19 +01:00
Jaroslav Kysela
f47f1e6ff7 README.md: add build status badge
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-02-18 15:04:52 +01:00
Jaroslav Kysela
6d5a7b4eb0 github: create test workflow for fedora and ubuntu
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-02-18 14:55:41 +01:00
Rolf Eike Beer
b367274b4d do not set close-on-exec flag on descriptor if it was already set
There is no need to set this again if O_CLOEXEC is supported.

Signed-off-by: Rolf Eike Beer <eb@emlix.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-02-11 12:13:08 +01:00
Jaroslav Kysela
5bc3d4c4c1 ucm: parser - add error message to verb_dev_list_add()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-02-11 10:38:51 +01:00
Takashi Iwai
5bbe8b2fb9 uapi: Sync with 5.6 kernel ABI
This is a sync with 5.6-rc1 kernel headers.  The copy is performed
from the sanitized headers installed via make headers_install.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-02-10 12:50:50 +01:00
Takashi Iwai
beb6b178e6 topology: Drop SNDRV_CTL_ELEM_ACCESS_TIMESTAMP access
SNDRV_CTL_ELEM_ACCESS_TIMESTAMP is removed from 5.6 kernel ABI as the
ctl timestamp field has been never used and deprecated.
Drop the corresponding access from the topology code, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-02-10 12:49:25 +01:00
Takashi Iwai
43e137c064 control: Remove access to the deprecated dimen fields
The dimen fields of control element has been deprecated, and it's
finally dropped in kernel 5.6 ABI definition.  Remove the
corresponding accesses in alsa-lib code.

As of this patch, it's disabled via ifdef, just to be sure.  The
disabled code should be removed in a later stage as a cleanup.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-02-10 12:47:19 +01:00
Jaroslav Kysela
fdf96312fa ucm: fill missing device entries (conflicting / supported)
It is not necessary to maintain this information in sync in the configuration
files. Fill the missing entries to the complementary devices.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-02-07 16:20:56 +01:00
Jaroslav Kysela
251bc204a1 ucm: implement RenameDevice and RemoveDevice verb management
With the conditionals, it may be useful to define the devices
in the included configuration files. To satisfy the specification
requirements (device naming) those device names might require
to be renamed or deleted wrong references from the conflicting
or supported lists.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-02-07 16:20:49 +01:00
Jaroslav Kysela
71a1367bca ucm: the ucm2/ subdirectory is driver name based
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-02-03 15:24:19 +01:00
Jaroslav Kysela
c5a09b0fea ucm: parser - use correct filename in parser_master_file()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-02-03 14:44:13 +01:00
Tanu Kaskinen
b2fe99277a configure.ac: remove an unnecessary libtool fix
This code was added in commit 75d393a563
without explaining why. I assume it was a mistake, since it looks like
the libtool problem should have gone away a long time ago. The referenced
wiki page https://wiki.debian.org/RpathIssue says:

    Since libtool 1.5.2 (released 2004-01-25), on Linux libtool no
    longer sets RPATH for any directories in the dynamic linker search
    path, so this should no longer be an issue unless upstream used a
    really old version of libtool when creating their distribution
    tarball.

This code caused problems in OpenEmbedded, where the libtool script is
named "x86_64-oe-linux-libtool" or similar rather than just "libtool",
so the sed command failed with a file not found error. Rather than
adapting the code to OpenEmbedded's peculiarities, it seems best to just
remove the unnecessary code altogether.

Note: The rpath is set (hardcoded) for 'make' but it is corrected
for 'make install' by libtool.

Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-01-24 09:55:51 +01:00
Jaroslav Kysela
7d3fec6ac6 ucm: parser - cosmetic fixes in the comments
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-01-17 18:23:44 +01:00
Jaroslav Kysela
fbe1ac4a09 topology: remove MAX_FILE definition and use correct PATH_MAX
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-01-15 10:41:35 +01:00
Jaroslav Kysela
ebf5213cd6 ucm: remove MAX_FILE definition and use correct PATH_MAX
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-01-15 10:40:39 +01:00
Jaroslav Kysela
fe6425af75 ucm: split conf_file_name and conf_dir_name
With ucm2, the file name might differ from the directory
name. Also, allocate those fields.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-01-15 10:40:35 +01:00
Jaroslav Kysela
b34715004f ucm: fix the configuration directory (longname) for ucm2
The new ucm2 expects that the longname directory is shared with
the driver directory. Fix that for 'Syntax 2'.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-01-15 09:49:56 +01:00
Bertware
a78dd1bd1e Quote strings containing [ or ] when saving an alsa config
Signed-off-by: Bert Marcelis <bert.marcelis@outlook.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-01-13 14:24:28 +01:00
David Fries
14ad963e19 mixer: Fix memory leak for more than 16 file descriptor case
Signed-off-by: David Fries <David@Fries.net>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-01-07 16:30:09 +01:00
Jaroslav Kysela
b20b400e2f topology: cosmetic changes (functions)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-01-03 23:38:08 +01:00
Jaroslav Kysela
d768da27e7 topology: tplg_dbg() cleanups
- remove newline at the end

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-01-03 23:38:08 +01:00
Jaroslav Kysela
ae6522e106 topology: unify the log mechanism
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-01-03 23:38:08 +01:00
Jaroslav Kysela
cb88813ff7 topology: move the elem->list delete to tplg_elem_free()
The tplg_elem_free() is called in the error path from many places
and it is expected that the element object will be unregistered
from the tplg structure, too.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-01-03 23:38:08 +01:00
Jaroslav Kysela
b6c9afb4f5 topology: implement snd_tplg_decode
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-01-03 23:38:08 +01:00
Jaroslav Kysela
0ba4d6d9c0 topology: fix the wrong memory access (object realloc)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-01-03 23:38:08 +01:00
Jaroslav Kysela
c765615bce topology: fix the ops parser (accept integer/hexa values)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-01-03 23:38:08 +01:00