Detailed changes v1.0.29 v1.1.0

From AlsaProject
Jump to: navigation, search

Contents

Detailed changelog between 1.0.29 and 1.1.0 releases

Changelog between 1.0.29 and 1.1.0 releases

alsa-lib

Core

- Release v1.1.0
- support building w/out System V shared memory
Some systems, like Android/Bionic, do not support SysV at all.
Let the configure script detect if the header is available, and
if not, automatically disable the pieces that require it.
- fix _GNU_SOURCE handling & header inclusion
The configure script blindly adds -D_GNU_SOURCE to all build settings,
even on non-GNU systems. This isn't too much of a big deal (even if
it uses the wrong variable -- CFLAGS instead of CPPFLAGS), except that
the alsa-lib source itself determines whether to use GNU features when
this is defined (such as versionsort). So when we build on non-glibc
systems, we get build failures like:
src/ucm/parser.c:1268:18: error: 'versionsort' undeclared (first use in this function)
#define SORTFUNC versionsort
^
src/ucm/parser.c:1272:54: note: in expansion of macro 'SORTFUNC'
err = scandir(filename, &namelist, filename_filter, SORTFUNC);
^
The correct way to add these flags is to use the autoconf helper
AC_USE_SYSTEM_EXTENSIONS. Unfortunately, that triggers some more
bugs in the alsa build. This macro adds defines to config.h and
not directly to CPPFLAGS, so it relies on files correctly including
config.h before anything else. A number of alsa files do not do
this leading to build failures. The fix there is to shuffle the
includes around so that the local ones come first.
- build: Do not try to detect cross-compiler
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
- core: add convenience macros to local.h
Move ARRAY_SIZE() from tplg_local.h to local.h and add container_of()
macro to local.h. Both macros are generic but are initially used by
topology.
- conf: topology: Add topology file for broadwell audio DSP
- topology: autotools: Add build support for topology core
- Replace list.h with its own version
We copied include/list.h from Linux kernel, and it's of course in
GPLv2. This has raised concerns to many people, as it's not clear
whether such a code is considered to be completely trivial, thus it
might be seen as a derivative work, which takes effect in GPL, as
suggested by Clemens.
For clearing the situation, this patch replaces the existing list.h
implementation from a new version. The API is kept to be compatible,
but the codes were written from full scratch under LGPL, to be aligned
with other alsa-lib codes.
Reported-by: Clemens Lang <clemens.lang@bmw-carit.de>
- Allow hint for ctl, hwdep, timer and seq
Like pcm and rawmidi, each object parser needs to accept the hint
component. Now a new local function _snd_conf_generic_id() was
introduced to replace each call of "comment" and "type" field checks.
Also, the two existing identical functions for pcm and rawmidi are
removed and the new function is used commonly.
- conf/ucm: Add Makefile.am for broadwell-rt286 ucm config

Config API

- Replace unsafe characters with _ in card name
Otherwise, they get misinterpreted as argument separators
in USB-Audio PCM definitions, and thus prevent SPDIF blacklist entries
from working.
While at it, add my Logitec C910 webcam to the SPDIF blacklist.

Control API

- control: Allow cset'ing specific values in the multi-value case
Improve the parser to allow empty elements followed by a comma.
Now amixer works like below for setting only the third element.
 % amixer cset 'IIR1 Band1' ,,200
Reported-and-tested-by: Arun Raghavan <arun@accosted.net>
- Allow hint for ctl, hwdep, timer and seq
Like pcm and rawmidi, each object parser needs to accept the hint
component. Now a new local function _snd_conf_generic_id() was
introduced to replace each call of "comment" and "type" field checks.
Also, the two existing identical functions for pcm and rawmidi are
removed and the new function is used commonly.
- namehint: Fix bad free with invalid iface name
Due to the uninitialized field before the error path, passing an
invalid iface argument may result in a bad free() call. Initialize
the fields properly beforehand.
- namehint: Fix the listing without device number
The current code of snd_device_name_hint() has a bug when listing up
devices without the device index (e.g. ctl). Because it assigns the
default device index 0 unconditionally and it has a check at the later
point to filter entries with dev >= 0, it ended up with empty
outputs.
The fix is simply to remove the bogus assignment of dev = 0.
- namehint: Fix invalid list access in snd_device_name_hint()
snd_device_name_hint() tries to free the allocated list at the error
path via snd_device_name_free_hint(). But snd_device_name_free_hint()
expects a list terminated by NULL while snd_device_name_hint() doesn't
add it. Adding it may again result in an error and thus isn't
guaranteed to work. Hence we can't add NULL at the error path.
Instead, now the code always allocates one entry more, and zero-clears
the newly allocated beforehand to guarantee the NULL termination.

HWDEP API

- hwdep: add FireWire digi00x/tascam driver support
Linux 4.4 newly support these drivers. Their hardware dependent interfaces
give functionalities to get hardware information, to lock/unlock kernel
streaming and to receive lock status event.
- Allow hint for ctl, hwdep, timer and seq
Like pcm and rawmidi, each object parser needs to accept the hint
component. Now a new local function _snd_conf_generic_id() was
introduced to replace each call of "comment" and "type" field checks.
Also, the two existing identical functions for pcm and rawmidi are
removed and the new function is used commonly.

PCM API

