Commit Graph

11809 Commits

Author SHA1 Message Date
Axel Lin
80deaf09cb ASoC: cs4265: CS4265_INT_STATUS is readable register
CS4265_INT_STATUS was missed in cs4265_readable_register, fix it.
The register 0x01 ~ 0x12 are readable, use
CS4265_CHIP_ID ... CS4265_SPDIF_CTL2 syntax for better readability.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-24 18:31:03 +01:00
Axel Lin
bffc449688 ASoC: cs4265: Fix setting dai format for Left/Right Justified
The settings in current code does not match the datasheet, fix it.

DAC Control - Address 03h

DAC Digital Interface Format (Bits 5:4)
        DAC_DIF1 DAC_DIF0 Description
        0        0        Left Justified, up to 24-bit data (default)
        0        1        I²S, up to 24-bit data
        1        0        Right-Justified, 16-bit Data
        1        1        Right-Justified, 24-bit Data

Transmitter Control 2 - Address 12h

Transmitter Digital Interface Format (Bits 7:6)
        Tx_DIF1 Tx_DIF0 Description Format Figure
        0       0       Left Justified, up to 24-bit data (default)
        0       1       I²S, up to 24-bit data
        1       0       Right-Justified, 16-bit Data
        1       1       Right-Justified, 24-bit Data

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-24 18:30:46 +01:00
Mark Brown
996034b117 Merge remote-tracking branches 'asoc/fix/sgtl5000', 'asoc/fix/topology' and 'asoc/fix/zx' into asoc-linus 2015-07-24 16:18:22 +01:00
Mark Brown
c8a075ab1e Merge remote-tracking branches 'asoc/fix/fsl-ssi', 'asoc/fix/intel', 'asoc/fix/intel-kconfig' and 'asoc/fix/mediatek' into asoc-linus 2015-07-24 16:18:20 +01:00
Mark Brown
5c851ba4d5 Merge remote-tracking branch 'asoc/fix/ssm4567' into asoc-linus 2015-07-24 16:18:19 +01:00
Mark Brown
51126f6049 Merge remote-tracking branch 'asoc/fix/rt5645' into asoc-linus 2015-07-24 16:18:19 +01:00
Mark Brown
66874cc145 Merge remote-tracking branch 'asoc/fix/pcm1681' into asoc-linus 2015-07-24 16:18:18 +01:00
Mark Brown
61710a655f Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus 2015-07-24 16:18:18 +01:00
Mark Brown
0e375d625b Merge branch 'fix/ssm4567' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-ssm4567 2015-07-24 16:15:02 +01:00
Mark Brown
beb8962210 Merge branch 'topic/owner' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-ssm4567
Conflicts:
	sound/soc/codecs/ssm4567.c
2015-07-24 16:11:47 +01:00
Harsha Priya
eeffd4b442 ASoC: ssm4567: Added ACPI entry for SSM4567 codec
Added INT343B ACPI ID for the SSM4567 codec

Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Signed-off-by: M Naveen <naveen.m@intel.com>
Signed-off-by: M R Sathya Prakash <sathya.prakash.m.r@intel.com>
Acked-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-24 11:37:33 +01:00
Axel Lin
97a747117d ASoC: sta529: Remove redundant I2C_FUNC_SMBUS_BYTE_DATA functionality check
This checking is done by regmap_get_i2c_bus() which is called in
devm_regmap_init_i2c().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-24 11:35:28 +01:00
Axel Lin
48f403be3e ASoC: pcm1681: Improve the logic for de-emphasis sampling rate selection
Slightly improve the logic for de-emphasis sampling rate selection by break
out the loop if the rate is matched.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-24 11:35:13 +01:00
Axel Lin
fa8173a3ef ASoC: pcm1681: Fix setting de-emphasis sampling rate selection
The de-emphasis sampling rate selection is controlled by BIT[3:4] of
PCM1681_DEEMPH_CONTROL register. Do proper left shift to set it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Marek Belisko <marek.belisko@streamunlimited.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-07-24 11:34:58 +01:00
Vaishali Thakkar
36e914cc4b ASoC: xtensa: Remove unnecessary snd_pcm_lib_preallocate_free_for_all()
The ALSA core takes care that all preallocated memory is freed
when the PCM itself is freed. There is no need to do this
manually in the driver.

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 17:40:37 +01:00
Bard Liao
213213d9d6 ASoC: rl6231: add pll preset table
Currently, rl6231_pll_calc provide a working PLL parameters for
given freq_in and freq_out. However, in some cases it is not the
perfect parameter. For example if freq_in = 19200000 and freq_out
 = 24576000, the calculated parameter will gengrate 24.5647 MHz
which is not exactly the same as what we need. But the PLL can
output 24.576 MHz as exactly what we expect if we set the best
PLL parameter.
To improve it, we put the best match parameters in a preset table.
We can search the preset table first, if there is no preset parameter
for the given freq_in and freq_out, we can still calculate a working
PLL parameter.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 17:39:41 +01:00
Jeeja KP
d255b09555 ASoC: Intel: Skylake: Add dsp and ipc init helpers
This helper function will be used by the Skylake driver for dsp and
ipc initialization if processing pipe capability is supported.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 17:39:01 +01:00
Jeeja KP
473eb87adc ASoC: Intel: Skylake: Add NHLT support to get BE config
The Non-HD Audio Endpoint Description table contains the link
configuration information for the DSP. This is specific to Non HDA
links only, like I2s and PDM

Skylake driver will use NHLT table to retrieve the configuration based
on the link type, format, channel and rate. This configuration is
passed to DSP FW

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 17:39:00 +01:00
Lars-Peter Clausen
310398f5e4 ASoC: wm9713: Use core AC'97 reset helper
Use the new snd_ac97_reset() helper and the reset functionality provided by
snd_soc_new_ac97_codec() to perform the device reset rather than
open-coding it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 17:33:43 +01:00
Lars-Peter Clausen
a575be4cbb ASoC: wm9712: Use core AC'97 reset helper
Use the new snd_ac97_reset() helper and the reset functionality provided by
snd_soc_new_ac97_codec() to perform the device reset rather than
open-coding it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 17:33:40 +01:00
Lars-Peter Clausen
6e0b73a0a1 ASoC: wm9705: Use core AC'97 reset helper
Use the new snd_ac97_reset() helper and the reset functionality provided by
snd_soc_new_ac97_codec() to perform the device reset rather than
open-coding it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 17:33:37 +01:00
Lars-Peter Clausen
017e800af9 ASoC: stac9766: Use core reset helper
Use the new snd_ac97_reset() helper and the reset functionality provided by
snd_soc_new_ac97_codec() to perform the device reset rather than
open-coding it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 17:33:34 +01:00
Lars-Peter Clausen
3ab3dbdfb9 ASoC: ad1980: Use core AC'97 reset helper
Use the new snd_ac97_reset() helper function to perform the reset and
verify the device ID.

Unfortunately the reset can't be done in snd_soc_new_ac97_codec() due to
the special requirements in order to support the non-standard 16-bit slot
mode of the ad1980.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 17:33:31 +01:00
Lars-Peter Clausen
7361fbeaea ASoC: ac97: Add support for resetting device before registration
AC97 devices need to be initially reset before they can be used. Currently
each driver does this on its own.

Add support for resetting the device to core in snd_soc_new_ac97_codec().
If the caller supplies a device ID and device ID mask the function will
reset the device and verify that it has the correct ID, if it does not a
error is returned.

This will allow to remove custom code with similar functionality from
individual drivers.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 17:33:28 +01:00
Axel Lin
9425e9d8c7 ASoC: tas5086: Improve the logic for de-emphasis sampling rate selection
Slightly improve the logic for de-emphasis sampling rate selection by break
out the loop if the rate is matched.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 16:47:08 +01:00
Axel Lin
95f1044f56 ASoC: tas2552: Fix off-by-one for max_register setting
The latest valid register is TAS2552_VBAT_DATA.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Dan Murphy<dmurphy@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 16:46:31 +01:00
Axel Lin
f285f16103 ASoC: rt5677: Remove NULL test for desc before gpiod_set_value_cansleep call
It's safe to call gpiod_set_value_cansleep() with NULL desc.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 16:46:00 +01:00
Axel Lin
8626e5eb6c ASoC: cs42l73: Fix mask for setting CS42L73_SP_3ST bit
CS42L73_SP_3ST is BIT(7), so the mask field is wrong. Fix it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 16:04:04 +01:00
Axel Lin
d5a78c8ea0 ASoC: cs35l32: Remove unneeded NULL test for cs35l32->reset_gpio
It's safe to call gpiod_set_value_cansleep() with NULL desc.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 16:02:05 +01:00
Axel Lin
4c38b9c30f ASoC: cs35l32: Fix define for CS35L32_SDOUT_3ST
According to the datasheet, the CS35L32_SDOUT_3ST is BIT(3).

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 16:01:56 +01:00
Koro Chen
775b07de4f ASoC: mediatek: Add suspend/resume callbacks
This adds suspend/resume callbacks, which are common for each DAI.
To be able to continue the last playback/capture after resume
when suspend was done during a playback/capture, in the callbacks
we do backup/restore of registers which were set before prepare stage.
Registers to be backup/restore are defined in a backup list array.

Signed-off-by: Koro Chen <koro.chen@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-22 11:11:18 +01:00
Axel Lin
ec12693e5d ASoC: cs4349: Fix up setting PWR_DWN bit
The PWR_DWN is Bit 7, so current code does not set the PWR_DWN bit. Fix it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-22 10:55:06 +01:00
Axel Lin
6a75c0b62b ASoC: cs4349: Remove unneeded NULL test for cs4349->reset_gpio
It's safe to call gpiod_set_value_cansleep() with NULL desc.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-22 10:55:06 +01:00
Ben Zhang
a6c2a32ac8 ASoC: ssm4567: Keep TDM_BCLKS in ssm4567_set_dai_fmt
The regmap_write in ssm4567_set_dai_fmt accidentally clears the
TDM_BCLKS field which was set earlier by ssm4567_set_tdm_slot.

This patch fixes it by using regmap_update_bits with proper mask.

Signed-off-by: Ben Zhang <benzh@chromium.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-07-22 10:54:22 +01:00
Axel Lin
b101acfabc ASoC: sgtl5000: Fix up define for SGTL5000_SMALL_POP
Currently, below code actually does not update any bit because
SGTL5000_SMALL_POP is 0.

snd_soc_update_bits(codec, SGTL5000_CHIP_REF_CTRL, SGTL5000_SMALL_POP, 1);

The SGTL5000_SMALL_POP should be BIT(0) rather than 0, fix it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-By: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-22 10:49:02 +01:00
Lars-Peter Clausen
4806896175 ASoC: dapm: Avoid duplicating immutable strings
When creating a new widget from a template the name string of the template
is duplicated for the newly created widget. This is necessary because in
some cases the string might be stored on the stack or other volatile
memory locations.

But most of the time the string is static const data, which means it is
possible to use it directly without having to worry that it might get freed
or changed.

Use kstrdup_const() to handle duplicating the string. This function is
capable of detecting whether a string is immutable and if it is returns the
input without duplicating it. This will slightly reduce the runtime memory
footprint of DAPM and also speed up initialization.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-21 18:08:53 +01:00
Lars-Peter Clausen
b97e26980f ASoC: dapm: Add helper function to free a widget
snd_soc_tplg_widget_remove_all() has a verbatim copy of an older version of
the widget freeing code from dapm_free_widgets(). Add a new helper function
that takes care of freeing a widget and use it in both places.

This removes the duplicated code and also makes sure that future changes to
the widget freeing code only have to be made in one location.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-21 18:08:53 +01:00
Mark Brown
62d8f23795 Merge branch 'fix/dapm' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-dapm 2015-07-21 18:08:05 +01:00
Jean-Francois Moine
c4a42915d8 ASoC: kirkwood: prevent double streaming
The kirkwood audio subsystem presents 2 PCM's for one source.
Streaming on a second PCM while the first one is active
cuts this last one.
Then, ending the last stream gives a kernel trap in free_irq().

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-21 18:07:01 +01:00
Dan Carpenter
a4642e9969 ASoC: sti: error handling bug in sti_uniperiph_cpu_dai_of()
There is a stray '!' which means the condition is never true.

