Commit graph

11402 commits

Author SHA1 Message Date
Tomi Valkeinen
8dc0a56529 Merge branch 'ti-dra7-dss' into 4.2/fbdev
Merge arch/ changes for TI's DRA7 SoC Display Subsystem.
2015-06-05 16:55:52 +03:00
kbuild test robot
67f72776b6 ASoC: zx: fix platform_no_drv_owner.cocci warnings
sound/soc/zte/zx296702-i2s.c:428:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-04 18:16:40 +01:00
Peter Ujfalusi
16bd395259 ASoC: tas2552: Rename mclk parameter to pll_clkin to match with the datasheet
MCLK is one of the possible source for the pll_clkin frequency. Make this
clear by renaming the variable.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-04 17:50:03 +01:00
Peter Ujfalusi
dd6e305340 ASoC: tas2552: Simplify and reverse the functionality of tas2552_sw_shutdown
The function name and parameters of:
tas2552_sw_shutdown(struct tas2552_data *tas_data, int sw_shutdown)

implies that if sw_shutdown is 1 we should be entering to the software
shutdown mode.

The code can be simplified as well within the function.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-04 17:50:03 +01:00
Peter Ujfalusi
e3606aa496 ASoC: tas2552: Simplify the tas2552_mute function
Initialize the cfg1_reg to 0 and set the mute bit only when it is needed.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-04 17:50:02 +01:00
Peter Ujfalusi
7de544fd32 ASoC: tas2552: Correct CFG1 register bit definitions
Remove the _MASK postfix of the bit definitions, collect the CFG1 bit
definition in one place and correct the bit shifts at the same time.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-04 17:50:02 +01:00
Peter Ujfalusi
89683fdefd ASoC: tas2552: Correct PDM configuration register bit definitions
The PDM clock can be selected via bit0-1.
PDM_DATA_ES bit is at bit2.

The code were trying to select BCLK as PDM reference clock but instead
it was selecting PLL and set the DATA_ES bit to 1.
Selecting the PLL output as reference clock as default does make sense,
but the driver should not change the PDM data edge.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-04 17:50:02 +01:00
Peter Ujfalusi
1cf0f44811 ASoC: tas2552: Fix kernel crash caused by wrong kcontrol entry
SOC_DAPM_SINGLE("Playback AMP", ..) should not be under kcontrols. It
causes kernel crash (NULL pointer) when the mixers are listed.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-06-04 17:49:53 +01:00
Peter Ujfalusi
80ba2669ec ASoC: tas2552: Fix kernel crash when the codec is loaded but not part of a card
If the card is not part of any card the tas_data->codec is NULL since it is
set only during snd_soc_codec_driver.probe, which is not yet called.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-06-04 17:49:46 +01:00
Peter Ujfalusi
ea178d1456 ASoC: tas2552: Make the enable-gpio really optional
Do not fail the probe if the enable-gpio is not specifiedbut handle
deferred probe case.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-04 17:49:28 +01:00
Mark Brown
69ccc50231 ASoC: zte: Fix missing dev in devm operation
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-04 17:11:18 +01:00
kbuild test robot
c8d8ff0a9d ASoC: zx: fix simple_return.cocci warnings
sound/soc/zte/zx296702-spdif.c:191:1-4: WARNING: end returns can be simpified

 Simplify a trivial if-return sequence.  Possibly combine with a
 preceding function call.
Generated by: scripts/coccinelle/misc/simple_return.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-04 17:07:59 +01:00
kbuild test robot
3898182b50 ASoC: zx: fix platform_no_drv_owner.cocci warnings
sound/soc/zte/zx296702-spdif.c:361:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-04 17:07:56 +01:00
Liam Girdwood
cc76e7def0 ASoC: dapm: fix build errors for missing snd_soc_dapm_new_control symbol
Fix the following error:-

All error/warnings (new ones prefixed by >>):
>
>    sound/built-in.o: In function `soc_tplg_dapm_widget_create':
> >> :(.text+0x25a90): undefined reference to `snd_soc_dapm_new_control'

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-04 16:25:26 +01:00
kbuild test robot
3c10c280a0 ASoC: zx: zx_i2s_dai can be static
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-04 15:39:33 +01:00
Jun Nie
e5d4cd8780 ASoC: zx: Add ZTE zx296702 I2S DAI driver
Add ZTE zx296702 I2S interface DAI driver

Signed-off-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-04 13:05:07 +01:00
Jun Nie
6fc3d24d42 ASoC: zx: Add zx296702 SPDIF support
Add driver for zx296702 SPDIF controller

Signed-off-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-04 13:05:07 +01:00
Liam Girdwood
8a9782346d ASoC: topology: Add topology core
The topology core parses the FW topology file for known block types and
instanciates any common ALSA/ASoC objects that it discovers. The core
also passes any block that is does not understand to client component
drivers for enumeration.

The core exports some APIs to client drivers in order to load and unload
firmware topology data as use case require.

Currently the core deals with the following object types :-

 o kcontrols. This includes TLV, enumerated and bytes controls.
 o DAPM widgets. All types with any associated kcontrol.
 o DAPM graph.
 o FE PCM. FE PCM capabilities and configuration can be defined.
 o BE DAI Link. BE DAI link capabilities and configuration can be defined.
 o Codec <-> codec style links capabilities and configuration.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-04 09:40:03 +01:00
Misael Lopez Cruz
516034787e ASoC: omap-hdmi-audio: Fix invalid combination of DM_INH and CA
DM_INH = 1 (stereo downmix prohibited) and CA = 0x00 (Channel
Allocation: FR, FL) is an invalid combination according to the
HDMI Compliance Test 7.31 "Audio InfoFrame".

Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Mark Brown <broonie@kernel.org>
2015-06-03 14:34:14 +03:00
Misael Lopez Cruz
88359b99d0 ASoC: omap-hdmi-audio: Force channel allocation only for OMAP4
There is a constraint in the OMAP4 HDMI IP that requires to use
the 8-channel code when transmitting more than two channels.

The constraint doesn't apply for OMAP5 so don't force the channel
allocation in the sound driver as it can be done specifically for
OMAP4 later in the hdmi4 core.

Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Mark Brown <broonie@kernel.org>
2015-06-03 14:34:02 +03:00
Jyri Sarha
3e0aa8d83b ASoC: core: If component doesn't have of_node use parent's node instead
If an ASoC component device does not have a device tree node, use its
parent's node instead, when looking for a matching DAI based on a
device tree reference.

This allows video device drivers to register a separate child device
for their ASoC side audio functionality.  [And MFDs in general --
broonie]

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-02 21:09:11 +01:00
Richard Fitzgerald
2c118b4c27 ASoC: arizona: Add DVFS handling for sample rate control
The WM8997 and WM5102 codecs need to boost DVFS for higher sample rates.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-02 21:07:20 +01:00
Richard Fitzgerald
81ac58b13f ASoC: wm_adsp: Move DVFS control into codec driver
In theory the ADSP driver should not need to know anything
about the codec it is part of. But the WM5102 needs DVFS
control based on ADSP clocking speed. This was being handled
by bundling part of the knowledge of this into the ADSP driver.