- support building w/out System V shared memory
Some systems, like Android/Bionic, do not support SysV at all.
Let the configure script detect if the header is available, and
if not, automatically disable the pieces that require it.
- pcm: drop unused sys/shm.h inclusion
This header isn't used in these files, so stop trying to include it.
This helps builds on systems that don't provide the header (such as
Android/Bionic).
- move page helpers to common code
If you build with --disable-pcm, the rawmidi code fails to link because
it uses the page_size helper declared in local.h, but the page_* funcs
are in the pcm mmap module. Move these funcs into conf.c so that they
are always available to the rest of the system.
- pcm: dmix: Handle slave PCM xrun and unexpected states properly
Currently, dmix & co plugins ignore the XRUN state of the slave PCM.
It's (supposedly) because dmix deals with the PCM in a free-wheel
mode, which is equivalent with XRUN. But, this difference (whether
the correct freewheel or XRUN) should be done by the kernel, and we
may have an XRUN state indeed (e.g. via xrun injection).
This patch fixes this lack of behavior, to handle PCM xrun and does
prepare when the slave PCM is in such a state.
Also, the patch consolidates the prepare callback for all dmix, dsnoop
and dshare plugins, and fix/cleanup a bit for dshare/dsnoop codes to
align with dsnoop code.
- pcm: ladspa: Fix segfault due to a wrong channel reference
Because of a typo in referencing the input array in
snd_pcm_ladspa_allocate_memory(), ladpsa PCM plugin may cause a
segfault at prepare when input and and output channels are different:
#0 0x00007ffff78623ef in snd_pcm_ladspa_allocate_memory (pcm=0x626fa0, pcm=0x626fa0, pcm=0x626fa0, ladspa=0x621ad0) at pcm_ladspa.c:753
#1 snd_pcm_ladspa_init (pcm=0x626fa0) at pcm_ladspa.c:834
#2 0x00007ffff7842946 in snd_pcm_plugin_prepare (pcm=0x626fa0) at pcm_plugin.c:171
#3 0x00007ffff784290f in snd_pcm_plugin_prepare (pcm=0x62c760) at pcm_plugin.c:162
#4 0x000000000040256a in ?? ()
#5 0x00007ffff7222ec5 in __libc_start_main (main=0x401d80,a argc=4, argv=0x7fffffffde28, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffde18) at libc-start.c:287
#6 0x0000000000402fdd in ?? ()
This patch corrects the wrong reference.
Reported-and-tested-by: Andreas Hartmann <mail@andreashartmann.eu>
- pcm: route: Remove bogus ! in snd_config_get_id() checks
There are strange "!" added before snd_config_get_id() return value
checks in a couple of places in pcm_route.c. This essentially makes
the result always positive, making checks bogus.
- pcm: ioplug,extplug: Fix logic errors in type checks
A few error checks are wrongly performed with logical and (&&) instead
of logical or (||), which condition never met.
Reported-by: David Binderman <dcb314@hotmail.com>
- pcm: Fix doxygen for two enums
The doxygen comments were wrong, making doxygen output weird.
- pcm: restore hw params on set latency failed
When method snd_pcm_set_params sets sample rate to 22050 and latency to 50000
to davinci soc driver method snd_pcm_hw_params_set_buffer_time_near fails
and variable params is already changed in the method so the next method
snd_pcm_hw_params_set_period_time_near fails also.
- pcm: add support for new STATUS_EXT ioctl
use STATUS_EXT ioctl if PCM protocol is > 2.0.12
All audio timestamp configuration will be ignored with an
older protocol.
- pcm: add support for get/set_audio_htstamp_config
Enable kernel-side functionality by letting user select what sort of
timestamp it desires
- pcm: add helper functions to query timestamping capabilities
extend support to link, link_estimated and link_synchronized
timestamp. wall-clock is deprecated
- PCM: snd_pcm_xxxx_drain() maybe blocked after suspend and resume
After suspend and resume, the alsa driver is stopped. But if alsa-lib run
into snd_pcm_xxxx_drain(), it need to wait avail >= pcm->stop_threshold,
otherwise, it will not exit the loop, so finally it is blocked at poll() of
snd_pcm_wait_nocheck(pcm, -1).
This patch is to add state check after snd_pcm_wait_nocheck(pcm, -1), if
the state is SND_PCM_STATE_SUSPENDED, then return error.
- pcm: Fix snd_pcm_status() for dmix & co
Fetch the timestamp and other status fields by issuing
snd_pcm_status() for the slave PCM. Also, fill the delay field
properly. This should fix longstanding PA's complaints.
Reported-by: Dan Hordern <danhordern@gmail.com>
- pcm: Don't assert in _snd_pcm_hw_params_internal()
It's no fatal error from sw params, and it's really bad habit to use
assert() and abort the operation as a system library.
- pcm: Remove assert() from snd_pcm_hw_params_slave()
Using assert() for non-fatal error checks is really brain-dead.
These are especially bad, as it hits even in the normal operation with
plugins and some h/w constraints.
Reported-by: Alan Horstmann <gineera@aspect135.co.uk>
- Allow hint for ctl, hwdep, timer and seq
Like pcm and rawmidi, each object parser needs to accept the hint
component. Now a new local function _snd_conf_generic_id() was
introduced to replace each call of "comment" and "type" field checks.
Also, the two existing identical functions for pcm and rawmidi are
removed and the new function is used commonly.

RawMidi API

- Allow hint for ctl, hwdep, timer and seq
Like pcm and rawmidi, each object parser needs to accept the hint
component. Now a new local function _snd_conf_generic_id() was
introduced to replace each call of "comment" and "type" field checks.
Also, the two existing identical functions for pcm and rawmidi are
removed and the new function is used commonly.

Timer API

