summaryrefslogtreecommitdiff
path: root/sound/soc/codecs
AgeCommit message (Collapse)AuthorFilesLines
2017-12-20Merge remote-tracking branches 'asoc/fix/rt5663', 'asoc/fix/tlv320aic31xx' ↵Mark Brown4-2/+12
and 'asoc/fix/twl4030' into asoc-linus
2017-12-20Merge remote-tracking branches 'asoc/fix/msm8916', 'asoc/fix/nau8825', ↵Mark Brown6-10/+16
'asoc/fix/rt5514' and 'asoc/fix/rt5645' into asoc-linus
2017-12-20Merge remote-tracking branches 'asoc/fix/adsp', 'asoc/fix/amd', ↵Mark Brown2-7/+7
'asoc/fix/atmel', 'asoc/fix/da7218', 'asoc/fix/da7219', 'asoc/fix/fsl-asrc' and 'asoc/fix/fsl-ssi' into asoc-linus
2017-12-19ASoC: rt5514-spi: only enable wakeup when fully initializedBrian Norris1-2/+2
If an rt5514-spi device is probed but the platform hasn't linked it in, we might never fully request the SPI IRQ, nor configure the rt5514 DSP, but we still might try to enable the SPI IRQ (enable_irq_wake()). This is bad, and among other things, can cause the interrupt to trigger every time we try to suspend the system (e.g., because the interrupt trigger setting was never set properly). Instead of setting our wakeup capabilities in the SPI driver probe routine, let's wait until we've actually requested the IRQ. Fixes issues seen on the "kevin" Chromebook (Samsung Chromebook Plus). Fixes: 58f1c07d23cd ("ASoC: rt5514: Voice wakeup support.") Signed-off-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-12-19ASoC: nau8825: fix issue that pop noise when start captureAbhijeet Kumar1-0/+1
In skylake platform, we hear a loud pop noise(0 dB) at start of audio capture power up sequence. This patch removes the pop noise from the recording by adding a delay before enabling ADC. Signed-off-by: Abhijeet Kumar <abhijeet.kumar@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-12-14ASoC: rt5663: Fix the wrong result of the first jack detectionoder_chiou@realtek.com2-0/+8
In the first jack detection while booting, the result will always show as headset, even we insert the headphone. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-12-08ASoC: wm_adsp: Fix validation of firmware and coeff lengthsBen Hutchings1-6/+6
The checks for whether another region/block header could be present are subtracting the size from the current offset. Obviously we should instead subtract the offset from the size. The checks for whether the region/block data fit in the file are adding the data size to the current offset and header size, without checking for integer overflow. Rearrange these so that overflow is impossible. Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Tested-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2017-11-30ASoC: tlv320aic31xx: Fix GPIO1 register definitionAndrew F. Davis1-1/+1
GPIO1 control register is number 51, fix this here. Fixes: bafcbfe429eb ("ASoC: tlv320aic31xx: Make the register values human readable") Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2017-11-30ASoC: codecs: msm8916-wcd: Fix supported formatsSrinivas Kandagatla2-3/+3
This codec is configurable for only 16 bit and 32 bit samples, so reflect this in the supported formats also remove 24bit sample from supported list. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2017-11-27ASoC: rt5514: Add the sanity check for the driver_data in the resume functionoder_chiou@realtek.com1-4/+7
If the rt5514 spi driver is loaded, but the snd_soc_platform_driver is not loaded by the correct DAI settings, the NULL pointer will be gotten by snd_soc_platform_get_drvdata in the resume function. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-24ASoC: rt5514: Make sure the DMIC delay will be happened after normal SUPPLY ↵oder_chiou@realtek.com1-1/+1
widgets power on The patch makes sure the DMIC delay will be happened after normal SUPPLY widgets power on. If there are some platforms that provide the MCLK using the SUPPLY widget, it will make sure the delay time is helpful. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-22ASoC: rt5645: reset RT5645_AD_DA_MIXER at probeBard Liao1-0/+2
RT5645_AD_DA_MIXER (0x29) register will not be reset to default after SW reset. So we have to write it to its default value in i2c_probe. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-16ASoC: twl4030: fix child-node lookupJohan Hovold1-1/+3
Fix child-node lookup during probe, which ended up searching the whole device tree depth-first starting at the parent rather than just matching on its children. To make things worse, the parent codec node was also prematurely freed, while the child node was leaked. Fixes: 2d6d649a2e0f ("ASoC: twl4030: Support for DT booted kernel") Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable <stable@vger.kernel.org>
2017-11-16ASoC: da7218: fix fix child-node lookupJohan Hovold1-1/+1
Fix child-node lookup during probe, which ended up searching the whole device tree depth-first starting at the parent rather than just matching on its children. To make things worse, the parent codec node was also prematurely freed. Fixes: 4d50934abd22 ("ASoC: da7218: Add da7218 codec driver") Signed-off-by: Johan Hovold <johan@kernel.org> Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable <stable@vger.kernel.org>
2017-11-13Merge tag 'asoc-v4.15' of ↵Takashi Iwai59-339/+1448
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v4.15 The biggest thing this release has been the conversion of the AC98 bus to the driver model, that's been a long time coming so thanks to Robert Jarzmik for his dedication there. Due to there being some AC97 MFD there's a few fairly large changes in input and the MFD layer, mainly to the wm97xx driver. There's also some drivers/drm changes to support the new AMD Stoney platform, these are shared with the DRM subsystem and should be being merged via both. Within the subsystem the overwhelming bulk of the changes is in the Intel drivers which continue to need lots of cleanups and fixes, this release they've also gained support for their open source firmware. There's also some large changs in the core as Morimoto-san continues to mirror operations into the component level in preparation for conversion of drivers to that. - The AC97 bus has finally caught up with the driver model thanks to some dedicated and persistent work from Robert Jarzmik. - Continued work from Morimoto-san on moving us towards being able to use components for everything. - Lots of cleanups for the Intel platform code, including support for their open source audio firmware. - Support for scaling MCLK with sample rate in simple-card. - Support for AMD Stoney platform.
2017-11-13Merge branch 'for-next' into for-linusTakashi Iwai1-4/+3
Pull 4.15 updates to take over the previous urgent fixes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-11-11Merge remote-tracking branches 'asoc/topic/tfa9879', 'asoc/topic/ts3a277e', ↵Mark Brown7-70/+149
'asoc/topic/wm8741', 'asoc/topic/wm97xx' and 'asoc/topic/zte' into asoc-next
2017-11-11Merge remote-tracking branches 'asoc/topic/samsung', 'asoc/topic/sgtl5000', ↵Mark Brown1-1/+2
'asoc/topic/stm32', 'asoc/topic/sunxi' and 'asoc/topic/tas571x' into asoc-next
2017-11-11Merge remote-tracking branches 'asoc/topic/rt5645', 'asoc/topic/rt5651', ↵Mark Brown7-53/+647
'asoc/topic/rt5659', 'asoc/topic/rt5663' and 'asoc/topic/rt5670' into asoc-next
2017-11-11Merge remote-tracking branches 'asoc/topic/rl6231' and 'asoc/topic/rt5514' ↵Mark Brown5-5/+57
into asoc-next
2017-11-11Merge remote-tracking branches 'asoc/topic/max98925', 'asoc/topic/max98927', ↵Mark Brown4-96/+201
'asoc/topic/msm8916' and 'asoc/topic/omap' into asoc-next
2017-11-11Merge remote-tracking branches 'asoc/topic/hdmi', 'asoc/topic/img' and ↵Mark Brown1-4/+1
'asoc/topic/kirkwood' into asoc-next
2017-11-11Merge remote-tracking branches 'asoc/topic/dwc', 'asoc/topic/fallthrough', ↵Mark Brown7-3/+10
'asoc/topic/fsi', 'asoc/topic/fsl' and 'asoc/topic/graph' into asoc-next
2017-11-11Merge remote-tracking branches 'asoc/topic/cygnus', 'asoc/topic/da7213', ↵Mark Brown2-10/+49
'asoc/topic/davinci' and 'asoc/topic/doc' into asoc-next
2017-11-11Merge remote-tracking branches 'asoc/topic/bcm2835', 'asoc/topic/cs42l56' ↵Mark Brown1-2/+14
and 'asoc/topic/cs43130' into asoc-next
2017-11-11Merge remote-tracking branches 'asoc/topic/ac97', 'asoc/topic/ac97-mfd', ↵Mark Brown7-11/+229
'asoc/topic/amd' and 'asoc/topic/arizona-mfd' into asoc-next
2017-11-11Merge remote-tracking branch 'asoc/topic/pcm512x' into asoc-nextMark Brown4-6/+6
2017-11-11Merge remote-tracking branch 'asoc/topic/intel' into asoc-nextMark Brown1-7/+44
2017-11-11Merge tag 'asoc-fix-v4.14-rc6' into asoc-linusMark Brown4-71/+26
ASoC: Fixes for v4.14 I've been quite lax in sending these due to conference season but here's a fairly large collection of ASoC updates. The one thing that's not device specific is Takashi's fix for races between delayed work and PCM destruction, otherwise everything is specific to an individual device. # gpg: Signature made Thu 26 Oct 2017 15:11:23 BST # gpg: using RSA key ADE668AA675718B59FE29FEA24D68B725D5487D0 # gpg: issuer "broonie@kernel.org" # gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>" [unknown] # gpg: aka "Mark Brown <broonie@debian.org>" [unknown] # gpg: aka "Mark Brown <broonie@kernel.org>" [unknown] # gpg: aka "Mark Brown <broonie@tardis.ed.ac.uk>" [unknown] # gpg: aka "Mark Brown <broonie@linaro.org>" [unknown] # gpg: aka "Mark Brown <Mark.Brown@linaro.org>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 3F25 68AA C269 98F9 E813 A1C5 C3F4 36CA 30F5 D8EB # Subkey fingerprint: ADE6 68AA 6757 18B5 9FE2 9FEA 24D6 8B72 5D54 87D0
2017-11-11ASoC: rt5514: work around link errorArnd Bergmann2-0/+5
The main rt5514 driver optionally calls into the SPI back-end to load the firmware. This causes a link error when one driver selects rt5514 as built-in and another driver selects rt5514-spi as a loadable module: sound/soc/codecs/rt5514.o: In function `rt5514_dsp_voice_wake_up_put': rt5514.c:(.text+0xac8): undefined reference to `rt5514_spi_burst_write' As a workaround, this adds another silent symbol, to force rt5514-spi to be built-in for that configuration. I'm not overly happy with that solution, but couldn't come up with anything better. Using 'IS_REACHABLE()' would break the case that relies on the loadable module, and all other ideas would result in more complexity. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-11ASoC: rt5514: mark PM functions as __maybe_unusedArnd Bergmann1-2/+2
The new functions are only used when CONFIG_PM is enabled, leading to a harmless warning: sound/soc/codecs/rt5514-spi.c:474:12: error: 'rt5514_resume' defined but not used [-Werror=unused-function] sound/soc/codecs/rt5514-spi.c:464:12: error: 'rt5514_suspend' defined but not used [-Werror=unused-function] This marks them as __maybe_unused to make the build silent again. Fixes: 58f1c07d23cd ("ASoC: rt5514: Voice wakeup support.") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-10ASoC: rt5663: Check the JD status in the button pushingoder_chiou@realtek.com1-2/+41
Check the JD status in the button pushing to prevent the IRQ that is locked by button pushing event while the jack unpluging. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-09ASoC: rt5645: Wait for 400msec before concluding on value of RT5645_VENDOR_ID2Akshu Agrawal1-0/+8
Minimum time required between power On of codec and read of RT5645_VENDOR_ID2 is 400msec. We should wait that long before reading the value. TEST=Cold boot the device and check for sound device. Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com> Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-09ASoC: da7213: add support for DSP modesPierre-Louis Bossart2-10/+49
DSP modes are documented in the data sheet but not enabled in the driver. The work-around already implemented for DA7218/9 is also required to make sure the bit clock handling in DSP modes follows ASoC conventions. Tested with ARD-AUDIO-DA7212 and Minnowmax Turbot boards Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-09ASoC: rt5663: Delay and retry reading rt5663 ID registerOder Chiou1-1/+10
In the probe, the codec may not be ready for I2C reading or there are some glitches on the i2c line. So if the i2c reading value is incorrect, it will read again after delay. This issue is similar the patch https://patchwork.kernel.org/patch/9681421/. In current project, these 2 devices were connected to the same i2c line, and they met the same problem. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-09ASoC: rt5514-spi: check irq status to schedule data copy in resume functionoder_chiou@realtek.com1-0/+10
For wake on voice use case, we need to copy data from DSP buffer to PCM stream when system wakes up by voice. However the edge triggered IRQ could be missed when system wakes up, in that case the irq function will not be called. If the substream was constructed beforce suspend, we will schedule data copy in resume function. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-09ASoC: rt5514: Voice wakeup support.oder_chiou@realtek.com1-0/+27
If the rt5514 Wake on Voice device is opened while suspended, it will be able to wake up the system when a voice command is detected. This patch also supports user-space policy to override wakeup behavior by /sys/bus/spi/drivers/rt5514/spi2.0/power/wakeup. Signed-off-by: Chinyue Chen <chinyue@chromium.org> Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-09ASoC: wm8994: mark expected switch fall-throughsGustavo A. R. Silva1-0/+2
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 402005 Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-09ASoC: wm8993: mark expected switch fall-throughsGustavo A. R. Silva1-0/+2
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 115168 Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-09ASoC: wm8753: mark expected switch fall-throughsGustavo A. R. Silva1-2/+2
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 146568 Addresses-Coverity-ID: 146569 Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-09ASoC: tpa6130a2: mark expected switch fall-throughGustavo A. R. Silva1-0/+1
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 115164 Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-09ASoC: tlv320dac31xx: mark expected switch fall-throughGustavo A. R. Silva1-1/+1
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1195220 Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-09ASoC: tlv320aic23: mark expected switch fall-throughGustavo A. R. Silva1-0/+1
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 146566 Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-09ASoC: msm8916-wcd-analog: mark expected switch fall-throughGustavo A. R. Silva1-0/+1
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1397957 Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-08ASoC: hdac_hdmi: Fix possible memory leak on parse and map nid failureSubhransu S. Prusty1-6/+30
During failure, widgets in cvt_list and pin_list are not freed. So fix the possible memory leak by freeing them when failure occurs. Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com> Acked-By: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-08ASoC: hdac_hdmi: Fix possible NULL pointer dereferenceSubhransu S. Prusty1-0/+12
Pointers hdac_hdmi_pcm and hda_device_id can be NULL, so add check for valid pointer to avoid NULL pointer dereference. Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com> Acked-By: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-08ASoC: hdac_hdmi: Fix static checker warning for sprintf usageSubhransu S. Prusty1-1/+2
Use snprintf instead of sprintf to shut the warning. Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com> Acked-By: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-08ASoC: rt5514-spi: Let the buf_size to align with period_bytesOder Chiou1-0/+9
The patch lets the buf_size to align with period_bytes to prevent the buffer reading over the real size of the DSP buffer and also avoid to calculate the wrong size of remaining data. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-08ASoC: pcm512x: Scrub my work address from the driverMark Brown4-6/+6
It's difficult for me to handle upstream mail that ends up in my work account and this was done outside of work anyway so replace my work address with my usual address for upstream stuff. Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-03ASoC: wm8741: Fix setting BCLK and LRCLK polaritySergej Sawazki1-2/+2
After checking the code and the datasheet, it seems like we are handling the clock inversion (SND_SOC_DAIFMT_NB_IF and SND_SOC_DAIFMT_IB_IF) not correctly. >From the datasheet (Table 58): R5 Format Control, BITS[5:4], [BCP:LRP]: (0) 00 = normal BCLK, normal LRCLK (1) 01 = normal BCLK, inverted LRCLK <-- Fix this (2) 10 = inverted BCLK, normal LRCLK (3) 11 = inverted BCLK, inverted LRCLK <-- Fix this Signed-off-by: Sergej Sawazki <sergej@taudac.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>