Fixes: f3bd847eb0 ('ASoC: sti: Add uniperipheral dai driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-21 11:44:14 +01:00
Dan Carpenter
6eb1c2a63d ASoC: max98925: reading beyond the end of the array
Debug prints are seldom useful and this one has an annoying thing where
it reads one space beyond the end of the array on error.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-21 11:40:38 +01:00
Kuninori Morimoto
48725e9cc8 ASoC: rsnd: tidyup parameter assignment position
84e95355602c("ASoC: rsnd: show debug message for SSI/SRC/DVC connection")
added debug message on rsnd_dai_connect(), but the relationship of
parameter check was absurdity. This patch tidyup it.
It is reported via Smatch/Dan

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-21 11:39:42 +01:00
Lars-Peter Clausen
a798c24a69 ASoC: dapm: Don't add prefix to widget stream name
Commit fdb6eb0a12 ("ASoC: dapm: Modify widget stream name according to
prefix") fixed the case where a DAPM route between a DAI widget and a
DAC/ADC/AIF widget with a matching stream name was not created when the
DAPM context was using a prefix.

Unfortunately the patch introduced a few issues on its own like leaking the
dynamically allocated stream name memory and also not checking whether the
allocation succeeded in the first place.

It is also incomplete in that it still does not handle the case where
stream name of the widget is a substring of the stream name of the DAI,
which is explicitly allowed and works fine if no DAPM prefix is used.

Revert the commit and take a slightly different approach to solving the
issue. Instead of comparing the widget's stream name to the name of the DAI
widget compare it to the stream name of the DAI widget. The stream name of
the DAI widget is identical to the name of the DAI widget except that it
wont have the DAPM prefix added. So this approach behaves identical
regardless to whether the DAPM context uses a prefix or not.

We don't have to worry about potentially matching with a widget with the
same stream name, but from a different DAPM context with a different
prefix, since the code already makes sure that both the DAI widget and the
matched widget are from the same DAPM context.

Fixes: fdb6eb0a12 ("ASoC: dapm: Modify widget stream name according to prefix")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-07-21 11:32:00 +01:00
Mark Brown
bf9185dda8 ASoC: sti-uniperf: Fix implicit inclusion of pinctrl
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-20 19:27:40 +01:00
akpm@linux-foundation.org
091571d071 ASoC: cs4349: include gpio/consumer.h
s390 allmodconfig:

sound/soc/codecs/cs4349.c: In function 'cs4349_i2c_probe':
sound/soc/codecs/cs4349.c:300: error: implicit declaration of function 'devm_gpiod_get_optional'
sound/soc/codecs/cs4349.c:301: error: 'GPIOD_OUT_LOW' undeclared (first use in this function)
sound/soc/codecs/cs4349.c:301: error: (Each undeclared identifier is reported only once
sound/soc/codecs/cs4349.c:301: error: for each function it appears in.)
sound/soc/codecs/cs4349.c:306: error: implicit declaration of function 'gpiod_set_value_cansleep'

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-20 18:32:31 +01:00
Axel Lin
44251551df ASoC: cs4349: Drop platform data support
The struct cs4349_platform_data should be defined in a public header in
include/sound/ rather than in sound/soc/codecs folder.
In additional, the platform data support is not properly handled in this
driver so remove it now.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-20 18:18:46 +01:00
Axel Lin
0443de7e7e ASoC: cs4349: Set .writeable_reg for cs4349_regmap
The first valid register index is 1 rather than 0, and the CS4349_CHIPID
is readonly. So set .writeable_reg to avoid writing to these registers.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-20 18:18:46 +01:00
Julia Lawall
4313489c25 ASoC: ux500: adjust devm usage
The explicit call to devm_regulator_put in the probe and remove functions
does not seem to be necessary.  In particular, the functions
prcmu_qos_remove_requirement and ux500_msp_i2s_cleanup_msp in the remove
function seem to do nothing that can interfere with devm_regulator_put,
making it safe to allow devm_regulator_put to occur after the end of the
remove function.

Convert the calls to clk_get to devm_clk_get, and remove the corresponding
calls to clk_put in the probe and remove functions.

Replace various gotos by direct returns, and drop unneeded labels.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-20 18:17:08 +01:00
Axel Lin
da304ac37e ASoC: cs4349: Fix setting digital interface format
Mode Control - Register 02h

Digital Interface Format (DIF[2:0]) Bits 6-4

DIF2    DIF1    DIF0    Description
0       0       0       Left-Justified, up to 24-bit data
0       0       1       I²S, up to 24-bit data
0       1       0       Right-Justified, 16-bit data
0       1       1       Right-Justified, 24-bit data
1       0       0       TDM slot 0
1       0       1       TDM slot 1
1       1       0       TDM slot 2
1       1       1       TDM slot 3

The DIF_MASK is 0x70, so current code does not correctly set the DIFx
setting. Fix it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-20 18:16:16 +01:00
Lars-Peter Clausen
dedae86d4d ASoC: cs4349: Don't use rtd->codec
rtd->codec does not necessarily point to the CODEC instance for which the
callback was called (e.g. for CODEC<->CODEC or multi-CODEC links). Use
dai->codec instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-20 18:15:29 +01:00
Lars-Peter Clausen
cb2510dac7 ASoC: cs4349: Fix suspend/resume
dev_get_drvdata() will not return the snd_soc_runtime to which this CODEC
is attached, so the current code will result in undefined behavior.
To fix this just use regmap_update_bits(cs4349->regmap, ...) directly
instead of snd_soc_update_bits(rtd->codec, ...).

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-20 18:15:28 +01:00
zhengxing
86059653ea ASoC: rockchip: Add machine driver for rt5645/rt5650 codec
The driver is used for rockchip board using a rt5645/rt5650.

Reviewed-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: zhengxing <zhengxing@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-20 18:15:07 +01:00
zhengxing
49bdb04405 ASoC: rockchip: Add machine driver for max98090 codec
The driver is used for rockchip board using a max98090.

Reviewed-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: zhengxing <zhengxing@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-20 18:15:07 +01:00
Nicolas Boichat
f136dce451 ASoC: rt5645: Remove return value in jack detect work
"ASoC: rt5645: Check if codec is initialized in workqueue handler"
adds a check if codec is NULL in rt5645_irq_detection, which
returns an int. However, "ASoC: rt5645: Remove irq_jack_detection
function" removes that function, and moves the code in
jack_detect_work, which returns void.

Remove the return value to fix compilation warning.

Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-20 18:14:15 +01:00
Mark Brown
2c23b0c10f Merge branch 'fix/rt5645' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rt5645 2015-07-20 18:14:12 +01:00
Axel Lin
b08b338253 ASoC: cs4349: Constify cs4349_regmap
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Tim Howe <tim.howe@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-18 22:30:21 +01:00
Axel Lin
dd9283e23f ASoC: cs4349: Fix max_register setting for cs4349_regmap
The max_register should be the maximum valid register index rather than
number of registers. Also remove unused defines.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Tim Howe <tim.howe@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-18 22:30:10 +01:00
Mark Brown
41a5fefeff regmap: Create a new struct reg_sequence for register sequences
In order to allow us to start adding extra annotations for sequences
 without bloating register default tables duplicate the structure under
 the new name reg_sequence and update the APIs to use that instead of
 reg_default.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEbBAABAgAGBQJVqUFGAAoJECTWi3JdVIfQ3YUH+LWLxVerlyUj/uug4vhRLlp2
 KkKLInX1r9Al8cRWo6ln3kdB8jTmOxFxm1XUkpz+IQLiF0yV5kGtVm7uBup/X4DA
 5oi7313rPs4maS/jqwyuOUi8X+ZMkKxp1Pgf4dJAzRJPN5tlks3drYdqY2c7JdT0
 q5IqUR1KIsouK1/wCBy17BEe9PLpjV6U/yN2E/b1tsW1utjtAgY5pPjv/MZpPJ8C
 NI6WXHjdykIi6Peg1mHqczgGEkyRlKBllZVsOvFhX1yjy0ITvao5/Mpv8NK5BwwU
 cOWPVLlXOwa4m+kVXePPgA4GlB2q1Xupw5k6TDPip5aCGUgS+ryKQmOVcNaJnA==
 =C5/o
 -----END PGP SIGNATURE-----

Merge tag 'regmap-seq-delay-api' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into asoc-reg-default

regmap: Create a new struct reg_sequence for register sequences

In order to allow us to start adding extra annotations for sequences
without bloating register default tables duplicate the structure under
the new name reg_sequence and update the APIs to use that instead of
reg_default.

Conflicts:
	sound/soc/codecs/da7210.c
	sound/soc/codecs/rt5651.c
	sound/soc/codecs/wm8993.c
2015-07-17 19:32:04 +01:00
Kuninori Morimoto
70fb10529f ASoC: rsnd: add MIX (Mixer) support
This patch adds MIX (Mixer) initial support for rsnd driver.
It is assuming that this MIX is used via DPCM.

This is sample code for playback.

	CPU0  : [MEM] -> [SRC1] -> [CTU02] -+
					    |
					    +-> [MIX0] -> [DVC0] -> [SSI0]
	                                    |
	CPU1  : [MEM] -> [SRC2] -> [CTU03] -+

	sound {
		compatible = "renesas,rsrc-card";

		...

		cpu@0 {
			sound-dai = <&rcar_sound 0>;
		};

		cpu@1 {
			sound-dai = <&rcar_sound 1>;
		};

		codec {
			...
		};
	};

	rcar_sound {

		...

		rcar_sound,dai {
			dai0 {
				playback = <&src1 &ctu02 &mix0 &dvc0 &ssi0>;
			};
			dai1 {
				playback = <&src2 &ctu03 &mix0 &dvc0 &ssi0>;
			};
		};
	};

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-07-17 19:26:06 +01:00
Kuninori Morimoto
9269e3c3cf ASoC: rsnd: add CTU (Channel Transfer Unit) prototype support
This patch adds CTU (Channel Transfer Unit) support for rsnd driver.
But, it does nothing to data at this point, but is required for MIX
support.

CTU design is a little different from other IPs (CTU0 is including
CTU00 - CTU03, and CTU1 is including CTU10 - CTU13, these have different
register mapping) We need to care about it on this driver.

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-07-17 19:26:06 +01:00
Kuninori Morimoto
7dfb491945 ASoC: rsnd: update Audio DMA path search method
Current rsnd driver is assuming Audio DMAC / Audio DMAC peri peri
are used from SSI/SSIU/SRC/DVC. But we will add CTU/MIX to this driver.
Then, current DMA path searching method is not understandable, and good
enough for this purpose. This patch update DMA path search method, more
simply.

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-07-17 19:26:06 +01:00
Nariman Poushin
dc606e0546 ASoC: wm5110: Use reg_sequence for multi_reg_write/register_patch
Introduced by:
commit 8019ff6cfc
("regmap: Use reg_sequence for multi_reg_write / register_patch")

Interacting with:
commit d1acd31883
("ASoC: wm5110: Add special DRE on/off handling for the headphone path")

Signed-off-by: Nariman Poushin <nariman@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-17 18:58:02 +01:00
Mark Brown
da7b33739e regmap: Create a new struct reg_sequence for register sequences
In order to allow us to start adding extra annotations for sequences
 without bloating register default tables duplicate the structure under
 the new name reg_sequence and update the APIs to use that instead of
 reg_default.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEbBAABAgAGBQJVqUFGAAoJECTWi3JdVIfQ3YUH+LWLxVerlyUj/uug4vhRLlp2
 KkKLInX1r9Al8cRWo6ln3kdB8jTmOxFxm1XUkpz+IQLiF0yV5kGtVm7uBup/X4DA
 5oi7313rPs4maS/jqwyuOUi8X+ZMkKxp1Pgf4dJAzRJPN5tlks3drYdqY2c7JdT0
 q5IqUR1KIsouK1/wCBy17BEe9PLpjV6U/yN2E/b1tsW1utjtAgY5pPjv/MZpPJ8C
 NI6WXHjdykIi6Peg1mHqczgGEkyRlKBllZVsOvFhX1yjy0ITvao5/Mpv8NK5BwwU
 cOWPVLlXOwa4m+kVXePPgA4GlB2q1Xupw5k6TDPip5aCGUgS+ryKQmOVcNaJnA==
 =C5/o
 -----END PGP SIGNATURE-----

Merge tag 'regmap-seq-delay-api' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into asoc-wm5110

regmap: Create a new struct reg_sequence for register sequences

In order to allow us to start adding extra annotations for sequences
without bloating register default tables duplicate the structure under
the new name reg_sequence and update the APIs to use that instead of
reg_default.
2015-07-17 18:57:41 +01:00
Koro Chen
9fc114c5d7 ASoC: rt5645: Add regulator support
This adds basic regulator support for rt5645.

Signed-off-by: Koro Chen <koro.chen@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-17 12:16:01 +01:00
Koro Chen
5168c5476a ASoC: rt5645: Fix missing free_irq
The driver does not free irq when snd_soc_register_codec returns error.
It does not return error when request irq failed, either.

Add return when request irq failed, and free_irq if
snd_soc_register_codec failed.

Signed-off-by: Koro Chen <koro.chen@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-17 12:16:01 +01:00
Nicolas Boichat
582edace0b ASoC: rt5645: Remove unused rt5645 variable
"ASoC: rt5645: Simplify rt5645_enable_push_button_irq" removes
the test that accessed rt5645->pdata.jd_mode (that test is now
done in rt5645_jack_detect only), so we do not need that
variable anymore.

Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-17 12:16:00 +01:00
Axel Lin
42d1b8ce29 ASoC: Constify dev_pm_ops variables
The dev_pm_ops variables are not modified after initialization in these
drivers, so make them const.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-17 12:14:48 +01:00
Nicolas Boichat
f2a5ded385 ASoC: rt5645: Check if codec is initialized in workqueue handler
This fixes kernel panic on boot, if rt5645->codec is NULL when
rt5645_jack_detect_work is first called.

rt5645_jack_detect_work needs rt5645->codec to be initialized to setup
dapm pins. Also, reporting jack events is useless, as the jacks cannot
be set before the codec is ready.

Since we manually call the interrupt handler in
rt5645_set_jack_detect, the initial jack state will be reported
correctly, and dapm pins will be setup at that time.

Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-17 12:12:20 +01:00
kbuild test robot
f2da454226 ASoC: sti: sti_uniperiph_dai_create_ctrl() can be static
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-17 01:08:47 +01:00
Kuninori Morimoto
78edead449 ASoC: rsnd: tidyup SRC position on each code
This is cleanup for CTU/MIX support

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-07-16 22:29:22 +01:00
Kuninori Morimoto
5cbbadd3d5 ASoC: rsnd: add rsnd_io_to_mod()
Sometimes we would like to get each module directly, especially data path
searching. this patch adds rsnd_io_to_mod() macro, and existing
rsnd_io_to_mod_xxx() use it.

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-07-16 22:29:22 +01:00
Kuninori Morimoto
ddea1b2e83 ASoC: rsnd: dma: add DMA name on .ops
Current rsnd driver is using Audio DMAC (via DMAEngine) and
Audio DMAC peri peri (via original method), and usage of these DMAC
are different. Indicates its naming is useful for debugging.

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-07-16 22:29:22 +01:00
Kuninori Morimoto
9469b8b609 ASoC: rsnd: check the Gen1 at the beginning of DVC probe
DVC doesn't support Gen1, check it beginning of probe

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-07-16 22:29:22 +01:00
Kuninori Morimoto
98d358af07 ASoC: rsnd: tidyup rsnd_dma_ops definition place
rsnd_dma_ops is used only from dma.c, rsnd.h doesn't need it.

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-07-16 22:29:22 +01:00
Kuninori Morimoto
84e9535560 ASoC: rsnd: show debug message for SSI/SRC/DVC connection
It can help for connection debug

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-07-16 22:29:22 +01:00
Kuninori Morimoto
4689032b11 ASoC: rsnd: tidyup data align position
Sound L/R order of SSI is different from Linux sound data order.
So current rsnd driver is using DALIGN (= data align) to exchange data
align on SSIU. OTOH, CMD/SRC/SSIU have DALIGN register. Now inverted
sound volume will be exchanged if user used volume control on DVC.
Because SSIU which exchanges data align is located after DVC.

	MEM -> SRC -> DVC -> SSI

This patch exchanges data align SRC if possible

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-07-16 22:29:21 +01:00
Kuninori Morimoto
bfe1360d79 ASoC: rsnd: add rsnd_get_adinr_chan()
Current rsnd driver has rsnd_get_adinr_bit() to get bit settings for
ADINR (= Audio Information Register) of SSIU/SRC/DVC.
This patch adds rsnd_get_adinr_chan() to get channel settings for
ADINR (= Audio Information Register) of CTU/MIX.

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-07-16 22:29:21 +01:00
Kuninori Morimoto
3023b384d0 ASoC: rsnd: tidyup ADINR function name
Renesas sound IP (= SSIU/SRC/CTU/MIX/DVC) have ADINR
(= Audio Information Register), but some of them (= SSIU/SRC/DVC)
are for audio data bits, some of them (= CTU/MIX) are for audio data
channels.
Current rsnd driver is supporting SSIU/SRC/DVC, and these ADINR were
for bits. This patch rename rsnd_get_adinr() to rsnd_get_adinr_bit(),
and we will have rsnd_get_adinr_chan() for CTU/MIX.

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-07-16 22:29:21 +01:00
Kuninori Morimoto
d1ade514e8 ASoC: rsnd: add rsnd_src_initialize_lock/unlock()
Renesas SCU (Sampling Rate Convert Unit) includes SRC/CTU/MIX/DVC,
and these have similar register. xxxIR (Initialization Register) is one
of them. These xxxIR need be set to 1 during initialization.
Current rsnd driver has src.c / dvc.c, and we will have mix.c.
It is readable if these have same named function.
This patch adds rsnd_src_initialize_lock/unlock() and make sure it

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-07-16 22:29:21 +01:00
Kuninori Morimoto
3bb3d363e5 ASoC: rsnd: add rsnd_dvc_initialize_lock/unlock()
Renesas SCU (Sampling Rate Convert Unit) includes SRC/CTU/MIX/DVC,
and these have similar register. xxxIR (Initialization Register) is one
of them. These xxxIR need be set to 1 during initialization.
Current rsnd driver has src.c / dvc.c, and we will have mix.c.
It is readable if these have same named function.
This patch adds rsnd_dvc_initialize_lock/unlock() and make sure it

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-07-16 22:29:21 +01:00
Kuninori Morimoto
e2c0841619 ASoC: rsnd: add rsnd_path_parse() for CTU/MIX/DVC route setting
Current sound data route settings is done in dvc.c, and it doesn't care
about CTU/MIX at this poinnt, but we need to care about these.
OTOH, rsnd driver already has rsnd_path_xxx() functions for data path which
are good match for CTU/MIX/DVC path selectio.
This patch adds new rsnd_path_parse() to select sound data route which will
care about CTU/MIX/DVC path.

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-07-16 22:29:21 +01:00
Kuninori Morimoto
c8cf15f64f ASoC: rsnd: rename rsnd_path_parse/break() into add/remove
parse/break is a little ambiguous/confusable name for rsnd module path.
Especially for CTU/MIX support. It was renamed to add/remove

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-07-16 22:29:21 +01:00
Kuninori Morimoto
d6f8d5b442 ASoC: rsnd: enable module multi connection
'8a4e379b54f8("ASoC: rsnd: remove io from rsnd_mod")' removed mod/io
relationship. rsnd_dai_connect() mod/io check is no longer needed

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-07-16 22:29:20 +01:00
Kuninori Morimoto
379febfd2e ASoC: rsnd: src: make sure SRC soft reset
Renesas SCU (Sampling Rate Convert Unit) includes SRC/CTU/MIX/DVC,
and these have similar register. xxxRSR (Software reset Register) is one
of them. These xxxRSR need be set to 1 to 0 when software reset.
Current rsnd driver has src.c / dvc.c, and we will have mix.c.
It is readable if these have same named function.
This patch adds rsnd_src_soft_reset() and make sure it

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-07-16 22:29:20 +01:00
Kuninori Morimoto
636e4bad5c ASoC: rsnd: dvc: make sure DVC soft reset
Renesas SCU (Sampling Rate Convert Unit) includes SRC/CTU/MIX/DVC,
and these have similar register. xxxRSR (Software reset Register) is one
of them. These xxxRSR need be set to 1 to 0 when software reset.
Current rsnd driver has src.c / dvc.c, and we will have mix.c.
It is readable if these have same named function.
This patch adds rsnd_dvc_soft_reset() and make sure it

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-07-16 22:29:20 +01:00
Kuninori Morimoto
da599fd34b ASoC: rsnd: move SRC specific macro into src.c
rsnd_src_nr() is used only from src.c

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-07-16 22:10:34 +01:00
Kuninori Morimoto
4f35fabaa3 ASoC: rsnd: move DVC specific macro into dvc.c
rsnd_dvc_nr() is used only from dvc.c

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-07-16 22:10:34 +01:00
Kuninori Morimoto
72413c107e ASoC: rsnd: rsnd_mod_id() return -1 if mod was NULL
enabling to use same method for exception case is useful.

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-07-16 22:10:33 +01:00
Kuninori Morimoto
1a1bf58aaf ASoC: rsnd: add workaround for SRC sync convert + DVC
We couldn't use SRC sync convert mode together with DVC,
but we can use workaround for it.
This patch adds workaround and can use SRC sync convert + DVC

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-07-16 22:10:33 +01:00
Kuninori Morimoto
a48e3f9747 ASoC: rsnd: fixup each module counter on __rsnd_mod_call()
'5451ea443b ("ASoC: rsnd: count each mod (SSI/SRC/DVC)")' counts each
module's callback status, but counts 1st callback only.
This patch fixup it. Otherwise, multi-called function will be trouble

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-07-16 22:10:33 +01:00
Kuninori Morimoto
efa991dc91 ASoC: rsnd: rename INT_ENABLE to SSI_INT_ENABLE
based on datasheet

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-07-16 22:10:33 +01:00
Kuninori Morimoto
cdde84d10d ASoC: rsnd: rename BUSIF_DALIGN to SSI_BUSIF_DALIGN
based on datasheet

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-07-16 22:10:33 +01:00
Kuninori Morimoto
6abcae32ea ASoC: rsnd: remove unnecessary 'out of memory' message from DVC
Current checkpatch.pl indicates 'out of memory' message is unnecessary.
Let's remove it

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-07-16 22:10:32 +01:00
Kuninori Morimoto
33363f7a18 ASoC: rsnd: remove unnecessary 'out of memory' message from SRC
Current checkpatch.pl indicates 'out of memory' message is unnecessary.
Let's remove it

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-07-16 22:10:32 +01:00
Kuninori Morimoto
afa7007296 ASoC: rsnd: remove unnecessary 'out of memory' message from SSI
Current checkpatch.pl indicates 'out of memory' message is unnecessary.
Let's remove it

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-07-16 22:10:32 +01:00
Kuninori Morimoto
b7419dd736 ASoC: rsrc-card: use snd_soc_of_parse_audio_route/prefix for routing
using common audio routing path method makes sense.
Let's use snd_soc_of_parse_audio_route/prefix.

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-07-16 22:10:32 +01:00
Mark Brown
904e8b0b30 Merge branch 'topic/of-name' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rcar 2015-07-16 22:04:17 +01:00
Nariman Poushin
8019ff6cfc regmap: Use reg_sequence for multi_reg_write / register_patch
Separate the functionality using sequences of register writes from the
functions that take register defaults. This change renames the arguments
in order to support the extension of reg_sequence to take an optional
delay to be applied after any given register in a sequence is written.
This avoids adding an int to all register defaults, which could
substantially increase memory usage for regmaps with large default tables.

This also updates all the clients of multi_reg_write/register_patch.

Signed-off-by: Nariman Poushin <nariman@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:02:55 +01:00
Kuninori Morimoto
5e3cdaa208 ASoC: core: add snd_soc_of_parse_audio_prefix()
Current ASoC can add name_prefix for DAPM, and it is necessary for
route settings. This patch adds snd_soc_of_parse_audio_prefix() for
this purpose. It will be used with snd_soc_of_parse_audio_routing().

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-07-16 21:59:41 +01:00
Tim Howe
e40da86a37 ASoC: cs4349: Add support for Cirrus Logic CS4349
Signed-off-by: Tim Howe <tim.howe@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:56:02 +01:00
Omair M Abdullah
28f3b6f113 ASoC: Intel: Skylake: Print error code in IPC for SKL
Signed-off-by: Omair M Abdullah <omair.m.abdullah@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:46:50 +01:00
Subhransu S. Prusty
a750ba5f5a ASoC: Intel: Skylake: Add SKL DSP initialization
This adds the dsp and ipc initialization for the Skylake platform.
It also requests firmware and uses code loader dma to load it.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:46:50 +01:00
Subhransu S. Prusty
6cb0033380 ASoC: Intel: Skylake: Process code loader DMA interrupt
The code loader DMA interrupt is received by main interrupt handler which
dispatches it to cldma routines

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-07-16 21:46:50 +01:00
Vinod Koul
3e40a78461 ASoC: Intel: Skylake: Add code loader DMA APIs
This patch adds the last piece of code loader DMA APIs by adding the code
loader DMA APIs for the driver to use

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:46:50 +01:00
Vinod Koul
914426c865 ASoC: Intel: Skylake: add code loader DMA operations
This patch starts adding code loader DMA handling internal operations for
setting up bdle, controller, spb, cleanup routines and buffer filling

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:46:50 +01:00
Vinod Koul
e30903877f ASoC: Intel: Skylake: Add code loader DMA registers
Skylake has a DMA controller for loading DSP code and modules to memory.
Add the register defines for this DMA

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:46:50 +01:00
Subhransu S. Prusty
b662680252 ASoC: Intel: Skylake: Add dsp loader ops
The ops is initialized during the dsp registration and used for the
allocating dma buffers.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:46:50 +01:00
Arnaud Pouliquen
fa050796b3 ASoC: sti: Add clock adjustement control
Add capability to adjust player clock, for clocks drift management.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:38:24 +01:00
Arnaud Pouliquen
1e6babb417 ASoC: Add ability to build sti drivers
Define the platform and codec drivers, and how to build them.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:38:24 +01:00
Arnaud Pouliquen
f3bd847eb0 ASoC: sti: Add uniperipheral dai driver
ASoc uniperipheral dai driver that manages uniperipheral DAIs and registers
associated generic dma engine platform.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:38:23 +01:00
Arnaud Pouliquen
c3a0003aaf ASoC: sti: Add CPU DAI driver for capture
Add code to manage Uniperipheral reader IP instances.
These DAIs are dedicated to capture and support I2S and IEC modes.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:38:23 +01:00
Arnaud Pouliquen
ed6c75f233 ASoC: sti: minor corrections for uniplayer
Minor corrections after code review.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:38:23 +01:00
Lars-Peter Clausen
04b5cbd80a ASoC: max9768: Convert to component
The driver does not use any CODEC specific constructs anymore. Convert it
to snd_soc_component.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:36:23 +01:00
Lars-Peter Clausen
d79cca1a99 ASoC: max9768: Use managed gpio request
Makes the code a bit shorter and simpler.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:36:23 +01:00
Lars-Peter Clausen
623436af42 ASoC: max9877: Convert to component
The driver does not use any CODEC specific constructs anymore. Convert it
to snd_soc_component.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:35:12 +01:00
Lars-Peter Clausen
df2e268226 ASoC: max9877: Make driver global regmap struct local
Use a stack local variable to handle function local state rather than a
global static variable. The later has a potential for race conditions if
the probe function runs for two devices concurrently.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:35:12 +01:00
Mark Brown
7d9fb377a7 Merge branches 'topic/owner' and 'topic/reg-default' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-max9877 2015-07-16 21:35:01 +01:00
Nicolas Boichat
a4e3c5fa95 ASoC: rt5645: Simplify rt5645_enable_push_button_irq
LDO2/Mic Det Power pins are already enabled/disabled in rt5645_jack_detect
(the jack out code path previously did not disable those if button function
is enabled: modify it to make it so).

Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 13:10:47 +01:00
Nicolas Boichat
b14c917409 ASoC: rt5645: Update dapm pins when the card is not instantiated yet
This makes sure the dapm state is consistent when the card is
instantiated.

However, if the card is not instantiated yet, we still update the
registers manually in the "jack in" case, so that we can immediately
report if a mic is present or not.

Disabling "Mic Det Power" after detection, and on jack out, can
wait until the card gets instantiated.

Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 13:10:46 +01:00
Bard Liao
5efe58c443 ASoC: rt298: remove meanless pr_info
This line doesn't include any information. So, remove it.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 13:09:53 +01:00
Arnaud Pouliquen
601b9d9c7b ASoC: sti-sas: fix x86 compilation issue.
Fixes for compilation warnings and errors reported by Kbuild test robot
for x86_64 and i386.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 09:59:23 +01:00
Geert Uytterhoeven
be9ae23092 ASoC: fsi: Remove obsolete sh_fsi2 platform_device_id entry
Since the removal of the r8a7740 legacy board code in commit
1fa59bda21 ("ARM: shmobile: Remove legacy board code for
Armadillo-800 EVA"), all former users of the "sh_fsi2" platform device
name are only supported in generic DT-only ARM multi-platform builds.
The driver doesn't need to match platform devices by name anymore, hence
remove the corresponding platform_device_id entry.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 09:58:00 +01:00
Masanari Iida
7d1442b4c4 ASoC: Fix warning caused by a typo in comments of snd_soc_add_platform()
This patch fix following warnings.
Warning(.//sound/soc/soc-core.c:2855): No description found
for parameter 'platform_drv'
Warning(.//sound/soc/soc-core.c:2855): Excess function parameter
'platform_driver' description in 'snd_soc_add_platform'

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-15 17:56:51 +01:00
Masanari Iida
231b86b1d8 ASoC: Fix warning while make xmldocs caused by soc-core.c
This patch fix following warning while make xmldocs.
Warning(.//sound/soc/soc-core.c:2148): No description found
for parameter 'ratio'

Add missing ":"

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-15 17:56:51 +01:00
Shilpa Sreeramalu
412efa73dc ASoC: Intel: Get correct usage_count value to load firmware
The usage_count variable was read before it was set to the correct
value, due to which the firmware load was failing. Because of this
IPC messages sent to the firmware were timing out causing a delay
of about 1 second while playing audio from the internal speakers.

With this patch the usage_count is read after the function call
pm_runtime_get_sync which will increment the usage_count variable
and the firmware load is successful and all the IPC messages are
processed correctly.

Signed-off-by: Shilpa Sreeramalu <shilpa.sreeramalu@intel.com>
Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-07-15 17:03:36 +01:00
Krzysztof Kozlowski
1c07a4de5b ASoC: drivers: Drop owner assignment from i2c_driver
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-15 12:50:43 +01:00
Mark Brown
a5e412a99c Merge branches 'topic/rt298', 'topic/ts3a227e' and 'topic/cs42xx8' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-owner 2015-07-15 12:50:33 +01:00
Axel Lin
8e2175d42e ASoC: sirf-audio-codec: Staticise local symbols
Also make sirf_audio_codec_dai_ops const.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-15 12:32:56 +01:00
Axel Lin
a01da00cbc ASoC: da732x: Merge da732x_dai1_ops and da732x_dai2_ops
da732x_dai1_ops is identical to da732x_dai2_ops, so merge them to
da732x_dai_ops. The da732x_dai_ops is not modified after initialization,
so make it const.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-15 12:30:36 +01:00
Axel Lin
6479304755 ASoC: Constify snd_soc_dai_ops variables
The snd_soc_dai_ops variables are not modified after initialization in
these drivers, so make them const.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-15 12:12:46 +01:00
Dan Carpenter
89e0e250f9 ASoC: fsl: fsl_spdif: signedness bug in fsl_spdif_startup()
We need "i" to be signed or it leads to a forever loop in the error
handling.

Fixes: fa3be9208d ('ASoC: fsl: fsl_spdif: Check for clk_prepare_enable() error')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-14 18:54:10 +01:00
Krzysztof Kozlowski
27bc1dd244 ASoC: mediatek: Drop owner assignment from platform_driver
platform_driver does not need to set an owner because
platform_driver_register() will set it.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Koro Chen <koro.chen@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-14 18:10:16 +01:00
Nicolas Boichat
f312bc59d2 ASoC: rt5645: Remove irq_jack_detection function
irq_jack_detection is only called from rt5645_jack_detect_work:
remove the function to simplify the code.

Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-14 14:08:06 +01:00
Lars-Peter Clausen
f6d1a81484 ASoC: max98925: Remove control_data initialization
The control_data field of the snd_soc_codec struct is no longer used by
ASoC drivers using standard regmap IO.

There is no need to initialize the field to point to the drivers regmap
struct, so drop that.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-14 10:13:19 +01:00
Jeeja KP
2c57d47801 ASoC: topology: Fix to add dapm mixer info
Mixer control for widgets can't be created if the info is NULL. So assign
the correct info for this.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-14 10:12:55 +01:00
Anatol Pomozov
4ab0c591c1 ASoC: max98357a: Do not print error message on asoc/gpio errors
gpiolib/asoc system already prints enough info if there are any problems.

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-13 19:13:03 +01:00
Anatol Pomozov
508e61953f ASoC: max98357a: Use DAI input as a dapm widget
Spec does not say anything about DAC called SDMode.
It makes more sense to use DAI input that created automatically by DAPM
and route it to Speaker output.

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-13 19:13:03 +01:00
Anatol Pomozov
5119222f2e ASoC: max98357a: Make 'sdmode-gpios' dts property optional
The option is not needed if chip is always on or managed by some other part
of system like platform card driver.

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-13 19:13:03 +01:00
Krzysztof Kozlowski
2dfbe9afcd ASoC: zx: spdif: Fix devm_ioremap_resource return value check
Value returned by devm_ioremap_resource() was checked for non-NULL but
devm_ioremap_resource() returns IOMEM_ERR_PTR, not NULL. In case of
error this could lead to dereference of ERR_PTR.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Reviewed-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-13 12:16:33 +01:00
Krzysztof Kozlowski
a18da49ff3 ASoC: zx: i2s: Fix devm_ioremap_resource return value check
Value returned by devm_ioremap_resource() was checked for non-NULL but
devm_ioremap_resource() returns IOMEM_ERR_PTR, not NULL. In case of
error this could lead to dereference of ERR_PTR.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Reviewed-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-13 12:16:29 +01:00
kbuild test robot
9cae85f5e2 ASoC: sti-sas: fix platform_no_drv_owner.cocci warnings
sound/soc/codecs/sti-sas.c:616: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-07-13 11:59:12 +01:00
Mark Brown
a2f3a8ca52 ASoC: sti-sas: Remove spurious dependency on SND_SOC_STI
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-13 11:53:08 +01:00
Axel Lin
589bef3296 ASoC: sti-sas: Staticise local symbols
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-13 11:52:18 +01:00
Axel Lin
e27d9ee6e7 ASoC: sti-sas: Fix checking return value for ERR_PTR
Both devm_regmap_init and syscon_regmap_lookup_by_phandle return ERR_PTR
on failure.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-13 11:52:18 +01:00
Lars-Peter Clausen
ef3355d220 ASoC: uda134x: Use regmap_update_bits() were appropriate
Instead of doing the read-modify-update cycle by hand when updating a
register use regmap_update_bits().

This also means we can now remove uda134x_read_reg_cache() and
uda134x_write() since they are unused.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-13 11:51:35 +01:00
Lars-Peter Clausen
f33c340a51 ASoC: uda134x: Convert to regmap
Use regmap rather then the legacy ASoC IO for the uda134x driver.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-13 11:51:35 +01:00
Lars-Peter Clausen
82c7b531f3 ASoC: uda134x: Explicitly handle in-data addresses
The UDA134X family extends the rather limited L3 register set by using part
of the register value as additional address bits.

These extra address bits are currently stored in the default register cache
and rely on them remaining constant. While this works it is rather
idiomatic and slightly confusing. Change it so that the additional address
bits are explicitly added when writing a register.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-13 11:51:35 +01:00
Lars-Peter Clausen
f15c444e58 ASoC: uda134x: Move state struct allocation to bus probe
Resource allocations should be done in the bus probe rather than the CODEC
probe. Move the allocation of the drivers state struct there.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-13 11:51:35 +01:00
Arnaud Pouliquen
76c2145ded ASoC: sti: Add CPU DAI driver for playback
Add code to manage Uniperipheral player IP instances.
These DAIs are dedicated to playback and support I2S and IEC modes.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-10 18:36:26 +01:00
Arnaud Pouliquen
e1ecace6a6 ASoC: sti: Add uniperipheral header file
Add the Uniperipheral header file for uniperipheral IPs registers definition.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-10 18:36:26 +01:00
Arnaud Pouliquen
32a726b2e0 ASoC: sti-sas: Add sti platform codec
Codec part of the sti platform that supports codec IPs.
This first version does not support HDMI, but only DAC and SPDIF out.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-10 18:35:10 +01:00
Charles Keepax
d90c6cc242 ASoC: arizona: Fix error path in codec probe
If we fail to add some DSPs or fail to add the controls we should call
wm_adsp2_codec_remove for all the cores we have already added. This
patch fixes this up on the wm5102 and wm5110.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-10 17:02:42 +01:00
Kuninori Morimoto
7b47ab47b3 ASoC: rsnd: gen: add rsnd_force_write()
rsnd_force_write() is similar to rsnd_write(),
but rsnd_force_write() write data to register even though
it is same value.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-10 11:39:37 +01:00
Subhransu S. Prusty
e973e31a02 ASoC: Intel: Add DSP init and boot up functionality for SKL
This patch adds code to enable, disable and boot DSP core.
Also provide some helpers to reset and power up/down the core.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-09 18:33:23 +01:00
Subhransu S. Prusty
b81fd26359 ASoC: Intel: Add Skylake IPC library
This adds base SKL IPC library which uses common SST IPC lib.
Here we add definition for IPC types, sending and receiving IPC messages
from aDSP, handling interrupt, sending different types of messages etc

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-09 18:33:23 +01:00
Subhransu S. Prusty
d15b1ae17c ASoC: Intel: Add helper to update register bits with attr RWC
For SKL IPC, we have some register bits with attribute RWC. So we need to
force update them. Add helper to force update this type of registers bits.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-09 18:33:23 +01:00
Subhransu S. Prusty
7a2c52b61f ASoC: Intel: Add helper to poll register for DSP status
This patch adds helper to poll register for DSP status.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Kp, Jeeja <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-09 18:33:23 +01:00
Bard Liao
6adcafae6e ASoC: add rt298 codec driver
It is the initial version of ALC298 codec driver.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-09 12:00:11 +01:00
Jeeja KP
0505700104 ASoC: Intel: Add support for decoupled mode in skl driver
Decoupled mode is where audio link is broken to frontend HDA and backend
(hda/i2s/dmic/hdmi) links. This patch adds support for decoupled mode and
then adds dais, dai ops for be/fe cpu dais and interrupt handler change to
support decoupled mode

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-09 11:54:26 +01:00
Jeeja KP
eb965e3686 ASoC: Intel: Add makefile support for SKL driver
This adds makefile and Kconfig to enable Skylake HD audio PCM driver

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-09 11:54:26 +01:00
Jeeja KP
d8c2dab838 ASoC: Intel: Add Skylake HDA audio driver
This patch follows up by adding the HDA controller operations. This
code is mostly derived from Intel HDA PCI driver without legacy bits

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-09 11:54:26 +01:00
Jeeja KP
a40e693c7f ASoC: Intel: Add Skylake HDA platform driver
This patch starts to add the Skylake HDA platform driver by defining
SoC CPU dais, DMA driver ops and implements ALSA operations

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-09 11:54:26 +01:00
Charles Keepax
5ed68f0a28 ASoC: arizona: Use the more idiomatic params_width
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-09 11:51:43 +01:00
Koro Chen
94319ba10e ASoC: mediatek: Use platform_of_node for machine drivers
This replaces the platform_name in snd_soc_dai_link by device tree node.

Signed-off-by: Koro Chen <koro.chen@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-09 09:30:12 +01:00
Lars-Peter Clausen
2210438b6a ASoC: Free card DAPM context on snd_soc_instantiate_card() error path
Make sure the to free the card DAPM context if snd_soc_instantiate_card()
fails, otherwise the memory allocated for the DAPM widgets is leaked.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-08 22:16:51 +01:00
Lars-Peter Clausen
e18077b6e5 ASoC: dapm: Fix kcontrol widget name memory management
The name field of the widget template is only used inside
snd_soc_dapm_new_control_unlocked() which allocates a copy for the actual
widget. This means we need to free the name allocated for the template in
dapm_kcontrol_data_alloc() and not the name of the actual widget in
dapm_kcontrol_free(). Otherwise we get a double free on the widget name and
a memory leak on the template name.

Fixes: 773da9b358 ("ASoC: dapm: Append "Autodisable" to autodisable widget names")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-08 22:16:12 +01:00
Charles Keepax
d1acd31883 ASoC: wm5110: Add special DRE on/off handling for the headphone path
For the best performance the headphone path enable/disable must be
handled specially for the situations of DRE on and DRE off.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-08 20:23:07 +01:00
Lars-Peter Clausen
abd31b32dd ASoC: Use card field to indicate whether a component is bound
Use the card field of a component to indicate whether it is bound or not.
This makes a certain sense given that the field contains the card the
component is bound to and a component can only be bound to one card at a
time. And it also requires to unset the card field when the component is
unbound from the card.

This makes the probded flag redundant and it can be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-08 20:05:04 +01:00
Lars-Peter Clausen
1b7c123169 ASoC: Prevent components from being bound to multiple cards
A component can only be bound to a single card at a time. Binding it to
card while it is already bound to another will result in undefined
behavior.

As the undefined behavior might only manifest itself later on it is not
necessarily always straight forward to find the cause. To prevent this add
a check that refuses to bind a component to multiple cards as well as
prints a error describing the problem.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-08 20:05:04 +01:00
Subhransu S. Prusty
f7c765e604 ASoC: Intel: Reorganize the common dsp structure
We will add SKL platform data. So organizing common and platform
specific data helps.

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-07-08 19:46:49 +01:00
Subhransu S. Prusty
3582f9ae07 ASoC: Intel: Define SKL ADSP IPC and general purpose registers
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Kp, Jeeja <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-08 19:46:48 +01:00
Axel Lin
ca94085139 ASoC: wm8996: Remove spurious IRQF_ONESHOT flag
This reverts ed043aebe6 ("ASoC: wm8996: Pass the IRQF_ONESHOT flag").

The coccinelle warnings is false positive because the original code does
set IRQF_ONESHOT by "trigger |= IRQF_ONESHOT;".

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>
2015-07-08 19:33:49 +01:00
Axel Lin
efc04ca223 ASoC: wm5100: Remove spurious IRQF_ONESHOT flag
This reverts 3d907cc30d ("ASoC: wm5100: Pass the IRQF_ONESHOT flag").

The coccinelle warnings is false positive because the original code does
set IRQF_ONESHOT by "trigger |= IRQF_ONESHOT;".

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>
2015-07-08 19:30:29 +01:00
Axel Lin
030e6ee241 ASoC: wm0010: Remove spurious missing IRQF_ONESHOT
This reverts 58d4683286 ("ASoC: wm0010: Add missing IRQF_ONESHOT").

The coccinelle warnings is false positive because the original code does
set IRQF_ONESHOT by "trigger |= IRQF_ONESHOT;".

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>
2015-07-08 19:29:41 +01:00
Axel Lin
a5afdc5bf5 ASoC: rt286: Constify dmi_system_id table
dmi_check_system() takes "const struct dmi_system_id *", so make the
dmi_system_id table const.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-08 19:29:06 +01:00
Vinod Koul
47a7bfc2bc ASoC: intel - atom: fix sst_platform_compr_ops declaration
Sparse complains that sst_platform_compr_ops should be static, but the
declaration of this symbol was not correct so declare the symbol as
extern in header file

sound/soc/intel/atom/sst-mfld-platform-compress.c:257:22: warning: symbol
'sst_platform_compr_ops' was not declared. Should it be static?

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-07-08 19:24:05 +01:00
Vinod Koul
9569909f4d ASoC: intel - atom: statify sst_slot_enum_info
Sparse complains that sst_slot_enum_info should be static, so make it
static

sound/soc/intel/atom/sst-atom-controls.c:135:5: warning: symbol
'sst_slot_enum_info' was not declared. Should it be static?

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-07-08 19:23:51 +01:00
Vinod Koul
13735d1cec ASoC: intel - kconfig: remove SND_SOC_INTEL_SST prompt
The SND_SOC_INTEL_SST is for common IPC lib and this should ideally be
not selectable symbol but selected by respective machine driver So
remove the prompt and get respective machines select it

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-07-08 19:23:50 +01:00
Vinod Koul
7dd6bd8926 ASoC: intel: kconfig - Move DW_DMAC_CORE dependency to machines
Some HSW and BYT machines depend on the DW_DMAC_CORE so they should
have have depends on this symbol rather than common IPC lib as SKL
onwards IPC lib is used but we don't depend on DW_DMAC_CORE

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-07-08 19:23:42 +01:00
Vinod Koul
56e7366e43 ASoC: Intel: use CONFIG_SND_SOC for intel boards
The Intel boards directory was under CONFIG_SND_SOC_INTEL_SST so the
machines which don't need these were not allowed to be
selected/compiled without enabling this symbol The machine should be
allowed to selected by ASoC and then they should select rest of
symbols required

Reported-by: Michele Curti <michele.curti@gmail.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-07-08 19:22:30 +01:00
Fabio Estevam
402f2a4f80 ASoC: max98095: Check for clk_prepare_enable() error
clk_prepare_enable() may fail, so we should better check its return value
and propagate it in the case of error.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-08 19:09:30 +01:00
Fabio Estevam
cef6daa919 ASoC: wm8731: Check for clk_prepare_enable() error
clk_prepare_enable() may fail, so we should better check its return value
and propagate it in the case of error.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-08 19:09:12 +01:00
Fabio Estevam
779ea47399 ASoC: wm8904: Check for clk_prepare_enable() error
clk_prepare_enable() may fail, so we should better check its return value
and propagate it in the case of error.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-08 19:08:57 +01:00
Fang, Yang A
c4a99a4b4f ASoC: ts3a227e: do not report jack status when there is i2c read err
After suspend -> resume the ts3a227e_interrupt sometimes comes before i2c
controller resume is called .regmap_read will return incorrect status
and report a wrong jack status.This patch will disable irq on suspend
and enable irq again on the resume to make sure interrupt is coming
after TI resumes. Also We should return if there is read err,the
interrupt will come again since it is level triggered and we are not yet
clear the interrupt.

In addtion,cht_bsw_max98090_ti machine driver registered additional
notifier base on jack event which will program the audio codec.there
will be codec timeout err if such event occurs prior to i2c controller
is resumed.

Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-08 18:40:08 +01:00
Shengjiu Wang
6e78108bda ASoC: core: Don't probe the component which is dummy
Dummy dai can be used by multiple sound card. But it only belong to one
card's dapm list. If another card use it, there will be dapm_assert_locked
warning.

[   20.015782] WARNING: CPU: 1 PID: 661 at sound/soc/soc-dapm.c:124 dapm_assert_locked.isra.36+0x4c/0x58()
[   20.025249] Modules linked in:
[   20.028349] CPU: 1 PID: 661 Comm: aplay Not tainted 4.1.0-rc6-next-20150605-00004-gaee05d8-dirty #92
[   20.037528] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[   20.044110] Backtrace:
[   20.046614] [<80012e00>] (dump_backtrace) from [<80012fa0>] (show_stack+0x18/0x1c)
[   20.054229]  r6:809e8060 r5:00000000 r4:00000000 r3:00000000
[   20.060002] [<80012f88>] (show_stack) from [<807a0f74>] (dump_stack+0x80/0x9c)
[   20.067293] [<807a0ef4>] (dump_stack) from [<8002b144>] (warn_slowpath_common+0x7c/0xb4)
[   20.075427]  r5:0000007c r4:00000000
[   20.079065] [<8002b0c8>] (warn_slowpath_common) from [<8002b1a0>] (warn_slowpath_null+0x24/0x2c)
[   20.087898]  r8:00000001 r7:88007c28 r6:ed94a680 r5:809e83e4 r4:ed83d6c0
[   20.094747] [<8002b17c>] (warn_slowpath_null) from [<8058403c>] (dapm_assert_locked.isra.36+0x4c/0x58)
[   20.104101] [<80583ff0>] (dapm_assert_locked.isra.36) from [<805842ec>] (dapm_mark_dirty+0x64/0xa4)
[   20.113165] [<80584288>] (dapm_mark_dirty) from [<805853a8>] (soc_dapm_dai_stream_event.isra.42+0x30/0xc8)
[   20.122863]  r8:ed9b5dbc r7:00000000 r6:00000001 r5:00000001 r4:ed83d6c0
[   20.129706] [<80585378>] (soc_dapm_dai_stream_event.isra.42) from [<80587e28>] (snd_soc_dapm_stream_event+0x78/0xa0)
[   20.140264]  r5:ee2ee62c r4:00000001
[   20.143918] [<80587db0>] (snd_soc_dapm_stream_event) from [<8058957c>] (soc_pcm_prepare+0x138/0x21c)
[   20.153058]  r8:ed8d9480 r7:00000000 r6:ed9b0e00 r5:00000001 r4:ee2ee62c r3:00000000
...

This patch is to not probe the dummy component in soc_probe_component. Then
there is no widget created for dummy DAI, and also don't need to check the
dummy dai in dapm_connect_dai_link_widgets().

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07 19:30:34 +01:00
Fabio Estevam
9acc7f0871 ASoC: max98090: Check for clk_prepare_enable() error
clk_prepare_enable() may fail, so we should better check its return value
and propagate it in the case of error.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07 18:24:32 +01:00
Mark Brown
f2a763858a Merge branch 'topic/codec-dapm' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rt5645
Conflicts:
	sound/soc/codecs/rt5645.c
2015-07-07 15:04:40 +01:00
Koro Chen
c5b8540dca ASoC: dpcm: Add checks of playback/capture before dpcm_get_be
In dpcm_get_be(), it looks for a BE rtd that has the DAI widget
according to current stream type. Only playback_widgets are searched
in the case of playback stream and vice versa. However, the DAI widget
itself can be playback or capture.

If the DAI widget is capture, but current stream type is playback,
dpcm_get_be() will always fail to find a rtd, print error messages,
and continue to the next DAI widget in list. We can just skip this
DAI widget to further suppress error messages. This happens in a
special case when 2 codecs are inter-connected, and the 1st codec's
"capture" widget is used to send data to the 2nd codec during "playback":

mtk-rt5650-rt5676 sound: ASoC: can't get playback BE for Sub AIF2 Capture
rt5650_rt5676 Playback: ASoC: no BE found for Sub AIF2 Capture

Add checks to continue to next DAI widget if current DAI widget's
direction does not match the stream type.

Signed-off-by: Koro Chen <koro.chen@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07 14:56:15 +01:00
Lars-Peter Clausen
4890140f38 ASoC: Remove snd_soc_codec dapm field
There are no more direct users of the snd_soc_codec DAPM field left. So we
can finally remove it and switch over to directly using the component DAPM
context and remove the dapm_ptr indirection.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07 14:54:32 +01:00
Lars-Peter Clausen
b3c25fb7ca ASoC: dapm_widget_show_codec: Use component instead of CODEC
There is nothing snd_soc_codec specific in this function, just use
snd_soc_component instead.

With this also the last reference of snd_soc_codec form soc-dapm.c.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07 14:54:31 +01:00
Lars-Peter Clausen
c68c2be5f6 ASoC: cht_bsw_max98090_ti: Use card DAPM context to access widgets
The dapm field of the snd_soc_codec struct will eventually be removed
(replaced with the DAPM context from the component embedded inside the
CODEC). Replace its usage with the card's DAPM context. The idea is that
DAPM is hierarchical and with the card at the root it is possible to access
widgets from other contexts through the card context.

While we are at it also remove some extra newlines.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07 14:54:31 +01:00
Lars-Peter Clausen
987731bb7c ASoC: omap3pandora: Use card DAPM context to access widgets
The dapm field of the snd_soc_codec struct will eventually be removed
(replaced with the DAPM context from the component embedded inside the
CODEC). Replace its usage with the card's DAPM context. The idea is that
DAPM is hierarchical and with the card at the root it is possible to access
widgets from other contexts through the card context.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07 14:54:31 +01:00
Lars-Peter Clausen
8f218fa93d ASoC: tas571x: 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: Kevin Cernekee <cernekee@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07 14:54:27 +01:00
Lars-Peter Clausen
e2ada8187b ASoC: rt5645: 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-07-07 14:54:14 +01:00
Kenneth Westfield
7f005256f7 ASoC: qcom: remove Kconfig deps from variant configs
Remove the SND_SOC_QCOM dependency from the variant
configs.  The board configs, which select the
variants, already have this dependency.

Signed-off-by: Kenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07 14:52:01 +01:00
Kenneth Westfield
02c4b9c28b ASoC: qcom: move board Kconfig deps to parent config
Rather than have each board define the same set of
dependencies; move the common dependencies to the
SND_SOC_QCOM parent config.

Signed-off-by: Kenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07 14:52:01 +01:00
Juergen Borleis
ebac95a920 ASoC: fsl-ssi: Fix bitclock calculation for master mode
According to the datasheet 'pm', 'psr' and 'div2' should never be all 0.
Since commit 541b03ad6c ("ASoC: fsl_ssi: Fix the incorrect limitation of
the bit clock rate") this can happen, because for some bitclock rates
'pm' = 0 seems to be a valid choice but does not work due to hardware
restrictions. This results into a bad hardware behaviour (slow audio for
example). Feature tested on a i.MX25.

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07 14:40:02 +01:00
Axel Lin
c418a84a8c ASoC: Constify reg_default tables
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Peter Rosin <peda@axentia.se>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07 14:39:02 +01:00
Axel Lin
02a9547e9b ASoC: gtm601: Constify soc_codec_dev_gtm601
Also clean up the code a bit by fixing indent.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07 14:23:53 +01:00
Axel Lin
6f43979496 ASoC: lm49453: Remove fs_rate from struct lm49453_priv
fs_rate is only used in lm49453_hw_params() so don't need to store it in
private data.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07 14:00:20 +01:00
Axel Lin
f8ea6cebcf ASoC: ak4642: Fix up max_register setting
The max_register setting for ak4642, ak4643 and ak4648 are wrong, fix it.

According to the datasheet:
        the maximum valid register for ak4642 is 0x1f
        the maximum valid register for ak4643 is 0x24
        the maximum valid register for ak4648 is 0x27

The default settings for ak4642 and ak4643 are the same for 0x0 ~ 0x1f
registers, so it's fine to use the same reg_default table with differnt
num_reg_defaults setting.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07 13:58:31 +01:00
Axel Lin
93ec3a1ad5 ASoC: 88pm860x: Don't change pm860x->dir setting if pm860x_set_dai_sysclk fails
88pm860x does not support slave mode, so it returns -EINVAL for
PM860X_CLK_DIR_IN. Current code changes pm860x->dir setting before
return error, so it has impact on the logic of pm860x_pcm_set_dai_fmt.

This patch adds comment for the reason to return -EINVAL for
PM860X_CLK_DIR_IN, and avoid changing pm860x->dir setting if
pm860x_set_dai_sysclk fails.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07 13:48:59 +01:00
Axel Lin
5e4cb7b608 ASoC: cs42xx8: Setup of_match_table
Setup of_match_table and since cs42xx8_of_match is exported and used in
cs42xx8-i2c.c, it cannot be static.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07 13:35:13 +01:00
Axel Lin
d375d0abcd ASoC: cs42xx8: Move the code checking *regmap argument earlier
Slightly improve the readability by moving the code checking *regmap
argument earlier. Also move the assignment of of_id close to the place
testing it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07 13:35:09 +01:00
Ben Zhang
9bfde72157 ASoC: rt5677: Switch to use unified device property API
This patch makes the driver use the unified device property API
so that platform data can be provided by Device Tree, ACPI
or board files.

Signed-off-by: Ben Zhang <benzh@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07 13:34:03 +01:00
Ben Zhang
efd901ee4b ASoC: rt5677: Switch to use descriptor-based gpiod API
This patch makes the driver use the new descriptor-based gpiod API
so that gpio assignment info can be provided by Device Tree, ACPI
or board files.

Signed-off-by: Ben Zhang <benzh@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07 13:34:03 +01:00
Fabio Estevam
fa3be9208d ASoC: fsl: fsl_spdif: Check for clk_prepare_enable() error
clk_prepare_enable() may fail, so we should better check its return value
and propagate it in the case of error.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07 13:32:34 +01:00
Fabio Estevam
b1ade0f2af ASoC: fsl: fsl_asrc: Check for clk_prepare_enable() error
clk_prepare_enable() may fail, so we should better check its return value
and propagate it in the case of error.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07 13:31:52 +01:00
Shengjiu Wang
0d69e0dddf ASoC: fsl: Add dedicated DMA buffer size for each cpu dai
As the ssi is not the only cpu dai, there are esai, spdif, sai.
and imx_pcm_dma can be used by all of them. Especially ESAI need
a larger DMA buffer size. So Add dedicated DMA buffer for each cpu
dai.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Acked-by: Timur Tabi <timur@tabi.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07 13:16:12 +01:00
Charles Keepax
5f8e671a49 ASoC: arizona: Implement stability check for LHPF coefficients
Specifying unstable coefficients for the low/high pass filters can have
a severe impact on the audio. This patchs adds a stability check on the
coefficients written to the low/high pass filter block to prevent this.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07 13:15:12 +01:00
Charles Keepax
c05d9a8c7f ASoC: arizona: Implement stability check for EQ coefficients
Specifying unstable coefficients for the EQ can have a severe impact on
the audio. This patchs adds a stability check on the coefficients
written to the EQ, for this it is necessary to merge the mode control
and the coefficients as some coefficients may only be unstable with a
certain mode setting so it is ideal if these are always updated in sync.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07 13:15:12 +01:00
Nik Nyby
b650247da5 ASoC: codecs: max98088: fix typo in constant
This fixes a typo in the M98088_REG_02_JACK_STATUS constant.

Signed-off-by: Nik Nyby <nikolas@gnu.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07 13:14:15 +01:00
Bard Liao
83c09290ad ASoC: rt5645: move RT5645 muxes to rt5645_specific_dapm_widgets
This is a similar patch to "move RT5650 muxes to rt5650_specific_
dapm_widgets" patch. The purpose is to silence the "has no paths"
warnings.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07 13:08:50 +01:00
Sergey Kiselev
6702dfcc57 ASoC: wm8731: initialize the hardware when loading the codec driver
This patch moves the requesting supplies, hardware reset and
initialization from wm8731_probe to wm8731_i2c_probe and wm8731_spi_probe.
So that the codec hardware is initialized when loading the codec driver,
and not when loading the machine driver. This avoids unnecesary hardware
resets and re-initializations when re-loading the machine driver.

Signed-off-by: Sergey Kiselev <sergey.kiselev@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07 12:53:57 +01:00
Arnaud Pouliquen
e22579713a ASoC: simple card: set cpu-dai sysclk with mclk-fs
Allows to request a specific mclk frequency per cpu_dai.
To support some codecs with mclk provided by the cpu_dai, the
mclk rate must be set depending on frame rate.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07 12:52:56 +01:00
Fang, Yang A
8bc76c8bf6 ASoC: Intel: fix incorrect widget name
We should use "HiFi Playback" and "HiFi Capture".it will fix below err

cht-bsw-max98090: ASoC: no sink widget found for AIF1 Playback
cht-bsw-max98090: ASoC: Failed to add route ssp2 Tx -> direct ->
AIF1 Playback
cht-bsw-max98090: ASoC: no source widget found for AIF1 Capture
cht-bsw-max98090: ASoC: Failed to add route AIF1 Capture -> direct ->
ssp2 Rx

Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-06 22:28:29 +01:00
Axel Lin
0bc7d10c4a ASoC: rt5645: Constify dmi_system_id table
dmi_check_system() takes "const struct dmi_system_id *", so make the
dmi_system_id table const.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-06 21:42:53 +01:00
Antonio Borneo
93d5fc8bd1 ASoC: wm0010: Remove redundant spi driver bus initialization
In ancient times it was necessary to manually initialize the bus
field of an spi_driver to spi_bus_type. These days this is done in
spi_register_driver(), so we can drop the manual assignment.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-06 20:30:23 +01:00
Jarkko Nikula
aa0bcc5c44 ASoC: rt5677: Prefix hexadecimal ID register value with 0x in error print
Make it obvious that unexpected value read from ID register is printed in
hexadecimal.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-06 20:30:16 +01:00
Jarkko Nikula
387ad57fe1 ASoC: rt5670: Prefix hexadecimal ID register value with 0x in error print
Make it obvious that unexpected value read from ID register is printed in
hexadecimal.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-06 20:30:12 +01:00
Jarkko Nikula
469444fb13 ASoC: rt5651: Prefix hexadecimal ID register value with 0x in error print
Make it obvious that unexpected value read from ID register is printed in
hexadecimal.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-06 20:30:07 +01:00
Jarkko Nikula
8f68e80f5f ASoC: rt5645: Prefix hexadecimal ID register value with 0x in error print
Make it obvious that unexpected value read from ID register is printed in
hexadecimal.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-06 20:30:02 +01:00
Jarkko Nikula
818454d1ab ASoC: rt5640: Prefix hexadecimal ID register value with 0x in error print
Make it obvious that unexpected value read from ID register is printed in
hexadecimal.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-06 20:29:57 +01:00
Jarkko Nikula
e608aaefd8 ASoC: rt286: Prefix hexadecimal ID register value with 0x in error print
Make it obvious that unexpected value read from ID register is printed in
hexadecimal.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-06 20:29:52 +01:00
Axel Lin
d49796317d ASoC: gtm601: Fix modalias
The MODULE_ALIAS needs to match the driver name to make module auto-loading
work. Also move MODULE_ALIAS close to other MODULE_* macro.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-06 20:29:43 +01:00
kbuild test robot
beb5f8659c ASoC: gtm601_dai can be static
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-06 20:29:43 +01:00
kbuild test robot
726f783e80 ASoC: fix platform_no_drv_owner.cocci warnings
sound/soc/codecs/gtm601.c:86:4-9: 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

CC: Marek Belisko <marek@goldelico.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-06 20:29:43 +01:00
Marek Belisko
efc4720dfb ASoC: Add gtm601 codec driver
This driver add PCM interface to a GTM601 UMTS modem chip.
There is no configuration interface.

Signed-off-by: Marek Belisko <marek@goldelico.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-06 20:29:43 +01:00
Lars-Peter Clausen
e50b1e06b7 ASoC: dapm: Lock during userspace access
The DAPM lock must be held when accessing the DAPM graph status through
sysfs or debugfs, otherwise concurrent changes to the graph can result in
undefined behaviour.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-07-06 20:27:06 +01:00
Liam Girdwood
7084ffbff4 ASoC: topology: Fix TLV size calculation.
TLV size calculation was incorrectly calculated. Fix this according to
include/sound/tlv.h

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-02 12:40:09 +01:00
Charles Keepax
ffacb48e5a ASoC: dapm: Fix deadlock on auto-disable mux controls
The commit 02aa78abec ("ASoC: DAPM: Add APIs to create individual DAPM
controls.") added locking to the snd_soc_dapm_new_control function but
did not update the call to snd_soc_dapm_new_control in the auto-disable
mux code, this appears to be because the patches were sent at fairly
similar times.

This patch change the call in the auto-disable mux code to use the new
snd_soc_dapm_new_control_unlocked function instead.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-26 12:46:55 +01:00
Linus Torvalds
4570a37169 sound updates for 4.2-rc1
It was a busy development cycle at this time, as you can see a wide
 range of changes in diffstat.  There are no big changes but many
 refactoring and improvements.  Here we go some highlights:
 
 * ALSA core:
 - Procfs codes were cleaned up to use seq_file
 - Procfs can be opt out via Kconfig (only for EXPERT)
 - Two types of jack API were unified finally; now both kctl and input
   jack devs are handled via a single function call.
 
 * HD-audio
 - Continued code restructuring for the future ASoC driver; now HDA
   controller driver is split to a core helper module.
 - Preliminary codes for Skylake audio support in HDA core.
 - Proper i915 gfx power well management for SKL & co
 - Enabled runtime PM as default for Intel HDMI/DP codecs
 - Newer Tegra chip supports
 - More quirks for Dell headsets, Alienware (with CA0132), etc.
 - A couple of DRM ELD helper API functions
 
 * ASoC
 - Support for loading ASoC topology maps from firmware, intended to be
   used to allow self-describing DSP firmware images to be built which
   can map controls added by the DSP to userspace without the kernel
   needing to know about individual DSP firmwares
 - Lots of refactoring to avoid direct access to snd_soc_codec where
   it's not needed supporting future refactoring
 - Big refactoring, cleanup and enhancement for the Wolfson ADSP driver
 - Cleanup series for TI TAS2552 and R-CAR drivers
 - Fixes and improvements on RT56xx codecs
 - Support for TI TAS571x power amplifiers
 - Support for Qualcomm APQ8016 and ZTE ZX296702 SoCs
 - Support for x86 systems with RT5650 and Qualcomm Storm
 - Support for Mediatek AFE (Audio Front End) unit
 - Other various small fixes to ASoC codec drivers
 
 * Firewire
 - Enhanced to allow non-blocking streams to use timestamp
   synchronization
 - Improve support for DM1500 and BeBoBv3
 
 * Misc
 - Cleanup of old pci API functions over all PCI sound drivers
 - Fix long-standing regression of the old powermac i2c setup
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJVitjmAAoJEGwxgFQ9KSmksW8P/2ngNzNpo/bmmGh6xjB7GWU9
 RDAkqhKd6yvcClQojGS9n4a9CJ8nk5tdqTr9rMp58N7DRv6GYCPdq0A+lLOih+yC
 UPcTkTMBKm6UtvJjEcaasMxhvs5xno345oo5KrBdvlfv1rXe83dTtzEsybWYkaVD
 dJbbr5QFaiyj5cTp9nanK5kyTyDDXCdP+vjBGv5u9+GbVxQ6Eenyts89uSqEZs1F
 ltoBrl4VotXyqHKneJ0ttUKEimcVIgu8rCXH0sTtCg0SZVJFi+UXzI/VkkS+expL
 x9bNN6bw5UT9LA8+qybFRETx+8qchFsffzeUEle4wkIpVKXt/VqjP3GIvp6umlF5
 RhU5Wumf2KuIVjgVsYxd7bUkmHr4ywpqS3vSWMWU90FApJay7exatzLPyUVN0AxH
 pdAizc8NWFk1kVtWq8jr9agEdxDt2l+E9UXij+ViGyouMZL1oSvOo9NgovfwvfC6
 qKUisUkq53p1uPOW/U5gvF7bee2enEXMI9YUY1Z8MHx7nloq+25Nqma8P0gYthB8
 6Qk+t1oqC2p7ZMSkyVHH9nySQmoLITZHZmsHqqpLW+jFtanhuckDI75AvmrScs+r
 3+2YZXxPI0caZZ1qxMCd7Clmh7ZcSeRe73HXSXmF0xrLffISM3Yg3ZN10cbWQRj2
 D6TiHCspLpn+pcYLcWJ2
 =D78E
 -----END PGP SIGNATURE-----

Merge tag 'sound-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound updates from Takashi Iwai:
 "It was a busy development cycle at this time, as you can see a wide
  range of changes in diffstat.  There are no big changes but many
  refactoring and improvements.  Here we go some highlights:

  ALSA core:
   - Procfs codes were cleaned up to use seq_file
   - Procfs can be opt out via Kconfig (only for EXPERT)
   - Two types of jack API were unified finally; now both kctl and input
     jack devs are handled via a single function call.

  HD-audio:
   - Continued code restructuring for the future ASoC driver; now HDA
     controller driver is split to a core helper module.
   - Preliminary codes for Skylake audio support in HDA core.
   - Proper i915 gfx power well management for SKL & co
   - Enabled runtime PM as default for Intel HDMI/DP codecs
   - Newer Tegra chip supports
   - More quirks for Dell headsets, Alienware (with CA0132), etc.
   - A couple of DRM ELD helper API functions

  ASoC:
   - Support for loading ASoC topology maps from firmware, intended to
     be used to allow self-describing DSP firmware images to be built
     which can map controls added by the DSP to userspace without the
     kernel needing to know about individual DSP firmwares
   - Lots of refactoring to avoid direct access to snd_soc_codec where
     it's not needed supporting future refactoring
   - Big refactoring, cleanup and enhancement for the Wolfson ADSP
     driver
   - Cleanup series for TI TAS2552 and R-CAR drivers
   - Fixes and improvements on RT56xx codecs
   - Support for TI TAS571x power amplifiers
   - Support for Qualcomm APQ8016 and ZTE ZX296702 SoCs
   - Support for x86 systems with RT5650 and Qualcomm Storm
   - Support for Mediatek AFE (Audio Front End) unit
   - Other various small fixes to ASoC codec drivers

  Firewire:
   - Enhanced to allow non-blocking streams to use timestamp
     synchronization
   - Improve support for DM1500 and BeBoBv3

  Misc:
   - Cleanup of old pci API functions over all PCI sound drivers
   - Fix long-standing regression of the old powermac i2c setup"

* tag 'sound-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (533 commits)
  ALSA: pcm: Fix pcm_class sysfs output
  ALSA: hda-beep: Update authors dead email address
  ASoC: wm_adsp: Move DSP Rate controls into the codec
  ASoC: wm8995: Fix setting sysclk for WM8995_SYSCLK_MCLK2 case
  ALSA: hda: provide default bus io ops extended hdac
  ALSA: hda: add hda link cleanup routine
  ALSA: hda: add hdac_ext stream creation and cleanup routines
  ASoC: rsrc-card: remove unused ret
  ALSA: HDAC: move SND_HDA_PREALLOC_SIZE to core
  ASoC: mediatek: Add machine driver for rt5650 rt5676 codec
  ASoC: mediatek: Add machine driver for MAX98090 codec
  ASoC: mediatek: Add AFE platform driver
  ASoC: rsnd: remove io from rsnd_mod
  ASoC: rsnd: move rsnd_mod_is_working() to rsnd_io_is_working()
  ASoC: rsnd: don't use rsnd_mod_to_io() on snd_kcontrol
  ASoC: rsnd: don't use rsnd_mod_to_io() on rsnd_src_xxx()
  ASoC: rsnd: don't use rsnd_mod_to_io() on rsnd_ssi_xxx()
  ASoC: rsnd: don't use rsnd_mod_to_io() on rsnd_dma_xxx()
  ASoC: rsnd: don't use rsnd_mod_to_io() on rsnd_get_adinr()
  ASoC: rsnd: add common interrupt handler for SSI/SRC/DMA
  ...
2015-06-25 17:15:18 -07:00
Linus Torvalds
1a13e36a79 fbdev changes for 4.2
* ssd1307fb: various fixes and improvements, SSD1305 support
 * Use architecture agnostic functions instead of MTRR functions in various
   fbdev drivers
 * TI DRA7xx SoC display support (arch/arm/ side)
 * OMAPDSS componentization to fix probing order issues
 * OMAPDSS scaling fixes
 * msm_fb: remove obsoleted driver
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJViP8kAAoJEPo9qoy8lh71RqQP/3YnFrHQj1G/EDw4EvaUrcJb
 MiEbc6Q1/OkG+KWls8kNFi0Mm5PeXlOYgjYukr9mFS0C/BxceU/Aqg/+1TqGSMe4
 kZArCTKWa3ZyU2TUwmPPpeUPeUTUBBXrVBdfqtfNzs2wQKunwQX9MlKQnDHnCZJD
 4kUsK12iW5C+EW0fDWDEg9GwEe/cJ6jBLEYWPTg/1ePtrKKGp8O6kEEtOTVwaKT+
 EdStaPOTUKvCgdcfVQhIgKcym2t4/BeFEt2moxDU9vwClatGbXmTDIru2iCrGgIU
 VFGIjOetVwRe0h+8zpYTATxvJPxmjWYL7HhJ0SbFNMDlZephdJxZGJbgszxHZCW/
 ap1fnxWvW2LZ48JsZSmHTnWK0CoX3WGs+Q+TWqMHy1ID8jkOc2SkHeB3IzCyOG/V
 NwUNvDyooyNV0J8ywbBXIMVmlg7YE3AgNROFlApqm2rF5fhtTO3HER71ALBZckEH
 FXRN4tsyLQXbzmuHcQgY3ENxPZgPYM0usSdAVWSU/vIXrhdnWGA7nWE7bRg508Hd
 aHhpw5HrH8L+4nNwDvd4Dai9Ye8DimWvIPdb1wH8mZ2c81sLxCTkePqkAc7AXo54
 UOkXSWjUBu1i8w/BZqXT9U/dU+aCDQ9beNDFLrZQLwrwtHASyyJY75Hi3DtcZyBQ
 HUAWB45Gu2f+k7PCGsRQ
 =Ix8O
 -----END PGP SIGNATURE-----

Merge tag 'fbdev-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux

Pull fbdev updates from Tomi Valkeinen:

 - ssd1307fb: various fixes and improvements, SSD1305 support

 - use architecture agnostic functions instead of MTRR functions in
   various fbdev drivers

 - TI DRA7xx SoC display support (arch/arm/ side)

 - OMAPDSS componentization to fix probing order issues

 - OMAPDSS scaling fixes

 - msm_fb: remove obsoleted driver

* tag 'fbdev-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (77 commits)
  msm: msm_fb: Remove dead code
  OMAPDSS: HDMI: wait for framedone when stopping video
  OMAPDSS: HDMI4: fix error handling
  OMAPDSS: DISPC: scaler debug print
  OMAPDSS: DISPC: do only y decimation on OMAP3
  OMAPDSS: DISPC: check if scaling setup failed
  OMAPDSS: DISPC: fix 64 bit issue in 5-tap
  OMAPDSS: DISPC: fix row_inc for OMAP3
  OMAPDSS: DISPC: add check for scaling limits
  OMAPDSS: DISPC: fix check_horiz_timing_omap3 args
  OMAPDSS: DISPC: fix predecimation for YUV modes
  OMAPDSS: DISPC: work-around for errata i631
  OMAPDSS: simplify submodule reg/unreg code
  OMAPDSS: componentize omapdss
  OMAPDSS: reorder uninit calls
  OMAPDSS: remove uses of __init/__exit
  OMAPDSS: fix dss_init_ports error handling
  OMAPDSS: refactor dss probe function
  OMAPDSS: move 'dss_initialized' to dss driver
  fbdev: propagate result of fb_videomode_from_videomode()
  ...
2015-06-23 16:23:30 -07:00
Linus Torvalds
2ad7b44f5d Merge branch 'for-linus-clk' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Pull clkdev updates from Russell King:
 "This series addresses some breakage in clkdev caused by a previous
  patch set from the clk tree which introduced per-user clk structures.
  This basically renamed the existing 'struct clk' to 'struct clk_hw',
  and introduced a new 'struct clk'.

  This change will break anyone using clk_add_alias() with the common
  clk code enabled.  Thankfully, the intersection of users of
  clk_add_alias() and those using the common clk code is practically
  zero, but this is something which should be fixed to keep the code
  sane.

  The problem is that clk_add_alias() does this:

        r = clk_get(...);
        l = clkdev_alloc(r, ...);
        clk_put(...);

  which causes the alias to store a pointer to 'r', which has been
  freed.

  The original patch set tried to work around this problem incorrectly -
  at clk_get() time, it tried to convert the struct clk to a struct
  clk_hw, and then creating a new struct clk from that.  Clearly, if the
  original struct clk has been freed, then we have a use-after-free bug.

  We have other places in the tree which do something similar, so this
  series also addresses those locations too.

  This series addresses this problem by converting clkdev to store and
  use the clk_hw pointer.  This allows clk_get() to only have to create
  it's per-user struct clk from the clk_hw.  We can also get to the
  desired clk_hw at clk_add_alias() or clk lookup creation time, when
  the struct clk is "alive".

  We also perform some cleanups of the code:

   - replacing looped calls to clkdev_add() with clkdev_add_table()

   - replacing open-coded lookup allocation (which should have been
     using clkdev_alloc()) and subsequent clkdev_add() with
     clkdev_create()

   - replacing open-coded clk_add_alias() with clk_add_alias()"

* 'for-linus-clk' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
  clk: s2mps11: use clkdev_create()
  ASoC: migor: use clkdev_create()
  ARM: omap2: use clkdev_add_alias()
  ARM: omap2: use clkdev_create()
  ARM: orion: use clkdev_create()
  ARM: lpc32xx: convert to use clkdev_add_table()
  SH: use clkdev_add_table()
  clkdev: add clkdev_create() helper
  clkdev: const-ify connection id to clk_add_alias()
  clkdev: get rid of redundant clk_add_alias() prototype in linux/clk.h
  clkdev: drop __init from clkdev_add_table()
  clk: update clk API documentation to clarify clk_round_rate()
  clkdev: use clk_hw internally
2015-06-23 15:50:46 -07:00
Koro Chen
4623a614e8 ASoC: mediatek: Fix unbalanced calls to runtime suspend/resume
This adds call to runtime suspend in dev remove. It fixs the problem that
suspend is not called in the case of CONFIG_PM=n. It also fixs build
warning when CONFIG_PM=n.

Signed-off-by: Koro Chen <koro.chen@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-23 12:10:01 +01:00
Takashi Iwai
c7988afde7 ASoC: A couple more updates for v4.2
These were sitting on my laptop.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJVh+HbAAoJECTWi3JdVIfQ4pEH/0MZfYrxtxtft/Vt8/QYS6ah
 U/VBzIEGN7Phv15Eqspww+IKK9nIsuI8Iy+Qbm+gsWUy31m+07Lg/LuE6rEetbg2
 xsJ/f4J81rCQTBvrvDXCevvTnw5W6vy9F5ZEi6RmXSTw8W6NDbAmBZXnZ8yCapLU
 QPhCxaffCXujpV302wponlIlIYO4CnkqyaMTuBAKsaIeMjDjGewDy7xqJ3spihcn
 qDNvzdfIMTxBby+E6hJRHnA4JrJH9mP21xEOp9QJ9vKdw79C1XaVAWgeYaJ55YKl
 v1aFc7Ryn97LAKAeLcK/d2qA8y9dNUrTEin/MQs41blOKj0WA1eQ991ugjS49Mw=
 =ypFd
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v4.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next

ASoC: A couple more updates for v4.2

These were sitting on my laptop.
2015-06-22 13:25:34 +02:00
Mark Brown
f76b240206 Merge remote-tracking branch 'asoc/topic/rcar' into asoc-next 2015-06-22 11:19:46 +01:00
Mark Brown
6791142f41 Merge remote-tracking branch 'asoc/topic/arizona' into asoc-next 2015-06-22 11:19:45 +01:00
Takashi Iwai
57fa8a1e22 ASoC: Further updates for v4.2
There's a bunch of additional updates and fixes that came in since my
 orignal pull request here, including DT support for rt5645 and fairly
 large serieses of cleanups and improvements to tas2552 and rcar.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJVh9RgAAoJECTWi3JdVIfQZjYH/3t48LgdB5dxKxIhn70kiaUx
 DqXCIkFOvkum1KUU3VTgcCZAT/dOEvbAY2S8PtxKbPRyRpmY1CqyXDEL7fXICl+y
 kyDBhZYKdzVlf+LBb4TIOibaRONQqJNATRWFN8bJu0L9wzqo2jUjZSYqpJxuvnYD
 U9T4P0dNbIN35ioVrK/0QPt6V2bCPs/qw3UwXmojl2T/4JDATdE+2yJO/SXzdEdR
 qq5aRtS+Ak6yx5DpWw/QBkt85NrbuwyoeYRNQuRXCOAWC8SPmHB/H+aNsvMNAcP1
 UZuRVtxPXjkFp6OVDJ4rIOg8hVb0cfXqUfnj+syEpZxtmRcS7Wwi1Y2M3BJMV1A=
 =H6q+
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v4.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next

ASoC: Further updates for v4.2

There's a bunch of additional updates and fixes that came in since my
orignal pull request here, including DT support for rt5645 and fairly
large serieses of cleanups and improvements to tas2552 and rcar.
2015-06-22 11:32:41 +02:00
Mark Brown
c99d49a8f8 Merge remote-tracking branch 'asoc/topic/wm8995' into asoc-next 2015-06-22 10:24:37 +01:00
Mark Brown
e12be671ad Merge remote-tracking branches 'asoc/topic/wm8523' and 'asoc/topic/wm8741' into asoc-next 2015-06-22 10:24:36 +01:00
Mark Brown
e39f6bc7de Merge remote-tracking branch 'asoc/topic/tas2552' into asoc-next 2015-06-22 10:24:35 +01:00
Mark Brown
6afff9e060 Merge remote-tracking branch 'asoc/topic/simple' into asoc-next 2015-06-22 10:24:35 +01:00
Mark Brown
71d8c2d783 Merge remote-tracking branches 'asoc/topic/qcom', 'asoc/topic/rcar', 'asoc/topic/rt286' and 'asoc/topic/rt5640' into asoc-next 2015-06-22 10:24:33 +01:00
Mark Brown
861fe71725 Merge remote-tracking branches 'asoc/topic/mediatek', 'asoc/topic/ml26124' and 'asoc/topic/omap' into asoc-next 2015-06-22 10:24:31 +01:00
Mark Brown
dacdd36911 Merge remote-tracking branches 'asoc/topic/intel' and 'asoc/topic/max98090' into asoc-next 2015-06-22 10:24:30 +01:00
Mark Brown
1cdf4f6113 Merge remote-tracking branch 'asoc/topic/fsl' into asoc-next 2015-06-22 10:24:30 +01:00
Mark Brown
2924c96276 Merge remote-tracking branch 'asoc/topic/davinci' into asoc-next 2015-06-22 10:24:30 +01:00
Mark Brown
95baa281a3 Merge remote-tracking branches 'asoc/topic/adsp' and 'asoc/topic/atmel' into asoc-next 2015-06-22 10:24:28 +01:00
Mark Brown
f79a9db83c Merge remote-tracking branch 'asoc/topic/rt5670' into asoc-next 2015-06-22 10:24:28 +01:00