- fix _GNU_SOURCE handling & header inclusion
The configure script blindly adds -D_GNU_SOURCE to all build settings,
even on non-GNU systems. This isn't too much of a big deal (even if
it uses the wrong variable -- CFLAGS instead of CPPFLAGS), except that
the alsa-lib source itself determines whether to use GNU features when
this is defined (such as versionsort). So when we build on non-glibc
systems, we get build failures like:
src/ucm/parser.c:1268:18: error: 'versionsort' undeclared (first use in this function)
#define SORTFUNC versionsort
^
src/ucm/parser.c:1272:54: note: in expansion of macro 'SORTFUNC'
err = scandir(filename, &namelist, filename_filter, SORTFUNC);
^
The correct way to add these flags is to use the autoconf helper
AC_USE_SYSTEM_EXTENSIONS. Unfortunately, that triggers some more
bugs in the alsa build. This macro adds defines to config.h and
not directly to CPPFLAGS, so it relies on files correctly including
config.h before anything else. A number of alsa files do not do
this leading to build failures. The fix there is to shuffle the
includes around so that the local ones come first.

Topology API

- topology: Add missing prototypes for new functions
The prototypes for some functions that have been added in the recent
changes are missing, which leads to compile warnings. Let's fix.
- topology: remove little endian type from userspace header
Use a generic uint64_t for formats instead of an ABI endian specific
__le64 type.
- topology: Add C API support for PCM
PCM objects can be added by C API. And this is used to create FE DAIs
and DAI links in kernel.
- topology: Add C API support for BE and CC Links.
Adding BE and CC Link support for C API reference. This will be used
to populate the .hw_params element for BE and .params for CC, enabling
us to update already existing DAI Links created by the kernel.
- topology: ABI - Change stream formats to a bitwise flag
The toplogy user space tool will generate this bitwise flag by using
SNDRV_PCM_FORMAT_* exposed by asound.h, and the topology core will copy
this flag when generating DAI streams.
- topology: ABI - Separate PCM & BE/CC link support and bump ABI version to 4
The struct snd_soc_tplg_pcm_dai is renamed to snd_soc_tplg_pcm.
This struct will now be used to handle data related to PCMs
(FE DAI & DAI links). It's not for BE, because BE DAI mappings will be
provided by ACPI/FDT data.
Remove the unused struct snd_soc_tplg_pcm_cfg_caps. We are using
snd_soc_tplg_stream and snd_soc_stream_caps instead.
Define the topology type for BE DAI link: SND_SOC_TPLG_TYPE_BACKEND_LINK.
Define struct snd_soc_tplg_link_config to configure BE & CC links.
Bump ABI version to 4.
- topology: Add API to set a vendor specific version number
This vendor-specific version number is optional. It will be written to
the 'version' field of each block header of the binary toplogy data file.
The vendor driver can check this number for further processing in kernel.
The topology ABI version number is still stored in the 'abi' field of
block headers.
Reviewed-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
- topology: pcm: Remove unused variables
Fix gcc warnings:
pcm.c: In function ‘tplg_parse_stream_cfg’:
pcm.c:160:6: warning: unused variable ‘ret’ [-Wunused-variable]
int ret;
^
pcm.c: In function ‘split_format’:
pcm.c:267:13: warning: unused variable ‘ret’ [-Wunused-variable]
int i = 0, ret;
^
- topology: parser: Add missing return value to snd_tplg_set_manifest_data()
Spotted by gcc warning:
parser.c: In function ‘snd_tplg_set_manifest_data’:
parser.c:361:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
- topology: data: Fix wrong size check in tplg_parse_data_hex()
A wrong, uninitialized variable is referred as the size to check in
tplg_parse_data_hex(). Spotted by gcc warning:
data.c: In function ‘tplg_parse_data_hex’:
data.c:228:5: warning: ‘esize’ may be used uninitialized in this function [-Wmaybe-uninitialized]
if (esize > TPLG_MAX_PRIV_SIZE) {
^
data.c:211:12: note: ‘esize’ was declared here
int size, esize, off, num;
^
- topology: ctl: Fix access type checks
Fix the wrong bit-and check by adding parentheses properly:
ctl.c: In function ‘tplg_add_bytes’:
ctl.c:868:22: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses]
if (be->hdr.access & SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE
^
- topology: builder: Fix possibly uninitialized variable in write_elem_block()
When an empty list is passed to write_elem_block(), it may leave
vendor_type uninitialized.
builder.c: In function ‘write_elem_block’:
builder.c:127:8: warning: ‘vendor_type’ may be used uninitialized in this function [-Wmaybe-uninitialized]
ret = write_block_header(tplg, tplg_type, vendor_type,
^
builder.c:114:33: note: ‘vendor_type’ was declared here
int ret, wsize = 0, count = 0, vendor_type;
^
Add an immediate return for count = 0 for avoiding it, and simplify
the code initializing vendor_type without using a one-shot loop.
- topology: A API calls to directly build topology data from templates
Add some new API calls so that applications can directly build topology data
using template structures.
- topology: Add C templates structure for building topology from C programs
Define structures that can be used by applications to directly build topology
data instead of using text files. The application will build up the topology
data by populating the template structures for each object type and then
registering the template with the topology core.
- core: add convenience macros to local.h
Move ARRAY_SIZE() from tplg_local.h to local.h and add container_of()
macro to local.h. Both macros are generic but are initially used by
topology.
- topology: rename OBJECT_TYPE_ to SND_TPLG_TYPE_
rename OBJECT_TYPE_ to SND_TPLG_TYPE_ in preparation for exporting via
a new public API.
- topology: print error prefix on error message.
Let the user know it's an error.
- topology: treat all DAPM controls types the same when copying
Copy all DAPM controls types using the same method.
- topology: update ABI to improve support for different TLV object types.
Currently the TLV topology structure is targeted at only supporting the
DB scale data. This patch extends support for the other TLV types so they
can be easily added at a later stage.
TLV structure is moved to common topology control header since it's a
common field for controls and can be processed in a general way.
Users must set a proper access flag for a control since it's used to decide
if the TLV field is valid and if a TLV callback is needed.
Removed the following fields from topology TLV struct:
- size/count: type can decide the size.
- numid: not needed to initialize TLV for kcontrol.
- data: replaced by the type specific struct.
Added TLV structure to generic control header and removed TLV structure from
mixer control.
- topology: Add support for writing manifest private data.
Allow manifest to contain private data and write this data to file.
- topology: Add element ID so we can look up references by name.
Add support to lookup elements by name. This is in preparation for adding
some new API calls that will allow building topology data using a C API. This
will allow applications to build their own topology data directly.
- topology: fix element object type is switch()
Use the correct type for this object.
- topology: Fix typos
- topology: Fix missing inclusion of ctype.h
Fix a compile warning:
data.c:116:7: warning: implicit declaration of function 'isspace' [-Wimplicit-function-declaration]
- topology: autotools: Add build support for topology core
- topology: Add binary file builder.
Build the binary output file from all the locally parsed objects and elements.
- topology: Add Channel map parser.
Add support for parsing channel map to control registers.
- topology: Add CTL parser
Add support to parse mixers, enums and byte controls.
- topology: Add DAPM object parser
Parse DAPM objects including widgets and graph elements.
- topology: Add private data parser
Parse private data and store for attachment to other objects. Data can come
file or be locally defined as bytes, shorts or words.
- topology: Add operations parser
Parse operations so we can bind them to kcontrols in the kernel.
- topology: Add PCM parser.
Parse PCM configurations and capabilities. These can then be used to define
the capabilities and config for FE DAI links, PCM devices and
codec <-> codec style links.
- topology: Add text section parser.
Parse text lists (like enum values) and store for later attachment
to other objects.
- topology: Add topology core parser.
The topology core parses the high level topology file and calls the
individual object parsers when any new object element is detected at
the high level.

Use Case Manager API

- fix _GNU_SOURCE handling & header inclusion
The configure script blindly adds -D_GNU_SOURCE to all build settings,
even on non-GNU systems. This isn't too much of a big deal (even if
it uses the wrong variable -- CFLAGS instead of CPPFLAGS), except that
the alsa-lib source itself determines whether to use GNU features when
this is defined (such as versionsort). So when we build on non-glibc
systems, we get build failures like:
src/ucm/parser.c:1268:18: error: 'versionsort' undeclared (first use in this function)
#define SORTFUNC versionsort
^
src/ucm/parser.c:1272:54: note: in expansion of macro 'SORTFUNC'
err = scandir(filename, &namelist, filename_filter, SORTFUNC);
^
The correct way to add these flags is to use the autoconf helper
AC_USE_SYSTEM_EXTENSIONS. Unfortunately, that triggers some more
bugs in the alsa build. This macro adds defines to config.h and
not directly to CPPFLAGS, so it relies on files correctly including
config.h before anything else. A number of alsa files do not do
this leading to build failures. The fix there is to shuffle the
includes around so that the local ones come first.
- ucm: docs: Fix doxygen formatting for UCM main page.
Make sure group is defined and lists dipplayed correctly.
- ucm: allow multiple devices in JackHWMute
One jack may mute multiple devices, so let's make JackHWMute a list of
device names instead of just a single device name.
- ucm: improve jack configuration documentation
- ucm: reformat snd_use_case_get() doc
Doxygen doesn't preserve formatting that relies only on indentation.
This fixes it by using lists more liberally.
There are probably more places to fix than just
snd_use_case_get_list(), but I only have motivation for fixing this
function's documentation formatting (the next patch will add some more
content to the function's documentation).
- ucm: document some standard values
add standard value JackDev, JackControl and JackHWMute for speaker
mute control on jack insertion. These values will be applied on
pulseaudio.

/include/Makefile.am

- topology: autotools: Add build support for topology core

/src/Makefile.am

- topology: autotools: Add build support for topology core

Configuration

- move page helpers to common code
If you build with --disable-pcm, the rawmidi code fails to link because
it uses the page_size helper declared in local.h, but the page_* funcs
are in the pcm mmap module. Move these funcs into conf.c so that they
are always available to the rest of the system.
- fix _GNU_SOURCE handling & header inclusion
The configure script blindly adds -D_GNU_SOURCE to all build settings,
even on non-GNU systems. This isn't too much of a big deal (even if
it uses the wrong variable -- CFLAGS instead of CPPFLAGS), except that
the alsa-lib source itself determines whether to use GNU features when
this is defined (such as versionsort). So when we build on non-glibc
systems, we get build failures like:
src/ucm/parser.c:1268:18: error: 'versionsort' undeclared (first use in this function)
#define SORTFUNC versionsort
^
src/ucm/parser.c:1272:54: note: in expansion of macro 'SORTFUNC'
err = scandir(filename, &namelist, filename_filter, SORTFUNC);
^
The correct way to add these flags is to use the autoconf helper
AC_USE_SYSTEM_EXTENSIONS. Unfortunately, that triggers some more
bugs in the alsa build. This macro adds defines to config.h and
not directly to CPPFLAGS, so it relies on files correctly including
config.h before anything else. A number of alsa files do not do
this leading to build failures. The fix there is to shuffle the
includes around so that the local ones come first.
- conf: topology: Add topology file for broadwell audio DSP
- Replace unsafe characters with _ in card name
Otherwise, they get misinterpreted as argument separators
in USB-Audio PCM definitions, and thus prevent SPDIF blacklist entries
from working.
While at it, add my Logitec C910 webcam to the SPDIF blacklist.
- surround41/50.conf: Use chmap syntax for better flexibility
In case the hardware only supports a specific channel map,
this change would allow surround41/50 to select the correct
channel map and channel count in this situation.
- conf/ucm: broadwell-rt286: change to set capture volume and capture device
Set 'Mic Capture Volume' in capture device EnableSequence, to fix
capture no volume by default issue.
Also add JackHWMute Value item to mute onboard dmic while headset
mic is plugged in.
Tested-by: Mark Brown <broonie@kernel.org>
- conf: Add hint descriptions to ctl, hwdep, seq and timer devices
- Allow hint for ctl, hwdep, timer and seq
Like pcm and rawmidi, each object parser needs to accept the hint
component. Now a new local function _snd_conf_generic_id() was
introduced to replace each call of "comment" and "type" field checks.
Also, the two existing identical functions for pcm and rawmidi are
removed and the new function is used commonly.
- conf/ucm: broadwell-rt286: change to use the correct jack kcontrol name
The headset jack has two kctls: "Headphone Jack" and "Mic Jack",
we need switch speaker output according to the former JackControl.
Here correct it.
- USB-audio: Sound Blaster HD iec958 is on device 1
Creative Sound Blaster X-Fi HD uses device 1 for iec958 output.
- conf/ucm: Add Makefile.am for broadwell-rt286 ucm config
- conf/ucm: broadwell-rt286: add ucm config
The configure should apply to all Broadwell-rt286 boards from Intel,
like Wilson Beach SDS Ultrabook.

