summaryrefslogtreecommitdiffstats
path: root/sound
AgeCommit message (Collapse)AuthorFilesLines
2014-10-06Merge remote-tracking branch 'asoc/topic/dapm' into asoc-nextMark Brown1-1/+2
2014-10-06Merge remote-tracking branch 'asoc/topic/core' into asoc-nextMark Brown1-17/+13
2014-10-06Merge remote-tracking branch 'asoc/topic/component' into asoc-nextMark Brown16-483/+701
2014-10-06Merge remote-tracking branches 'asoc/fix/davinci' and 'asoc/fix/max98090' ↵Mark Brown2-3/+4
into asoc-linus
2014-10-06Merge tag 'asoc-v3.17-rc4' into asoc-linusMark Brown2-2/+112
ASoC: Fixes for v3.17 Another round of again fairly unexciting fixes - several driver fixes, an e-mail address change and a fix for error handling with DPCM. # gpg: Signature made Wed 10 Sep 2014 12:26:54 BST using RSA key ID 5D5487D0 # gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>" # gpg: aka "Mark Brown <broonie@debian.org>" # gpg: aka "Mark Brown <broonie@kernel.org>" # gpg: aka "Mark Brown <broonie@tardis.ed.ac.uk>" # gpg: aka "Mark Brown <broonie@linaro.org>" # gpg: aka "Mark Brown <Mark.Brown@linaro.org>"
2014-10-03ASoC: dapm: Fix NULL pointer dereference when registering card with widgetsJarkko Nikula1-1/+2
Commit 0bd2ac3dae74 ("ASoC: Remove CODEC pointer from snd_soc_dapm_context") introduced regression to snd_soc_dapm_new_controls() when registering a card with card->dapm_widgets set. Call chain is: snd_soc_register_card() -> snd_soc_instantiate_card() -> snd_soc_dapm_new_controls() -> snd_soc_dapm_new_control() Null pointer dereference occurs since card->dapm context doesn't have associated component. Fix this by setting widget codec pointer conditionally. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-02ASoC: Export dapm_kcontrol_get_valueSubhransu S. Prusty1-1/+2
The DSP driver needs to know widget control value in its event handler for widgets like mixers. This is required in the subsequent patches 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-10-01Merge tag 'asoc-v3.17-rc7' of ↵Takashi Iwai1-1/+1
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: ssm2602: do not hardcode type to SSM2602Stefan Kristiansson1-1/+1
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-30Merge tag 'asoc-v3.17-rc6' of ↵Takashi Iwai4-14/+13
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v3.17 A few small driver specific fixes and a couple of error handling fixes in the core.
2014-09-29ASoC: Remove CODEC pointer from snd_soc_dapm_contextLars-Peter Clausen2-2/+1
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 Clausen1-1/+1
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 Clausen3-3/+3
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 Bergmann1-1/+2
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 Brown41-150/+260
'asoc/fix/core', 'asoc/fix/fsl-ssi' and 'asoc/fix/rt286' into asoc-linus
2014-09-28ASoC: max98090: Enable both DMIC channels also when using mono configurationJarkko Nikula1-2/+2
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 Li1-1/+1
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-26ASoC: rt286: Fix sync functionBard Liao1-1/+1
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 Liao1-3/+2
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-24ASoC: soc-compress: fix double unlock of fe card mutexQiao Zhou1-4/+2
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: core: Fix volsw_range funcs so SOC_DOUBLE_R_RANGE_TLV works.Howard Mitchell1-8/+12
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 Clausen1-1/+0
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 Trimarchi1-5/+7
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 Clausen1-8/+1
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-22ALSA: snd-usb-caiaq: Fix LED commands for Kore controllerDaniel Mack1-7/+11
KoreController and KoreController2 need an EP1_CMD_DIMM_LEDS command to set their LEDs, not EP1_CMD_WRITE_IO. Signed-off-by: Daniel Mack <daniel@zonque.org> Reported-and-tested-by: Brad Wilson <brad.wilson.00@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-22ALSA: pcm: fix fifo_size frame calculationClemens Ladisch1-3/+5
The calculated frame size was wrong because snd_pcm_format_physical_width() actually returns the number of bits, not bytes. Use snd_pcm_format_size() instead, which not only returns bytes, but also simplifies the calculation. Fixes: 8bea869c5e56 ("ALSA: PCM midlevel: improve fifo_size handling") Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-19ALSA: hda - Add fixup model name lookup for Lemote A1205Huacai Chen1-0/+1
Lemote A1004 is already added in commit a2dd933d01f (ALSA: hda - Add fixup name lookup for CX5051 and 5066 codecs), but Lemote A1205 has missing. Signed-off-by: Huacai Chen <chenhc@lemote.com> Cc: <stable@vger.kernel.org> # 3.15+ Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-16Merge tag 'asoc-v3.17-rc4' of ↵Takashi Iwai10-32/+78
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v3.17 This is mostly driver fixes, the biggest one being the tlv320aic31xx which is relatively large but simple and device specific. There's a small fix in the error handling in DPCM too which is relatively minor error handling fix.
2014-09-15Merge remote-tracking branches 'asoc/fix/cs4265', 'asoc/fix/davinci', ↵Mark Brown5-24/+62
'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 Brown2-2/+10
2014-09-15Merge remote-tracking branch 'asoc/fix/core' into asoc-linusMark Brown3-6/+6
2014-09-13ASoC: rockchip-i2s: fix registers' property of rockchip i2s controllerJianqun1-3/+3
Reference rockchip I2S controller TRM, modify some registers' property I2S_FIFOLR: read / write, but not volatile, not precious I2S_INTSR: read / write I2S_CLR: volatile, register value will be cleared by read Test on RK3288 with max98090. Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-13ASoC: rockchip-i2s: fix master mode set bit errorJianqun1-3/+4
Fix error format set to I2S master or slave mode. Test on RK3288 board with max98090. Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-11ASoC: cs4265: Fix register address to set the proper data type.Paul Handrigan1-3/+3
The SPDIF control register must be written to set the data type in hw_params not the ADC control register. Signed-off-by: Paul Handrigan <Paul.Handrigan@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2014-09-11ALSA: hda - Fix invalid pin powermap without jack detectionTakashi Iwai1-5/+12
When a driver is set up without the jack detection explicitly (either by passing a model option or via a specific fixup), the pin powermap of IDT/STAC codecs is set up wrongly, resulting in the silence output. It's because of a logic failure in stac_init_power_map(). It tries to avoid creating a callback for the pins that have other auto-hp and auto-mic callbacks, but the check is done in a wrong way at a wrong time. The stac_init_power_map() should be called after creating other jack detection ctls, and the jack callback should be created only for jack-detectable widgets. This patch fixes the check in stac_init_power_map() and its callee at the right place, after snd_hda_gen_build_controls(). Reported-by: Adam Richter <adam_richter2004@yahoo.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-10Merge remote-tracking branches 'asoc/fix/davinci', 'asoc/fix/max98090', ↵Mark Brown5-17/+164
'asoc/fix/samsung' and 'asoc/fix/tlv320aic31xx' into asoc-linus
2014-09-10Merge remote-tracking branch 'asoc/fix/pcm' into asoc-linusMark Brown2-2/+10
2014-09-10Merge remote-tracking branch 'asoc/fix/core' into asoc-linusMark Brown3-6/+6
2014-09-10ASoC: soc-pcm: fix dpcm_path_get error handlingQiao Zhou2-2/+10
dpcm_path_get may return -ENOMEM when allocating memory for list fails. We should not keep processing path or start up dpcm dai in this case. Signed-off-by: Qiao Zhou <zhouqiao@marvell.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-09ASoC: samsung-i2s: Check secondary DAI exists before referencingCharles Keepax1-2/+3
In a couple of places the driver is missing a check to ensure there is a secondary DAI before it de-references the pointer to it, causing a null pointer de-reference. This patch adds a check to avoid this. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
2014-09-09ASoC: Update email id of the authorRajeev Kumar3-5/+5
I moved from ST Microelectronics and so updating email-id to personal one. Signed-off-by: Rajeev Kumar <rajeevkumar.linux@gmail.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-09-06ASoC: Remove table based DAPM/control setup support from snd_soc_platform_driverLars-Peter Clausen1-52/+6
There are no users left and new users should rather use the component_driver struct embedded in the snd_soc_platform_driver struct to do this. E.g.: static const struct snd_soc_platform_driver foobar_driver = { .component_driver = { .dapm_widgets = ..., .num_dapm_widgets = ..., ..., }, ... }; instead of static const struct snd_soc_platform_driver foobar_driver = { .dapm_widgets = ..., .num_dapm_widgets = ..., ... }; This also allows us to remove the steal_sibling_dai_widgets hack. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-09-06ASoC: sst-haswell-pcm: Move controls and DAPM elements to componentLars-Peter Clausen1-17/+15
The sst-haswell-pcm driver registers both a snd_soc_component and a snd_soc_platform and expects that the DAPM widgets for the DAIs registered by component are added to the DAPM context of the platform. This requires us to have a hack in the ASoC core which does so. Moving the DAPM elements over to the component allows us to remove this hack. While we are at it also move the controls over to the component. The controls don't need the platform for anything other than snd_soc_platform_get_drvdata(), this can easily be replaced by snd_soc_component_get_drvdata(). As the long term goal is to register only a single component this is a step in the right direction. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-09-06ASoC: sst-haswell-pcm: Alloc state struct in driver probe()Lars-Peter Clausen1-11/+13
Resource allocations should happen in driver probe callback rather than in snd_soc_platform probe functions. Especially if the resource is device managed. The snd_soc_* probe/remove functions are mainly intended to be used for things that require the component to be already bound to a card. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-09-06Merge branch 'topic/component' of ↵Mark Brown4-394/+313
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel
2014-09-06ASoC: dwc: Update email id of the authorRajeev Kumar1-1/+1
I moved from ST Microelectronics and the email-id no longer exists. Update email-id to personal one, Signed-off-by: Rajeev Kumar <rajeevkumar.linux@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-04ASoC: davinci-mcasp: Correct rx format unit configurationPeter Ujfalusi1-1/+10
In case of capture we should not use rotation. The reverse and mask is enough to get the data align correctly from the bus to MCU: Format data from bus after reverse (XRBUF) S16_LE: |LSB|MSB|xxx|xxx| |xxx|xxx|MSB|LSB| S24_3LE: |LSB|DAT|MSB|xxx| |xxx|MSB|DAT|LSB| S24_LE: |LSB|DAT|MSB|xxx| |xxx|MSB|DAT|LSB| S32_LE: |LSB|DAT|DAT|MSB| |MSB|DAT|DAT|LSB| With this patch all supported formats will work for playback and capture. Reported-by: Jyri Sarha <jsarha@ti.com> (broken S24_3LE capture) Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2014-09-03Merge tag 'asoc-v3.17-rc3' of ↵Takashi Iwai82-225/+234
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v3.17 A few more driver specific fixes on top of the currently pending fixes (which are already in your tree but not Linus').
2014-09-03ASoC: max98090: Add recovery for PLL lock failureJarkko Nikula2-2/+112
All MAX98090 input clocks MCLK, LRCLK and BCLK must be running and stable before powering on the codec in slave mode. Otherwise the PLL may not lock to LRCLK causing silence in playback and capture. How often that happens is somewhat hardware and clock configuration specific. Now if wanting to follow strictly this clocks must be active before powering the codec on requirement we should have a notification from DAI driver to codec driver when clocks are activated and take codec out of shutdown only after that. Plus take care of possible active bypass paths. However, when PLL unlock occurs, MAX98090 asserts the PLL Unlock Flag which can be configured as an IRQ source. This allows to workaround around the issue by toggling the codec power shortly in case of PLL lock failure. In order to prevent needlessly toggling codec power in case of short PLL unlocks at the beginning of stream this patch implements delayed activation for PLL unlock interrupt. Then workaround is run only when the PLL doesn't lock at all. Power toggling workaround for PLL unlock comes originally from Liam Girdwood <liam.r.girdwood@linux.intel.com> and delayed activation from me. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-03ASoC: tlv320aic31xx: Fix 24bit samples with I2S format and 12MHz mclkJyri Sarha1-12/+39
I2S format requires bitclock to have an exact amount of cycles in a frame for audio to work cleanly. With dsp formats that is not so important. Updates aic31xx_setup_pll() to look for a line in aic31xx_divs table that produces the best match for the bitclock and adds lines to aic31xx_divs for 12MHz mclk and 24bit samples. Signed-off-by: Jyri Sarha <jsarha@ti.com> Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>