OSDN Git Service
Takashi Iwai [Tue, 31 May 2016 10:48:40 +0000 (12:48 +0200)]
pcm: dmix: Return error when slave is in OPEN or DISCONNECTED
A slave PCM in OPEN or DISCONNECTED state can't be used properly at
all, so the best option is to return -EBADFD error.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 31 May 2016 10:46:03 +0000 (12:46 +0200)]
pcm: dmix: Prepare slave when it's in SETUP, too
SETUP is an unusual state, but it's still possible.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 25 May 2016 13:03:51 +0000 (15:03 +0200)]
pcm: dmix: resume workaround for buggy driver
The previous commit removed the whole handling of resume in dmix, but
this seems causing another regression; some buggy drivers assume that
the device-resume needs to be triggered before transitioning to
PREPARED state. As an ugly workaround, in this patch, when the slave
PCM supports resume, snd_pcm_direct_resume() does resume of the slave
PCM but immediately drop the stream after that. In that way, the
device is brought to the sane active state, then the apps can prepare
and restart the stream properly.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Sat, 28 May 2016 08:37:26 +0000 (10:37 +0200)]
pcm: Fix secondary retry in dsnoop and dshare
The commit [
fdba9e1bad8f: pcm: Fallback open as the first instance for
dmix & co] introduced a mechanism to retry the open of slave PCM for
the secondary streams, but this also introduced a regression in dsnoop
and dshare plugins: since the retry goto-tag was placed at a wrong
position, it retries to re-fetch the shm unnecessarily and eventually
leads to the fatal error.
The bug can be easily reproduced by starting arecord and killing it
via SIGKILL, then starting arecord again. The second arecord fails.
The fix is obviously to move the wrong retry goto-tags to the right
positions.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 18 May 2016 08:38:27 +0000 (10:38 +0200)]
pcm: Remove resume support from dmix & co
PCM dmix and other plugins inherit the resume behavior from the slave
PCM. However, the resume on dmix can't work reliably even if the
slave PCM may do resume. The running state of each dmix stream is
individual and may be PREPARED or RUN_PENDING while the slave PCM is
already in RUNNING. And, when the slave PCM is resumed, the whole
samples that have been already mapped are also played back, even if
the corresponding dmix stream is still in SUSPENDED. Such
inconsistencies can't be avoided as long as we manage each stream
individually.
That said, dmix & co can't provide the proper resume support "by
design". For aligning with it, we should drop the whole resume code
and clear the PCM SND_PCM_INFO_RESUME flag.
Reported-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 17 May 2016 13:39:07 +0000 (15:39 +0200)]
conf: Add thread-safe global tree reference
Most of open functions in alsa-lib have the call pattern:
snd_config_update();
return snd_xxx_open(x, snd_config, ...);
This means that the toplevel config gets updated, and passed to a
local open function. Although snd_config_update() itself has a
pthread mutex to be thread safe, the whole procedure above isn't
thread safe. Namely, the global snd_config tree may be deleted and
recreated at any time while the open function is being processed.
This may lead to a data corruption and crash of the program.
For avoiding the corruption, this patch introduces a refcount to
config tree object. A few new helper functions are introduced as
well:
- snd_config_update_ref() does update and take the refcount of the
toplevel tree. The obtained config tree has to be freed via
snd_config_unref() below.
- snd_config_ref() and snd_config_unref() manage the refcount of the
config object. The latter eventually deletes the object when all
references are gone.
Along with these additions, the caller of snd_config_update() and
snd_config global tree in alsa-lib are replaced with the new helpers.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Thu, 12 May 2016 14:33:19 +0000 (16:33 +0200)]
pcm: Define namehint for single directional PCM types
The PCM namehint for some PCM types like dmix, dsnoop and surround51
should be defined as single directional.
Reported-by: Trent Reed <treed0803@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Thu, 12 May 2016 14:30:44 +0000 (16:30 +0200)]
namehint: Don't enumerate as duplex if only a single direction is defined
When a hint description has only either device_input or device_output,
we shouldn't handle it as a full duplex but rather a single
direction. In that way, we can avoid to list up a playback stream
like dmix or surround51 as a capture stream in the namehint.
Reported-by: Trent Reed <treed0803@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 11 May 2016 11:06:25 +0000 (13:06 +0200)]
pcm: dmix: Fix doubly resume of slave PCM
The dmix plugin and co may trigger the resume for each instance in
snd_pcm_direct_resume(). It means that the slave PCM gets resumed or
re-prepared/started by each opened dmix stream, and this may end up
with the doubly triggers even though the slave PCM has been already
resumed by another dmix stream.
For avoiding this conflicts, check the slave PCM state and resume only
when it's still in the suspended state. Meanwhile we keep the shadow
state updated no matter whether the slave was triggered or not.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 11 May 2016 07:06:47 +0000 (09:06 +0200)]
pcm: Fix suspend/resume regression with dmix & co
The recent fix commit [
8985742d91db: pcm: dmix: Handle slave PCM xrun
and unexpected states properly] caused a regression in dmix and other
plugins regarding suspend/resume. For example, aplay endlessly prints
"Suspended. Trying resume. Done." message if suspend and resume are
performed in the middle of playback.
The reason is that the commit above changed the shadow PCM state
(dmix->state) to SUSPENDED when the slave PCM is in suspend, while it
doesn't restore the shadow state upon resume. Thus it appears as if
it's always suspended even after the resume is invoked.
The fix is just to add the proper update of the shadow state in
snd_pcm_direct_resume().
Reported-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Enric Balletbo i Serra [Thu, 5 May 2016 06:32:06 +0000 (08:32 +0200)]
conf/ucm: ROCKCHIP-I2S: add Rockchip I2S UCM config.
Taken from the ChromeOS sources, this configuration was tested on Veyron
Jerry based Chromebook from Google.
[Added missing Makefile changes by tiwai]
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jörg Krause [Sun, 8 May 2016 18:48:42 +0000 (20:48 +0200)]
pcm: softvol: fix conversion of TLVs min_db and max_dB value
Both, min_dB and max_dB, are floating type whereas the TLV is (always)
unsigned.
The problem with the conversion of a negative floating-point number into an
unsigned integer is, that the behavior is undefined. This may, depending on
the platform, result in a wrong TLV, i.e. for the default values of min_dB
(-51dB) and max_dB (0dB), alsactl generates the following state on an ARM
cpu build with GCC:
control.1 {
iface MIXER
name Master
value.0 255
value.1 255
comment {
access 'read write user'
type INTEGER
count 2
range '0 - 255'
tlv '
00000001000000080000000000000014'
dbmin 0
dbmax 5100
dbvalue.0 5100
dbvalue.1 5100
}
}
With the fix applied, alsactl stores the correct TLV:
control.1 {
iface MIXER
name Master
value.0 255
value.1 255
comment {
access 'read write user'
type INTEGER
count 2
range '0 - 255'
tlv '
0000000100000008ffffec1400000014'
dbmin -5100
dbmax 0
dbvalue.0 0
dbvalue.1 0
}
}
Also tested for different combinations of min_dB and max_dB other than the
default values.
Replaces:
http://mailman.alsa-project.org/pipermail/alsa-devel/2016-May/107733.html
Fixes:
http://mailman.alsa-project.org/pipermail/alsa-devel/2016-May/107628.html
Cc: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mengdong Lin [Fri, 29 Apr 2016 03:03:45 +0000 (11:03 +0800)]
topology: Update PCM configurations in Broadwell text conf file
To make this conf file a better example, update the name & ID of PCMs
(front-end DAI link) and their cpu DAI (front-end DAI), same as those
defined by Broadwell upstream driver.
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mengdong Lin [Fri, 29 Apr 2016 03:03:37 +0000 (11:03 +0800)]
topology: Parse front-end DAI name and ID for the PCM
These two fields are necessary to create the front-end DAIs
in kernel but the support is missing in text conf previously.
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mengdong Lin [Fri, 29 Apr 2016 03:03:30 +0000 (11:03 +0800)]
topology: Fix pcm ID & name parsing
The name and ID of SectionPCM should be set to pcm_name and pcm_id,
for a front-end DAI link in the kernel, not for the front-end DAI
of the link.
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mengdong Lin [Fri, 29 Apr 2016 03:03:22 +0000 (11:03 +0800)]
topology: Use generic pointer to realloc buffer for private data
Many element types have private data. So use the generic obj pointer
instead of the type-specific pointer when reallocating the object to
accommodate the private data.
Empty private data will be overlooked.
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mengdong Lin [Fri, 29 Apr 2016 03:03:04 +0000 (11:03 +0800)]
topology: Refactor functions to parse and build streams
Previously these functions are only used by pcm elements (front-end DAI
& DAI link) to parse stream capablities. Now refactor them to be reused
by back-end DAI elements later.
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mengdong Lin [Fri, 29 Apr 2016 03:02:57 +0000 (11:02 +0800)]
topology: Set manifest size for ABI
The topology kernel driver will check the size of manifest struct, and
will stop loading topology info if size mismatch is detected.
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Thu, 28 Apr 2016 14:16:08 +0000 (16:16 +0200)]
Add src/conf/topology/sklrt286/data/pvt_data to .gitignore
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Shreyas NC [Thu, 28 Apr 2016 05:37:58 +0000 (11:07 +0530)]
conf: topology: Generate Private data binary blobs
The DSP modules need private data and that is provided as binary
blob. These blobs are compiled from C structures which specify module
configuration.
Signed-off-by: Shreyas NC <shreyas.nc@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Shreyas NC [Thu, 28 Apr 2016 05:37:57 +0000 (11:07 +0530)]
Add u8 in type_compat.h
Skylake headers use u8 data types which were not present in
type_compat so add them.
Signed-off-by: Shreyas NC <shreyas.nc@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Shreyas NC [Thu, 28 Apr 2016 05:37:56 +0000 (11:07 +0530)]
conf: topology: Add Skylake i2s conf
The Skylake topology configuration for simple topology graph is
provided. This exposes the PCM capabilities of the DSP.
Signed-off-by: Shreyas NC <shreyas.nc@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Thu, 14 Apr 2016 15:33:03 +0000 (17:33 +0200)]
pcm: Fallback open as the first instance for dmix & co
dmix and other PCM plugins tries to open a secondary stream with
O_APPEND flag when the shmem was already attached by another.
However, when another streams have been already closed after the
shmem check, this open may return the error EBADFD, since the kernel
accepts O_APPEND only for the secondary streams.
This patch adds a workaround for such a case. It just retries opening
the stream as the first instance (i.e. without O_APPEND flag).
This is basically safe behavior (the kernel takes care of races), even
we may do this even unconditionally. But it's bad from the
performance POV, so we do it only when really needed.
Reported-by: Lars Lindqvist <lars.lindqvist@yandex.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Hsin-Yu Chao [Wed, 13 Apr 2016 10:53:09 +0000 (18:53 +0800)]
ucm: add cset-tlv
This patch enables UCM to set a file in TLV format to kcontrol by:
cset-tlv "name='<kcontrol-name>' <path-to-file>"
This new 'cset-tlv' command will be used to write audio DSP to
specific alsa control, where the driver expectes a file in TLV
format.
The TLV file to set to kcontrol will be checked first by file size
not larger than 16 MB, and then examine if the length field reports
correct number of bytes in the TLV file.
Signed-off-by: Hsin-Yu Chao <hychao@chromium.org>
Reviewed-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mengdong Lin [Thu, 7 Apr 2016 07:29:49 +0000 (15:29 +0800)]
topology: Build data objects with tuples
For data objects with tuples, the parser will bind the vendor tuples
and tokens, copy the tuples to the private buffer of its parent data
object. Then later the builder will export the vendor tuples as private
binary data for the control or widgets objects.
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mengdong Lin [Thu, 7 Apr 2016 07:29:43 +0000 (15:29 +0800)]
topology: Add support for parsing vendor tuples
Vendor can define several tuple arrays in 'SectionVendorTuples', as
well as the reference to a vendor token list object.
A later patche will copy vendor tuples in ABI format to the private
buffer of its parent data object in the building phase.
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mengdong Lin [Thu, 7 Apr 2016 07:29:36 +0000 (15:29 +0800)]
topology: Add support for vendor tokens
Vendor can define a token list in SectionVendorTokens. Each token element
is a pair of string ID and integer value. And both the ID and value are
vendor-specific.
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mengdong Lin [Thu, 7 Apr 2016 07:29:27 +0000 (15:29 +0800)]
topology: ABI - Define types for vendor tuples
Tuples, a pair of token and value, can be used to define vendor specific
data, for controls and widgets. This can avoid importing binary data blob
from other files.
Vendor specific tuple arrays will be embeded in the private data buffer
of a control or widget object. To be backward compatible, union is used
to define the tuple arrays in the existing private data ABI object
'struct snd_soc_tplg_private'.
Vendors need to make sure the token values defined by the topology conf
file match those defined by their driver.
Now supported tuple types are uuid, string, bool, byte, short and word.
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mengdong Lin [Thu, 7 Apr 2016 07:29:15 +0000 (15:29 +0800)]
topology: Add doc for vendor tuples
Describe how to define vendor tokens and tuples in the text conf file.
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mengdong Lin [Thu, 7 Apr 2016 07:29:01 +0000 (15:29 +0800)]
topology: Define a free handler for the element
This handler is defined for type-specific destruction of an element.
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mengdong Lin [Thu, 7 Apr 2016 07:28:42 +0000 (15:28 +0800)]
topology: Use the generic pointer to free an element's object
The element is a wrapper for different types of objects.So use the
generic pointer 'obj' instead of the type-specific pointer to free
the object.
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Thu, 7 Apr 2016 14:29:41 +0000 (16:29 +0200)]
pcm: Clean up error paths in snd_pcm_plugin_*() helpers
Minor code refactoring to unify the error return paths.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Shengjiu Wang [Wed, 6 Apr 2016 11:02:12 +0000 (19:02 +0800)]
pcm_plugin: fix appl pointer not correct when mmap_commit() return error
When snd_pcm_mmap_commit() return error, the appl pointer is also updated.
which cause the avail_update()'s result wrong.
This patch move the snd_pcm_mmap_appl_forward() to the place when
snd_pcm_mmap_commit() is successfully returned.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jaroslav Kysela [Thu, 31 Mar 2016 13:10:39 +0000 (15:10 +0200)]
Release v1.1.1
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Liam Girdwood [Mon, 14 Mar 2016 08:07:38 +0000 (08:07 +0000)]
topology: Add support for widget byte controls
Add support for DAPM widgets to include bytes controls.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Liam Girdwood [Mon, 14 Mar 2016 08:07:37 +0000 (08:07 +0000)]
topology: add support for CTL access flags to config file
Allow the config files to define CTL access flags.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Liam Girdwood [Mon, 14 Mar 2016 08:07:36 +0000 (08:07 +0000)]
topology: add support for pasring external ops in conf files
Parsing external ops was missing from the conf files but was in the
C API. Fix this now by making sure we also check for external ops.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Liam Girdwood [Mon, 14 Mar 2016 08:07:35 +0000 (08:07 +0000)]
topology: Add ops to bytes control.
Byte controls can also support ops. Add them to the parser.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Qing Cai [Thu, 10 Mar 2016 12:40:51 +0000 (07:40 -0500)]
pcm: fix 'unable to create IPC shm instance' caused by fork from a thread
As stated in manpage SHMCTL(2), shm_nattch is "No. of current attaches"
(i.e., number of processes attached to the shared memeory). If an
application uses alsa-lib and invokes fork() from a thread of the
application, there may be the following execution sequence:
1. execute the following statement:
pcm_direct.c:110: dmix->shmptr = shmat(dmix->shmid, 0, 0)
(shm_nattch becomes 1)
2. invoke fork() in some thread.
(shm_nattch becomes 2)
3. execute the following statement:
pcm_direct.c:122: if (buf.shm_nattch == 1)
4. execute the following statement:
pcm_direct.c:131: if (dmix->shmptr->magic != SND_PCM_DIRECT_MAGIC)
(As stated in manpage SHMGET(2), "When a new shared memory segment
is created, its contents are initialized to zero values", so
dmix->shmptr->magic is 0)
5. execute the following statements:
pcm_direct.c:132: snd_pcm_direct_shm_discard(dmix)
pcm_direct.c:133: return -EINVAL
The above execution sequence will cause the following error:
unable to create IPC shm instance
This error causes multimedia application has no sound. This error rarely
occurs, probability is about 1%.
More notes about this patch:
this patch tries to address the race above by changing the condition
to identify "the first user". Until now, the first user was
identified by checking shm_nattch. But this is racy, as stated in the
above.
In this version, we try to assign a shm at first without IPC_CREAT.
If this succeeds, we are not alone, so we must not be the first user.
Only when this fails, try to get a shmem with IPC_CREAT and IPC_EXCL.
If this succeeds, we are the first user. And, one more notable point
is that the race of this function call itself is protected by
semaphore in the caller side. The only point to avoid is the race
after shmget() and the first initialization, and this method should
work around that.
Signed-off-by: Qing Cai <bsiice@msn.com>
Signed-off-by: Qing Cai <caiqing@neusoft.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Martin Koegler [Thu, 3 Mar 2016 21:39:37 +0000 (22:39 +0100)]
seq: Provide sequencer sound card number / PID via alsa-lib
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 changes adds support for exposing the card number for kernel clients
as well as the PID for user client.
It supports kernels with and without the required support.
Signed-off-by: Martin Koegler <martin.koegler@chello.at>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 4 Mar 2016 09:57:32 +0000 (10:57 +0100)]
Update include/sound/asequencer.h from 4.6-pre kernel uapi
A few unimplemented ioctl definitions have been removed. Also
<sound/asound.h> is included locally, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 4 Mar 2016 09:52:18 +0000 (10:52 +0100)]
Update include/sound/asound.h from 4.6-pre kernel uapi
The inclusion of <linux/*.h> is done conditionally for Linux in order
to improve portability.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Thomas Klausner [Thu, 3 Mar 2016 14:08:04 +0000 (15:08 +0100)]
topology: Remove unnecessary includes
Headers are already included in local.h.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Thomas Klausner [Thu, 3 Mar 2016 11:58:07 +0000 (12:58 +0100)]
Use alphasort where versionsort is not available.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Thomas Klausner [Thu, 3 Mar 2016 11:57:34 +0000 (12:57 +0100)]
Only use F_SETSIG fcntl where it exists.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Thomas Klausner [Thu, 3 Mar 2016 11:56:58 +0000 (12:56 +0100)]
Add more compatibility defines.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Thomas Klausner [Thu, 3 Mar 2016 11:16:57 +0000 (12:16 +0100)]
Introduce bswap.h for portable definitions of byte swap macros.
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Thomas Klausner [Wed, 2 Mar 2016 22:11:54 +0000 (23:11 +0100)]
Define some types if missing
Include Linux headers on Linux only.
For portability with non-Linux.
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Thomas Klausner [Wed, 24 Feb 2016 13:15:10 +0000 (14:15 +0100)]
Define EBADFD in terms of EBADF if it doesn't exist.
For portability on FreeBSD, NetBSD and probably others.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Sakamoto [Mon, 22 Feb 2016 13:13:31 +0000 (22:13 +0900)]
control: keep consistent usage of assertion
In most codes for control APIs, assertions are used to check given
arguments from applications. If the arguments are not expected, the
application is forced to abort. When NDEBUG is defined in the beginning
of the codes, no checks are performed.
Although, in snd_ctl_elem_set_bytes(), assertion is used with condition
statement. There's an intention to check the arguments regardless of
NDEBUG. However, this is not the same fashion in the codes.
This commit applies the same fashion to the function, to keep consistent
usage of assertion.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Sakamoto [Sun, 21 Feb 2016 16:54:28 +0000 (01:54 +0900)]
control: initialize element channel values according to identification number at adding a new element
In ALSA control core, there're two ways to identify elements. One is by
numid. Another is by name/index. The former way is lighter than the latter
way.
In control API, after adding elements by snd_ctl_elem_add_integer() and
snd_ctl_elem_add_integer64(), these functions initialize value of each
channel. When executing this operation, used ID information is still given
by applications. Although, in this time, the element can be identified
according to numid.
This commit uses the numid instead of name/index pair.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Sakamoto [Sun, 21 Feb 2016 16:54:19 +0000 (01:54 +0900)]
control: fulfill a description about element type with integer64
In UAPI of asound.h, there're 6 types of control element; boolean, integer,
enumerated, bytes, iec958 and integer64 (The none type seems to be added to
start the value at non-zero). Although, current description in alsa-lib
has a lack of integer64 type.
This commit fulfil the type.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Liam Girdwood [Mon, 1 Feb 2016 14:20:44 +0000 (14:20 +0000)]
topology: fix debug output to print correct "max" value.
Debug log is printing num_regs instead of max in the max section.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jaroslav Kysela [Tue, 12 Jan 2016 15:25:42 +0000 (16:25 +0100)]
coverity fixes
Jaroslav Kysela [Tue, 12 Jan 2016 15:07:16 +0000 (16:07 +0100)]
pcm_hw: fix possible memory leak (coverity)
Jaroslav Kysela [Tue, 12 Jan 2016 14:58:25 +0000 (15:58 +0100)]
control: add missing asserts to ctl_elem_set functions
Jaroslav Kysela [Tue, 12 Jan 2016 13:56:18 +0000 (14:56 +0100)]
config files - do not include ucm/topology configuration when not requested
Mengdong Lin [Thu, 19 Nov 2015 08:33:12 +0000 (03:33 -0500)]
topology: Quit and show error message on big-endian machines
This tool can only support little-endian machines atm.
Many codes directly refer to __le32/__le64 variables of ABI objects,
so will be broken on big-endian machines.
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mengdong Lin [Thu, 19 Nov 2015 08:33:05 +0000 (03:33 -0500)]
topology: Not compare a for loop iterator with ABI __le32 variables
The iterator 'i' in a loop is a usually a integer. But ABI variables use
type _le32, which is converted to host unsigned integer. Comparing them
can cause gcc warning: comparison between signed and unsigned integer
expressions[-Wsign-compare].
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mengdong Lin [Wed, 18 Nov 2015 07:23:59 +0000 (02:23 -0500)]
topology: Fix comparison of unsigned expression < 0
Fix gcc warning: comparison of unsigned expression < 0 is always false
[-Wtype-limits]
The ABI object channel->id is _le32 and is converted to host unsigned
integer. It cannot be < 0.
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mengdong Lin [Wed, 18 Nov 2015 07:23:19 +0000 (02:23 -0500)]
topology: Remove unused variables
Fix gcc warning when -Wunused-variable is set.
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mengdong Lin [Wed, 18 Nov 2015 07:22:59 +0000 (02:22 -0500)]
topology: Remove unused function write_data_block()
Fix gcc warning: 'write_data_block' defined but not used
[-Wunused-function].
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Vinod Koul [Wed, 18 Nov 2015 13:42:46 +0000 (19:12 +0530)]
topology: open topology files with O_TRUNC
The topology file if exists needs to rewritten, so we need to open these
files with O_TRUNC flag as well
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Peter Rosin [Wed, 11 Nov 2015 15:11:10 +0000 (16:11 +0100)]
pcm: simple: Fix asserts
Do not error out on the boundaries.
Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Takashi Iwai [Mon, 9 Nov 2015 12:37:26 +0000 (13:37 +0100)]
topology: Add missing include sys/stat.h
Necessary for proper definitions of S_IRUSR & co. Otherwise it
results in compile errors with old glibc:
parser.c: In function 'snd_tplg_build_file':
parser.c:262: error: 'S_IRUSR' undeclared (first use in this function)
parser.c:262: error: (Each undeclared identifier is reported only once
parser.c:262: error: for each function it appears in.)
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jaroslav Kysela [Mon, 9 Nov 2015 07:39:18 +0000 (08:39 +0100)]
Release v1.1.0
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Takashi Iwai [Sat, 7 Nov 2015 10:29:13 +0000 (11:29 +0100)]
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.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Liam Girdwood [Fri, 6 Nov 2015 14:57:17 +0000 (14:57 +0000)]
topology: remove little endian type from userspace header
Use a generic uint64_t for formats instead of an ABI endian specific
__le64 type.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mengdong Lin [Thu, 5 Nov 2015 12:49:36 +0000 (20:49 +0800)]
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.
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Vedang Patel [Thu, 5 Nov 2015 12:49:23 +0000 (20:49 +0800)]
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.
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Mengdong Lin [Thu, 5 Nov 2015 12:49:10 +0000 (20:49 +0800)]
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).
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Mengdong Lin [Thu, 5 Nov 2015 12:49:02 +0000 (20:49 +0800)]
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.
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Vedang Patel [Thu, 5 Nov 2015 12:48:54 +0000 (20:48 +0800)]
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.
Signed-off-by: Vedang Patel <vedang.patel@intel.com>
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Vedang Patel [Thu, 5 Nov 2015 12:48:46 +0000 (20:48 +0800)]
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.
Signed-off-by: Vedang Patel <vedang.patel@intel.com>
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Mengdong Lin [Thu, 5 Nov 2015 12:48:38 +0000 (20:48 +0800)]
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.
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Vedang Patel [Thu, 5 Nov 2015 12:48:30 +0000 (20:48 +0800)]
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.
Signed-off-by: Vedang Patel <vedang.patel@intel.com>
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Vedang Patel [Thu, 5 Nov 2015 12:48:18 +0000 (20:48 +0800)]
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.
Signed-off-by: Vedang Patel <vedang.patel@intel.com>
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Mike Frysinger [Tue, 27 Oct 2015 21:28:04 +0000 (17:28 -0400)]
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.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mike Frysinger [Tue, 27 Oct 2015 21:28:03 +0000 (17:28 -0400)]
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).
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mike Frysinger [Tue, 27 Oct 2015 21:27:55 +0000 (17:27 -0400)]
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.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 30 Oct 2015 16:13:50 +0000 (17:13 +0100)]
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.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mike Frysinger [Fri, 9 Oct 2015 21:47:40 +0000 (17:47 -0400)]
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.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Sakamoto [Mon, 5 Oct 2015 16:08:59 +0000 (01:08 +0900)]
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.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 2 Oct 2015 09:55:36 +0000 (11:55 +0200)]
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>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mengdong Lin [Wed, 16 Sep 2015 09:07:13 +0000 (17:07 +0800)]
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.
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Khem Raj [Tue, 15 Sep 2015 15:48:02 +0000 (18:48 +0300)]
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
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Sep 2015 20:15:02 +0000 (22:15 +0200)]
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;
^
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Sep 2015 20:13:50 +0000 (22:13 +0200)]
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]
}
^
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Sep 2015 20:11:48 +0000 (22:11 +0200)]
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;
^
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Sep 2015 20:09:44 +0000 (22:09 +0200)]
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
^
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Sep 2015 20:04:48 +0000 (22:04 +0200)]
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.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Sep 2015 19:48:17 +0000 (21:48 +0200)]
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.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Sep 2015 18:57:47 +0000 (20:57 +0200)]
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>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
David Henningsson [Mon, 24 Aug 2015 18:37:29 +0000 (20:37 +0200)]
pcm: Fix doxygen for two enums
The doxygen comments were wrong, making doxygen output weird.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mengdong Lin [Tue, 11 Aug 2015 17:23:17 +0000 (18:23 +0100)]
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.
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mengdong Lin [Tue, 11 Aug 2015 17:23:16 +0000 (18:23 +0100)]
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.
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Liam Girdwood [Tue, 11 Aug 2015 17:23:15 +0000 (18:23 +0100)]
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.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Liam Girdwood [Mon, 10 Aug 2015 18:13:47 +0000 (19:13 +0100)]
topology: rename OBJECT_TYPE_ to SND_TPLG_TYPE_
rename OBJECT_TYPE_ to SND_TPLG_TYPE_ in preparation for exporting via
a new public API.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Liam Girdwood [Fri, 7 Aug 2015 15:39:16 +0000 (16:39 +0100)]
topology: print error prefix on error message.
Let the user know it's an error.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mengdong Lin [Fri, 7 Aug 2015 15:39:15 +0000 (16:39 +0100)]
topology: treat all DAPM controls types the same when copying
Copy all DAPM controls types using the same method.
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>