Documentation

- topology: doxygen: Add doxygen support for topology core.
- docs: Add UCM link to main doxygen page.
- ucm: docs: fix doxygen exclude patch for UCM local header

Kernel Headers

- topology: ABI - Rename dai_elems to pcm_elems in manifest
This field is the number of PCM objects (a pair of FE DAI and DAI link).
- topology: ABI - Change stream formats to a bitwise flag
The toplogy user space tool will generate this bitwise flag by using
SNDRV_PCM_FORMAT_* exposed by asound.h, and the topology core will copy
this flag when generating DAI streams.
- topology: ABI - Use __le32 instead of __u32 in snd_soc_tplg_dapm_widget
This fixes the endianness of the ABI parameters in the struct.
The field 'num_kcontrols' is also extended from 16 bits to 32 bits.
- topology: ABI - Remove unused struct snd_soc_tplg_stream_config
The struct snd_soc_tplg_stream_config is no longer used in the ABI.
We are using snd_soc_tplg_stream instead.
- topology: ABI - Remove tdm_slot & dai_fmt from snd_soc_tplg_stream
These two fields are line parameters for BE/CC links and
should not be from toplogy but from ACPI.
- topology: ABI - Separate PCM & BE/CC link support and bump ABI version to 4
The struct snd_soc_tplg_pcm_dai is renamed to snd_soc_tplg_pcm.
This struct will now be used to handle data related to PCMs
(FE DAI & DAI links). It's not for BE, because BE DAI mappings will be
provided by ACPI/FDT data.
Remove the unused struct snd_soc_tplg_pcm_cfg_caps. We are using
snd_soc_tplg_stream and snd_soc_stream_caps instead.
Define the topology type for BE DAI link: SND_SOC_TPLG_TYPE_BACKEND_LINK.
Define struct snd_soc_tplg_link_config to configure BE & CC links.
Bump ABI version to 4.
- topology: ABI - Add name element to snd_soc_tplg_stream
For codec-codec links, this struct will be mapped to the DAI links's
params, which is struct snd_soc_pcm_stream and it needs a stream name.
- hwdep: add FireWire digi00x/tascam driver support
Linux 4.4 newly support these drivers. Their hardware dependent interfaces
give functionalities to get hardware information, to lock/unlock kernel
streaming and to receive lock status event.
- topology: Add ops support to byte control objects.
Rename the control ops structure to make it more generic so we can use it
with other objects like bytes controls. Add this structure to the byte
control structure.
- topology: update ABI to improve support for different TLV object types.
Currently the TLV topology structure is targeted at only supporting the
DB scale data. This patch extends support for the other TLV types so they
can be easily added at a later stage.
TLV structure is moved to common topology control header since it's a
common field for controls and can be processed in a general way.
Users must set a proper access flag for a control since it's used to decide
if the TLV field is valid and if a TLV callback is needed.
Removed the following fields from topology TLV struct:
- size/count: type can decide the size.
- numid: not needed to initialize TLV for kcontrol.
- data: replaced by the type specific struct.
Added TLV structure to generic control header and removed TLV structure from
mixer control.
- topology: uapi: Add UAPI headers for topology ABI
- Sync include/sound/asound.h with 4.1 kernel
This adds the new ABI for timestamp stuff and minor fixes.

