summaryrefslogtreecommitdiffstats
path: root/sound/soc/stm
Commit message (Collapse)AuthorAgeFilesLines
...
| * ASoC: stm32: spdifrx: fix inconsistent lock stateOlivier Moysan2019-12-241-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In current spdifrx driver locks may be requested as follows: - request lock on iec capture control, when starting synchronization. - request lock in interrupt context, when spdifrx stop is called from IRQ handler. Take lock with IRQs disabled, to avoid the possible deadlock. Lockdep report: [ 74.278059] ================================ [ 74.282306] WARNING: inconsistent lock state [ 74.290120] -------------------------------- ... [ 74.314373] CPU0 [ 74.314377] ---- [ 74.314381] lock(&(&spdifrx->lock)->rlock); [ 74.314396] <Interrupt> [ 74.314400] lock(&(&spdifrx->lock)->rlock); Fixes: 03e4d5d56fa5 ("ASoC: stm32: Add SPDIFRX support") Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Link: https://lore.kernel.org/r/20191204154333.7152-2-olivier.moysan@st.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: stm32: Use managed buffer allocationTakashi Iwai2019-12-111-27/+2
|/ | | | | | | | | | | | | | Clean up the drivers with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped, as well as the superfluous snd_pcm_lib_preallocate_free_for_all() call. As of the result, hw_free and pcm_destruct ops became empty and got removed. Cc: Olivier Moysan <olivier.moysan@st.com> Cc: Arnaud Pouliquen <arnaud.pouliquen@st.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20191210142614.19405-13-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge branch 'for-5.4' of ↵Mark Brown2019-11-061-11/+22
|\ | | | | | | https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.5
| * ASoC: stm32: sai: add restriction on mmap supportOlivier Moysan2019-11-051-1/+11
| | | | | | | | | | | | | | | | | | | | Do not support mmap in S/PDIF mode. In S/PDIF mode the buffer has to be copied, to allow the channel status bits insertion. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Link: https://lore.kernel.org/r/20191104133654.28750-1-olivier.moysan@st.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: stm32: sai: fix sysclk management on shutdownOlivier Moysan2019-10-181-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit below, adds a call to sysclk callback on shutdown. This introduces a regression in stm32 SAI driver, as some clock services are called twice, leading to unbalanced calls. Move processing related to mclk from shutdown to sysclk callback. When requested frequency is 0, assume shutdown and release mclk. Fixes: 2458adb8f92a ("SoC: simple-card-utils: set 0Hz to sysclk when shutdown") Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Link: https://lore.kernel.org/r/20191018082040.31022-1-olivier.moysan@st.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: stm32: spdifrx: retry synchronization in sync stateOlivier Moysan2019-10-141-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | When STM32 SPDIFRX is in sync state, allow multiple synchro attempts, instead of exiting on first unsuccessful trial. This is useful when spdif signal is not immediately available on input. This also allows Pulseaudio to check iec capture device availability when no signal is present. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Link: https://lore.kernel.org/r/20191011084816.14279-1-olivier.moysan@st.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: stm: stm32_adfsdm: remove snd_pcm_opsKuninori Morimoto2019-10-081-19/+23
| | | | | | | | | | | | | | | | | | snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/875zl7af0h.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: stm32: sai: clean up indentation issueColin Ian King2019-10-011-1/+1
|/ | | | | | | | | There is a statement that is indented one level too deeply, remove the extraneous tab. Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20190925112621.9312-1-colin.king@canonical.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Remove dev_err() usage after platform_get_irq()Stephen Boyd2019-08-023-10/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch. // <smpl> @@ expression ret; struct platform_device *E; @@ ret = ( platform_get_irq(E, ...) | platform_get_irq_byname(E, ...) ); if ( \( ret < 0 \| ret <= 0 \) ) { ( -if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... } | ... -dev_err(...); ) ... } // </smpl> While we're here, remove braces on if statements that only have one statement (manually). Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.com> Cc: alsa-devel@alsa-project.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Stephen Boyd <swboyd@chromium.org> Link: https://lore.kernel.org/r/20190730181557.90391-50-swboyd@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: stm32: sai: use devm_platform_ioremap_resource() to simplify codeYueHaibing2019-07-311-3/+1
| | | | | | | | | | Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20190727150738.54764-16-yuehaibing@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge tag 'v5.2-rc6' into asoc-5.3Mark Brown2019-06-266-55/+6
|\ | | | | | | Linux 5.2-rc6
| * treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174Thomas Gleixner2019-05-305-55/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 655 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Richard Fontana <rfontana@redhat.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070034.575739538@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * treewide: Add SPDX license identifier - Makefile/KconfigThomas Gleixner2019-05-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add SPDX license identifiers to all Make/Kconfig files which: - Have no license information of any form These files fall under the project license, GPL v2 only. The resulting SPDX license identifier is: GPL-2.0-only Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | ASoC: stm32: dfsdm: add 16 bits audio record supportOlivier Moysan2019-06-201-10/+39
| | | | | | | | | | | | | | | | Add support of audio 16 bits format record to STM32 DFSDM driver. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: stm32: sai: manage identification registersOlivier Moysan2019-06-033-24/+88
| | | | | | | | | | | | | | Add support of identification registers in STM32 SAI. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | Merge tag 'v5.2-rc1' into asoc-5.3Mark Brown2019-05-202-3/+5
|\| | | | | | | Linux 5.2-rc1
| * Merge tag 'asoc-v5.2-5' of ↵Takashi Iwai2019-05-091-1/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v5.2 A bunch of driver specific fixes that came in since the initial pull request for v5.2, mainly warning fixes for the newly added Sound Open Firmware code which people appeared to only start looking at after I'd sent the pull request.
| | * ASoC: stm32: i2s: update pcm hardware constraintsOlivier Moysan2019-05-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Set period minimum size. Ensure at least 5ms period up to 48kHz/16 bits to prevent underrun/overrun. - Remove MDMA constraints on period maximum size and set period maximum to half the buffer maximum size. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | Merge tag 'asoc-v5.2-2' of ↵Takashi Iwai2019-05-081-2/+3
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v5.2 A bunch of driver specific fixes that came in since the initial pull request for v5.2, mainly warning fixes for the newly added Sound Open Firmware code which people appeared to only start looking at after I'd sent the pull request.
| | * ASoC: stm32: spdifrx: change trace level on iec controlOlivier Moysan2019-05-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Change trace level to debug to avoid spurious messages. Return quietly when accessing iec958 control, while no S/PDIF signal is available. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: stm32: spdifrx: update pcm hardware constraintsOlivier Moysan2019-05-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Set period minimum size. Ensure at least 5ms period up to 48kHz/16 bits to prevent underrun/overrun. - Remove MDMA constraints on period maximum size and set period maximum to half the buffer maximum size. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: stm32: i2s: manage identification registersOlivier Moysan2019-05-081-3/+57
| | | | | | | | | | | | | | | | | | | | | Add support of identification registers in STM32 I2S. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: stm32: spdifrx: manage identification registersOlivier Moysan2019-05-061-2/+35
|/ / | | | | | | | | | | | | Add support of identification registers in STM32 SPDIFRX. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | Merge branch 'asoc-5.2' into asoc-nextMark Brown2019-05-066-73/+166
|\|
| * ASoC: stm32: sai: simplify dai driver initialisationArnaud Pouliquen2019-04-261-34/+9
| | | | | | | | | | | | | | Suppress the useless dynamic allocation of the dai driver structure. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * Merge branch 'asoc-5.1' into asoc-5.2Mark Brown2019-04-262-3/+4
| |\
| * \ Merge branch 'asoc-5.1' into asoc-5.2Mark Brown2019-04-041-4/+34
| |\ \
| * | | ASoC: stm32: sai: add power managementOlivier Moysan2019-03-253-19/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support of low power modes to STM32 SAI driver. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: stm32: dfsdm: add mmap supportOlivier Moysan2019-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable direct access (mmap) support. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | Merge branch 'for-5.1' of ↵Mark Brown2019-03-183-15/+44
| |\ \ \ | | | | | | | | | | | | | | | https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.2
| * | | | ASoC: stm32: spdifrx: add power managementOlivier Moysan2019-03-181-3/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add suspend and resume sleep callbacks to STM32 SPDIFRX driver, to support system low power modes. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | Merge tag 'v5.1-rc1' into asoc-5.2Mark Brown2019-03-181-2/+3
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Linux 5.1-rc1
| * | | | | ASoC: stm32: i2s: use default dai nameOlivier Moysan2019-03-111-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use default DAI name based on dev_name function. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | | ASoC: stm32: i2s: improve channel capabilities handlingOlivier Moysan2019-03-111-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use alsa snd_pcm_hw_constraint_single service to manage channels restriction. This provides better status on driver limitations, to the application. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | | ASoC: stm32: i2s: change trigger tracesOlivier Moysan2019-03-111-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update traces to log capture/playback stream start/stop. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | | | Merge branch 'asoc-5.1' into asoc-linusMark Brown2019-05-061-2/+3
|\ \ \ \ \ \ | | |_|_|_|/ | |/| | | |
| * | | | | ASoC: stm32: i2s: return the get_irq errorFabien Dessenne2019-04-251-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During probe, return the "get_irq" error value instead of -ENOENT. This allows the driver to be deferred probed if needed. Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | | | ASoC: stm32: sai: fix master clock managementOlivier Moysan2019-04-101-17/+47
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When master clock is used, master clock rate is set exclusively. Parent clocks of master clock cannot be changed after a call to clk_set_rate_exclusive(). So the parent clock of SAI kernel clock must be set before. Ensure also that exclusive rate operations are balanced in STM32 SAI driver. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | / ASoC: stm32: fix sai driver name initialisationArnaud Pouliquen2019-04-081-1/+1
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the sai driver structure overwriting which results in a cpu dai name equal NULL. Fixes: 3e086ed ("ASoC: stm32: add SAI driver") Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: stm32: dfsdm: fix debugfs warnings on entry creationOlivier Moysan2019-03-201-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Register platform component with a prefix, to avoid warnings on debugfs entries creation, due to component name redundancy. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: stm32: dfsdm: manage multiple prepareOlivier Moysan2019-03-201-1/+16
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | The DFSDM must be stopped when a new setting is applied. restart systematically DFSDM on multiple prepare calls, to apply changes. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | Merge tag 'v5.1-rc1' into asoc-5.1Mark Brown2019-03-181-2/+3
|\ \ \ | | |/ | |/| | | | Linux 5.1-rc1
| * | Merge tag 'asoc-v5.1-2' of ↵Takashi Iwai2019-02-283-71/+84
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: More changes for v5.1 Another batch of changes for ASoC, no big core changes - it's mainly small fixes and improvements for individual drivers. - A big refresh and cleanup of the Samsung drivers, fixing a number of issues which allow the driver to be used with a wider range of userspaces. - Fixes for the Intel drivers to make them more standard so less likely to get bitten by core issues. - New driver for Cirrus Logic CS35L26.
| * | ASoC: stm: Drop superfluous PCM preallocation error checksTakashi Iwai2019-02-061-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | snd_pcm_lib_preallocate_pages() and co always succeed, so the error check is simply redundant. Drop it. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ASoC: stm32: i2s: fix registers declaration in regmapOlivier Moysan2019-03-111-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Declare SR as volatile, as it is changed by hardware. - Remove TXDR from readable and volatile register list, as it is intended for write accesses only. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: stm32: sai: fix set_sync serviceOlivier Moysan2019-03-032-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add error check on set_sync function return. Add of_node_put() as of_get_parent() takes a reference which has to be released. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: stm32: sai: fix oversampling modeOlivier Moysan2019-03-031-3/+9
| | | | | | | | | | | | | | | | | | | | | Set OSR bit if mclk/fs ratio is 512. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: stm32: sai: fix race condition in irq handlerOlivier Moysan2019-03-031-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | When snd_pcm_stop_xrun() is called in interrupt routine, substream context may have already been released. Add protection on substream context. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: stm32: sai: fix exposed capabilities in spdif modeOlivier Moysan2019-03-031-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Change capabilities exposed in SAI S/PDIF mode, to match actually supported formats. In S/PDIF mode only 32 bits stereo is supported. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: stm32: sai: fix iec958 controls indexationOlivier Moysan2019-03-031-3/+4
| |/ |/| | | | | | | | | | | | | Allow indexation of sai iec958 controls according to device id. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>