aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/stm (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174Thomas Gleixner5-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>
2019-05-21treewide: Add SPDX license identifier - Makefile/KconfigThomas Gleixner1-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>
2019-05-09Merge tag 'asoc-v5.2-5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linusTakashi Iwai1-1/+2
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.
2019-05-08Merge tag 'asoc-v5.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linusTakashi Iwai1-2/+3
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.
2019-05-08ASoC: stm32: i2s: update pcm hardware constraintsOlivier Moysan1-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>
2019-05-06ASoC: stm32: spdifrx: change trace level on iec controlOlivier Moysan1-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>
2019-05-06ASoC: stm32: spdifrx: update pcm hardware constraintsOlivier Moysan1-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>
2019-05-06Merge branch 'asoc-5.2' into asoc-nextMark Brown6-73/+166
2019-05-06Merge branch 'asoc-5.1' into asoc-linusMark Brown1-2/+3
2019-04-26ASoC: stm32: sai: simplify dai driver initialisationArnaud Pouliquen1-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>
2019-04-26Merge branch 'asoc-5.1' into asoc-5.2Mark Brown2-3/+4
2019-04-25ASoC: stm32: i2s: return the get_irq errorFabien Dessenne1-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>
2019-04-10ASoC: stm32: sai: fix master clock managementOlivier Moysan1-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>
2019-04-08ASoC: stm32: fix sai driver name initialisationArnaud Pouliquen1-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>
2019-04-04Merge branch 'asoc-5.1' into asoc-5.2Mark Brown1-4/+34
2019-03-25ASoC: stm32: sai: add power managementOlivier Moysan3-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>
2019-03-20ASoC: stm32: dfsdm: add mmap supportOlivier Moysan1-1/+1
Enable direct access (mmap) support. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-03-20ASoC: stm32: dfsdm: fix debugfs warnings on entry creationOlivier Moysan1-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>
2019-03-20ASoC: stm32: dfsdm: manage multiple prepareOlivier Moysan1-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>
2019-03-18Merge branch 'for-5.1' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.2Mark Brown3-15/+44
2019-03-18ASoC: stm32: spdifrx: add power managementOlivier Moysan1-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>
2019-03-18Merge tag 'v5.1-rc1' into asoc-5.2Mark Brown1-2/+3
Linux 5.1-rc1
2019-03-18Merge tag 'v5.1-rc1' into asoc-5.1Mark Brown1-2/+3
Linux 5.1-rc1
2019-03-11ASoC: stm32: i2s: fix registers declaration in regmapOlivier Moysan1-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>
2019-03-11ASoC: stm32: i2s: use default dai nameOlivier Moysan1-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>
2019-03-11ASoC: stm32: i2s: improve channel capabilities handlingOlivier Moysan1-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>
2019-03-11ASoC: stm32: i2s: change trigger tracesOlivier Moysan1-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>
2019-03-03ASoC: stm32: sai: fix set_sync serviceOlivier Moysan2-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>
2019-03-03ASoC: stm32: sai: fix oversampling modeOlivier Moysan1-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>
2019-03-03ASoC: stm32: sai: fix race condition in irq handlerOlivier Moysan1-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>
2019-03-03ASoC: stm32: sai: fix exposed capabilities in spdif modeOlivier Moysan1-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>
2019-03-03ASoC: stm32: sai: fix iec958 controls indexationOlivier Moysan1-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>
2019-02-28Merge tag 'asoc-v5.1-2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-nextTakashi Iwai3-71/+84
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.
2019-02-26ASoC: stm32: i2s: skip useless write in slave modeOlivier Moysan1-2/+2
Dummy write in capture master mode is used to gate bus clocks. This write is useless in slave mode as the clocks are not managed by slave. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-26ASoC: stm32: i2s: fix race condition in irq handlerOlivier Moysan1-3/+14
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>
2019-02-26ASoC: stm32: i2s: remove useless callbackOlivier Moysan1-11/+0
Clocks do not need to be released on driver removal, as this is already managed before. Remove useless remove callback. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-26ASoC: stm32: i2s: fix dma configurationOlivier Moysan1-7/+7
DMA configuration is not balanced on start/stop. Move DMA configuration to trigger callback. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-26ASoC: stm32: i2s: fix stream count managementOlivier Moysan1-7/+5
Move counter handling to trigger start section to manage multiple start/stop events. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-26ASoC: stm32: i2s: fix 16 bit format supportOlivier Moysan1-1/+1
I2S supports 16 bits data in 32 channel length. However the expected driver behavior, is to set channel length to 16 bits when data format is 16 bits. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-26ASoC: stm32: i2s: fix IRQ clearingOlivier Moysan1-7/+6
Because of regmap cache, interrupts may not be cleared as expected. Declare IFCR register as write only and make writings to IFCR register unconditional. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-18ASoC: stm32: sai: remove set but not used variables 'mask, cr1'YueHaibing1-5/+3
Fixes gcc '-Wunused-but-set-variable' warning: sound/soc/stm/stm32_sai_sub.c: In function 'stm32_sai_configure_clock': sound/soc/stm/stm32_sai_sub.c:902:11: warning: variable 'mask' set but not used [-Wunused-but-set-variable] sound/soc/stm/stm32_sai_sub.c:902:6: warning: variable 'cr1' set but not used [-Wunused-but-set-variable] It's not used any more after 8307b2afd386 ("ASoC: stm32: sai: set sai as mclk clock provider") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-14ASoC: stm32: sai: add missing put_device()Wen Yang1-3/+8
The of_find_device_by_node() takes a reference to the underlying device structure, we should release that reference. Fixes: 7dd0d835582f ("ASoC: stm32: sai: simplify sync modes management") Signed-off-by: Wen Yang <yellowriver2010@hotmail.com> Acked-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-08SoC: stm32: i2s: manage clock powerOlivier Moysan1-29/+15
Kernel clock management: Enable/disable I2S kernel clock on audio stream startup/shutdown. Peripheral clock management: Manage I2S peripheral clock power through regmap services. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-08ASoC: stm32: i2s: add power managementOlivier Moysan1-3/+30
Add suspend and resume sleep callbacks, to support system low power modes. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-06ASoC: stm: Drop superfluous PCM preallocation error checksTakashi Iwai1-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>
2018-11-16ASoC: Convert a few more users to using %pOFn instead of device_node.nameRob Herring1-4/+4
In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. 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: Olivier Moysan <olivier.moysan@st.com> Cc: Arnaud Pouliquen <arnaud.pouliquen@st.com> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com> Cc: Alexandre Torgue <alexandre.torgue@st.com> Cc: alsa-devel@alsa-project.org Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-11-13ASoC: stm32: sai: fix invalid use of sizeof in stm32_sai_add_mclk_provider()Wei Yongjun1-1/+1
sizeof() when applied to a pointer typed expression gives the size of the pointer, not that of the pointed data. Fixes: 8307b2afd386 ("ASoC: stm32: sai: set sai as mclk clock provider") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-11-05ASoC: stm32: sai: fix less than zero comparison on unsigned intColin Ian King1-2/+1
Currently, the comparison of div < 0 is always false because div is an unsigned int. Fix this by making div an int. Detected by CoverityScan, CID#1475309 ("Unsigned compared against 0") Fixes: 8307b2afd386 "(ASoC: stm32: sai: set sai as mclk clock provider") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-10-23ASoC: stm32: sai: fix master clock namingOlivier Moysan1-3/+2
Fixes: 8307b2afd386 ("ASoC: stm32: sai: set sai as mclk clock provider") Fix warning issued by strncat when bound equals to source length. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-10-23ASoC: stm32: add clock dependency for saiOlivier Moysan1-0/+1
Fixes: 8307b2afd386 ("ASoC: stm32: sai: set sai as mclk clock provider") Add COMMON_CLK dependency for STM32 SAI, as it is required by clock provider. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>