SHM helpers

- support building w/out System V shared memory
Some systems, like Android/Bionic, do not support SysV at all.
Let the configure script detect if the header is available, and
if not, automatically disable the pieces that require it.

Test/Example code

- test: audio_time: show report validity and accuracy
Add checks to show if driver reports valid report and resolution
information. disabled by default
- test: fix audio_time with new get/set audio_tstamp_config
- test/pcm_min: Fix error messages
Fix the wrongly referred error code for error messages from
snd_pcm_writei() and other calls.
- test/pcm: Fix generated values with float PCM format
The float format should be generated [-1.0..1.0].

alsa-utils

Core

- Release v1.1.0
- bat: don't link all binaries with fftw library, add missing header
- configure.ac: check for fftw3/m(sqrtf)/pthread only when BAT is enabled
- build: Do not try to detect cross-compiler
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.
- BAT: Add Makefile and configures
Add Makefile and configures that enable BAT on alsa-utils
- topology: Add command line topology tool to build topology binaries
Add a command line tool that will parse topology text files and convert to the binary
topology data as used by the kernel.

ALSA Control (alsactl)

- alsactl: Manage both save and restore in a single unit
With RemainAfterExit=true, we can manage both save and restore of the
card state in a single unit file. This will fix also the case where
systemd reloads the service; with two individual units, it will
restore the previous state before saving, and may lead to inconsistent
state suddenly.
Also fix alsa-state.service as well to make both start and stop
working in a simpler way.
Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=929619
- alsactl: Add path condition to alsa-store and alsa-restore services
With alsa-restore.service and alsa-store.service, systemd invokes
alsactl at boot and shutdown times. When this is invoked on a system
without sound cards, it results in an ugly error message from alsact
/usr/sbin/alsactl: save_state:1590: No soundcards found...
return code is "19"
Add ConditionPathExistsGlob checks of /dev/snd/control* devices for
avoiding unnecessary invocations of alsactl on such a system.
Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=940950
- alsactl: terminate readlink result string
readlink does not guarantee that its result string is nul-terminated.
Instead, increase the buffer by one byte to make sure that we can
add '\0' at the end.