This change moves this handling out of the ADSP driver and
into the WM5102 driver.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-02 21:07:20 +01:00
Richard Fitzgerald
346d96836c ASoC: arizona: Export functions to control subsystem DVFS
The WM5102 and WM8997 codecs have an internal dynamic clock booster.
When this booster is active, the DCVDD voltage must be increased.
If all the currently active audio paths can run with the root SYSCLK
we can disable the booster, allowing us to turn down DCVDD voltage
to save power.

Previously this was being done by having the booster enable bit set
as a side-effect of the LDO1 regulator driver, which is unexpected
behaviour of a regulator and not compatible with using an external
regulator.  [Originally this was documented as a feature of the internal
LDO -- broonie]

This patch exports functions to handle the booster enable and
DCVDD voltage, with each relevant subsystem flagging whether it can
currently run without the booster. Note that these subsystems are
stateless and none of them are nestable, so there's no need for
reference counting, we only need a simple boolean for each subsystem
of whether their current condition could require the booster or will
allow us to turn the codec down to lower operating power.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-02 21:06:20 +01:00
Mark Brown
b601b58785 Merge branch 'topic/adsp' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-arizona 2015-06-02 21:06:04 +01:00
Arnd Bergmann
6cc8ae9481 ASoC: qcom: fix STORM board Kconfig
This patch is a fixup to correct dependencies in patch 9bae4880ac
("ASoC: qcom: move ipq806x specific bits out of lpass driver.")

