summaryrefslogtreecommitdiffstats
path: root/sound/soc
AgeCommit message (Collapse)Author
2020-09-04Merge tag 'sound-5.9-rc4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small changes, nothing intrusive: - remaining tasklet API conversions, now all sound stuff have been converted - a few HD-audio and USB-audio quirks and minor fixes - FireWire Tascam and Digi00xx fixes - drop a kernel WARNING from PCM OSS for syzkaller" * tag 'sound-5.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (29 commits) ALSA: hda/realtek - Improved routing for Thinkpad X1 7th/8th Gen ALSA: hda: use consistent HDAudio spelling in comments/docs ALSA: hda: add dev_dbg log when driver is not selected ALSA: hda: fix a runtime pm issue in SOF when integrated GPU is disabled ALSA: hda: hdmi - add Rocketlake support ALSA: ua101: convert tasklets to use new tasklet_setup() API ALSA: usb-audio: convert tasklets to use new tasklet_setup() API ASoC: txx9: convert tasklets to use new tasklet_setup() API ASoC: siu: convert tasklets to use new tasklet_setup() API ASoC: fsl_esai: convert tasklets to use new tasklet_setup() API ALSA: hdsp: convert tasklets to use new tasklet_setup() API ALSA: riptide: convert tasklets to use new tasklet_setup() API ALSA: pci/asihpi: convert tasklets to use new tasklet_setup() API ALSA: firewire: convert tasklets to use new tasklet_setup() API ALSA: core: convert tasklets to use new tasklet_setup() API ALSA: pcm: oss: Remove superfluous WARN_ON() for mulaw sanity check ALSA: hda - Fix silent audio output and corrupted input on MSI X570-A PRO ALSA: hda/hdmi: always check pin power status in i915 pin fixup ALSA: hda/realtek: Add quirk for Samsung Galaxy Book Ion NT950XCJ-X716A ALSA: usb-audio: Add basic capture support for Pioneer DJ DJM-250MK2 ...
2020-09-02ASoC: txx9: convert tasklets to use new tasklet_setup() APIAllen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier <romain.perier@gmail.com> Signed-off-by: Allen Pais <allen.lkml@gmail.com> Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20200902040221.354941-9-allen.lkml@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-09-02ASoC: siu: convert tasklets to use new tasklet_setup() APIAllen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier <romain.perier@gmail.com> Signed-off-by: Allen Pais <allen.lkml@gmail.com> Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20200902040221.354941-8-allen.lkml@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-09-02ASoC: fsl_esai: convert tasklets to use new tasklet_setup() APIAllen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier <romain.perier@gmail.com> Signed-off-by: Allen Pais <allen.lkml@gmail.com> Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20200902040221.354941-7-allen.lkml@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-23treewide: Use fallthrough pseudo-keywordGustavo A. R. Silva
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
2020-08-21Merge tag 'sound-5.9-rc2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small fixes over several drivers, but all are driver- specific and nothing looks scary. Slightly large changes are seen in ASoC qcom driver for the bugs that were revealed by the recent ASoC core change to report the invalid register access errors. Also ASoC fsl got a slight intensive change for the distortion fix. Others are only trivial fixes or device-specific quirks" * tag 'sound-5.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (25 commits) ALSA: hda: avoid reset of sdo_limit ALSA: hda/realtek: Add quirk for Samsung Galaxy Book Ion ALSA: usb-audio: ignore broken processing/extension unit ASoC: intel: Fix memleak in sst_media_open ASoC: wm8994: Avoid attempts to read unreadable registers ASoC: msm8916-wcd-analog: fix register Interrupt offset ASoC: wm8994: Prevent access to invalid VU register bits on WM1811 ALSA: hda/realtek: Add model alc298-samsung-headphone ALSA: usb-audio: Update documentation comment for MS2109 quirk ALSA: isa: fix spelling mistakes in the comments ALSA: usb-audio: Add capture support for Saffire 6 (USB 1.1) ALSA: hda/realtek: Add quirk for Samsung Galaxy Flex Book ASoC: q6routing: add dummy register read/write function ASoC: q6afe-dai: mark all widgets registers as SND_SOC_NOPM ASoC: Make soc_component_read() returning an error code again ASoC: amd: Replacing component->name with codec_dai->name. ASoC: fsl: Fix unused variable warning ASoC: tegra: tegra210_i2s: Fix compile warning with CONFIG_PM=n ASoC: tegra: tegra210_dmic: Fix compile warning with CONFIG_PM=n ASoC: tegra: tegra210_ahub: Fix compile warning with CONFIG_PM=n ...
2020-08-19Merge tag 'asoc-fix-v5.9-rc1' of ↵Takashi Iwai
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v5.9 A bunch of fixes that came in during the merge window, mostly for issues that were uncovered by the changes to report errors on invalid register access plus one important fix in that code itself.
2020-08-17ASoC: intel: Fix memleak in sst_media_openDinghao Liu
When power_up_sst() fails, stream needs to be freed just like when try_module_get() fails. However, current code is returning directly and ends up leaking memory. Fixes: 0121327c1a68b ("ASoC: Intel: mfld-pcm: add control for powering up/down dsp") Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200813084112.26205-1-dinghao.liu@zju.edu.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17ASoC: wm8994: Avoid attempts to read unreadable registersSylwester Nawrocki
The driver supports WM1811, WM8994, WM8958 devices but according to documentation and the regmap definitions the WM8958_DSP2_* registers are only available on WM8958. In current code these registers are being accessed as if they were available on all the three chips. When starting playback on WM1811 CODEC multiple errors like: "wm8994-codec wm8994-codec: ASoC: error at soc_component_read_no_lock on wm8994-codec: -5" can be seen, which is caused by attempts to read an unavailable WM8958_DSP2_PROGRAM register. The issue has been uncovered by recent commit "e2329ee ASoC: soc-component: add soc_component_err()". This patch adds a check in wm8958_aif_ev() callback so the DSP2 handling is only done for WM8958. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20200731173834.23832-1-s.nawrocki@samsung.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17ASoC: msm8916-wcd-analog: fix register Interrupt offsetSrinivas Kandagatla
For some reason interrupt set and clear register offsets are not set correctly. This patch corrects them! Fixes: 585e881e5b9e ("ASoC: codecs: Add msm8916-wcd analog codec") Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Tested-by: Stephan Gerhold <stephan@gerhold.net> Reviewed-by: Stephan Gerhold <stephan@gerhold.net> Link: https://lore.kernel.org/r/20200811103452.20448-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17ASoC: wm8994: Prevent access to invalid VU register bits on WM1811Sylwester Nawrocki
The ADC2 and DAC2 are not available on WM1811 device. This patch moves the ADC2, DAC2 VU bitfields to a separate array so we can skip accessing them and avoid unreadable register access on WM1811. This allows to get rid of warnings during boot like: wm8994-codec: ASoC: error at soc_component_read_no_lock on wm8994-codec: -5 Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Link: https://lore.kernel.org/r/20200804141043.11425-1-s.nawrocki@samsung.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-11ASoC: q6routing: add dummy register read/write functionSrinivas Kandagatla
Most of the DAPM widgets for DSP ASoC components reuse reg field of the widgets for its internal calculations, however these are not real registers. So read/writes to these numbers are not really valid. However ASoC core will read these registers to get default state during startup. With recent changes to ASoC core, every register read/write failures are reported very verbosely. Prior to this fails to reads are totally ignored, so we never saw any error messages. To fix this add dummy read/write function to return default value. Fixes: e3a33673e845 ("ASoC: qdsp6: q6routing: Add q6routing driver") Reported-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20200811120205.21805-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-11ASoC: q6afe-dai: mark all widgets registers as SND_SOC_NOPMSrinivas Kandagatla
Looks like the q6afe-dai dapm widget registers are set as "0", which is a not correct. As this registers will be read by ASoC core during startup which will throw up errors, Fix this by making the registers as SND_SOC_NOPM as these should be never used. With recent changes to ASoC core, every register read/write failures are reported very verbosely. Prior to this fails to reads are totally ignored, so we never saw any error messages. Fixes: 24c4cbcfac09 ("ASoC: qdsp6: q6afe: Add q6afe dai driver") Reported-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20200811120205.21805-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-11ASoC: Make soc_component_read() returning an error code againTakashi Iwai
Along with the recent unification of snd_soc_component_read*() functions, the behavior of snd_soc_component_read() was changed slightly; namely it returns the register read value directly, and even if an error happens, it returns zero (but it prints an error message). That said, the caller side can't know whether it's an error or not any longer. Ideally this shouldn't matter much, but in practice this seems causing a regression, as John reported. And, grepping the tree revealed that there are still plenty of callers that do check the error code, so we'll need to deal with them in anyway. As a quick band-aid over the regression, this patch changes the return value of snd_soc_component_read() again to the negative error code. It can't work, obviously, for 32bit register values, but it should be enough for the known regressions, so far. Fixes: cf6e26c71bfd ("ASoC: soc-component: merge snd_soc_component_read() and snd_soc_component_read32()") Reported-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20200810134631.19742-1-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-10ASoC: amd: Replacing component->name with codec_dai->name.Ravulapati Vishnu vardhan rao
Replacing string compare with "codec_dai->name" instead of comparing with "codec_dai->component->name" in hw_params because, Here the component name for codec RT1015 is "i2c-10EC5682:00" and will never be "rt1015-aif1" as it is codec-dai->name. So, strcmp() always compares and fails to set the sysclk,pll,bratio for expected codec-dai="rt1015-aif1". Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com> Link: https://lore.kernel.org/r/20200807161046.17932-1-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-06Merge tag 'sound-5.9-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "This became wide and scattered updates all over the sound tree as diffstat shows: lots of (still ongoing) refactoring works in ASoC, fixes and cleanups caught by static analysis, inclusive term conversions as well as lots of new drivers. Below are highlights: ASoC core: - API cleanups and conversions to the unified mute_stream() call - Simplify I/O helper functions - Use helper macros to retrieve RTD from substreams ASoC drivers: - Lots of fixes and cleanups in Intel ASoC drivers - Lots of new stuff: Freescale MQS and i.MX6sx, Intel KeemBay I2S, Maxim MAX98360A and MAX98373 SoundWire, various Mediatek boards, nVidia Tegra 186 and 210, RealTek RL6231, Samsung Midas and Aries boards, TI J721e EVM ALSA core: - Minor code refacotring for SG-buffer handling HD-audio: - Generalization of mute-LED handling with LED classdev - Intel silent stream support for HDMI - Device-specific fixes: CA0132, Loongson-3 Others: - Usual USB- and HD-audio quirks for various devices - Fixes for echoaudio DMA position handling - Various documents and trivial fixes for sparse warnings - Conversion to adopt inclusive terms" * tag 'sound-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (479 commits) ALSA: pci: delete repeated words in comments ALSA: isa: delete repeated words in comments ALSA: hda/tegra: Add 100us dma stop delay ALSA: hda: Add dma stop delay variable ASoC: hda/tegra: Set buffer alignment to 128 bytes ALSA: seq: oss: Serialize ioctls ALSA: hda/hdmi: Add quirk to force connectivity ALSA: usb-audio: add startech usb audio dock name ALSA: usb-audio: Add support for Lenovo ThinkStation P620 Revert "ALSA: hda: call runtime_allow() for all hda controllers" ALSA: hda/ca0132 - Fix AE-5 microphone selection commands. ALSA: hda/ca0132 - Add new quirk ID for Recon3D. ALSA: hda/ca0132 - Fix ZxR Headphone gain control get value. ALSA: hda/realtek: Add alc269/alc662 pin-tables for Loongson-3 laptops ALSA: docs: fix typo ALSA: doc: use correct config variable name ASoC: core: Two step component registration ASoC: core: Simplify snd_soc_component_initialize declaration ASoC: core: Relocate and expose snd_soc_component_initialize ASoC: sh: Replace 'select' DMADEVICES 'with depends on' ...
2020-08-03Merge branch 'linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto updates from Herbert Xu: "API: - Add support for allocating transforms on a specific NUMA Node - Introduce the flag CRYPTO_ALG_ALLOCATES_MEMORY for storage users Algorithms: - Drop PMULL based ghash on arm64 - Fixes for building with clang on x86 - Add sha256 helper that does the digest in one go - Add SP800-56A rev 3 validation checks to dh Drivers: - Permit users to specify NUMA node in hisilicon/zip - Add support for i.MX6 in imx-rngc - Add sa2ul crypto driver - Add BA431 hwrng driver - Add Ingenic JZ4780 and X1000 hwrng driver - Spread IRQ affinity in inside-secure and marvell/cesa" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (157 commits) crypto: sa2ul - Fix inconsistent IS_ERR and PTR_ERR hwrng: core - remove redundant initialization of variable ret crypto: x86/curve25519 - Remove unused carry variables crypto: ingenic - Add hardware RNG for Ingenic JZ4780 and X1000 dt-bindings: RNG: Add Ingenic RNG bindings. crypto: caam/qi2 - add module alias crypto: caam - add more RNG hw error codes crypto: caam/jr - remove incorrect reference to caam_jr_register() crypto: caam - silence .setkey in case of bad key length crypto: caam/qi2 - create ahash shared descriptors only once crypto: caam/qi2 - fix error reporting for caam_hash_alloc crypto: caam - remove deadcode on 32-bit platforms crypto: ccp - use generic power management crypto: xts - Replace memcpy() invocation with simple assignment crypto: marvell/cesa - irq balance crypto: inside-secure - irq balance crypto: ecc - SP800-56A rev 3 local public key validation crypto: dh - SP800-56A rev 3 local public key validation crypto: dh - check validity of Z before export lib/mpi: Add mpi_sub_ui() ...
2020-08-03Merge series "ASoC: tegra: Fix compile warning with CONFIG_PM=n" from ↵Mark Brown
Takashi Iwai <tiwai@suse.de>: Hi, this is a trivial patch set to add the missing __maybe_unused for covering the compile warnings with CONFIG_PM=n. Takashi === Takashi Iwai (5): ASoC: tegra: tegra186_dspk: Fix compile warning with CONFIG_PM=n ASoC: tegra: tegra210_admaif: Fix compile warning with CONFIG_PM=n ASoC: tegra: tegra210_ahub: Fix compile warning with CONFIG_PM=n ASoC: tegra: tegra210_dmic: Fix compile warning with CONFIG_PM=n ASoC: tegra: tegra210_i2s: Fix compile warning with CONFIG_PM=n sound/soc/tegra/tegra186_dspk.c | 4 ++-- sound/soc/tegra/tegra210_admaif.c | 4 ++-- sound/soc/tegra/tegra210_ahub.c | 4 ++-- sound/soc/tegra/tegra210_dmic.c | 4 ++-- sound/soc/tegra/tegra210_i2s.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) -- 2.16.4
2020-08-03ASoC: fsl: Fix unused variable warningTakashi Iwai
The variable rtd was left unused in psc_dma_free(), even unnoticed during conversion to a new style: sound/soc/fsl/mpc5200_dma.c:342:30: warning: unused variable 'rtd' [-Wunused-variable] Drop the superfluous one. Fixes: 6d1048bc1152 ("ASoC: fsl: mpc5200_dma: remove snd_pcm_ops") Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20200803144630.9615-1-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-03ASoC: tegra: tegra210_i2s: Fix compile warning with CONFIG_PM=nTakashi Iwai
Fix trivial compile warnings wrt unused functions by adding __maybe_unused prefix: sound/soc/tegra/tegra210_i2s.c:167:12: warning: 'tegra210_i2s_runtime_suspend' defined but not used [-Wunused-function] sound/soc/tegra/tegra210_i2s.c:179:12: warning: 'tegra210_i2s_runtime_resume' defined but not used [-Wunused-function] Fixes: c0bfa98349d1 ("ASoC: tegra: Add Tegra210 based I2S driver") Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20200803141850.23713-6-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-03ASoC: tegra: tegra210_dmic: Fix compile warning with CONFIG_PM=nTakashi Iwai
Fix trivial compile warnings wrt unused functions by adding __maybe_unused prefix: sound/soc/tegra/tegra210_dmic.c:43:12: warning: 'tegra210_dmic_runtime_suspend' defined but not used [-Wunused-function] sound/soc/tegra/tegra210_dmic.c:55:12: warning: 'tegra210_dmic_runtime_resume' defined but not used [-Wunused-function] Fixes: 8c8ff982e9e2 ("ASoC: tegra: Add Tegra210 based DMIC driver") Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20200803141850.23713-5-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-03ASoC: tegra: tegra210_ahub: Fix compile warning with CONFIG_PM=nTakashi Iwai
Fix trivial compile warnings wrt unused functions by adding __maybe_unused prefix: sound/soc/tegra/tegra210_ahub.c:567:12: warning: 'tegra_ahub_runtime_suspend' defined but not used [-Wunused-function] sound/soc/tegra/tegra210_ahub.c:579:12: warning: 'tegra_ahub_runtime_resume' defined but not used [-Wunused-function] Fixes: 16e1bcc2caf4 ("ASoC: tegra: Add Tegra210 based AHUB driver") Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20200803141850.23713-4-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-03ASoC: tegra: tegra210_admaif: Fix compile warning with CONFIG_PM=nTakashi Iwai
Fix trivial compile warnings wrt unused functions by adding __maybe_unused prefix: sound/soc/tegra/tegra210_admaif.c:232:12: warning: 'tegra_admaif_runtime_resume' defined but not used [-Wunused-function] sound/soc/tegra/tegra210_ahub.c:567:12: warning: 'tegra_ahub_runtime_suspend' defined but not used [-Wunused-function] Fixes: f74028e159bb ("ASoC: tegra: Add Tegra210 based ADMAIF driver") Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20200803141850.23713-3-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-03ASoC: tegra: tegra186_dspk: Fix compile warning with CONFIG_PM=nTakashi Iwai
Fix trivial compile warnings wrt unused functions by adding __maybe_unused prefix: sound/soc/tegra/tegra186_dspk.c:74:12: warning: 'tegra186_dspk_runtime_suspend' defined but not used [-Wunused-function] sound/soc/tegra/tegra186_dspk.c:86:12: warning: 'tegra186_dspk_runtime_resume' defined but not used [-Wunused-function] Fixes: 327ef6470266 ("ASoC: tegra: Add Tegra186 based DSPK driver") Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20200803141850.23713-2-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-03ASoC: amd: renoir: restore two more registers during resumeHui Wang
Recently we found an issue about the suspend and resume. If dmic is recording the sound, and we run suspend and resume, after the resume, the dmic can't work well anymore. we need to close the app and reopen the app, then the dmic could record the sound again. For example, we run "arecord -D hw:CARD=acp,DEV=0 -f S32_LE -c 2 -r 48000 test.wav", then suspend and resume, after the system resume back, we speak to the dmic. then stop the arecord, use aplay to play the test.wav, we could hear the sound recorded after resume is weird, it is not what we speak to the dmic. I found two registers are set in the dai_hw_params(), if the two registers are set during the resume, this issue could be fixed. Move the code of the dai_hw_params() into the pdm_dai_trigger(), then these two registers will be set during resume since pdm_dai_trigger() will be called during resume. And delete the empty function dai_hw_params(). Signed-off-by: Hui Wang <hui.wang@canonical.com> Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200730123138.5659-1-hui.wang@canonical.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-03ASoC: wm8962: Do not remove ADDITIONAL_CONTROL_4 from readable register listFabio Estevam
Removing ADDITIONAL_CONTROL_4 from the list of readable registers cause audio distortion. This change was sent as a comment below the --- line when submitting commit 658bb297e393 ("ASoC: wm8962: Do not access WM8962_GPIO_BASE"), so it was not supposed to get merged. Keep WM8962_ADDITIONAL_CONTROL_4 inside wm8962_readable_register() to fix the regression. Fixes: 658bb297e393 ("ASoC: wm8962: Do not access WM8962_GPIO_BASE") Reported-by: Shengjiu Wang <shengjiu.wang@gmail.com> Signed-off-by: Fabio Estevam <festevam@gmail.com> Link: https://lore.kernel.org/r/20200803115233.19034-1-festevam@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-03ASoC: fsl-asoc-card: Remove fsl_asoc_card_set_bias_level functionShengjiu Wang
With this case: aplay -Dhw:x 16khz.wav 24khz.wav There is sound distortion for 24khz.wav. The reason is that setting PLL of WM8962 with set_bias_level function, the bias level is not changed when 24khz.wav is played, then the PLL won't be reset, the clock is not correct, so distortion happens. The resolution of this issue is to remove fsl_asoc_card_set_bias_level. Move PLL configuration to hw_params and hw_free. After removing fsl_asoc_card_set_bias_level, also test WM8960 case, it can work. Fixes: 708b4351f08c ("ASoC: fsl: Add Freescale Generic ASoC Sound Card with ASRC support") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Link: https://lore.kernel.org/r/1596420811-16690-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-31Merge remote-tracking branch 'asoc/for-5.9' into asoc-nextMark Brown
2020-07-31Merge remote-tracking branch 'asoc/for-5.8' into asoc-linusMark Brown
2020-07-31Merge series "ASoC: core: Two step component registration" from Cezary ↵Mark Brown
Rojewski <cezary.rojewski@intel.com>: Provide a mechanism for true two-step component registration. This mimics device registration flow where initialization is the first step while addition goes as second in line. Drivers may choose to modify component's fields before registering component to ASoC subsystem via snd_soc_add_component. Patchset achieves status quo - behavior of snd_soc_register_component remains unchanged. Cezary Rojewski (3): ASoC: core: Relocate and expose snd_soc_component_initialize ASoC: core: Simplify snd_soc_component_initialize declaration ASoC: core: Two step component registration include/sound/soc-component.h | 3 -- include/sound/soc.h | 11 +++--- sound/soc/soc-component.c | 16 --------- sound/soc/soc-core.c | 52 +++++++++++++++++---------- sound/soc/soc-generic-dmaengine-pcm.c | 14 +++++--- sound/soc/stm/stm32_adfsdm.c | 9 +++-- 6 files changed, 55 insertions(+), 50 deletions(-) -- 2.17.1
2020-07-31ASoC: core: Two step component registrationCezary Rojewski
Modify snd_soc_add_component so it calls snd_soc_component_initialize no longer and thus providing true two-step registration. Drivers may choose to change component's fields before actually adding it to ASoC subsystem. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20200731144146.6678-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-31ASoC: core: Simplify snd_soc_component_initialize declarationCezary Rojewski
Move 'name' field initialization responsibility back to snd_soc_component_initialize to prepare snd_soc_add_component function for being called separatelly as a second registration step. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20200731144146.6678-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-31ASoC: core: Relocate and expose snd_soc_component_initializeCezary Rojewski
To allow for two-step component registration, expose snd_soc_component_initialize function and move it back to soc-core.c. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20200731144146.6678-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-31ASoC: sh: Replace 'select' DMADEVICES 'with depends on'Laurent Pinchart
Enabling a whole subsystem from a single driver 'select' is frowned upon and won't be accepted in new drivers, that need to use 'depends on' instead. Existing selection of DMADEVICES will then cause circular dependencies. Replace them with a dependency. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20200731152433.1297-3-laurent.pinchart@ideasonboard.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-31ASoC: fsl_sai: Fix value of FSL_SAI_CR1_RFW_MASKShengjiu Wang
The fifo_depth is 64 on i.MX8QM/i.MX8QXP, 128 on i.MX8MQ, 16 on i.MX7ULP. Original FSL_SAI_CR1_RFW_MASK value 0x1F is not suitable for these platform, the FIFO watermark mask should be updated according to the fifo_depth. Fixes: a860fac42097 ("ASoC: fsl_sai: Add support for imx7ulp/imx8mq") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Fabio Estevam <festevam@gmail.com> Link: https://lore.kernel.org/r/1596176895-28724-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-31ASoC: meson: cards: deal dpcm flag changeJerome Brunet
Commit b73287f0b074 ("ASoC: soc-pcm: dpcm: fix playback/capture checks") changed the meaning of dpcm_playback/dpcm_capture and now requires the CPU DAI BE to aligned with those flags. This broke all Amlogic cards with uni-directional backends (All gx and most axg cards). While I'm still confused as to how this change is an improvement, those cards can't remain broken forever. Hopefully, next time an API change is done like that, all the users will be updated as part of the change, and not left to fend for themselves. Fixes: b73287f0b074 ("ASoC: soc-pcm: dpcm: fix playback/capture checks") Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20200731120603.2243261-1-jbrunet@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-31ASoC: core: use less strict tests for dailink capabilitiesPierre-Louis Bossart
Previous updates to set dailink capabilities and check dailink capabilities were based on a flawed assumption that all dais support the same capabilities as the dailink. This is true for TDM configurations but existing configurations use an amplifier and a capture device on the same dailink, and the tests would prevent the card from probing. This patch modifies the snd_soc_dai_link_set_capabilities() helper so that the dpcm_playback (resp. dpcm_capture) dailink capabilities are set if at least one dai supports playback (resp. capture). Likewise the checks are modified so that an error is reported only when dpcm_playback (resp. dpcm_capture) is set but none of the CPU DAIs support playback (resp. capture). Fixes: 25612477d20b5 ('ASoC: soc-dai: set dai_link dpcm_ flags with a helper') Fixes: b73287f0b0745 ('ASoC: soc-pcm: dpcm: fix playback/capture checks') Suggested-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200723180533.220312-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30Merge series "drop unnecessary list_empty" from Julia Lawall ↵Mark Brown
<Julia.Lawall@inria.fr>: The various list iterators are able to handle an empty list. The only effect of avoiding the loop is not initializing some index variables. Drop list_empty tests in cases where these variables are not used. The semantic patch that makes these changes is as follows: (http://coccinelle.lip6.fr/) <smpl> @@ expression x,e; iterator name list_for_each_entry; statement S; identifier i; @@ -if (!(list_empty(x))) { list_for_each_entry(i,x,...) S - } ... when != i ? i = e @@ expression x,e; iterator name list_for_each_entry_safe; statement S; identifier i,j; @@ -if (!(list_empty(x))) { list_for_each_entry_safe(i,j,x,...) S - } ... when != i when != j ( i = e; | ? j = e; ) @@ expression x,e; iterator name list_for_each; statement S; identifier i; @@ -if (!(list_empty(x))) { list_for_each(i,x) S - } ... when != i ? i = e @@ expression x,e; iterator name list_for_each_safe; statement S; identifier i,j; @@ -if (!(list_empty(x))) { list_for_each_safe(i,j,x) S - } ... when != i when != j ( i = e; | ? j = e; ) // ------------------- @@ expression x,e; statement S; identifier i; @@ -if (!(list_empty(x))) list_for_each_entry(i,x,...) S ... when != i ? i = e @@ expression x,e; statement S; identifier i,j; @@ -if (!(list_empty(x))) list_for_each_entry_safe(i,j,x,...) S ... when != i when != j ( i = e; | ? j = e; ) @@ expression x,e; statement S; identifier i; @@ -if (!(list_empty(x))) list_for_each(i,x) S ... when != i ? i = e @@ expression x,e; statement S; identifier i,j; @@ -if (!(list_empty(x))) list_for_each_safe(i,j,x) S ... when != i when != j ( i = e; | ? j = e; ) </smpl> --- drivers/media/pci/saa7134/saa7134-core.c | 14 ++--- drivers/media/usb/cx231xx/cx231xx-core.c | 16 ++---- drivers/media/usb/tm6000/tm6000-core.c | 24 +++------- drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c | 13 ++--- drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c | 5 -- drivers/net/ethernet/sfc/ptp.c | 20 +++----- drivers/net/wireless/ath/dfs_pattern_detector.c | 15 ++---- sound/soc/intel/atom/sst/sst_loader.c | 10 +--- sound/soc/intel/skylake/skl-pcm.c | 8 +-- sound/soc/intel/skylake/skl-topology.c | 5 -- 10 files changed, 53 insertions(+), 77 deletions(-)
2020-07-30ASoC: rk3399_gru_sound: Add DAPM pins, kcontrols for jack detectionAlper Nebi Yasak
PulseAudio (and perhaps other userspace utilities) can not detect any jack for rk3399_gru_sound as the driver doesn't expose related Jack kcontrols. This patch adds two DAPM pins to the headset jack, where the snd_soc_card_jack_new() call automatically creates "Headphones Jack" and "Headset Mic Jack" kcontrols from them. With an appropriate ALSA UCM config specifying JackControl fields for the "Headphones" and "Headset" (mic) devices, PulseAudio can detect plug/unplug events for both of them after this patch. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Link: https://lore.kernel.org/r/20200721182709.6895-1-alpernebiyasak@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30ASoC: wm8962: Do not access WM8962_GPIO_BASEFabio Estevam
According to the WM8962 datasheet, there is no register at address 0x200. WM8962_GPIO_BASE is just a base address for the GPIO registers and not a real register, so remove it from wm8962_readable_register(). Also, Register 515 (WM8962_GPIO_BASE + 3) does not exist, so skip its access. This fixes the following errors: wm8962 0-001a: ASoC: error at soc_component_read_no_lock on wm8962.0-001a: -16 wm8962 0-001a: ASoC: error at soc_component_read_no_lock on wm8962.0-001a: -16 Signed-off-by: Fabio Estevam <festevam@gmail.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20200717135959.19212-1-festevam@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30ASoC: SOF: imx: use resource_sizeJulia Lawall
Use resource_size rather than a verbose computation on the end and start fields. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) <smpl> @@ struct resource ptr; @@ - (ptr.end - ptr.start + 1) + resource_size(&ptr) </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr> Link: https://lore.kernel.org/r/1595751933-4952-1-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30ASoC: Intel: drop unnecessary list_emptyJulia Lawall
list_for_each_entry_safe is able to handle an empty list. The only effect of avoiding the loop is not initializing the index variable. Drop list_empty tests in cases where these variables are not used. Note that list_for_each_entry_safe is defined in terms of list_first_entry, which indicates that it should not be used on an empty list. But in list_for_each_entry_safe, the element obtained by list_first_entry is not really accessed, only the address of its list_head field is compared to the address of the list head, so the list_first_entry is safe. The semantic patch that makes this change is as follows (with another variant for the no brace case): (http://coccinelle.lip6.fr/) <smpl> @@ expression x,e; iterator name list_for_each_entry_safe; statement S; identifier i,j; @@ -if (!(list_empty(x))) { list_for_each_entry_safe(i,j,x,...) S - } ... when != i when != j ( i = e; | ? j = e; ) </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr> Link: https://lore.kernel.org/r/1595761112-11003-2-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30Merge series "ASoC: Intel: KMB: TDM Enablement patches" from Michael Sit Wei ↵Mark Brown
Hong <michael.wei.hong.sit@intel.com>: This patch series is to enable multiple features on the Keembay Platform Michael Sit Wei Hong (4): ASoC: Intel: KMB: Add 8kHz audio support ASoC: Intel: KMB: Rework disable channel function ASoC: Intel: KMB: Enable TDM audio capture dt-bindings: sound: intel,keembay-i2s: Add channel-max property .../bindings/sound/intel,keembay-i2s.yaml | 8 + sound/soc/intel/keembay/kmb_platform.c | 137 +++++++++++++----- sound/soc/intel/keembay/kmb_platform.h | 1 + 3 files changed, 112 insertions(+), 34 deletions(-) -- 2.17.1
2020-07-30Merge series "ASoC: meson: tdm fixes" from Jerome Brunet <jbrunet@baylibre.com>:Mark Brown
This patcheset is collection of fixes for the TDM input and output the axg audio architecture. Its fixes: - slave mode format setting - g12 and sm1 skew offset - tdm clock inversion - standard daifmt props names which don't require a specific prefix Jerome Brunet (4): ASoC: meson: axg-tdm-interface: fix link fmt setup ASoC: meson: axg-tdmin: fix g12a skew ASoC: meson: axg-tdm-formatters: fix sclk inversion ASoC: meson: cards: remove DT_PREFIX for standard daifmt properties sound/soc/meson/axg-tdm-formatter.c | 11 ++++++----- sound/soc/meson/axg-tdm-formatter.h | 1 - sound/soc/meson/axg-tdm-interface.c | 26 +++++++++++++++++--------- sound/soc/meson/axg-tdmin.c | 16 +++++++++++++++- sound/soc/meson/axg-tdmout.c | 3 --- sound/soc/meson/meson-card-utils.c | 2 +- 6 files changed, 39 insertions(+), 20 deletions(-) -- 2.25.4
2020-07-30ASoC: amd: Added hw_params support for ALC1015Ravulapati Vishnu vardhan rao
Adding rt1015 hw_params which set Bit-clock ratio, PLL and appropriate sys clk specific with RTK1015. Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com> Link: https://lore.kernel.org/r/20200728160255.31020-6-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30ASoC: amd: Adding DAI LINK for rt1015 codecRavulapati Vishnu vardhan rao
DAI link support for RTK 1015 and providing the codec details depending on the snd_soc_card selected by ACPI ID. Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com> Link: https://lore.kernel.org/r/20200728160255.31020-5-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30ASoC: amd: Adding support for ALC1015 codec in machine driverRavulapati Vishnu vardhan rao
Adding support for ALC1015 RTK codec in machine driver. Passing specific card structure based on its ACPI ID. Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com> Link: https://lore.kernel.org/r/20200728160255.31020-4-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30ASoC: amd: Passing card structure based on codecRavulapati Vishnu vardhan rao
Passing specific snd_soc_card structure depending on the ACPI ID. In future we can add other IDs in the ACPI table and pass the structure. Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com> Link: https://lore.kernel.org/r/20200728160255.31020-3-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30ASoC: amd: Renaming snd-soc-card structure and fieldsRavulapati Vishnu vardhan rao
As in future our machine driver supports multiple codecs So changing naming convention of snd_soc_card struct and its fields. Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com> Link: https://lore.kernel.org/r/20200728160255.31020-2-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30ASoC: samsung: Add sound support for Midas boardsSimon Shields
This patch adds support for voice and BT calls, along with standard audio output via the speaker, earpiece, headphone jack, HDMI, and any accessories compatible with Midas boards. This patch also supports headphone/headset detection and headsets with inline buttons. [m.szyprowski: adaptation to v5.1+ kernels (DAI links initialization)] [s.nawrocki: removal of the clk API calls for CODEC MCLK, the jack data structure moved to struct midas_priv, coding style and typo fixes, conversion to new cpu/codec/dai-node binding] Signed-off-by: Simon Shields <simon@lineageos.org> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20200728131111.14334-2-s.nawrocki@samsung.com Signed-off-by: Mark Brown <broonie@kernel.org>