Speaker Test

- speaker-test: fix option ordering
The -c and -s options needed to be provided in a specific order for the -s option to work correctly.
This pulls the speaker option check outside of the option parsing so that all the options have been parsed before checking to see if the parameter to -s is correct.
- speaker-test: Add option to specify signal scale
Allow generated signals (sine and noise) to have a specified signal scale
instead of using hardcoded limits of 80%. This can be handy for debugging, ie
when analysing clipping issues with audio drivers.

alsa-info.sh

- alsa-info: Don't try update when wget isn't available
... otherwise it overwrites a zero size file. Also add a check of
zero size file in the update procedure, too.

alsatplg (topology)

- topology: Add command line topology tool to build topology binaries
Add a command line tool that will parse topology text files and convert to the binary
topology data as used by the kernel.

alsaucm

- alsaucm: Drop localbuild hacks
The include and library paths shouldn't be across the build tree.
The installed alsa-lib must have the UCM support for building the
stuff here in alsa-utils repo correctly.

amixer

- amixer: expand local storage for item name according to kernel code
According to kernel code (snd_ctl_elem_init_enum_names() in
sound/core/control.c), the maximum length of item name is 63 characters
(+ 1 terminator = 64 bytes). But current amixer implementation
uses 40 bytes. This causes name truncation and fail to operation.
This commit fixes this bug by expanding the length of local variables.
- amixer: Don't set only the first item in sset_enum()

aplay/arecord

- aplay: fix VU meter for S24_LE etc formats
When recording or playing back audio in a format where the number of
significant bits is less than the physical width (e.g. S24_LE), the VU
meter code needs to consider the number of significant bits in the samples
rather than the physical sample width (e.g. 24 vs 32 bits). Otherwise the
resulting VU meter display will be far too low and it will just indicate
0% all the time.
Tested with a device supporting the S24_LE format.
- arecord: Remove only regular files
arecord removes a file before writing into it. It's not
appropriate in some cases. For example, if you a pass
a symlink to a file, then the symlink will be removed
while the user expects to record into the symlink's target.
Another case is recording into the device file. Some
modems provide a tty device file as a voice device.
And it's not possible to write into it under root with
arecord, because it removes the device file.
So check the type of a file before writing into it and
remove only regular files.
- aplay: Fix uninterruptible aplay
When aplay is invoked to play from stdin, it can't be terminated by
normal signals like SIGTERM or SIGINT. It's because our signal
handler tries to trap as much as possible while the stalling point is
not in the PCM loop but rather the file I/O.
For fixing this, leave our signal handler once when a signal is
received and snd_pcm_abort() is called. At the next hit, it shall be
handled normally.
- aplay: Fix type for signal flag
A flag used in signal handlers has to be a special atomic type,
volatile sig_atomic_t.

bat (basic audio tester)

- bat: add all headers to noinst_HEADERS
- bat: don't link all binaries with fftw library, add missing header
- BAT: Add missing locale.h header
Missing include became apparent when -O3 was not specified.
Added the header to remove error messages during debug compile.
- BAT: Add man page
Add more information about BAT utility, including design intent,
principles, use mode, hardware connection, options, example and
return value.
- BAT: Use dynamic temp file
Use dynamic temp file instead of fixed temp file to store recorded
wav data, for better security.
- BAT: Change comments and interface of usage()
1. Change comment strings to make the descriptions more clear;
2. Add indent for option lines that have no indent;
3. Use a const string instead of argv[0] as program name.
- BAT: Use colon instead of comma for separation
Use colon instead of comma to separate frequency parameters, for
in several locale comma may be handled as decimal point.
- BAT: Remove redundant message strings
Cutting down 6 message strings to 2, as translators need to work
on each different variant.
- BAT: Add Makefile and configures
Add Makefile and configures that enable BAT on alsa-utils
- BAT: Add spectrum analysis functions
Add functions that detecting signal frequency through spectrum
analyzing.
- BAT: Add converting functions
Add functions that converting audio samples to double data for analysis,
and functions that converting float data to audio samples for playback.
- BAT: Add signal generator
Add function that generates sine waveform through math lib.
The waveform can be used as source for playback or analysis.
- BAT: Add playback and record functions
Add functions as main loop of playback thread and record thread.
The functions access pcm hardware through ALSA APIs.
- BAT: Add common definitions and functions
Add common definitions of macros and data structures; Add functions
that used by multiple components, such as wav file reading and writing.
- BAT: Add initial functions
Add main entrance, command line parsing, parameter initiating and
thread initiating functions for BAT.

