Add the support for showing the UMP events to aseqdump.
With the new option -u, the program can start as a UMP sequencer
client and receive UMP events instead of the legacy MIDI events.
Also, the automatic event conversion among legacy and UMP clients can
be suppressed by the new -r option, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The microphone arrays for Intel platforms are described in the
ACPI NHLT table. This table is available in sysfs. Parse this
information and use a more common format (json) for output. This
information is usable for the further DSP processing.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
- ERESTART not supported platform: use EINTR instead
- add include/os_compat.h, well-used OS specific definition
- copied include/bswap.h from alsa-lib
- EPIPE and ESTRPIPE are different usage, but currently
EPIPE is used when ESTRPIPE is not defined.
To fix this problem, assign ESPIPE instead.
Fixes: https://github.com/alsa-project/alsa-utils/pull/186
Signed-off-by: SASANO Takayoshi <uaa@uaa.org.uk>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Add Intel nhlt acpi table encoder plugin into topology2.0 processing.
Nhlt internal structure is defined in:
https://01.org/sites/default/files/595976_intel_sst_nhlt.pdf
Nhlt acpi table contain vendor specific binary data blobs that are used
in some Intel dsp platforms for configuring the dmic and ssp hardware.
The function of this code is mainly to generate the vendor specific
binary blobs, but as there is existing nhlt parser code and header in
kernel there's no point of re-inventing the container: just use the
existing nhlt acpi table format. Basically this code is creating similar
nhlt acpi table that you would get from: cat
/sys/firmware/acpi/tables/NHLT
This code will have implementation for dmic and ssp endpoints. Thus the
code will translate the topology dai tokens into vendor specific binary
blobs and pack them into nhlt acpi table. Ssp and dmic code is lifted
from Sound Open Firmware (sof) code base, thus it will have BSD-3
license.
This plugin can be enabled from command line with:
alsatplg -DPREPROCESS_PLUGINS="nhlt" -c foo.conf -p -o bar.tplg
You can also dump the nhlt binary into a file with additional define:
-DNHLT_BIN="nhlt.bin"
Link: https://github.com/alsa-project/alsa-utils/pull/129
Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This is a preparation to use memfd_create(2) system call for test programs
of axfer. The system call was introduced at Linux kernel v3.17 and
relatively new.
For safe, this commit adds detection of memfd_create() in autotools side
so that application can handle the case not to detect.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
It is handy to remove all card controls created by applications.
This change allows to remove those controls for all cards, selected
card or selected card with a control id filter list like:
alsactl clean 0 "name='PCM'" "name='Mic Phantom'"
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
At present, axfer is designed to use several types of backend for
transmission of data frames. This commit is an implementation
example of the backend.
Libffado is a userspace library for transmission of data frames according
to protocols similar to IEC 61883-1/6. This library handles audio and
music units on IEEE 1394 bus.
Unfortunately, this library executes ctor/dtor of instances for some
objects in startup/finish routines of C runtime. As a result, it outputs
some superfluous messages even if the backend is not actually used.
Furthermore, this library brings memory leak internally. Therefore,
it's not practical to build this backend for generic purposes. Although
the backend implementation works fine, this commit is just for technical
preview.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In former commits, container module gets supports of parser/builder for
several types of file format. This commit adds a unit test for them.
This includes positive test cases only. The test cases actually generate
I/O to file systems for many test cases. It takes a long time to finish.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit adds a new command, 'axfer' ('ALSA transfer'), to transfer data
frames described in asound.h. This command is intended to replace current
aplay. The most of features and command line parameters come from aplay as
much as possible, while it has more better feature and code to maintain.
This commit adds an entry point for this command. Current option system of
aplay is still available, while this command has a sub-command system like
commands in iproute2.
Currently, two sub-commands are supported; 'list' and 'transfer'. The
'list' sub-command has the same effect as '-l' and '-L' options of aplay.
The 'transfer' sub-command has the same effect as the main feature of
aplay. For the sub-command system, an option for stream direction is
required; '-P' for playback and '-C' for capture. If you create symbolic
links to this binary for aplay/arecord, please execute:
$ ln -s axfer aplay
$ ln -s axfer arecord
Actual code for each sub-command will be implemented in later commits.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Ensures soundcard is ready before restoring state.
sound.target added to systemd in v18:
https://cgit.freedesktop.org/systemd/systemd/commit/?id=88dfa2938af
Simplify dependencies:
- After=alsa-state.service is not needed because both units test for
@daemonswitch@ with opposite outcomes.
- After=sysinit.target is automatically added by systemd.
First proposed by Tom Yan.
Signed-off-by: Chris Mayo <aklhfex@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Define a USE_RST2MAN conditional so that, when available, rst2man can be
used to generate man pages from reStructuredText source files.
The code follows what is done to check for xmlto.
On Debian system, the rst2man executable is provided by python-docutils
or python3-docutils.
Signed-off-by: Antonio Ospite <ao2@ao2.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The same $xmlto variable is used both in AC_ARG_ENABLE and
AC_CHECK_PROG, but the latter is not setting a value to it when the
program is not found.
These two facts result in the "yes" value from the AC_ARG_ENABLE macro
to be still kept in the variable when the program is not found by
AC_CHECK_PROG, causing USE_XMLTO to be always set, finally resulting in
a build failure in case the xmlto program is not actually in the PATH.
As possible fix could have been to set "no" as a value in AC_CHECK_PROG
when program is not found.
However using two separate variables is more explicit, so fix the issue
this way.
Signed-off-by: Antonio Ospite <ao2@ao2.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch includes the reference asound.state config files
on Intel Skylake, Broadwell and Hsawell platforms
Signed-off-by: Focus Luo <focus.luo@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch includes automated test scripts for linux audio driver
based on alsa-lib interface by using alsabat as test tool.
It supports analog and display(HDMI/DP) audio test.
The package needs the alsa-utils, alsa-lib installed environment.
Signed-off-by: Focus Luo <focus.luo@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Aligning the data type of fftw analyzer, sample converter and other
components on float, because:
1. avoid unnecessary data type conversion;
2. using float is more efficient than using double;
3. the extra double accuracy is not required.
Signed-off-by: Lu, Han <han.lu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Use "configure --enable-alsabat-backend-tiny" for alsabat to use
tinyalsa as backend lib. On a system that has both ALSA and tinyalsa
installed, alsabat will use ALSA library by default.
The intention is for alsabat to run on tinyalsa platforms such as
Android or some Internet of Things(IoT) devices.
Signed-off-by: Lu, Han <han.lu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add support for standalone mode where alsabat will run on a
different machine to the one being tested.
In standalone mode, the alsabat just generates, playback and
capture sound data like in normal mode, but does not analyze.
The alsabat being built without libfftw3 support is always work
in standalone mode.
The alsabat in normal mode can also bypass data analysis using
option "--standalone".
Signed-off-by: Lu, Han <han.lu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
rawmidi devices expose the card number via IOCTLs, which allows to
find the corresponding device in sysfs.
The sequencer provides no identifing data. Chromium works around this
issue by scanning rawmidi as well as sequencer devices and matching
them by using assumtions, how the kernel register sequencer devices.
This patch adds support for displaying the sound card number/PID to
aconnect.
Signed-off-by: Martin Koegler <martin.koegler@chello.at>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
cross compilers are passed via path may not be a gcc based cross
compiler in such cases this check fails and try's to force gcc based
cross compiler detection, This code is a convenience that limits the
build system.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add Makefile and configures that enable BAT on alsa-utils
Signed-off-by: Lu, Han <han.lu@intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@intel.com>
Signed-off-by: Bernard Gautier <bernard.gautier@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add a command line tool that will parse topology text files and convert to the binary
topology data as used by the kernel.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>