OSDN Git Service

android-x86/external-alsa-lib.git
7 years agotopology: ABI - Update physical DAI link configurations to ABI v5
Mengdong Lin [Sun, 6 Nov 2016 05:13:08 +0000 (13:13 +0800)]
topology: ABI - Update physical DAI link configurations to ABI v5

This patch update physicals DAI link config to ABI v5:

- Define the types and ABI struct for runtime supported hardware configs
  e.g. audio hardware formats. The default HW config ID will help topology
  to find the DAI format to set on init. Topology provides this as a
  fallback if such HW settings are not available in ACPI or device tree,
  to avoid hard code in drivers. It's only for config items that can be
  programmed by SW or FW, not for physical things like link connections
  or GPIO used for HP etc.

- Add flags. The flags will be used to configure an existing physical
  links.

- Add private data. The private data is reserved for future extension.

- Add name and stream name to physical DAI links. Kernel can also use name
  and stream name to find an existing physical link and configure it.

Kernel can handle the ABI update in a backward compatible way via patch
'ASoC: topology: Add support to configure existing physical DAI links'.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agotopology: ABI - Define DAI physical PCM data formats
Mengdong Lin [Sun, 6 Nov 2016 05:12:57 +0000 (13:12 +0800)]
topology: ABI - Define DAI physical PCM data formats

Define DAI physical PCM data formats for user space, so users can specify
the formats of backends by topology (e.g. the DAI format to set on backend
link init).

The kernel will also refer to these formats.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agotopology: Define a function to build a single physical DAI link
Mengdong Lin [Sun, 6 Nov 2016 05:12:40 +0000 (13:12 +0800)]
topology: Define a function to build a single physical DAI link

Code refactoring. Rename the function to build all physical links from
tplg_build_link_config() to tplg_build_links(). And define a new function
build_link() to build a single physical DAI link element.

The function build_link() will be extended to handle more properties
of a physical DAI link (e.g. backend or codec-codec link).

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agotopology: Merge an element's be & cc pointer to one link pointer
Mengdong Lin [Sun, 6 Nov 2016 05:11:49 +0000 (13:11 +0800)]
topology: Merge an element's be & cc pointer to one link pointer

Code refactoring. Previously an element has two pointers, 'be' and 'cc',
for BE (Back End) and CC (Codec-Codec) link respectively. But actually
the topology tool processes BE and CC links in the same way, so these
two pointers can be merged into one 'link' pointer, which can be used
configure any physical links.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agotopology: Use snd_config_get_bool to simplify boolean flag parsing
Mengdong Lin [Sun, 6 Nov 2016 05:11:04 +0000 (13:11 +0800)]
topology: Use snd_config_get_bool to simplify boolean flag parsing

The link flags in the text conf file are boolean, so this patch uses
snd_config_get_bool() to simplify the code.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agotopology: tplg_elem_lookup() checks parameter before searching
Mengdong Lin [Thu, 3 Nov 2016 23:08:27 +0000 (07:08 +0800)]
topology: tplg_elem_lookup() checks parameter before searching

Check the parameters at first in case of misuse.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agotopology: Parse and build private data for PCM
Mengdong Lin [Thu, 3 Nov 2016 23:08:12 +0000 (07:08 +0800)]
topology: Parse and build private data for PCM

Users can define private for PCM (FE DAI & DAI links) elements by both
text conf file and C API:

- Text conf file may define multiple data blocks for a PCM and they will
  be merged in building phase;

- Add private data to C API template of PCM object.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agotopology: Define a function to build a single PCM element
Mengdong Lin [Thu, 3 Nov 2016 23:07:58 +0000 (07:07 +0800)]
topology: Define a function to build a single PCM element

Code refactoring. Rename tplg_build_pcm() to tplg_build_pcms() to build
all PCM (FE DAI & DAI link) elements. It will call a new function
build_pcm() to build a single PCM elemement.

build_pcm() will be extended to handle more properties of a PCM.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agotopology: Parse flags for PCM
Mengdong Lin [Thu, 3 Nov 2016 23:07:06 +0000 (07:07 +0800)]
topology: Parse flags for PCM

Users can define flags by both text conf file and C API.
Add flags and flag_mask to C API template of PCM object.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agotopology: Parse sig_bits of stream caps
Mengdong Lin [Thu, 3 Nov 2016 23:06:53 +0000 (07:06 +0800)]
topology: Parse sig_bits of stream caps

Add sig_bits to stream caps template of C API and parse it.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agotopology: ABI - Update stream caps and PCM objects to ABI v5
Mengdong Lin [Thu, 3 Nov 2016 23:05:53 +0000 (07:05 +0800)]
topology: ABI - Update stream caps and PCM objects to ABI v5

