Commit graph

11274 commits

Author SHA1 Message Date
Mark Brown
11e688862c Merge remote-tracking branches 'asoc/topic/wm8994', 'asoc/topic/wm8996' and 'asoc/topic/zx' into asoc-next 2015-06-05 18:55:07 +01:00
Mark Brown
28bedc5946 Merge remote-tracking branches 'asoc/topic/topology', 'asoc/topic/twl6040', 'asoc/topic/wm5100', 'asoc/topic/wm8741' and 'asoc/topic/wm8960' into asoc-next 2015-06-05 18:55:05 +01:00
Mark Brown
b5a8342c1d Merge remote-tracking branches 'asoc/topic/sta350', 'asoc/topic/tas2552', 'asoc/topic/tas3a227e' and 'asoc/topic/tas571x' into asoc-next 2015-06-05 18:55:03 +01:00
Mark Brown
19726b0ed5 Merge remote-tracking branches 'asoc/topic/simple', 'asoc/topic/ssm2518', 'asoc/topic/ssm2602', 'asoc/topic/ssm4567' and 'asoc/topic/sta32x' into asoc-next 2015-06-05 18:55:01 +01:00
Mark Brown
cee77be0ad Merge remote-tracking branches 'asoc/topic/rt5677', 'asoc/topic/samsung' and 'asoc/topic/sgtl5000' into asoc-next 2015-06-05 18:54:59 +01:00
Mark Brown
a178831a63 Merge remote-tracking branches 'asoc/topic/max98095', 'asoc/topic/omap', 'asoc/topic/pxa', 'asoc/topic/qcom' and 'asoc/topic/rcar' into asoc-next 2015-06-05 18:54:57 +01:00
Mark Brown
f36795a60d Merge remote-tracking branches 'asoc/topic/gpiod-flags', 'asoc/topic/gtm601', 'asoc/topic/intel', 'asoc/topic/lm3857' and 'asoc/topic/max98090' into asoc-next 2015-06-05 18:54:55 +01:00
Mark Brown
eb2d8ec37f Merge remote-tracking branches 'asoc/topic/fsl', 'asoc/topic/fsl-sai', 'asoc/topic/fsl-spdif', 'asoc/topic/fsl-ssi' and 'asoc/topic/gpio-jack' into asoc-next 2015-06-05 18:54:53 +01:00
Mark Brown
698803f8b9 Merge remote-tracking branches 'asoc/topic/davinci' and 'asoc/topic/dpcm' into asoc-next 2015-06-05 18:54:52 +01:00
Mark Brown
6ba82f91df Merge remote-tracking branches 'asoc/topic/au1x', 'asoc/topic/bt-sco', 'asoc/topic/cs35l32' and 'asoc/topic/da7210' into asoc-next 2015-06-05 18:54:51 +01:00
Mark Brown
202f5ecb4f Merge remote-tracking branches 'asoc/topic/adau1977', 'asoc/topic/adav80x', 'asoc/topic/arizona' and 'asoc/topic/atmel' into asoc-next 2015-06-05 18:54:49 +01:00
Mark Brown
0451b02ef0 Merge remote-tracking branches 'asoc/topic/ac97', 'asoc/topic/ad1836', 'asoc/topic/ada1977', 'asoc/topic/adau1701' and 'asoc/topic/adau17x1' into asoc-next 2015-06-05 18:54:47 +01:00
Mark Brown
f3b368d3b9 Merge remote-tracking branch 'asoc/topic/rt5645' into asoc-next 2015-06-05 18:54:46 +01:00
Mark Brown
977732b060 Merge remote-tracking branch 'asoc/topic/dma' into asoc-next 2015-06-05 18:54:45 +01:00
Mark Brown
4b57895522 Merge remote-tracking branch 'asoc/topic/dapm' into asoc-next 2015-06-05 18:54:45 +01:00
Mark Brown
2914b7004b Merge remote-tracking branch 'asoc/topic/core' into asoc-next 2015-06-05 18:54:44 +01:00
Mark Brown
f1363c40c7 Merge remote-tracking branches 'asoc/fix/wm8737', 'asoc/fix/wm8903' and 'asoc/fix/wm8955' into asoc-linus 2015-06-05 18:54:43 +01:00
Mark Brown
db2ecdfde0 Merge remote-tracking branches 'asoc/fix/arizona', 'asoc/fix/fmtbit', 'asoc/fix/max98925', 'asoc/fix/rcar' and 'asoc/fix/ux500' into asoc-linus 2015-06-05 18:54:41 +01:00
Mark Brown
0357fe0bf5 Merge remote-tracking branch 'asoc/fix/rt5645' into asoc-linus 2015-06-05 18:54:41 +01:00
Peter Ujfalusi
a571cb17ac ASoC: tas2552: Configure the WCLK frequency based on the stream
Instead of hard wiring the WCLK frequency at probe time do it runtime.
The hard wired 88_96KHz was not even setting the correct bits since it was
defined as (1 << 6) which will  change the I2S_OUT_SEL bit and will leave
the amplifier configured for 8KHz.
At the same time clean up and fix the CFG3 register bits.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-05 18:53:36 +01:00
Peter Ujfalusi
d20b098dd9 ASoC: tas2552: Add support for word length configuration
Configure the word length based on the params_width of the stream.
Also configure the clock per frame value which is used when tas2552 is bus
master.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-05 18:53:36 +01:00
Peter Ujfalusi
7d78502502 ASoC: tas2552: Implement startup/stop sequence as per TRM
Certain sequence need to be followed in order to have smooth power up and
power down performance.
Execute this sequence via DAPM_POST widget.
Remove patching the RESERVED_0D register at probe time since it has to be
handled every time when we stop or start the amplifier.
In order to be able to execute the sequence at the correct time, the driver
need to request to ignore the pmdown time.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-05 18:53:36 +01:00
Peter Ujfalusi
dd6ae3bcfe ASoC: tas2552: Correct the Speaker Driver Playback Volume (PGA_GAIN)
The last parameter for DECLARE_TLV_DB_SCALE() is to tell if the gain will
be muted or not when it is set to raw 0. IN this case it is not muted.
The PGA_GAIN is in 0-4 bits in the register. Fix the offset in the
SOC_SINGLE_TLV() for this.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-05 18:53:35 +01:00
Peter Ujfalusi
609e71313b ASoC: tas2552: Clean up the Digital - Analog DAPM route definition
The strings should be: 'static const char * const tas2552_input_texts[]'
SOC_DAPM_ENUM should have "Route" in place of xname and no need to have it
as an array.
Also align the parameters.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-05 18:53:35 +01:00
Peter Ujfalusi
3f747a810e ASoC: tas2552: Add TDM support
TDM support is achieved using DSP transfer mode and setting a programmable
offset which specifies where data begins with respect to the frame sync.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-05 18:53:34 +01:00
Peter Ujfalusi
1b68c7dca2 ASoC: tas2552: Correct and clean up data format and BCLK/WCLK direction
Use names from the datasheet for the definitions.
Correct the data format definitions since they were not correct.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-05 18:53:34 +01:00
Peter Ujfalusi
4c331373b9 ASoC: tas2552: Correct dai format support
DSP_A mode require one bit delay from the FS, DSP_B is without data delay.
When checking the requested format, also match the bit and fs inversion
flag along with the format since it is not possible to change inversion.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-05 18:53:34 +01:00
Peter Ujfalusi
9d87a8888c ASoC: tas2552: Add support for pll and pdm source clock selection
Instead of hard wiring the PLL_CLKIN and PDM_CLK to be sourced from BCLK add
proper clock configuration via the set_dai_sysclk callback.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-05 18:53:33 +01:00
Nicolas Boichat
7ea3470a72 ASoC: rt5645: Init jack_detect_work before registering irq
Prevents frequent panic on boot, if the irq handler rt5645_irq
gets called before the workqueue rt5645_jack_detect_work is
initialized.

Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-06-05 18:15:12 +01: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
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