summaryrefslogtreecommitdiff
path: root/sound/soc
AgeCommit message (Collapse)Author
2014-10-01Merge branch 'topic/rt5640' of ↵Mark Brown
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel
2014-10-01ASoC: rt5640: Add function for enabling DMIC from ACPI probed machineJarkko Nikula
There is no code enabling DMIC clock in systems that don't provide platform data for rt5640 after commit 71d97a794301 ("ASoC: rt5640: Use the platform data for DMIC settings"). I think it's worth to keep this static DMIC clock and alternative data pin setting during probe time. For making possible to use DMIC from ACPI probed machine (prior ACPI 5.1 with _DSD) this patch moves DMIC configuration to new exported rt5640_dmic_enable() that machine drivers can call. Please note, this patch moves DMIC configuration from i2c probe to codec probe in case platform data for rt5640 is set. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Cc: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-01ASoC: davinvi-mcasp: Proper suspend/resume support while audio is activePeter Ujfalusi
If the board is sent to suspend (deep sleep) the McASP context will be lost. In case when suspend happens during active audio we need to save and restore more registers, which was configured during hw_param times as well. We need to add more config registers, AFIFO control registers and we also need to save and restore the serializer configuration as well. Since the number of serializers depends on the SoC we need to allocate the memory for it based on the num_serializer for the given McASP instance. With this patch the ongoing stream will resume after resuming from deep sleep. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-01ASoC: davinci-mcasp: Convert the context save/restore to use arrayPeter Ujfalusi
Instead of individual values use an array to store the registers need to be saved on suspend and restored on resume. It is going to be easier to add more registers to save and restore. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-01Merge tag 'asoc-v3.17-rc7' of ↵Takashi Iwai
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fix SSM2602 device identification Another fix for v3.17, fixing device identification after the split out of the I2C and SPI code.
2014-09-30ASoC: fsl_ssi: Remove unneeded 'i2s-slave' propertyFabio Estevam
There is no need to use 'i2s-slave' property, since master/slave configuration are passed via machine layer. This change does not break existing users because they do check for slave mode inside sound/soc/fsl/mpc8610_hpcd.c/p1022_ds.c/p1022_rdk.c Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Timur Tabi <timur@tabi.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-30ASoC: ssm2602: add support for 11.025kHz and 22.5kHz sample ratesStefan Kristiansson
This adds the necessary values to the constraint list and register values to the coefficient table in order to configure the device for 11.025kHz and 22.5kHz sample rates. Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi> Signed-off-by: Mark Brown <broonie@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2014-09-30ASoC: ssm2602: add device tree bindingsStefan Kristiansson
Allow the ssm2602/ssm2603/ssm2604 codec driver to be instantiated from the device tree. Also, add Kconfig prompts to allow manual selection of both the I2C and SPI configuration versions of the driver. Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi> Signed-off-by: Mark Brown <broonie@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2014-09-30ASoC: ssm2602: do not hardcode type to SSM2602Stefan Kristiansson
The correct type (SSM2602/SSM2603/SSM2604) is passed down from the ssm2602_spi_probe()/ssm2602_spi_probe() functions, so use that instead of hardcoding it to SSM2602 in ssm2602_probe(). Fixes: c924dc68f737 ("ASoC: ssm2602: Split SPI and I2C code into different modules") Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi> Signed-off-by: Mark Brown <broonie@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Cc: stable@vger.kernel.org
2014-09-29ASoC: rt5677: Add dts properties for input/output differential configurationAnatol Pomozov
Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-29ASoC: Intel: byt-rt5640: Add quirk for Asus T100Jarkko Nikula
Asus T100 internal microphone is not digital but analogue connected to IN1P pin of the RT564x codec with shared bias between internal and headset microphones. Because of this there is need to have machine specific DAPM routes in byt-rt5640. Add handling for them with the help of DMI quirk that is used to add custom routes in addition to common. Because "Internal Mic" connected to DMIC1 is not common to all move it as a default custom route when there is no match in quirk table. Custom "Internal Mic" -> "IN1P" with MICBIAS1 route is added for Asus T100. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-29ASoC: Intel: byt-rt5640: Remove IN2N pin from DAPM route tableJarkko Nikula
I tested couple byt-rt5640 based platforms and they have single-ended headset microphone connection to IN2P only. I guess IN2N was either defined by accident or some early platform had floating ground for headset. It's better to remove IN2N and add a custom route for such a platform if needed. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-29ASoC: Remove CODEC pointer from snd_soc_dapm_contextLars-Peter Clausen
The only remaining user of the CODEC pointer in the DAPM struct is to initialize the CODEC pointer in the widget struct. The later is scheduled for removal, but has still a few users left. For now use dapm->component->codec to initialize it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-29ASoC: rx51: Use snd_soc_dapm_to_codec() instead of dapm->codecLars-Peter Clausen
The CODEC struct in the snd_soc_dapm_context struct is deprecated and scheduled for removal. Use the snd_soc_dapm_to_codec() function instead. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-29ASoC: wm8{350,753,971}: Use snd_soc_dapm_to_codec() instead of dapm->codecLars-Peter Clausen
The CODEC struct in the snd_soc_dapm_context struct is deprecated and scheduled for removal. Use the snd_soc_dapm_to_codec() function instead. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-29ASoC: davinci: vcif must be a module if SND_DAVINCI_SOC isArnd Bergmann
It is possible to configure a kernel with SND_DAVINCI_SOC=m and SND_DM365_VOICE_CODEC=y, which results in a link error: sound/built-in.o: In function `davinci_vcif_probe': sound/soc/davinci/davinci-vcif.c:223: undefined reference to `davinci_soc_platform_register' The best way to avoid this is to make SND_DM365_VOICE_CODEC a tristate option that depends on SND_DAVINCI_SOC, so it can only be a module or disabled when the base driver is a loadable module Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-28Merge remote-tracking branches 'asoc/fix/atmel', 'asoc/fix/compress', ↵Mark Brown
'asoc/fix/core', 'asoc/fix/fsl-ssi' and 'asoc/fix/rt286' into asoc-linus
2014-09-28ASoC: Intel: byt-max98090: Set card as fully routedJarkko Nikula
All byt-max98090 audio connections are known and described in DAPM routing table. Set the fully_routed flag in order to disable unused codec pins. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-28Merge branch 'fix/max98090' of ↵Mark Brown
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel
2014-09-28ASoC: max98090: Enable both DMIC channels also when using mono configurationJarkko Nikula
According to MAX98090 specification "Digital microphone clock (DMC) is enabled once both data channels are enabled.". Therefore both digital microphone data channels must be enabled also when using mono microphone configuration. Fix this by moving "DMICL_ENA" and "DMICR_ENA" supply widgets from "DMICL" and "DMICR" inputs to "DMIC Mux" in order to enable both data channels whenever there is active mono or stereo digital microphone input path. Use of "DMICL" and "DMICR" inputs are retained for informative source and in case the driver would find use for exact digital microphone configuration in the future. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-28ASoC: core: fix possible ZERO_SIZE_PTR pointer dereferencing error.Xiubo Li
Since we cannot make sure the 'params->num_regs' will always be none zero here, and then if it equals to zero, the kmemdup() will return ZERO_SIZE_PTR, which equals to ((void *)16). So this patch fix this with just doing the zero check before calling kmemdup(). Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2014-09-27ASoC: ssm4567: Add driver for Analog Devices SSM4567 amplifierAnatol Pomozov
Analog Devices SSM4567 is a boost class-D audio amplifier. Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-26ASoC: rt286: Fix sync functionBard Liao
We try to write index registers into cache when we write an index register, but we change the reg value before updating the cache. As a result, the cache is never be updated. This patch will fix this issue. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2014-09-26ASoC: rt286: Correct default valueBard Liao
This patch corrects some incorrect default value in the cache. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2014-09-26mfd: arizona: Add ASYNC_SAMPLE_RATE_2 registersCharles Keepax
Some arizona devices have a second asynchronous sample rate, add the registers necessary to support this. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Mark Brown <broonie@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-09-25ASoC: wm8741: Remove unused wm8741_suspend defineLars-Peter Clausen
This driver has no suspend callback. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-25ASoC: Intel: mfld-pcm: add control for powering up/down dspVinod Koul
When we have PCM (FE/BE) opened or DAPM widgets triggered we need power up/down DSP accordingly. The DSP will do ref count of these requests i.e. link these runtime_get/put calls of DSP Also fix some preexisting spacing error. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-24ASoC: soc-compress: fix double unlock of fe card mutexQiao Zhou
Fix double unlock of fe card mutex introduced by patch 8f70e515a8bb "ASoC: soc-pcm: fix dpcm_path_get error handling" The first unlock is at line 106, and the unlock is at line 149. we should remove the first unlock. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Qiao Zhou <zhouqiao@marvell.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-24ASoC: rt5677: Add a configuration option for LDO2_POW pinAnatol Pomozov
Some boards have this pin statically tied and do not require any configuration, some other boards allow to enable chip using GPIO. Add an option that tells which GPIO is used to power the audio codec. Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-24ASoC: max98090: Remove unused byte access macrosJarkko Nikula
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-24ASoC: max98090: Remove unused version defineJarkko Nikula
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-24ASoC: max98090: Remove structure member extmic_mux from private dataJarkko Nikula
There is no other use for extmic_mux than setting it to zero so remove it. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-24ASoC: max98090: Remove structure member irq from private dataJarkko Nikula
struct max98090_priv member irq is now used only locally in max98090_i2c_probe() and can be removed. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-24ASoC: max98090: Move interrupt request from codec probe to i2c probeJarkko Nikula
Keep MAX98090 interrupt requested after i2c device probing as long as the driver is loaded. This fixes the issue where subsequent codec probe max98090_probe() call fails in interrupt request since interrupt wasn't freed over codec remove-reprobe cycle. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-24ASoC: core: Fix volsw_range funcs so SOC_DOUBLE_R_RANGE_TLV works.Howard Mitchell
This fixes a bug when using the SOC_DOUBLE_R_RANGE_TLV macro in the invert mode. In the non-invert case, e.g. SOC_DOUBLE_R_RANGE_TLV("<name>", <reg_l>, <reg_r>, 0, 40, 255, 0, <tlv>) the range sent to the hardware is 40..255, but in the invert case: SOC_DOUBLE_R_RANGE_TLV("<name>", <reg_l>, <reg_r>, 0, 40, 255, 1, <tlv>) the range 215..0 was being sent to the hardware. This commit corrects this to 255..40 so it is consistent with the non-invert case. Signed-off-by: Howard Mitchell <hm@hmbedded.co.uk> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-23ASoC: Fix snd_soc_{new,free}_ac97_codec() locking removalLars-Peter Clausen
Commit e3f205a72c45 ("ASoC: Remove locking in snd_soc_{new,free}_ac97_codec()") overlooked a unlock on one of the error paths. Fixes: e3f205a72c45 ("ASoC: Remove locking in snd_soc_{new,free}_ac97_codec()") Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-22ASoC: fsl_ssi: fix kernel panic in probe functionMichael Trimarchi
code can raise a panic when the ssi_private->pdev is null [...] /* * If codec-handle property is missing from SSI node, we assume * that the machine driver uses new binding which does not require * SSI driver to trigger machine driver's probe. */ if (!of_get_property(np, "codec-handle", NULL)) goto done; [...] ssi_private->pdev = platform_device_register_data(&pdev->dev, name, 0, NULL, 0); [...] done: if (ssi_private->dai_fmt) _fsl_ssi_set_dai_fmt(ssi_private, ssi_private->dai_fmt); Proposal was to not use ssi_private->pdev->dev here but adding a new parameter of *dev pointer to this _set_dai_fmt() -- passing pdev->dev in probe() and cpu_dai->dev in fsl_ssi_set_dai_fmt(). Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Reported-by: Jean-Michel Hautbois <jean-michel.hautbois@vodalys.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-22ASoC: Remove locking in snd_soc_{new,free}_ac97_codec()Lars-Peter Clausen
snd_soc_new_ac97_codec() and snd_soc_free_ac97_codec() are called from within a CODEC's probe() and remove() callbacks. Those will not run concurrently against each other for the same CODEC instance, hence it is not necessary to protect the two functions with a mutex. This removes the last user in the ASoC core of the snd_soc_codec mutex field and will allow us to eventually remove it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-22ASoC: rt5677: Add sidetone functionOder Chiou
Add sidetone function Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com> Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-17ASoC: fsl_ssi: refine ipg clock usage in this moduleShengjiu Wang
Check if ipg clock is in clock-names property, then we can move the ipg clock enable and disable operation to startup and shutdown, that is only enable ipg clock when ssi is working and keep clock is disabled when ssi is in idle. But when the checking is failed, remain the clock control as before. Tested-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-17ASoC: rt5677: Add the TDM functionOder Chiou
The patch adds the TDM function. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-17ASoC: Remove return value checking for gpiochip_remove()Axel Lin
gpiochip_remove() will return void eventually. Thus this patch removes return value checking for gpiochip_remove(). Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-16ASoC: Intel: mrfld: Use snd_soc_dai_get_drvdata to derive drv dataSubhransu S. Prusty
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>
2014-09-16ASoC: cs35l32: remove second linux/slab.h inclusionFabian Frederick
linux/slab.h was included twice. Signed-off-by: Fabian Frederick <fabf@skynet.be> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-16ASoC: Intel: mrfld: add bytes control for modulesVinod Koul
This patch add support for various modules like eq etc for mrfld DSP. All these modules will be exposed to usermode as bytes controls. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-16ASoC: Intel: mfld-pcm: don't call trigger ops to DSP for internal streamsVinod Koul
For internal stream i.e. BE we have don't need trigger ops as that would be handled by DAPM for us in subsequent patches Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-16ASoC: rt5677: Add the GPIO functionOder Chiou
The patch adds the GPIO function. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-15Merge remote-tracking branches 'asoc/fix/cs4265', 'asoc/fix/davinci', ↵Mark Brown
'asoc/fix/rockchip', 'asoc/fix/samsung' and 'asoc/fix/tlv320aic31xx' into asoc-linus
2014-09-15Merge remote-tracking branch 'asoc/fix/pcm' into asoc-linusMark Brown
2014-09-15Merge remote-tracking branch 'asoc/fix/core' into asoc-linusMark Brown