Originally this change-set was suggested by Arnd on mailing list.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-02 20:55:41 +01:00
Subhransu S. Prusty
859c34bd3c ASoC: Intel: Allocate for the mailbox with max size
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-02 20:48:08 +01:00
Vladimir Zapolskiy
5353f65b85 ASoC: dapm: fix snd_soc_dapm_new_control() implicit declaration
The change fixes the following compilation problem:

  sound/soc/soc-dapm.c: In function 'dapm_kcontrol_data_alloc':
  sound/soc/soc-dapm.c:388:4: error: implicit declaration of function
    'snd_soc_dapm_new_control' [-Werror=implicit-function-declaration]
    data->widget = snd_soc_dapm_new_control(widget->dapm,
    ^

  sound/soc/soc-dapm.c:387:17: warning: assignment makes pointer
    from integer without a cast [enabled by default]
    data->widget = snd_soc_dapm_new_control(widget->dapm,
                 ^
  sound/soc/soc-dapm.c: At top level:
  sound/soc/soc-dapm.c:3269:1: error: conflicting types for
    'snd_soc_dapm_new_control'
  snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
  ^

In addition to the fix add static qualifier to
snd_soc_dapm_new_control() function to silence checkpatch.

Fixes: 02aa78abec ("ASoC: DAPM: Add APIs to create individual DAPM controls.")
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-02 18:18:03 +01:00
Fang, Yang A
a650bb3422 ASoC: ts3a227e: use device property api
replace of_property_read_u32 with device_property_read_u32

Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-02 18:17:27 +01:00
Fang, Yang A
bb13f0e08d ASoC: max98090: read micbias from device property
This patch reads max98090 micbias from acpi or dt

Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-02 18:11:03 +01:00
Jie Yang
edd8ed496b ASoC: Intel: handle haswell pcm suspend including runtime modules freeing
It needs free pcm runtime modules before unloading firmware, here
add hsw_pcm_suspend() to handle this procedure:
suspends firmware ==> frees runtime modules ==> unloads firmware.

This fixes the broadwell module unload failed issue.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-02 15:34:12 +01:00
Jie Yang
2dbc80caf7 ASoC: Intel: check and clear runtime module pointer
Add check runtime module pointers before freeing them, and clear
them to NULL after freed.

With this implemented, we can avoid NULL pointer dereference or
double free errors.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-02 15:34:11 +01:00
Jie Yang
6e5132f79a ASoC: intel: Revert "ASoC: Intel: fix broadwell module removing failed issue"
This reverts commit 01f202c7b4.

We shouldn't leave the device as suspended state after module freed,
it is not good to do runtime suspend at driver free, here revert
this fixing, and replace it with the procedure:
suspends firmware ==> frees runtime modules ==> unloads firmware.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-02 15:34:07 +01:00
Jie Yang
a209d322dc ASoC: intel: Revert "ASoC: Intel: remove unused function hsw_pcm_free_modules()"
This reverts commit 506c148ee5.

We still need this hsw_pcm_free_modules(), we plan to remove the
runtime modules at both fw_unload(D0->D3) and snd_soc_sst_haswell_pcm
module removing.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-02 15:34:00 +01:00
Jie Yang
616268292b ASoC: Intel: don't need compress offload for broadwell
We don't need compress offload feature for broadwell broadwell machine,
here remove the non exist dependency.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-02 11:58:45 +01:00
Lars-Peter Clausen
4a6c2aa19d ASoC: wm_hubs: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to codec->dapm
with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:46:02 +01:00
Lars-Peter Clausen
718e23fde5 ASoC: wm9090: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:45:58 +01:00
Lars-Peter Clausen
1571f6ecfd ASoC: wm9081: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:45:53 +01:00
Lars-Peter Clausen
8383dfd889 ASoC: wm8997: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to codec->dapm
with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:45:50 +01:00
Lars-Peter Clausen
6a141e462e ASoC: wm8996: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:45:46 +01:00
Lars-Peter Clausen
a01ddd388d ASoC: wm8995: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:45:43 +01:00
Lars-Peter Clausen
8e09bac78a ASoC: wm8994: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:45:40 +01:00
Lars-Peter Clausen
f8ae3cf81f ASoC: wm8993: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:45:35 +01:00
Lars-Peter Clausen
bfdd20a497 ASoC: wm8991: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:45:31 +01:00
Lars-Peter Clausen
015ff30193 ASoC: wm8990: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:45:27 +01:00
Lars-Peter Clausen
491c04eb86 ASoC: wm8988: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:45:14 +01:00
Lars-Peter Clausen
4b67780291 ASoC: wm8985: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:45:11 +01:00
Lars-Peter Clausen
71ffce008c ASoC: wm8983: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:45:08 +01:00
Lars-Peter Clausen
547f3f47f5 ASoC: wm8978: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:45:04 +01:00
Lars-Peter Clausen
5c6415d630 ASoC: wm8974: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:45:01 +01:00
Lars-Peter Clausen
1977361420 ASoC: wm8971: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:44:58 +01:00
Lars-Peter Clausen
57ef7fa7b2 ASoC: wm8962: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Also drop the unnecessary comparison in the set_bias_level() callback that
checks if the device is already at the target level. The core already takes
care of this and will not call the callback if the device is already at the
target level.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:44:54 +01:00
Lars-Peter Clausen
049e17d7b9 ASoC: wm8961: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:44:51 +01:00
Lars-Peter Clausen
93f32f534e ASoC: wm8960: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:44:47 +01:00
Lars-Peter Clausen
afcd11df6d ASoC: wm8955: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:44:44 +01:00
Lars-Peter Clausen
2145554fea ASoC: wm8940: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:44:41 +01:00
Lars-Peter Clausen
f44a984293 ASoC: wm8904: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:43:48 +01:00
Lars-Peter Clausen
060ea2a0bd ASoC: wm8903: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:43:44 +01:00
Lars-Peter Clausen
eee53c35bb ASoC: wm8900: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:43:40 +01:00
Lars-Peter Clausen
e755603768 ASoC: wm8804: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to codec->dapm
with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:43:37 +01:00
Lars-Peter Clausen
265b8ac8b0 ASoC: wm8776: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:43:25 +01:00
Lars-Peter Clausen
ef075ca657 ASoC: wm8770: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:43:22 +01:00
Lars-Peter Clausen
6093e926cc ASoC: wm8753: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:43:18 +01:00
Lars-Peter Clausen
b31c9ef9f8 ASoC: wm8750: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:43:15 +01:00
Lars-Peter Clausen
11fb3914bd ASoC: wm8737: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:43:11 +01:00
Lars-Peter Clausen
fc31fda63b ASoC: wm8731: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:43:08 +01:00
Lars-Peter Clausen
5e80bb92f2 ASoC: wm8728: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:43:04 +01:00
Lars-Peter Clausen
f235d94fca ASoC: wm8711: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:43:01 +01:00
Lars-Peter Clausen
e8f48bc8cb ASoC: wm8580: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:42:56 +01:00
Lars-Peter Clausen
7db634d918 ASoC: wm8523: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:42:52 +01:00
Lars-Peter Clausen
38337a9df2 ASoC: wm8510: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:42:49 +01:00
Lars-Peter Clausen
cf25c66c5b ASoC: wm8400: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:42:46 +01:00
Lars-Peter Clausen
9b142894be ASoC: wm8350: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:42:43 +01:00
Lars-Peter Clausen
72945b3d3c ASoC: wm5110: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to codec->dapm
with snd_soc_codec_get_dapm().

While we are at it also remove the duplicated initialization of
priv->core.arizona->dapm.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:42:35 +01:00
Lars-Peter Clausen
0740135a53 ASoC: wm5102: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to codec->dapm
with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:42:31 +01:00
Lars-Peter Clausen
002d1c4ed8 ASoC: wm5100: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to codec->dapm
with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:42:27 +01:00
Lars-Peter Clausen
e566b53251 ASoC: wm0010: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:42:23 +01:00
Lars-Peter Clausen
1ac5214505 ASoC: arizona: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to codec->dapm
with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:42:10 +01:00
Lars-Peter Clausen
02b8c59ade ASoC: cs42xx8: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to codec->dapm
with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:42:10 +01:00
Lars-Peter Clausen
353c10a919 ASoC: cs42l73: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:42:07 +01:00
Lars-Peter Clausen
46a35b0d4d ASoC: cs42l56: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:42:03 +01:00
Lars-Peter Clausen
43a0350f21 ASoC: cs42l52: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:41:52 +01:00
Liam Girdwood
02aa78abec ASoC: DAPM: Add APIs to create individual DAPM controls.
The topology core needs to be able to create individual widget controls at
runtime and driver init. Add a regular locked and unlocked API calls to
facilitate this requirement.

The unlocked call is used by the topology core during component driver
probing where the card dapm_mutex is held by the ASoC core and the locked
version at non component driver probe time.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-29 11:24:33 +01:00
Richard Fitzgerald
10337b070d ASoC: wm_adsp: Dump scratch registers on DSP shutdown
The SCRATCH registers are used by firmwares to hold diagnostic
information. Log this during shutdown to assist analysis and debug
of firmwares.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-29 10:37:34 +01:00
Takashi Iwai
984a854705 Merge branch 'for-linus' into for-next
Merge back the latest HD-audio stuff for further development.
2015-05-29 10:27:50 +02:00
Liam Girdwood
01f202c7b4 ASoC: Intel: fix broadwell module removing failed issue
In haswell-pcm module unloading, we can't free runtime modules
directly, for they may be already freed in runtime suspend.

Here add executing suspend call to unload runtime modules, only
for status not equal to RPM_SUSPEND, to fix broadwell module
removing failed issue.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-28 20:27:00 +01:00
Jie Yang
506c148ee5 ASoC: Intel: remove unused function hsw_pcm_free_modules()
Remove the unused function hsw_pcm_free_modules() to fix the
compling warning:

sound/soc/intel/haswell/sst-haswell-pcm.c:923:13:
 warning: 'sw_pcm_free_modules' defined but not used
 [-Wunused-function]
 static void hsw_pcm_free_modules(struct hsw_priv_data *pdata)

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-28 16:05:05 +01:00
Richard Fitzgerald
15575ed544 ASoC: arizona: Fix noise generator gain TLV
The Arizona codec drivers had an incorrect dB scaling for the
noise generator gain that started at 0dB and went upwards.
Actually the highest setting is 0dB.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-05-28 15:02:16 +01:00
Axel Lin
0b51601d45 ASoC: max98925: Fix mask for setting DAI invert mode
The M98925_DAI_WCI_MASK bit is not updated with current code.
To properly set the DAI invert mode, the mask should be
M98925_DAI_BCI_MASK | M98925_DAI_WCI_MASK.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-05-26 18:32:53 +01:00
Takashi Iwai
d6b6c2ca6a ASoC: Simplify format_register_str() without stack usages
Instead of allocating two string buffers on stack and copying them
back, manipulate directly the target string buffer.  This simplifies
the code well.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-26 16:21:57 +01:00
Alexandre Belloni
0ef9dc139d ASoC: atmel: compile pcm driver in snd-soc-atmel_ssc_dai
It is currently possible to have CONFIG_SND_ATMEL_SOC_SSC=y with either
CONFIG_SND_ATMEL_SOC_PDC=m or CONFIG_SND_ATMEL_SOC_DMA=m. This results in a
driver that compiles but does not link with this kind of error:

sound/built-in.o: In function `atmel_ssc_set_audio':
(.text+0x87d90): undefined reference to `atmel_pcm_pdc_platform_register'
sound/built-in.o: In function `atmel_ssc_put_audio':
(.text+0x8879a): undefined reference to `atmel_pcm_pdc_platform_unregister'

Solve that by compiling the selected PCM driver (PDC, DMA or both) in the
Atmel SSC DAI driver.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-26 11:33:31 +01:00
Alexandre Belloni
fb67cdfbe5 ASoC: atmel: simplify Kconfig
Enclose the options in if SND_ATMEL_SOC ... endif to remove the dependency.
Also remove the useless description for SND_ATMEL_SOC_SSC.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-26 11:33:22 +01:00
Srinivas Kandagatla
dc1ebd1811 ASoC: qcom: Add apq8016 lpass driver support
This patch adds apq8016 lpass driver support. APQ8016 has 4 MI2S which
can be routed to one internal codec and 2 external codec interfaces.

Primary, Secondary, Quaternary I2S can do Rx(playback) and Tertiary and
Quaternary can do Tx(capture).

Tested-by: Kenneth Westfield <kwestfie@codeaurora.org>
Acked-by: Kenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-25 15:04:32 +01:00
Dylan Reid
e616d2eba6 ASoC: jack - add_gpiods accepts filled descriptors
Allow for the desc field to be pre-filled when adding gpios to a jack.
This allows drivers to get the gpios and decide if they should be added
to the list or not.  Specifically this will allow the gpio jack driver
to add gpios based on device property specifications.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-25 13:11:45 +01:00
Maciej S. Szmigiero
e712bfca1a ASoC: codecs: use SNDRV_PCM_FMTBIT_* for format bitmask
snd_soc_pcm_stream.formats is a bitmask of SNDRV_PCM_FMTBIT_*,
not of SNDRV_PCM_FORMAT_* (which are sequential integers),
however some of ASoC CODEC drivers use these values instead.

Found out by sparse on 0-day kernel tester.

Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-25 13:00:32 +01:00
Nicolin Chen
f490f32617 ASoC: fsl_spdif: Don't try to round-up for clock divisor calculation
As commit 6c8ca30eec ("ASoC: fsl_ssi: Don't try to round-up for PM
divisor calculation") mentioned that there's no more need to use a
round up work around to get a better divisor since the clk-divider
driver has been refined a lot.

So this patch applies the same modification to fsl_spdif driver.

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-25 12:58:01 +01:00
Subhransu S. Prusty
d0e72cc0ac ASoC: Intel: Initialize max mailbox size for haswell
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-22 19:24:35 +01:00
Subhransu S. Prusty
f99b26f0b4 ASoC: Intel: Initialize max mailbox size for baytrail
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-22 19:24:32 +01:00
Subhransu S. Prusty
1925e21961 ASoC: Intel: Allow to configure max size for mailbox data
Mailbox size can be different for different platforms. So allow the drivers
to configure the size.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-22 19:24:29 +01:00
Subhransu S. Prusty
a63faa58bd ASoC: Intel: Remove the direct register reference from common ipc
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-22 19:24:26 +01:00
Subhransu S. Prusty
40fea92107 ASoC: Intel: Move the busy check to ops for HSW
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-22 19:24:23 +01:00
Subhransu S. Prusty
2709bdbc4d ASoC: Intel: Move the busy check to ops for Baytrail
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-22 19:24:20 +01:00
Subhransu S. Prusty
6022d330a5 ASoC: Intel: Create an ops to check for DSP busy
Created an ops to check if DSP busy, to avoid using platform
specific registers in common IPC.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-22 19:24:10 +01:00
Kuninori Morimoto
02299d9875 ASoC: rsnd: spin lock for interrupt handler
Renesas R-Car driver interrupt handler was not locked before.
But now, SSI/SRC interrupt handler calls restart function
which should be called under spin lock.
Below error might happen witout this patch.

Unable to handle kernel NULL pointer dereference at virtual address 00000048
pgd = edfac000
[00000048] *pgd=6e0f0831, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#1] SMP ARM
CPU: 0 PID: 2009 Comm: aplay Not tainted 4.1.0-rc2-dirty #4
Hardware name: Generic R8A7790 (Flattened Device Tree)
task: eeac9040 ti: eebe8000 task.ti: eebe8000
PC is at rsnd_get_adinr+0x28/0x60
LR is at rsnd_src_ssiu_start+0xdc/0x19c
pc : [<c0409790>]    lr : [<c040c068>]    psr: a0000193
sp : eebe9e58  ip : eebe9e68  fp : eebe9e64
r10: c06ed9d0  r9 : ee919d10  r8 : 00000001
r7 : 00000001  r6 : ee1cb090  r5 : 00000000  r4 : edcaa418
r3 : 00000000  r2 : eea8ce00  r1 : 80000193  r0 : edcaa418
...

Reported-by: Cao Minh Hiep <cm-hiep@jinso.co.jp>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Tested by: Cao Minh Hiep <cm-hiep@jinso.co.jp>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-22 14:15:26 +01:00
Kuninori Morimoto
b723550d7e ASoC: rsnd: rsrc-card uses FE/BE merged format when DPCM
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-22 14:13:09 +01:00
Mark Brown
96a5d3f017 Merge branch 'topic/dpcm' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rcar 2015-05-22 14:12:56 +01:00
Maciej S. Szmigiero
a60abdf93b ASoC: ac97: make selectable in config
Make generic ASoC AC'97 CODEC selectable in config.

This way this driver can be used for platforms which don't need
specialized AC'97 CODEC drivers but which are not directly
selectable in config themselves (for example DT based ones).

Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-22 13:41:25 +01:00
Kuninori Morimoto
b073ed4e21 ASoC: soc-pcm: DPCM cares BE format
Current DPCM is caring only FE format. but it will be no sound
if FE/BE was below style, and user selects S24_LE format.

        FE: S16_LE/S24_LE
        BE: S16_LE

DPCM can rewrite the format, so basically we don't want to
constrain with the BE constraints. But sometimes it will be trouble.
This patch adds new .dpcm_merged_format on struct snd_soc_dai_link.
DPCM will use FE / BE merged format if .struct snd_soc_dai_link
has it. We can have other .dpcm_merged_xxx in the future

    .dpcm_merged_foramt
    .dpcm_merged_rate
    .dpcm_merged_chan

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-22 13:38:40 +01:00
Srinivas Kandagatla
89cdfa06d9 ASoC: qcom: add bit map to track static dma channel allocations
This patch adds dma channel bit mask to lpass data to keep track of dma
channel allocations. This flag would be used in apq8016 lpass driver.

Tested-by: Kenneth Westfield <kwestfie@codeaurora.org>
Acked-by: Kenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-22 13:27:07 +01:00
Srinivas Kandagatla
4f629e4b87 ASoC: qcom: Add ability to handle interrupts per dma channel
This patch adds ablity to lpass driver to handle interrupt per dma
channel. Without this patch its not possible to use multipl ports on the
lpass.

Tested-by: Kenneth Westfield <kwestfie@codeaurora.org>
Acked-by: Kenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-22 13:27:06 +01:00
Srinivas Kandagatla
0054055c59 ASoC: qcom: add dma channel control offset to variant data
This patch adds ability to pass dma channel control bits start offset,
which differ in differnet qcom SOCs. On apq8016 dma channel control bits
start after an offset of 1.

Tested-by: Kenneth Westfield <kwestfie@codeaurora.org>
Acked-by: Kenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-22 13:27:06 +01:00
Srinivas Kandagatla
3e53ac8230 ASoC: qcom: make osr clock optional
Some LPASS integrations like on APQ8016 do not have OSR clk, so making
osr clk optional would allow such integrations to use lpass driver.

Tested-by: Kenneth Westfield <kwestfie@codeaurora.org>
Acked-by: Kenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-22 13:27:06 +01:00
Srinivas Kandagatla
9a127cff91 ASoC: qcom: support bitclk and osrclk per i2s port
This patch adds support to allow bitclk and osrclk per i2s dai port.
on APQ8016 there are 4 i2s ports each one has its own bit clks.

Without this patch its not possible to support multiple i2s ports in the
lpass driver.

Tested-by: Kenneth Westfield <kwestfie@codeaurora.org>
Acked-by: Kenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-22 13:27:06 +01:00
kbuild test robot
7cc24b169f ASoC: qcom: ipq806x_lpass_alloc_dma_channel() can be static
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-22 12:14:32 +01:00
Srinivas Kandagatla
9e4980896c ASoC: skip legacy dai naming if dai driver has all the information
Original issue is that the id field in the dai is not same as the id
in dai_driver when dai driver count == 1. This is due to the legacy
dai naming check, which could possibly cause issues if the audio drivers
written in assumption that dai->id would be always equal to dai_driver->id.
This assumption is true only if the dai driver count is greater than 1,
and false if dai driver count is 1. On Qcom Lpass driver we hit such
issue while adding support to apq8016.

The code path which falls back to legacy naming for cases where num_dai
== 1 does not check if there is any valid information in the dai_driver.
This patch fixes that by checking if the dai_driver has valid id and
name before falling back to legacy dai naming
Although the drivers can work around this issue by only using
dai->driver->id, but this patch attempts to fix the actual issue.

Suggested-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Kenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-21 22:22:30 +01:00
Srinivas Kandagatla
6db1c6ba95 ASoC: qcom: remove hardcoded dma channel
This patch removes hardcoded dma channel value in lpass driver, Now the
dma channel allocation happens in the SOC specific layer. This will
allow different LPASS integrations to use the lpass driver in more
generic way.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Kenneth Westfield <kwestfie@codeaurora.org>
Acked-by: Kenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-21 21:12:39 +01:00
Srinivas Kandagatla
0ae9fd3b2c ASoC: qcom: remove hardcoded i2s port number
This patch attempts to remove the hardcoded i2s port number in lpass
driver. Now the the port number comes from the dai id field.

This will allow other SOCs to use different port numbers on the lpass
driver.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Kenneth Westfield <kwestfie@codeaurora.org>
Acked-by: Kenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-21 21:12:34 +01:00
Srinivas Kandagatla
9bae4880ac ASoC: qcom: move ipq806x specific bits out of lpass driver.
This patch tries to make the lpass driver more generic by moving the
ipq806x specific bits out of the cpu and platform driver, also allows the
SOC specific drivers to add the correct register offsets.

This patch also renames the register definition header file into more
generic header file.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Kenneth Westfield <kwestfie@codeaurora.org>
Acked-by: Kenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-21 21:12:30 +01:00
Rajan Vaja
72f0095e79 ASoC: mop500_ab8500: Add a NULL pointer check in mop500_ab8500_machine_init()
Avoid possible crash (NULL pointer dereference) by making
sure that dem_kzalloc() is successful.

Signed-off-by: Rajan Vaja <rajan.vaja@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-21 12:05:48 +01:00
Arnd Bergmann
a7310c496f ASoC: qcom: remove incorrect dependencies
Compile-tests show a warning for the newly added SND_SOC_STORM
symbol:

warning: (SND_SOC_STORM) selects SND_SOC_LPASS_CPU which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && SND_SOC_QCOM)

The problem is that it can be selected for COMPILE_TEST on non-QCOM
builds, but the symbols it selects have a dependency.
Dropping the dependencies makes it work without warnings and no
other side-effects, because these are not user-visible.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: f380dd3f3c ("ASoC: qcom: Add ability to build QCOM drivers")
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-21 11:59:53 +01:00
Kuninori Morimoto
5626ad0866 ASoC: rsnd: add rsnd_dai_stream_quit()
Current Renesas R-Car sound driver calls rsnd_dai_stream_init() when
start, but it didn't call paired function. This patch adds
rsnd_dai_stream_quit() for it. This is prepare for interrupt error
status check feature support.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Tested by: Cao Minh Hiep <cm-hiep@jinso.co.jp>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-21 11:58:48 +01:00
Kuninori Morimoto
b847357979 ASoC: rsnd: indicate unknown HW start
rsnd_ssi_hw_stop() should be called after rsnd_ssi_hw_start().
This patch indicates unknown hw_stop as error

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Tested by: Cao Minh Hiep <cm-hiep@jinso.co.jp>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-21 11:46:00 +01:00
Uwe Kleine-König
0a8ba6eeb6 ASoC: rx51: use flags argument of devm_gpiod_get to set direction
Since 39b2bbe3d7 (gpio: add flags argument to gpiod_get*() functions)
which appeared in v3.17-rc1, the gpiod_get* functions take an additional
parameter that allows to specify direction and initial value for output.

Use this to simplify the driver. Furthermore this is one caller less
that stops us making the flags argument to gpiod_get*() mandatory.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-20 19:08:05 +01:00
Uwe Kleine-König
5edf1e0692 ASoC: max98357a: use flags argument of devm_gpiod_get to set direction
Since 39b2bbe3d7 (gpio: add flags argument to gpiod_get*() functions)
which appeared in v3.17-rc1, the gpiod_get* functions take an additional
parameter that allows to specify direction and initial value for output.

Use this to simplify the driver. Furthermore this is one caller less
that stops us making the flags argument to gpiod_get*() mandatory.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Kenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-20 19:07:51 +01:00
Uwe Kleine-König
1137e58069 ASoC: sta32x: use devm_gpiod_get_optional for optional reset gpio
Since 39b2bbe3d7 (gpio: add flags argument to gpiod_get*() functions)
which appeared in v3.17-rc1, the gpiod_get* functions take an additional
parameter that allows to specify direction and initial value for output.

Also there is a variant to find optional gpios that returns NULL if
there is no gpio instead of -ENOENT.

Make use of both features to simplify the driver.

This changes behaviour if gpiod_get returns -ENOSYS which is the case if
CONFIG_GPIOLIB is not enabled. This is a good change because without
GPIOLIB there is no way to determine if the reset gpio is specified in
the device tree. And if it is it must be handled, so erroring out is the
right thing to do.

Furthermore this is one caller less that stops us making the flags
argument to gpiod_get*() mandatory.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-20 19:07:42 +01:00
Arnd Bergmann
0574eab363 ASoC: omap: fix up SND_OMAP_SOC_OMAP_ABE_TWL6040 dependency, again
I tried to fix this before and submitted a working patch, but after
some discussion we came up with what seemed to be a nicer solution,
resulting in commit 3d4cf65e2d ("ASoC: omap: fix up
SND_OMAP_SOC_OMAP_ABE_TWL6040 dependency"). Unfortunately, that
version was incomplete, and we still get this build error:

drivers/clk/clk-palmas.c:46:16: error: field 'hw' has incomplete type
drivers/clk/clk-palmas.c: In function 'to_palmas_clks_info':
drivers/clk/clk-palmas.c:54:74: warning: initialization from incompatible pointer type [-Winc

This happens only in randconfig builds that turn on MFD_PALMAS
on a platform other than OMAP2+ when COMPILE_TEST is set
but COMMON_CLK is not.

The new approach is only 'select COMMON_CLK_PALMAS' if we know
that we are on an OMAP5 platform and MFD_PALMAS is already set.
This patch has survived thousands of randconfig builds and I
don't see a remaining hole in the logic.

Fixes: 3d4cf65e2d ("ASoC: omap: fix up SND_OMAP_SOC_OMAP_ABE_TWL6040 dependency")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-20 19:06:30 +01:00
Lars-Peter Clausen
6b43c2eb9a ASoC: rt5677: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-20 11:18:32 +01:00
Lars-Peter Clausen
6d8135ff00 ASoC: rt5670: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-20 11:18:32 +01:00
Lars-Peter Clausen
eb13bd563a ASoC: rt5651: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-20 11:18:32 +01:00
Lars-Peter Clausen
76aad74bdd ASoC: rt5640: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-20 11:18:32 +01:00
Lars-Peter Clausen
61aad0b91c ASoC: rt5631: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and
snd_soc_codec_init_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-20 11:18:32 +01:00
Lars-Peter Clausen
b1cd8457da ASoC: rt286: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-20 11:18:32 +01:00
Lars-Peter Clausen
ff344dcd80 ASoC: alc5623: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-20 11:18:32 +01:00
Dan Carpenter
2d52d17239 ASoC: wm8741: check for error returns from wm8741_set_pdata()
Static checkers complain that "ret" is always zero so the conditions are
never true.

The intention here was clearly to check for errors from
wm8741_set_pdata().  Although, since wm8741_set_pdata() never returns
errors, it doesn't affect runtime.

Fixes: c354b54cfd ('ASoC: wm8741: Add differential mono mode support')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-20 10:55:10 +01:00
Nicolas Boichat
692768c4b2 ASoC: rt5645: Rename HP control to Headphone
Use the standard name "Headphone" instead of "HP" for better
userspace integration.

Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Acked-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-19 13:11:49 +01:00
John Lin
345b0f50e7 ASoC: rt5645: fix kernel hang when call rt5645_set_jack_detect()
rt5645_set_jack_detect() is usually called from
snd_soc_dai_link.init() and it calls snd_soc_jack_report() from
rt5645_irq_detection() if jack is inserted. snd_soc_jack_report()
results in kernel hang if it is called from a context which cannot
sleep.
This patch makes sure snd_soc_jack_report() is called from
workqueue. It can fix the kernel hang issue.

Signed-off-by: John Lin <john.lin@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-19 13:10:26 +01:00
Lars-Peter Clausen
3054716d4f ASoC: max9850: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-18 04:46:56 +01:00
Lars-Peter Clausen
1179a36850 ASoC: max98095: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-18 04:46:56 +01:00
Lars-Peter Clausen
29ca43bc54 ASoC: max98090: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and all other
manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-18 04:46:56 +01:00
Lars-Peter Clausen
b0b80c8075 ASoC: max98090: Remove unnecessary snd_soc_dapm_sync()
max98090_jack_work() doesn't modify the DAPM graph other than what's done
in snd_soc_jack_report(). snd_soc_jack_report() already calls
snd_soc_dapm_sync() internally, so there is no need to call it manually
and can be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-18 04:46:55 +01:00
Lars-Peter Clausen
0fbcbef98d ASoC: max98088: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-18 04:46:55 +01:00
Lars-Peter Clausen
ed3347e83c ASoC: da9055: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-18 04:46:55 +01:00
Lars-Peter Clausen
a3ea8a66f6 ASoC: da732x: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-18 04:46:55 +01:00
Lars-Peter Clausen
9c414c6246 ASoC: da7213: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-18 04:46:55 +01:00
Lars-Peter Clausen
95fcb384e6 ASoC: sta529: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-18 04:46:55 +01:00
Lars-Peter Clausen
ea85b45b11 ASoC: sta350: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-18 04:46:55 +01:00
Lars-Peter Clausen
cc740ec84d ASoC: sta32x: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-18 04:46:54 +01:00
Axel Lin
12c3500505 ASoC: wm8955: Fix setting wrong register for WM8955_K_8_0_MASK bits
WM8955_K_8_0_MASK bits is controlled by WM8955_PLL_CONTROL_3 rather than
WM8955_PLL_CONTROL_2.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-05-16 13:32:04 +01:00
Anatol Pomozov
b3b10e99b7 ASoC: rt5677: Add reset-gpio dts option
It allows to configure codec's RESET pin gpio

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-16 13:13:04 +01:00
Lars-Peter Clausen
b8faaba4a6 ASoC: Drop unnecessary bias level check on resume
The suspended flag will only be set if the CODEC bias level was either
STANDBY or OFF. This means we don't need to check for that on resume since
the condition will always be true.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-15 16:49:39 +01:00
Lars-Peter Clausen
d9dd37305e ASoC: twl6040: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-15 16:48:57 +01:00
Lars-Peter Clausen
1682c8e570 ASoC: twl4030: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-15 16:48:57 +01:00
Lars-Peter Clausen
37e931c179 ASoC: tlv320dac33: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-15 16:48:57 +01:00
Lars-Peter Clausen
650a18acac ASoC: tlv320aic3x: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-15 16:48:56 +01:00
Lars-Peter Clausen
378d1e432d ASoC: tlv320aix31xx: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-15 16:48:56 +01:00
Lars-Peter Clausen
b6070c11cd ASoC: pcm512x: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-15 16:48:56 +01:00
Lars-Peter Clausen
edc20cadcc ASoC: lm49453: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-15 16:48:56 +01:00
Lars-Peter Clausen
22310d320e ASoC: sn95031: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

While we are at it also replace the if(x == A) ... else if(x == B) ...
construct with a switch-case.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-15 16:48:56 +01:00
Sergej Sawazki
c354b54cfd ASoC: wm8741: Add differential mono mode support
The WM8741 DAC supports several differential output modes (stereo,
stereo reversed, mono left, mono right). Add platform data and DT
bindings to configure it.

Signed-off-by: Sergej Sawazki <ce3a@gmx.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-13 15:51:36 +01:00
Axel Lin
ebb6ad73e6 ASoC: wm8903: Fix define for WM8903_VMID_RES_250K
VMID Control 0 BIT[2:1] is VMID Divider Enable and Select

00 = VMID disabled (for OFF mode)
01 = 2 x 50kΩ divider (for normal operation)
10 = 2 x 250kΩ divider (for low power standby)
11 = 2 x 5kΩ divider (for fast start-up)

So WM8903_VMID_RES_250K should be 2 << 1, which is 4.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-05-13 12:49:39 +01:00
Axel Lin
14ba3ec1de ASoC: wm8737: Fixup setting VMID Impedance control register
According to the datasheet:
R10 (0Ah) VMID Impedance Control

BIT 3:2 VMIDSEL DEFAULT 00

DESCRIPTION: VMID impedance selection control
00: 75kΩ output
01: 300kΩ output
10: 2.5kΩ output

WM8737_VMIDSEL_MASK is 0xC (VMIDSEL - [3:2]),
so it needs to left shift WM8737_VMIDSEL_SHIFT bits for setting these bits.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-05-13 12:49:06 +01:00
Mark Brown
7730c0b550 Merge remote-tracking branches 'asoc/fix/davinci', 'asoc/fix/mc13783', 'asoc/fix/uda1380', 'asoc/fix/wm8960' and 'asoc/fix/wm8994' into asoc-linus 2015-05-12 20:31:33 +01:00
Mark Brown
12a0423149 Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus 2015-05-12 20:31:32 +01:00
Zidan Wang
7a8c78675f ASoC: wm8960: add 32 bit word length support
According to referance manual, right justify mode can't
support 32 bit word length.

Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-12 20:05:30 +01:00
Zidan Wang
0e50b51aa2 ASoC: wm8960: Let wm8960 driver configure its bit clock and frame clock
wm8960 codec driver missing configure its bit clock and frame clock for codec
master mode, so add support for it. It will calculate a appropriate frequency
dividing ratio according to the system clock, bit clock and frame clock, then
set the corresponding registers.

Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-12 20:05:27 +01:00
Zidan Wang
17fc2e0a3d ASoC: wm8994: correct BCLK DIV 348 to 384
According to the RM of wm8958, BCLK DIV 348 doesn't exist, correct it
to 384.

Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-05-12 20:05:07 +01:00
Zidan Wang
85e36a1f4a ASoC: wm8960: fix "RINPUT3" audio route error
It should be "RINPUT3" instead of "LINPUT3" route to "Right Input
Mixer".

Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-05-12 19:52:20 +01:00
John Lin
05a9b46a71 ASoC: rt5645: fix jack type detect error
rt5645_jack_detect doesn't report the correct jack type consistently.
It mistakes OMTP type headset to CTIA type in particular HW design.
Register changes are needed for this issue. This patch can make it
more stable.

Signed-off-by: John Lin <john.lin@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-12 19:50:40 +01:00
John Lin
b7f22478c0 ASoC: rt5645: fix IRQ error in jack detection
IRQ of jack and button detection is abnormal if "LDO2" and
"Mic Det Power" power disable in rt5645_jack_detect.
This patch make these two power keep enabled until jack out.

Signed-off-by: John Lin <john.lin@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-12 19:50:40 +01:00
John Lin
47ba5bb295 ASoC: rt5645: remove unnecessary power in JD function
The power of "micbias1" and "micbias2" are unnecessary for jack detection.
So, we remove it in rt5645_set_jack_detect function.

Signed-off-by: John Lin <john.lin@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-12 19:50:40 +01:00
John Lin
d12d6c4ef2 ASoC: rt5645: improve headphone depop function
We add a calibration function and call it at the beginning of i2c_probe.
The calibration value will be kept until codec is shutdown. We will reset
the codec after the calibration is finished. So, we set cache_bypass in
the calibration function. The benefit is we can shorter the delay time
in headphone depop.

We also change the register setting in the depop sequence which will
reduce the pop noise in headphone playback.

Signed-off-by: John Lin <john.lin@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-12 19:50:39 +01:00
Fabio Estevam
16f0acd0ca ASoC: max98095: Pass the IRQF_ONESHOT flag
Since commit 1c6c69525b ("genirq: Reject
bogus threaded irq requests") threaded IRQs without a primary handler
need to be requested with IRQF_ONESHOT, otherwise the request will fail.

So pass the IRQF_ONESHOT flag in this case.

The semantic patch that makes this change is available
in scripts/coccinelle/misc/irqf_oneshot.cocci.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-12 19:48:24 +01:00
Fabio Estevam
208ba89b40 ASoC: twl6040: Pass the IRQF_ONESHOT flag
Since commit 1c6c69525b ("genirq: Reject
bogus threaded irq requests") threaded IRQs without a primary handler
need to be requested with IRQF_ONESHOT, otherwise the request will fail.

So pass the IRQF_ONESHOT flag in this case.

The semantic patch that makes this change is available
in scripts/coccinelle/misc/irqf_oneshot.cocci.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-12 19:47:47 +01:00
Fabio Estevam
d78395ce78 ASoC: wm8994: Pass the IRQF_ONESHOT flag
Since commit 1c6c69525b ("genirq: Reject
bogus threaded irq requests") threaded IRQs without a primary handler
need to be requested with IRQF_ONESHOT, otherwise the request will fail.

So pass the IRQF_ONESHOT flag in this case.

The semantic patch that makes this change is available
in scripts/coccinelle/misc/irqf_oneshot.cocci.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-12 19:47:34 +01:00
Fabio Estevam
3d907cc30d ASoC: wm5100: Pass the IRQF_ONESHOT flag
Since commit 1c6c69525b ("genirq: Reject
bogus threaded irq requests") threaded IRQs without a primary handler
need to be requested with IRQF_ONESHOT, otherwise the request will fail.

So pass the IRQF_ONESHOT flag in this case.

The semantic patch that makes this change is available
in scripts/coccinelle/misc/irqf_oneshot.cocci.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-12 19:46:25 +01:00
Fabio Estevam
ed043aebe6 ASoC: wm8996: Pass the IRQF_ONESHOT flag
Since commit 1c6c69525b ("genirq: Reject
bogus threaded irq requests") threaded IRQs without a primary handler
need to be requested with IRQF_ONESHOT, otherwise the request will fail.

So pass the IRQF_ONESHOT flag in this case.

The semantic patch that makes this change is available
in scripts/coccinelle/misc/irqf_oneshot.cocci.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-12 19:45:38 +01:00
Zidan Wang
c5f4823bab ASoC: fsl_sai: add 12kHz, 24kHz, 176.4kHz and 192kHz sample rate support
Normally we don't support 12kHz, 24kHz in audio driver, alsa didn't
have formal definition of 12kHz, 24kHz, but alsa supply a way to
support these sample rates. And add 176.4kHz and 192kHz support.

Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-12 19:44:45 +01:00
Zidan Wang
c3ecef21c3 ASoC: fsl_sai: add sai master mode support
When sai works on master mode, set its bit clock and frame clock.

SAI has 4 MCLK source, bus clock, MCLK1, MCLK2 and MCLK3. fsl_sai_set_bclk
will select proper MCLK source, then calculate and set the bit clock divider.

After fsl_sai_set_bclk, enable the selected mclk in hw_params(), and add
hw_free() to disable the mclk.

Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-12 19:43:51 +01:00
Marek Belisko
c778b4726a ASoC: bt-sco: Add devicetree support for bt-sco codec
Add devicetree support for bluetooth SCO link codec.

Signed-off-by: Marek Belisko <marek@goldelico.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-12 19:43:41 +01:00
Koro Chen
fdb6eb0a12 ASoC: dapm: Modify widget stream name according to prefix
When there is prefix specified, currently we will add this prefix in
widget->name, but not in widget->sname.
it causes failure at snd_soc_dapm_link_dai_widgets:

if (!w->sname || !strstr(w->sname, dai_w->name))

because dai_w->name has prefix added, but w->sname does not.
We should also add prefix for stream name

Signed-off-by: Koro Chen <koro.chen@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-05-12 19:01:56 +01:00
Maciej S. Szmigiero
df82ca70bf ASoC: ac97: Remove rate constraints
Remove rate constraints from generic ASoC AC'97 CODEC.

Supported rates should be detected and constrained anyway by
AC'97 generic code - was tested with VT1613 CODEC and iMX6 SSI
controller.

This way this driver can be used for platforms which don't need
specialized AC'97 CODEC drivers while at the same avoiding
code duplication from implementing equivalent functionality in
a controller driver.

Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-12 18:58:17 +01:00
Axel Lin
c9eac46254 ASoC: sta350: Use devm_gpiod_get_optional at appropriate place
devm_gpiod_get_optional is equivalent to devm_gpiod_get(), except that
when no GPIO was assigned to the requested function it will return NULL.
This is convenient for drivers that need to handle optional GPIOs.

I just checked the code in commit 34d7c3905a
("ASoC: improve usage of gpiod API") and found that it should use
devm_gpiod_get_optional rather than devm_gpiod_get here.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-12 18:52:42 +01:00
Axel Lin
79ffbf11b7 ASoC: sta32x: Use devm_gpiod_get_optional at appropriate place
devm_gpiod_get_optional() is equivalent to devm_gpiod_get(), except that
when no GPIO was assigned to the requested function it will return NULL.
This is convenient for drivers that need to handle optional GPIOs.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-12 18:52:12 +01:00
Kuninori Morimoto
ae11a9be5a ASoC: rsnd: revert lock for calls to rsnd_dai_call
This reverts commit 'e9c390df671f ("ASoC: rsnd: make sure it uses lock when
it calls rsnd_dai_call)' The additional locks make 1") lock issue when boot
2) lock issue when unbind/rmmod. And there is no problem without these
locks. This patch revert it.

Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-12 11:44:07 +01:00
Charles Keepax
45a110a137 ASoC: dapm: Add cache to speed up adding of routes
Some CODECs have a significant number of DAPM routes and for each route,
when it is added to the card, the entire card widget list must be
searched. When adding routes it is very likely, however, that adjacent
routes will require adjacent widgets. For example all the routes for a
mux are likely added in a block and the sink widget will be the same
each time and it is also quite likely that the source widgets are
sequential located in the widget list.

This patch adds a cache to the DAPM context, this cache will hold the
source and sink widgets from the last call to snd_soc_dapm_add_route for
that context. A small search of the widget list will be made from those
points for both the sink and source. Currently this search only checks
both the last widget and the one adjacent to it.

On wm8280 which has approximately 500 widgets and 30000 routes (one of
the largest CODECs in mainline), the number of paths that hit the cache
is 24000, which significantly improves probe time.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-12 11:41:46 +01:00
Lars-Peter Clausen
ca60bc41fb ASoC: sirf-audio-codec: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-11 17:33:32 +01:00
Lars-Peter Clausen
8533eb24a9 ASoC: sgtl5000: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-11 17:33:32 +01:00
Lars-Peter Clausen
9f0617187a ASoC: uda1380: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Also drop the unnecessary check at the beginning of the
uda1380_set_bias_level() which compares the current level to the target
level and aborts if they are the same. Since the core will not call the
set_bias_level() callback if we already are in the target state the result
of the check is always false.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-11 17:33:32 +01:00
Lars-Peter Clausen
81024b1117 ASoC: uda134x: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-11 17:33:31 +01:00
Lars-Peter Clausen
41b7688137 ASoC: ml26124: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-11 17:33:31 +01:00
Lars-Peter Clausen
40d62f23b1 ASoC: jz4740: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-11 17:33:31 +01:00
Lars-Peter Clausen
2aff57e333 ASoC: es8328: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-11 17:33:31 +01:00
Lars-Peter Clausen
3f36f3c725 ASoC: cx20442: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-11 17:33:31 +01:00
Lars-Peter Clausen
6d701b6ded ASoC: ak4641: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-11 17:33:31 +01:00
Lars-Peter Clausen
c59878a413 ASoC: ab8500: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-11 17:33:31 +01:00
Lars-Peter Clausen
5f54ea214b ASoC: 88pm860x: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-11 17:33:31 +01:00
Fabio Estevam
0f9a7fecf2 ASoC: fsl: imx-mc13783: Simplify trivial if-return sequence
Simplify a trivial if-return sequence.  Possibly combine with a
preceding function call.

The semantic patch that makes this change is available
in scripts/coccinelle/misc/simple_return.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Timur Tabi <timur@tabi.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-11 16:13:45 +01:00
Fabio Estevam
d0657fe8c6 ASoC: fsl: fsl_dma: Use true/false for boolean init
Bool initializations should use true and false.  Bool tests don't need
comparisons.  Based on contributions from Joe Perches, Rusty Russell
and Bruce W Allan.

The semantic patch that makes this change is available
in scripts/coccinelle/misc/boolinit.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Timur Tabi <timur@tabi.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-11 16:13:36 +01:00
Charles Keepax
70c751095d ASoC: dapm: Break out of widget search when source and sink are located
Currently snd_soc_dapm_add_route will continue to search the widget list
even after both the source and sink for the route have been located.
This patch breaks out of the search when both are located giving a
small improvement in probe time for drivers.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-11 15:12:42 +01:00
Oder Chiou
5220f7fb49 ASoC: rt5677: Add DMIC ASRC detect function
The patch adds DMIC ASRC detect function to dominate whether the DMIC ASRC
enable or not.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-08 17:59:18 +01:00