alsa-tools

Core

- Release v1.1.0

sb16_csp

- cspctl.1: remove ".LO" macro. This macro don't exist for manpages syntax.

alsa-plugins

Core

- Release v1.1.0
- pph: Fix build with older speex
The previous commit fixed the build of the recent speexdsp, but it
also broke the build with the old library. Actually the only needed
change is the inclusion of speex/speex_types.h instead of
speex/speexdsp_types.h, so it can be easily worked around via the
check in configure script.
Along with this change, make the version check back to 1.2 from
1.2rc2, as 1.2rc1 works fine now again, too.
- pph: include speexdsp_types.h, not speex_types.h
Speexdsp was separated from speex in 1.2rc2. speex_types.h is not
shipped by speexdsp, so alsa-plugins shouldn't use that file. speexdsp
has speexdsp_types.h, which has the same contents as speex_types.h.
speexdsp_types.h is a new file introduced in 1.2rc2, so this change
bumps the minimum supported speexdsp version. The version check in
configure.ac will actually break if speexdsp 1.2 ever gets released,
because pkg-config thinks that "1.2" < "1.2rc2", but I think it's
useful to fail if the installed speexdsp version is 1.2rc1 (which I
believe is very common on current distributions). If a non-rc version
of speexdsp will ever get released, I hope version number 1.2 will be
skipped for this reason. (A non-rc version seems unlikely, since
1.2rc1 was released years ago, so it's pretty likely that the project
is stuck on so called "release candidates" forever...)

A52 Output plugin

- a52: Fix ioplug version ifdef checks
SND_PCM_IOPLUG_VERSION must be checked with 0x10002, not 0x102.

Arcam AV control plugin

- arcam-av: Include sys/select.h for fd_set definition
fixes build errors on non-glibc based systems
arcam-av/arcam_av.c:389:2: error: unknown type name 'fd_set'

Automatic upmix / downmix plugins

- mix: Fix extplug version ifdef checks
SND_PCM_EXTPLUG_VERSION must be checked with 0x10002, not 0x102.
Reported-by: Ethan Grammatikidis <eekee57@fastmail.fm>

Jack PCM plugin

- jack: Fixing a small memory leak
A small memory leak can be observed when using alsa-plugins (jack).
Check the following valgrind log:
...
==1034== 8 bytes in 1 blocks are definitely lost in loss record 7 of 108
==1034== at 0x4027E5A: calloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==1034== by 0x4035102: snd_pcm_jack_prepare (in /usr/lib/alsa-lib/libasound_module_pcm_jack.so)
==1034== by 0x40D07AB: snd_pcm_ioplug_prepare (pcm_ioplug.c:145)
==1034== by 0x4084961: snd_pcm_prepare (pcm.c:1052)
==1034== by 0x409DDB4: snd_pcm_plugin_prepare (pcm_plugin.c:162)
==1034== by 0x4084961: snd_pcm_prepare (pcm.c:1052)
==1034== by 0x409DDB4: snd_pcm_plugin_prepare (pcm_plugin.c:162)
==1034== by 0x4084961: snd_pcm_prepare (pcm.c:1052)
==1034== by 0x4084A1D: snd_pcm_hw_params (pcm.c:838)
==1034== by 0x4090013: snd_pcm_set_params (pcm.c:8053)
==1034== by 0x80486EB: main (in /root/pcm_min_ok)
...
==1034== LEAK SUMMARY:
==1034== definitely lost: 8 bytes in 1 blocks
==1034== indirectly lost: 0 bytes in 0 blocks
==1034== possibly lost: 31,311 bytes in 1,630 blocks
==1034== still reachable: 5,619 bytes in 24 blocks
==1034== suppressed: 0 bytes in 0 blocks
...

Public Parrot Hack rate converter

- pph: Fix build with older speex
The previous commit fixed the build of the recent speexdsp, but it
also broke the build with the old library. Actually the only needed
change is the inclusion of speex/speex_types.h instead of
speex/speexdsp_types.h, so it can be easily worked around via the
check in configure script.
Along with this change, make the version check back to 1.2 from
1.2rc2, as 1.2rc1 works fine now again, too.
- pph: include speexdsp_types.h, not speex_types.h
Speexdsp was separated from speex in 1.2rc2. speex_types.h is not
shipped by speexdsp, so alsa-plugins shouldn't use that file. speexdsp
has speexdsp_types.h, which has the same contents as speex_types.h.
speexdsp_types.h is a new file introduced in 1.2rc2, so this change
bumps the minimum supported speexdsp version. The version check in
configure.ac will actually break if speexdsp 1.2 ever gets released,
because pkg-config thinks that "1.2" < "1.2rc2", but I think it's
useful to fail if the installed speexdsp version is 1.2rc1 (which I
believe is very common on current distributions). If a non-rc version
of speexdsp will ever get released, I hope version number 1.2 will be
skipped for this reason. (A non-rc version seems unlikely, since
1.2rc1 was released years ago, so it's pretty likely that the project
is stuck on so called "release candidates" forever...)

PulseAudio -> ALSA plugin

- pulse: Add 24 bit data formats to Pulse plugin.