Here are the ABI updates for PCM (Front DAI & DAI link) objects:

- add sig_bits to stream caps.
- add flags and private data to PCM.

The kernel can handle the ABI update in a backward compatible way with
the patch "ASoC: topology: Make PCM backward compatible from ABI v4".

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agotopology: Add doc for including other files in the text conf file
Mengdong Lin [Mon, 24 Oct 2016 13:22:19 +0000 (21:22 +0800)]
topology: Add doc for including other files in the text conf file

This patch adds document about how to include other files in the text
configuration files, by alsaconf syntax <xxx> and <searchdir:xxx>.

Users may define common info in separate files (e.g. vendor tokens,
tuples) and share them for different platforms, by including them via
syntax <path/to/configuration-file>. This can save the total size of
files. Users can also specifiy additional configuraiton directories
relative to "/usr/share/alsa/" to search the included files, via syntax
<searchdir:relative-path/to/usr/share/alsa>.

The alsaconf will search and open an included file in the following order
of priority:
1. directly open the file by its name;
2. search for the file name in "/usr/share/alsa";
3. search for the file name in user specified subdirectories under
   "/usr/share/alsa".

The order of the included files need not to be same as their dependencies,
because the toplogy library will load all of them before parsing their
dependencies.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoconf: Search included files under user specified configuration directories
Mengdong Lin [Mon, 24 Oct 2016 13:22:11 +0000 (21:22 +0800)]
conf: Search included files under user specified configuration directories

Users can include file by giving a relative path or just a file name via
alsaconf syntax <xxx>. ALSA conf will search the file in top configuration
directory and additional configuration directories defined by users via
alsaconf syntax <searchdir:xxx>.

ALSA conf will search and open an included file in the following order
of priority:

1. directly open the file by its name;
2. search for the file name in top config direcotry "/usr/share/alsa/";
3. search for the file name in additional configuration directories
   specified by users, via alsaconf syntax
   <searchdir:relative-path/to/user/share/alsa>;
   These directories will be searched in the same order as their
   definition.

The configuration directories defined by a file will only be used to
search the files included by this file.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agotopology: Fix missing stream name of widgets in text conf file
Mengdong Lin [Mon, 24 Oct 2016 13:22:02 +0000 (21:22 +0800)]
topology: Fix missing stream name of widgets in text conf file

User can define the stream name of an input/output widget in the text conf
file, by setting "stream_name" of a SectionWidget.

Topology C API and kernel already have support for configuring a widget's
stream name. This patch just adds the missing part of the text conf file.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agopcm_plug: Clear plugins on all error conditions
Michael Forney [Thu, 20 Oct 2016 01:22:56 +0000 (18:22 -0700)]
pcm_plug: Clear plugins on all error conditions

Otherwise, they will linger after the error is returned (but pcm->setup == 0).
Then, if the caller tries to clean up and call snd_pcm_close(), the assertion
plug->gen.slave == plug->req_slave will fail.

Signed-off-by: Michael Forney <mforney@mforney.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoconf/ucm: skylake: add skylake-rt286 conf files
Vinod Koul [Fri, 7 Oct 2016 10:58:23 +0000 (16:28 +0530)]
conf/ucm: skylake: add skylake-rt286 conf files

This add the UCM conf files for skylake enabling I2S audio, HDMI and DMIC
ports.

Signed-off-by: Karthik D M <karthik.d.m@intel.com>
Signed-off-by: Nishit Sharma <nishitx.sharma@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoctl: correct documentation about TLV feature
Takashi Sakamoto [Wed, 28 Sep 2016 23:57:24 +0000 (08:57 +0900)]
ctl: correct documentation about TLV feature

From my misunderstanding, some explanations are wrong. This commit
corrects them.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoctl: improve documentation about TLV-related APIs
Takashi Sakamoto [Wed, 28 Sep 2016 23:57:23 +0000 (08:57 +0900)]
ctl: improve documentation about TLV-related APIs

The documentation gives no hints to users about format of TLV data.

This commit add hints to construct/parse the information.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoctl: improve API documentation for TLV operation
Takashi Sakamoto [Wed, 28 Sep 2016 23:57:22 +0000 (08:57 +0900)]
ctl: improve API documentation for TLV operation

