OSDN Git Service
Frédéric Recoules [Wed, 6 May 2020 17:19:23 +0000 (19:19 +0200)]
pcm: dmix: assembly: refactor the PIC mode
Newer versions of GCC (> 5.0) accept that ebx is declared
in the clobber list even in PIC mode. Meanwhile, even
unlikely, the compiler may use ebx as base address of
one of the memory entry, making subsequent access to
them unreliable ('size', 'dst_step', 'src_step', 'sum_step').
Adding ebx in the clobber solves the problem.
By the way, the entry 'old_ebx' is no longer required.
Signed-off-by: Frédéric Recoules <frederic.recoules@orange.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Frédéric Recoules [Wed, 6 May 2020 17:19:22 +0000 (19:19 +0200)]
pcm: dmix: assembly: fix the interface for safety (mmx)
- add mm0 in the clobber list if the compiler
is aware of the mmx technology;
- otherwise, add the mmx aliased x87 floating point
registers in the clobbers;
- the configure now checks if the compiler is aware of
the MMX technology.
The compiler assumes none of the mmx or x87 registers are used
by the function. If it chooses to store some data in them, they
will be overwritten by the chunk.
Recall that any mmx instruction invalidate the whole set of
x87 floating point registers.
Note: currently does not impact the binary output.
Signed-off-by: Frédéric Recoules <frederic.recoules@orange.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Frédéric Recoules [Wed, 6 May 2020 17:19:21 +0000 (19:19 +0200)]
pcm: dmix: assembly: fix the interface for safety
- move 'size' and 'old_ebx' in the output section
since they are clobbered;
- add the "memory" clobber since input pointers
are accessed;
- (minor) add the "cc" clobber since flags are
clobbered.
The compiler is missing some dataflow information
about the execution of the assembly chunks.
For instance, it assumes that 'size' remains unchanged
and that no input pointer is accessed.
The compiler optimizer may take advantage of these
assumption and produce a wrong code.
Note: currently produces the same binary output.
Signed-off-by: Frédéric Recoules <frederic.recoules@orange.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Frédéric Recoules [Wed, 6 May 2020 17:19:20 +0000 (19:19 +0200)]
pcm: dmix: assembly: change the token by symbolic names
It eases the refactoring of assembly chunk since we can now
add/remove/move entries without worrying about maintaining
the token numbering in the template.
Note: does not impact the binary output.
Signed-off-by: Frédéric Recoules <frederic.recoules@orange.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jaroslav Kysela [Sun, 3 May 2020 18:07:29 +0000 (20:07 +0200)]
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>
sylvain.bertrand@gmail.com [Tue, 28 Apr 2020 12:09:18 +0000 (12:09 +0000)]
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>
Amadeusz Sławiński [Fri, 17 Apr 2020 16:47:47 +0000 (12:47 -0400)]
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>
Jaroslav Kysela [Tue, 28 Apr 2020 10:58:41 +0000 (12:58 +0200)]
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>
Jaroslav Kysela [Thu, 23 Apr 2020 11:43:32 +0000 (13:43 +0200)]
pcm: rate - fix the remaining size calculation in snd_pcm_rate_drain()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Ivan Mironov [Thu, 26 Mar 2020 19:46:45 +0000 (00:46 +0500)]
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>
sylvain.bertrand@gmail.com [Wed, 15 Apr 2020 00:44:39 +0000 (00:44 +0000)]
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>
Jaroslav Kysela [Mon, 6 Apr 2020 15:20:24 +0000 (17:20 +0200)]
ucm: fix copy-n-paste typo (RemoveDevice list)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Mon, 6 Apr 2020 11:25:43 +0000 (13:25 +0200)]
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>
Jaroslav Kysela [Fri, 3 Apr 2020 16:00:43 +0000 (18:00 +0200)]
usecase: allow indexes also for modifier names
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jonas Holmberg [Tue, 31 Mar 2020 15:09:25 +0000 (17:09 +0200)]
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>
Jaroslav Kysela [Fri, 27 Mar 2020 17:14:02 +0000 (18:14 +0100)]
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>
Jaroslav Kysela [Fri, 27 Mar 2020 10:59:53 +0000 (11:59 +0100)]
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>
Jaroslav Kysela [Tue, 17 Mar 2020 15:20:52 +0000 (16:20 +0100)]
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>
Jaroslav Kysela [Tue, 17 Mar 2020 09:21:10 +0000 (10:21 +0100)]
ucm: clarify the index syntax for the device names
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Fri, 13 Mar 2020 16:05:14 +0000 (17:05 +0100)]
topology: add back asrc to widget_map in dapm.c
Fixes:
aa1bac2d04bd ("topology: add snd_tplg_save()")
BugLink: https://github.com/thesofproject/sof/issues/2543
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Tanu Kaskinen [Fri, 13 Mar 2020 07:39:17 +0000 (09:39 +0200)]
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>
Jaroslav Kysela [Wed, 4 Mar 2020 10:27:12 +0000 (11:27 +0100)]
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>
be-marc [Tue, 3 Mar 2020 10:01:09 +0000 (11:01 +0100)]
Change PCM device number of Asus Xonar U5
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Sun, 1 Mar 2020 18:57:06 +0000 (19:57 +0100)]
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>
Jaroslav Kysela [Sat, 29 Feb 2020 09:30:37 +0000 (10:30 +0100)]
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>
Jaroslav Kysela [Wed, 19 Feb 2020 09:35:39 +0000 (10:35 +0100)]
Release v1.2.2
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Tue, 18 Feb 2020 18:46:42 +0000 (19:46 +0100)]
github build.yml: cosmetic changes
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Tue, 18 Feb 2020 18:44:36 +0000 (19:44 +0100)]
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>
Jaroslav Kysela [Tue, 18 Feb 2020 14:04:52 +0000 (15:04 +0100)]
README.md: add build status badge
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Tue, 18 Feb 2020 08:22:58 +0000 (09:22 +0100)]
github: create test workflow for fedora and ubuntu
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Rolf Eike Beer [Tue, 11 Feb 2020 10:22:18 +0000 (11:22 +0100)]
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>
Jaroslav Kysela [Mon, 10 Feb 2020 12:18:23 +0000 (13:18 +0100)]
ucm: parser - add error message to verb_dev_list_add()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Takashi Iwai [Mon, 10 Feb 2020 11:50:50 +0000 (12:50 +0100)]
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>
Takashi Iwai [Mon, 10 Feb 2020 11:49:25 +0000 (12:49 +0100)]
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>
Takashi Iwai [Mon, 10 Feb 2020 11:47:19 +0000 (12:47 +0100)]
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>
Jaroslav Kysela [Fri, 7 Feb 2020 15:18:11 +0000 (16:18 +0100)]
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>
Jaroslav Kysela [Fri, 7 Feb 2020 09:09:07 +0000 (10:09 +0100)]
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>
Jaroslav Kysela [Mon, 3 Feb 2020 14:24:19 +0000 (15:24 +0100)]
ucm: the ucm2/ subdirectory is driver name based
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Mon, 3 Feb 2020 13:44:13 +0000 (14:44 +0100)]
ucm: parser - use correct filename in parser_master_file()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Tanu Kaskinen [Fri, 20 Dec 2019 07:26:12 +0000 (09:26 +0200)]
configure.ac: remove an unnecessary libtool fix
This code was added in commit
75d393a563efb578c79364a277087c6326267f52
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>
Jaroslav Kysela [Fri, 17 Jan 2020 17:21:08 +0000 (18:21 +0100)]
ucm: parser - cosmetic fixes in the comments
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Wed, 15 Jan 2020 09:41:35 +0000 (10:41 +0100)]
topology: remove MAX_FILE definition and use correct PATH_MAX
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Wed, 15 Jan 2020 09:40:01 +0000 (10:40 +0100)]
ucm: remove MAX_FILE definition and use correct PATH_MAX
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Wed, 15 Jan 2020 09:31:56 +0000 (10:31 +0100)]
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>
Jaroslav Kysela [Wed, 15 Jan 2020 08:41:05 +0000 (09:41 +0100)]
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>
Bertware [Mon, 13 Jan 2020 09:21:33 +0000 (10:21 +0100)]
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>
David Fries [Tue, 7 Jan 2020 15:18:10 +0000 (09:18 -0600)]
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>
Jaroslav Kysela [Fri, 3 Jan 2020 21:56:48 +0000 (22:56 +0100)]
topology: cosmetic changes (functions)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Fri, 3 Jan 2020 21:44:15 +0000 (22:44 +0100)]
topology: tplg_dbg() cleanups
- remove newline at the end
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Fri, 3 Jan 2020 21:31:27 +0000 (22:31 +0100)]
topology: unify the log mechanism
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Fri, 3 Jan 2020 21:07:11 +0000 (22:07 +0100)]
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>
Jaroslav Kysela [Sun, 15 Dec 2019 14:24:57 +0000 (15:24 +0100)]
topology: implement snd_tplg_decode
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Wed, 1 Jan 2020 18:10:20 +0000 (19:10 +0100)]
topology: fix the wrong memory access (object realloc)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Tue, 31 Dec 2019 14:27:58 +0000 (15:27 +0100)]
topology: fix the ops parser (accept integer/hexa values)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Sun, 29 Dec 2019 19:05:14 +0000 (20:05 +0100)]
topology: fix the TPLG_DEBUG compilation
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Sat, 28 Dec 2019 20:44:03 +0000 (21:44 +0100)]
topology: implement shorter hexa uuid 00:00 parser
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Sat, 28 Dec 2019 09:18:34 +0000 (10:18 +0100)]
topology: fix the unitialized tuples
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Fri, 27 Dec 2019 18:32:03 +0000 (19:32 +0100)]
topology: dapm - fix the SNDERR() - Undefined
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Fri, 20 Dec 2019 22:48:40 +0000 (23:48 +0100)]
topology: cleanup the SNDERR() calls
- remove the wrong new lines
- remove error/warning prefixes (error is error)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Fri, 20 Dec 2019 20:28:30 +0000 (21:28 +0100)]
topology: add snd_tplg_version() function
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Fri, 20 Dec 2019 13:59:00 +0000 (14:59 +0100)]
topology: add snd_tplg_create() with flags
Add SND_TPLG_CREATE_VERBOSE and SND_TPLG_CREATE_DAPM_NOSORT
flags for the special operations.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Mon, 16 Dec 2019 13:26:31 +0000 (14:26 +0100)]
topology: add snd_tplg_save()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Sun, 15 Dec 2019 16:24:50 +0000 (17:24 +0100)]
topology: add parser to the tplg_table
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Sun, 15 Dec 2019 15:15:29 +0000 (16:15 +0100)]
topology: move the topology element table from builder to elem
- use offsetof() for the lists
- add other info to describe the elements
- use the table in the element constructor
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Sun, 15 Dec 2019 15:03:29 +0000 (16:03 +0100)]
topology: add snd_tplg_load() remove snd_tplg_build_bin_file()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Sat, 14 Dec 2019 19:32:24 +0000 (20:32 +0100)]
topology: parser - recode tplg_parse_config()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Sat, 14 Dec 2019 18:20:02 +0000 (19:20 +0100)]
topology: add binary output from the builder
- snd_tplg_build_bin()
- snd_tplg_build_bin_file()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Sat, 14 Dec 2019 18:13:53 +0000 (19:13 +0100)]
topology: convert builder to use the mallocated memory
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Sat, 14 Dec 2019 13:05:49 +0000 (14:05 +0100)]
topology: add tplg_get_unsigned() function
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Sat, 14 Dec 2019 12:52:18 +0000 (13:52 +0100)]
topology: fix tplg_get_integer() - handle errno == ERANGE
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Sat, 14 Dec 2019 12:50:04 +0000 (13:50 +0100)]
topology: use snd_config_get_bool() instead own implementation
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Sat, 14 Dec 2019 12:36:09 +0000 (13:36 +0100)]
topology: avoid to use the atoi() directly when expected
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
David Ward [Fri, 3 Jan 2020 18:05:51 +0000 (13:05 -0500)]
Update the attributes.m4 macro file from xine
This file was imported from the xine project. Update it to the current
revision, which resolves the "no AC_LANG_SOURCE call detected in body"
warnings with Autoconf 2.68 or later.
Cc: Diego Pettenò <flameeyes@gmail.com>
Signed-off-by: David Ward <david.ward@ll.mit.edu>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Takashi Iwai [Fri, 20 Dec 2019 16:12:37 +0000 (17:12 +0100)]
uapi: Move typedefs from uapi to sound/*
For keeping uapi/*.h cleaner.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 20 Dec 2019 15:12:50 +0000 (16:12 +0100)]
type_compat: Add missing __s64 and __u64 definitions for non-Linux
Just for the case without Linux-compatible definitions.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 20 Dec 2019 14:46:48 +0000 (15:46 +0100)]
Fix alsa/sound/*.h for external programs
The recent update of sound/*.h to sync with the latest Linus uapi
files broke the build of alsa-tools programs. These files used to be
a modified version of Linux sound/* header files, so that they could
be built without Linux headers. The special prefix like __user and
other things were worked around there.
We may do that again, but a better approach is to fix those things in
Linux kernel uapi side, while we keep the minimal workaround in
alsa-lib such as the __u16 and co type definitions.
This patch is such an attempt, namely:
- Keep the original $LINUX/uapi/sound/*.h in include/sound/uapi
directory
- The "fixes" are applied to some uapi headers, so that they don't
contain Linux-specific prefix and use of opaque struct like
snd_ctl_elem_id
- The uapi headers are included indirectly from include/sound/*.h
- Some headers have inclusion of type_compat.h for the Linux variable
types and prefixes
- type_compat.h tries to use <linux/types.h> when __linux__ is
defined, instead of the own conflicting definitions
The last type might need a bit more adjustment depending on the
compiler, but it can be fixed locally without disturbing else.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jaroslav Kysela [Fri, 13 Dec 2019 21:07:46 +0000 (22:07 +0100)]
topology: more coding fixes
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Fri, 13 Dec 2019 20:56:58 +0000 (21:56 +0100)]
topology: dapm - merge identical index blocks like for other elems
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Fri, 13 Dec 2019 20:52:13 +0000 (21:52 +0100)]
topology: dapm - coding fixes
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Fri, 13 Dec 2019 20:23:52 +0000 (21:23 +0100)]
topology: use list_insert() macro in tplg_elem_insert()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Fri, 13 Dec 2019 17:53:41 +0000 (18:53 +0100)]
topology: make vebose output more nice
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Fri, 13 Dec 2019 17:49:29 +0000 (18:49 +0100)]
topology: merge write_block to tplg_write_data
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Fri, 13 Dec 2019 17:26:20 +0000 (18:26 +0100)]
topology: use size_t for calc_block_size()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Fri, 13 Dec 2019 17:24:55 +0000 (18:24 +0100)]
topology: use an array describing blocks for the main build loop
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Fri, 13 Dec 2019 16:01:03 +0000 (17:01 +0100)]
topology: file position and size cleanups
- try to use size_t/ssize_t
- track the position in own variable, do not use lseek
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Fri, 13 Dec 2019 15:09:35 +0000 (16:09 +0100)]
topology: remove vendor_fd/name from snd_tplg structure - not used
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Thu, 12 Dec 2019 17:42:33 +0000 (18:42 +0100)]
alsa-lib: fix the array parser (unique compound keys)
The code from the old import may merge arrays wrongly and
the result is a compound with same keys like:
Input:
lines [
"SSP0.OUT, , BUF1.3"
]
lines [
"BUF2.0, , SSP0.IN"
]
Parsed contents:
lines {
0 'SSP0.OUT, , BUF1.3'
0 'BUF2.0, , SSP0.IN'
}
Proper parsed contents (create+merge mode):
lines {
0 'SSP0.OUT, , BUF1.3'
1 'BUF2.0, , SSP0.IN'
}
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Libin Yang [Wed, 11 Dec 2019 06:07:19 +0000 (14:07 +0800)]
ucm: setup conf_format after getting ALSA_CONFIG_UCM_VAR successfully
Set the conf_format to 1 after getting ALSA_CONFIG_UCM_VAR successfully.
Otherwise, the conf_format is not set in this scenario.
Signed-off-by: Libin Yang <libin.yang@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Tue, 10 Dec 2019 10:48:06 +0000 (11:48 +0100)]
ucm: docs - remove MixerCopy values, add Priority for verb, improve priority docs
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Fri, 6 Dec 2019 10:11:54 +0000 (11:11 +0100)]
ucm: docs - add note about the sequences and device split
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Thu, 5 Dec 2019 16:19:06 +0000 (17:19 +0100)]
ucm: docs - change the Mic description to simple Microphone Device
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Thu, 5 Dec 2019 16:01:31 +0000 (17:01 +0100)]
ucm: docs - remove DigitalMic, it does not have sense
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Thu, 5 Dec 2019 15:59:05 +0000 (16:59 +0100)]
ucm: docs - add Mic/DigitalMic and multiple devices comments
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Wed, 4 Dec 2019 08:49:40 +0000 (09:49 +0100)]
alsa.m4: another try to fix the libatopology detection
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Fabrice Fontaine [Tue, 3 Dec 2019 17:56:40 +0000 (18:56 +0100)]
src/ucm/main.c: fix build without mixer
Commit
4ce38a5ff466d18039b2606938f866ea3a6c9f3c breaks the build without
mixer on:
CCLD libasound.la
/home/buildroot/autobuild/instance-1/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/8.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld: ucm/.libs/libucm.a(main.o): in function `snd_use_case_set':
main.c:(.text+0x185c): undefined reference to `snd_mixer_selem_id_parse'
Fixes: http://autobuild.buildroot.org/results/
4d91c9f82a2a61c50c457a851073b85cc09ea345
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Hans de Goede [Tue, 3 Dec 2019 17:27:39 +0000 (18:27 +0100)]
ucm: Do not fail to parse configs on cards with an empty CardComponents lists
Since the UCM profiles for all Bay- and Cherry-Trail SST cards have been
moved over to UCM2, parsing them fails with:
ALSA lib ucm_subs.c:220:(uc_mgr_get_substituted_value) variable '${CardComponents}' is not defined in this context!
This completely breaks audio support on all Bay- and Cherry-Trail devices.
This is caused by these non-SOF ASoC using cards having an empty
CardComponents list. Which in itself is fine, but is rejected by
the ucm_subs.c code. This commit changes the ucm_subs code to accept
an empty string as a valid value for CardComponents restoring audio
functionality on these boards.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Tue, 3 Dec 2019 14:01:04 +0000 (15:01 +0100)]
ucm: docs - add JackCTL, rearrange JackControl and JackDev
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Mon, 2 Dec 2019 10:57:18 +0000 (11:57 +0100)]
use-case: docs - add PlaybackMixerCopy and CaptureMixerCopy
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Mon, 2 Dec 2019 10:56:30 +0000 (11:56 +0100)]
ucm: docs - allow spaces in device names for JackHWMute
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Sun, 1 Dec 2019 13:30:54 +0000 (14:30 +0100)]
namehint: improve the previous patch (check the returned value)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>