Rate Converter plugins

- rate: Allow LGPL for libsamplerate commercial licensee
alsa-plugins-rate is tagged with GPL just for following the license of
libsamplerate. However, libsamplerate provides a commercial license
to allow it used with less restrictions. In that case, we also don't
have to stick with GPL. Instead, the code follows LGPL like other
plugin codes in this package.

Detailed changelog between 0.2.0 and 1.1.0 releases

Changelog between 0.2.0 and 1.1.0 releases

tinycompress

Core

- Release v1.1.0
- add gitcompile
- Authors: add information about how to find authors
- Changelog: update to git log
we dont use changelog file as git is a very good log of what we are
changing, so point to git log
- autotool: update the INSTALL file
toolchains are updating the INSTALL file so take the updated changes
- src/lib/utils.c: remove this empty file
utils.c isn't implementing anything so delete it
- Android.mk: Update to use the new location of source files
- makefile.linux: delete as no longer necessary/used
Now autotools takes care of generating Makefiles.
- Convert the build system to autotools
Hopefully this should make tinycompress a more robust package.
This change splits the source into utils and lib.
No functional changes was introduced.
use autogen.sh to generate configure then run ./configure as with other
packages.
- makefile.linux: allow env to override CROSS_COMPILE and CC
allow env variables to override them without having to modify the makefile.
- crec: Initial version of a compressed capture utility
This version only supports capture of PCM streams over a compressed
device and saves these as WAV files.

/Makefile.am

- Convert the build system to autotools
Hopefully this should make tinycompress a more robust package.
This change splits the source into utils and lib.
No functional changes was introduced.
use autogen.sh to generate configure then run ./configure as with other
packages.

Header files

- tinycompress.h: explicitly include required headers
tinycompress.h was relying on other files to include linux/types.h and stdbool.h
which are required by it. Explicitly include it to fix compile errors when external
program tries to include this header.
- Convert the build system to autotools
Hopefully this should make tinycompress a more robust package.
This change splits the source into utils and lib.
No functional changes was introduced.
use autogen.sh to generate configure then run ./configure as with other
packages.
- tinycompress: update headers for packed, aligned
commit "6b24a8dd: ALSA: compress: fix the struct alignment to 4 bytes" updated
compress struct to force packed and aligned to 4 bytes. Update here a s well
- tinycompress: update compress headers for sample rate field
commit "929559b: ALSA: compress: add num_sample_rates in snd_codec_desc" adds
array for passing sample rate instead of bit map. Update the local header as
well
- compress: use int for samples in compress_get_tstamp
in 64bit updates we made the sample rate as 32bit explicitly, so update the
library API as well
- tinycompress: remove usage of SNDRV_RATE_xxx
as now it is not to be used for passing the sampling rate
- tinycompress: update the header to kernel API v0.1.2

Library

- build: Fix make distcheck
srcdir may not be the same as builddir, so use the correct variable for
the include path.
- src/lib/utils.c: remove this empty file
utils.c isn't implementing anything so delete it
- compress.c: fix check for errors from poll(), read() and write()
When these functions fail they return -1 and set errno. Fix error checks
accordingly.
- Convert the build system to autotools
Hopefully this should make tinycompress a more robust package.
This change splits the source into utils and lib.
No functional changes was introduced.
use autogen.sh to generate configure then run ./configure as with other
packages.
- compress: use int for samples in compress_get_tstamp
in 64bit updates we made the sample rate as 32bit explicitly, so update the
library API as well
- compress: compress_wait() must return error if timed out
The caller must be certain that a return of 0 really means
that compress is ready for more data, so when poll() returns
0 for a timeout we must report that as an error.
- compress: Must check for POLLERR before POLLOUT/POLLIN
In the case of error the ALSA compressed driver sets revents as
(POLLOUT | POLLWRNORM | POLLERR) or (POLLIN | POLLWRNORM | POLLERR).
So we can't assume that POLLOUT or POLLIN indicate success, we must
check for POLLERR first.
- fix error returned by compress_wait()
oops() expects positive error codes.

Utilities

- build: Fix make distcheck
srcdir may not be the same as builddir, so use the correct variable for
the include path.
- cplay: check the values of fread
This fixes the following warning:
cplay.c: In function ‘play_samples’:
cplay.c:219:7: warning: ignoring return value of ‘fread’, declared with
attribute warn_unused_result [-Wunused-result]
fread(&header, sizeof(header), 1, file);
- Convert the build system to autotools
Hopefully this should make tinycompress a more robust package.
This change splits the source into utils and lib.
No functional changes was introduced.
use autogen.sh to generate configure then run ./configure as with other
packages.
- crec: support streaming output to stdout
It's useful for testing to be able to stream the captured
audio to stdout instead of having to go via a file.
- crec: Fix error with opening file using O_CREAT
The code was not compiling when mode was not passed to open()
while using O_CREAT offset. Passed mode to the open() alongwith
O_CREAT to specify the attributes of file and fix compile issue.
- crec: Add primitive exception handling
Add very primitive signal handling, we will not attempt to drain any
remaining data etc. simply save out what we have to a file.
- crec: Initial version of a compressed capture utility
This version only supports capture of PCM streams over a compressed
device and saves these as WAV files.
- tinycompress: remove usage of SNDRV_RATE_xxx
as now it is not to be used for passing the sampling rate
- tinycompress: cplay: use the numeric sample rate
- compress: fix the typo in compress_get_alsa_rate()
Reported-by: Ravi <ralama@codeaurora.org>
Custom Search
Personal tools
Namespaces

Variants
Actions
Navigation
wiki
Toolbox