A commit fe1b08803db6 ("ctl: improve API documentation for threshold level
operations") changes documentations for some TLV-related APIs with wrong
explanations.

This commit fix it with better explanations.

Fixes: fe1b08803db6 ("ctl: improve API documentation for threshold level operations")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agotest: use actual information for TLV operation
Takashi Sakamoto [Wed, 28 Sep 2016 23:57:21 +0000 (08:57 +0900)]
test: use actual information for TLV operation

Currently, this test program uses undefined type of TLV data. This can
bring confusions to userspace applications.

This commit replaces the array with valid information, constructed by newly
exported TLV macros from kernel land.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoUpdate include/sound/tlv.h from 4.9-pre kernel uapi
Takashi Sakamoto [Wed, 28 Sep 2016 23:57:20 +0000 (08:57 +0900)]
Update include/sound/tlv.h from 4.9-pre kernel uapi

The UAPI header in 4.9-pre kernel newly includes existent macros related
to tlv operation, mainly for layout of TLV packet payload.

This commit updates corresponding backport header in this library.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoucm: docs: typeset lists of identifiers explicitly
Antonio Ospite [Fri, 23 Sep 2016 16:18:57 +0000 (18:18 +0200)]
ucm: docs: typeset lists of identifiers explicitly

Doxygen doesn't preserve formatting that relies only on indentation,
typeset lists of identifiers explicitly.

This makes the HTML docs a lot more readable.

This change comes along the lines of commit 72aa0f8332fb ("ucm: reformat
snd_use_case_get() doc").

Some TABs has been added too in order to preserve the aligned look when
reading the source code.

Signed-off-by: Antonio Ospite <ao2@ao2.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoucm: fix crash when calling snd_use_case_geti() with no device or modifier
Antonio Ospite [Fri, 23 Sep 2016 16:11:16 +0000 (18:11 +0200)]
ucm: fix crash when calling snd_use_case_geti() with no device or modifier

When calling snd_use_case_geti(uc_mgr, "_devstatus", &lvalue) the code
ends up calling device_status(uc_mgr, NULL), which result in a crash in
strcmp(dev->name, NULL), when there are enabled devices.

This happens because snd_use_case_geti() allows a "_devstatus"
identifier even if it's only supposed to allow the form
"_devstatus/{device}".

So check that the device name is not null.

The same issue occurs with "_modstatus", this change fixes that as well.

Signed-off-by: Antonio Ospite <ao2@ao2.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agopcm: Better understandable locking code
Takashi Iwai [Thu, 1 Sep 2016 12:05:00 +0000 (14:05 +0200)]
pcm: Better understandable locking code

The newly added locking code seems to have confused quite a few
people, as "thread_safe=1" may be considered as if the thread-safety
lock has to be turned on.  (It meant that the plugin _is_ thread-safe,
i.e. it needs no extra locking.)

For avoiding such a misunderstanding, this commit renames the relevant
pcm fields and give more comments to explain what is for what.
The former single pcm->thread_safe flag is now split to two boolean
flags, pcm->need_lock and pcm->lock_enabled.  It consumes a few more
bytes, but this would be (hopefully) better understandable.

No functional change by this commit.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoconf: bxtrt298: Add topology conf file for bxt
Shreyas NC [Tue, 23 Aug 2016 04:08:36 +0000 (09:38 +0530)]
conf: bxtrt298: Add topology conf file for bxt

Add the conf file for bxt platform as well to define module
private data.

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>
7 years agoconf: sklrt286: Remove tool to generate private data blobs
Shreyas NC [Tue, 23 Aug 2016 04:08:35 +0000 (09:38 +0530)]
conf: sklrt286: Remove tool to generate private data blobs

Since tuples are used to define driver private data, the private data
blobs are no longer required.

So, remove the source files required to generate the private
data blobs and the private data blobs.

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>
7 years agoconf: sklrt286: define module private data through tuples in skylake
Shreyas NC [Tue, 23 Aug 2016 04:08:34 +0000 (09:38 +0530)]
conf: sklrt286: define module private data through tuples in skylake

In the conf file, module private data can be described through
tuples instead of blobs defined by vendor defined structures.

This patch defines the tuple section and the token list. The
tokens are then used to build the tuple array.

The module data may have both driver data and firmware data. The
driver data is passed using the tuple array and the firmware data
using byte data. A descriptor tuple array is defined to describe
the succeeding data block.

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>
7 years agopcm: Fix shm initialization race-condition
Ismael Luceno [Mon, 22 Aug 2016 16:04:33 +0000 (13:04 -0300)]
pcm: Fix shm initialization race-condition

Easily seen when two threads try at the same time, one of them will fail.

The bug was identified by using apulse with Skype.

Fixes: dec428c35221 ("pcm: fix 'unable to create IPC shm instance' caused by fork from a thread")
Fixes: https://github.com/i-rinat/apulse/issues/38
Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agomixer: Fix rounding mode documentation
David Henningsson [Sun, 14 Aug 2016 07:31:25 +0000 (09:31 +0200)]
mixer: Fix rounding mode documentation

The documentation specifies three different rounding modes, but this
is wrong, because they all end up calling snd_tlv_convert_from_dB,
which only has two rounding modes.

Signed-off-by: David Henningsson <diwic@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoucm: Add ucm files for DB410c board.
Srinivas Kandagatla [Mon, 8 Aug 2016 13:23:10 +0000 (16:23 +0300)]
ucm: Add ucm files for DB410c board.

DB410c board has support for both Digital and Analog audio. Digital
audio is over HDMI and analog is over codec chip integrated inside the
APQ8016 SOC.

It can support:
 -  3 Microphones: Primary Mic(Handset mic), Headset Mic and Secondary
 - 2 Digital Microphones.
 - Earpiece.
 - Headset.
 - Loud Speaker.
 - HDMI.

[Riku: squashed Srinivas's patches together and converted spaces to tabs]

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Cc: nicolas.dechesne@linaro.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoRelease v1.1.2
Jaroslav Kysela [Tue, 2 Aug 2016 17:48:38 +0000 (19:48 +0200)]
Release v1.1.2

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
7 years agoMakefile: fix sklrt286 dist files
Jaroslav Kysela [Tue, 2 Aug 2016 17:47:48 +0000 (19:47 +0200)]
Makefile: fix sklrt286 dist files

7 years agotopology: Fix the missing referenced elem ptr when merging private data
Mengdong Lin [Fri, 22 Jul 2016 05:12:54 +0000 (13:12 +0800)]
topology: Fix the missing referenced elem ptr when merging private data

tplg_copy_data() should set the valid referenced data element pointer
on success. The caller will double check this pointer for all kinds of
references, including controls and data.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agotopology: Fix inaccurate message on failure to find a widgets's reference
Mengdong Lin [Fri, 22 Jul 2016 05:12:45 +0000 (13:12 +0800)]
topology: Fix inaccurate message on failure to find a widgets's reference

A widget may have references to control or data elements. So the message
should not only use "control" here.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoctl: use condition statements instead of assert() for new APIs to add an element set
Takashi Sakamoto [Wed, 20 Jul 2016 09:58:52 +0000 (18:58 +0900)]
ctl: use condition statements instead of assert() for new APIs to add an element set

Usage of assert() is not better practice of programming as shared library
APIs. They should return appropriate error code to promote applications to
handle error state.

This commit applies condition statements with return value of -EINVAL,
instead of assert(). As a backward compatibility for existent applications,
old APIs still call assert().

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agotopology: Check address and length before string copy
Mengdong Lin [Wed, 20 Jul 2016 01:53:12 +0000 (09:53 +0800)]
topology: Check address and length before string copy

elem_copy_text() is widely used for string copy in topology. Because some
name fields are not mandatory for users, sometimes the source can be
invalid and we should not do the copy. So we add check here.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agotopology: Add ATTRIBUTE_UNUSED for unused parameters to fix compiler warning
Mengdong Lin [Wed, 20 Jul 2016 01:53:03 +0000 (09:53 +0800)]
topology: Add ATTRIBUTE_UNUSED for unused parameters to fix compiler warning

This commit adds ATTRIBUTE_UNUSED to the unused parameter 'tplg' for
function tplg_parse_streams() and tplg_parse_fe_dai(). These two functions
need to keep 'tplg' as ops for tplg_parse_compound().

The compiler warnings below are fixed:

pcm.c: In function 'tplg_parse_streams':
pcm.c:262:43: warning: unused parameter 'tplg' [-Wunused-parameter]
 static int tplg_parse_streams(snd_tplg_t *tplg, snd_config_t *cfg,
                                           ^
pcm.c: In function 'tplg_parse_fe_dai':
pcm.c:324:42: warning: unused parameter 'tplg' [-Wunused-parameter]
 static int tplg_parse_fe_dai(snd_tplg_t *tplg, snd_config_t *cfg,

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agotopology: Remove support for control flag SNDRV_CTL_ELEM_ACCESS_USER
Mengdong Lin [Wed, 20 Jul 2016 01:52:52 +0000 (09:52 +0800)]
topology: Remove support for control flag SNDRV_CTL_ELEM_ACCESS_USER

This access flag is used to add controls from user space by ioctl.
But topology only configures controls in user space and these controls
will eventually be created by ASoC in kernel, so topology should not
support this flag.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoctl: rename APIs to add an element set so that their names are appropriate
Takashi Sakamoto [Sat, 16 Jul 2016 13:20:01 +0000 (22:20 +0900)]
ctl: rename APIs to add an element set so that their names are appropriate

In this development period, some APIs have already been added. Most of
them are to add an element set, while their names are not so appropriate
against their feature. This is due to following to names of old APIs.

This commit renames them.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agotopology: Tuple type can have an extenstion
Mengdong Lin [Fri, 15 Jul 2016 12:19:58 +0000 (20:19 +0800)]
topology: Tuple type can have an extenstion

After the type specific string ("uuid", "string", "byte", "short" and
"word"), users may append a string, like  "uuidxxx". The topology parser
will check the first few characters to get the tuple type.

This can allow users to put multiple tuples of the same type into one
vendor tuple section (SectionVendorTuples), e.g. parameters of multiple
firmware modules.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agotopology: Parse vendor private data for manifest
Mengdong Lin [Fri, 15 Jul 2016 12:19:41 +0000 (20:19 +0800)]
topology: Parse vendor private data for manifest

In text conf file, user can define a manifest section and let it refer
to private data sections, in the same syntax as other element types.

The text conf file can have at most 1 manifest section.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agotopology: Change uuid value to 16 separate characters in text conf file
Mengdong Lin [Fri, 15 Jul 2016 12:18:59 +0000 (20:18 +0800)]
topology: Change uuid value to 16 separate characters in text conf file

Previously in text conf file, the uuid value of vendor tuples is a
16-characer string. Now change it to 16 characters separated by commas,
easier for users to edit it manually.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agotopology: Merge lookup for data reference into tplg_copy_data()
Mengdong Lin [Fri, 15 Jul 2016 12:18:11 +0000 (20:18 +0800)]
topology: Merge lookup for data reference into tplg_copy_data()

Code refactor to reduce function calls. Now tplg_copy_data() can look up
a referenced data element and merge its data.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agotopology: An element can refer to multipe data sections in text conf file
Mengdong Lin [Fri, 15 Jul 2016 12:17:43 +0000 (20:17 +0800)]
topology: An element can refer to multipe data sections in text conf file

Previously in text conf file, an element can only refer to one data
section (SectionData). Now it can also refer to a list of data sections.
Thus users can split groups of firmware parameters to multiple data
sections, and put them all in the reference list.

Finally, data of these data sections will be merged, in the same order as
they are in the reference list, as the element's private data for kernel.

We still support the original syntax of reference to a single data
section. The doc is updated for the syntax extension.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agomixer: remove alloca() from simple_event_add()
Takashi Sakamoto [Fri, 15 Jul 2016 00:23:33 +0000 (09:23 +0900)]
mixer: remove alloca() from simple_event_add()

Both of alloca() and automatic variables keep storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agomixer: change code formatting for simple_event_add()
Takashi Sakamoto [Fri, 15 Jul 2016 00:23:32 +0000 (09:23 +0900)]
mixer: change code formatting for simple_event_add()

This commit applies code format according to typical and moderate rule.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agomixer: remove alloca() from simple_add1()
Takashi Sakamoto [Fri, 15 Jul 2016 00:23:31 +0000 (09:23 +0900)]
mixer: remove alloca() from simple_add1()

Both of alloca() and automatic variables keep storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agomixer: change code formatting for simple_add1()
Takashi Sakamoto [Fri, 15 Jul 2016 00:23:30 +0000 (09:23 +0900)]
mixer: change code formatting for simple_add1()

This commit applies code format according to typical and moderate rule.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agomixer: remove alloca() from set_enum_item_ops()
Takashi Sakamoto [Fri, 15 Jul 2016 00:23:29 +0000 (09:23 +0900)]
mixer: remove alloca() from set_enum_item_ops()

Both of alloca() and automatic variables keep storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agomixer: remove alloca() from get_enum_item_ops()
Takashi Sakamoto [Fri, 15 Jul 2016 00:23:28 +0000 (09:23 +0900)]
mixer: remove alloca() from get_enum_item_ops()

Both of alloca() and automatic variables keep storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agomixer: remove alloca() from enum_item_name_ops()
Takashi Sakamoto [Fri, 15 Jul 2016 00:23:27 +0000 (09:23 +0900)]
mixer: remove alloca() from enum_item_name_ops()

Both of alloca() and automatic variables keep storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agomixer: remove alloca() from init_db_range()
Takashi Sakamoto [Fri, 15 Jul 2016 00:23:26 +0000 (09:23 +0900)]
mixer: remove alloca() from init_db_range()

Both of alloca() and automatic variables keep storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agomixer: change code formatting for init_db_range()
Takashi Sakamoto [Fri, 15 Jul 2016 00:23:25 +0000 (09:23 +0900)]
mixer: change code formatting for init_db_range()

This commit applies code format according to typical and moderate rule.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agomixer: remove alloca() from selem_write_main()
Takashi Sakamoto [Fri, 15 Jul 2016 00:23:24 +0000 (09:23 +0900)]
mixer: remove alloca() from selem_write_main()

Both of alloca() and automatic variables keep storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agomixer: change code formatting for selem_write_main()
Takashi Sakamoto [Fri, 15 Jul 2016 00:23:23 +0000 (09:23 +0900)]
mixer: change code formatting for selem_write_main()

This commit applies code format according to typical and moderate rule.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agomixer: remove alloca() from elem_write_route()
Takashi Sakamoto [Fri, 15 Jul 2016 00:23:22 +0000 (09:23 +0900)]
mixer: remove alloca() from elem_write_route()

Both of alloca() and automatic variables keep storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agomixer: change code formatting for elem_write_route()
Takashi Sakamoto [Fri, 15 Jul 2016 00:23:21 +0000 (09:23 +0900)]
mixer: change code formatting for elem_write_route()

This commit applies code format according to typical and moderate rule.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agomixer: remove alloca() from elem_write_enum()
Takashi Sakamoto [Fri, 15 Jul 2016 00:23:20 +0000 (09:23 +0900)]
mixer: remove alloca() from elem_write_enum()

Both of alloca() and automatic variables keep storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agomixer: change code formatting for elem_write_enum()
Takashi Sakamoto [Fri, 15 Jul 2016 00:23:19 +0000 (09:23 +0900)]
mixer: change code formatting for elem_write_enum()

This commit applies code format according to typical and moderate rule.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agomixer: remove alloca() from elem_write_switch_constant()
Takashi Sakamoto [Fri, 15 Jul 2016 00:23:18 +0000 (09:23 +0900)]
mixer: remove alloca() from elem_write_switch_constant()

Both of alloca() and automatic variables keep storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agomixer: remove alloca() from elem_write_switch()
Takashi Sakamoto [Fri, 15 Jul 2016 00:23:17 +0000 (09:23 +0900)]
mixer: remove alloca() from elem_write_switch()

Both of alloca() and automatic variables keep storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agomixer: change code formatting for elem_write_switch()
Takashi Sakamoto [Fri, 15 Jul 2016 00:23:16 +0000 (09:23 +0900)]
mixer: change code formatting for elem_write_switch()

This commit applies code format according to typical and moderate rule.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agomixer: remove alloca() from elem_write_volume()
Takashi Sakamoto [Fri, 15 Jul 2016 00:23:15 +0000 (09:23 +0900)]
mixer: remove alloca() from elem_write_volume()

Both of alloca() and automatic variables keep storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agomixer: change code formatting for elem_write_volume()
Takashi Sakamoto [Fri, 15 Jul 2016 00:23:14 +0000 (09:23 +0900)]
mixer: change code formatting for elem_write_volume()

This commit applies code format according to typical and moderate rule.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agomixer: remove alloca() from selem_read()
Takashi Sakamoto [Fri, 15 Jul 2016 00:23:13 +0000 (09:23 +0900)]
mixer: remove alloca() from selem_read()

Both of alloca() and automatic variables keep storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agomixer: change code formatting for selem_read()
Takashi Sakamoto [Fri, 15 Jul 2016 00:23:12 +0000 (09:23 +0900)]
mixer: change code formatting for selem_read()

This commit applies code format according to typical and moderate rule.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agomixer: remove alloca() from elem_read_enum()
Takashi Sakamoto [Fri, 15 Jul 2016 00:23:11 +0000 (09:23 +0900)]
mixer: remove alloca() from elem_read_enum()

Both of alloca() and automatic variables keep storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agomixer: change code formatting for elem_read_enum()
Takashi Sakamoto [Fri, 15 Jul 2016 00:23:10 +0000 (09:23 +0900)]
mixer: change code formatting for elem_read_enum()

This commit applies code format according to typical and moderate rule.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agomixer: remove alloca() from elem_read_route()
Takashi Sakamoto [Fri, 15 Jul 2016 00:23:09 +0000 (09:23 +0900)]
mixer: remove alloca() from elem_read_route()

Both of alloca() and automatic variables keep storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agomixer: change code formatting for elem_read_route()
Takashi Sakamoto [Fri, 15 Jul 2016 00:23:08 +0000 (09:23 +0900)]
mixer: change code formatting for elem_read_route()

This commit applies code format according to typical and moderate rule.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agomixer: remove alloca() from elem_read_volume()
Takashi Sakamoto [Fri, 15 Jul 2016 00:23:07 +0000 (09:23 +0900)]
mixer: remove alloca() from elem_read_volume()

Both of alloca() and automatic variables keep storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agomixer: change code formatting for elem_read_volume()
Takashi Sakamoto [Fri, 15 Jul 2016 00:23:06 +0000 (09:23 +0900)]
mixer: change code formatting for elem_read_volume()

This commit applies code format according to typical and moderate rule.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agomixer: include library local header to find layout of structures
Takashi Sakamoto [Fri, 15 Jul 2016 00:23:05 +0000 (09:23 +0900)]
mixer: include library local header to find layout of structures

Inner this library, implementation of each features can find actual layout
of structures by including local header. Although, mixer feature is written
without the header and as the same way for applications. This brings some
inefficiencies such as usage of alloca() to keep memory objects for the
structures.

This commit includes the header for further improvements in mixer
feature.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoalisp: remove alloca() from FA_pcm_info()
Takashi Sakamoto [Thu, 14 Jul 2016 14:07:51 +0000 (23:07 +0900)]
alisp: remove alloca() from FA_pcm_info()

Both of alloca() and automatic variables keeps storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoalisp: remove alloca() from FA_hctl_elem_write()
Takashi Sakamoto [Thu, 14 Jul 2016 14:07:50 +0000 (23:07 +0900)]
alisp: remove alloca() from FA_hctl_elem_write()

Both of alloca() and automatic variables keeps storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoalisp: remove alloca() from FA_hctl_elem_read()
Takashi Sakamoto [Thu, 14 Jul 2016 14:07:49 +0000 (23:07 +0900)]
alisp: remove alloca() from FA_hctl_elem_read()

Both of alloca() and automatic variables keeps storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoalisp: remove alloca() from FA_hctl_elem_info()
Takashi Sakamoto [Thu, 14 Jul 2016 14:07:48 +0000 (23:07 +0900)]
alisp: remove alloca() from FA_hctl_elem_info()

Both of alloca() and automatic variables keeps storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoalisp: remove alloca() from FA_hctl_find_elem()
Takashi Sakamoto [Thu, 14 Jul 2016 14:07:47 +0000 (23:07 +0900)]
alisp: remove alloca() from FA_hctl_find_elem()

Both of alloca() and automatic variables keeps storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoalisp: remove alloca() from FA_card_info()
Takashi Sakamoto [Thu, 14 Jul 2016 14:07:46 +0000 (23:07 +0900)]
alisp: remove alloca() from FA_card_info()

Both of alloca() and automatic variables keeps storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoconf: remove alloca() from snd_func_private_pcm_subdevice()
Takashi Sakamoto [Thu, 14 Jul 2016 14:07:45 +0000 (23:07 +0900)]
conf: remove alloca() from snd_func_private_pcm_subdevice()

Both of alloca() and automatic variables keeps storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoconf: remove alloca() from snd_func_pcm_args_by_class()
Takashi Sakamoto [Thu, 14 Jul 2016 14:07:44 +0000 (23:07 +0900)]
conf: remove alloca() from snd_func_pcm_args_by_class()

Both of alloca() and automatic variables keeps storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoconf: remove alloca() from snd_func_pcm_id()
Takashi Sakamoto [Thu, 14 Jul 2016 14:07:43 +0000 (23:07 +0900)]
conf: remove alloca() from snd_func_pcm_id()

Both of alloca() and automatic variables keeps storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoconf: remove alloca() from snd_func_card_name()
Takashi Sakamoto [Thu, 14 Jul 2016 14:07:42 +0000 (23:07 +0900)]
conf: remove alloca() from snd_func_card_name()

Both of alloca() and automatic variables keeps storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoconf: remove alloca() from snd_func_card_id()
Takashi Sakamoto [Thu, 14 Jul 2016 14:07:41 +0000 (23:07 +0900)]
conf: remove alloca() from snd_func_card_id()

Both of alloca() and automatic variables keeps storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoconf: remove alloca() from snd_determine_driver()
Takashi Sakamoto [Thu, 14 Jul 2016 14:07:40 +0000 (23:07 +0900)]
conf: remove alloca() from snd_determine_driver()

Both of alloca() and automatic variables keeps storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agopcm: remove alloca() from _snd_pcm_softvol_open()
Takashi Sakamoto [Thu, 14 Jul 2016 14:07:39 +0000 (23:07 +0900)]
pcm: remove alloca() from _snd_pcm_softvol_open()

Both of alloca() and automatic variables keeps storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agopcm: change code formatting for _snd_pcm_softvol_open()
Takashi Sakamoto [Thu, 14 Jul 2016 14:07:38 +0000 (23:07 +0900)]
pcm: change code formatting for _snd_pcm_softvol_open()

This commit applies code format according to typical and moderate rule,
for _snd_pcm_softvol_open().

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agopcm: remove alloca() from softvol_load_control()
Takashi Sakamoto [Thu, 14 Jul 2016 14:07:37 +0000 (23:07 +0900)]
pcm: remove alloca() from softvol_load_control()

Both of alloca() and automatic variables keeps storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agopcm: change code formatting for softvol_load_control()
Takashi Sakamoto [Thu, 14 Jul 2016 14:07:36 +0000 (23:07 +0900)]
pcm: change code formatting for softvol_load_control()

This commit applies code format according to typical and moderate rule,
for softvol_load_control().

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agopcm: remove alloca() from snd_spcm_init_duplex()
Takashi Sakamoto [Thu, 14 Jul 2016 14:07:35 +0000 (23:07 +0900)]
pcm: remove alloca() from snd_spcm_init_duplex()

Both of alloca() and automatic variables keeps storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agopcm: remove alloca() from snd_spcm_init()
Takashi Sakamoto [Thu, 14 Jul 2016 14:07:34 +0000 (23:07 +0900)]
pcm: remove alloca() from snd_spcm_init()

Both of alloca() and automatic variables keeps storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agopcm: remove alloca() from snd_pcm_hw_set_chmap()
Takashi Sakamoto [Thu, 14 Jul 2016 14:07:33 +0000 (23:07 +0900)]
pcm: remove alloca() from snd_pcm_hw_set_chmap()

Both of alloca() and automatic variables keeps storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agopcm: remove alloca() from snd_pcm_hw_get_chmap()
Takashi Sakamoto [Thu, 14 Jul 2016 14:07:32 +0000 (23:07 +0900)]
pcm: remove alloca() from snd_pcm_hw_get_chmap()

Both of alloca() and automatic variables keeps storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agopcm: remove alloca() from snd_pcm_query_chmaps_from_hw()
Takashi Sakamoto [Thu, 14 Jul 2016 14:07:31 +0000 (23:07 +0900)]
pcm: remove alloca() from snd_pcm_query_chmaps_from_hw()

Both of alloca() and automatic variables keeps storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agopcm: remove alloca() from snd_pcm_hw_change_timer()
Takashi Sakamoto [Thu, 14 Jul 2016 14:07:30 +0000 (23:07 +0900)]
pcm: remove alloca() from snd_pcm_hw_change_timer()

Both of alloca() and automatic variables keeps storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agopcm: change code formatting for snd_pcm_hw_change_timer()
Takashi Sakamoto [Thu, 14 Jul 2016 14:07:29 +0000 (23:07 +0900)]
pcm: change code formatting for snd_pcm_hw_change_timer()

This commit applies code format according to typical and moderate rule,
for snd_pcm_hw_change_timer().

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agopcm: remove alloca() from _snd_pcm_hook_ctl_elems_install()
Takashi Sakamoto [Thu, 14 Jul 2016 14:07:28 +0000 (23:07 +0900)]
pcm: remove alloca() from _snd_pcm_hook_ctl_elems_install()

Both of alloca() and automatic variables keeps storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agopcm: remove alloca() from snd_pcm_direct_set_timer_params
Takashi Sakamoto [Thu, 14 Jul 2016 14:07:27 +0000 (23:07 +0900)]
pcm: remove alloca() from snd_pcm_direct_set_timer_params

Both of alloca() and automatic variables keeps storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agopcm: change code formatting for snd_pcm_direct_set_timer_params()
Takashi Sakamoto [Thu, 14 Jul 2016 14:07:26 +0000 (23:07 +0900)]
pcm: change code formatting for snd_pcm_direct_set_timer_params()

This commit applies code format according to typical and moderate rule,
for snd_pcm_direct_set_timer_params().

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agopcm: remove alloca() from snd_pcm_direct_initialize_poll_fd()
Takashi Sakamoto [Thu, 14 Jul 2016 14:07:25 +0000 (23:07 +0900)]
pcm: remove alloca() from snd_pcm_direct_initialize_poll_fd()

Both of alloca() and automatic variables keeps storages on stack, while
the former generates more instructions than the latter. It's better to use
the latter if the size of storage is computable at pre-compile or compile
time; i.e. just for structures.

This commit obsolete usages of alloca() with automatic variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>