summaryrefslogtreecommitdiff
path: root/sound/soc/stm/stm32_sai_sub.c
AgeCommit message (Collapse)Author
2023-10-09ASoC: Use device_get_match_data()Rob Herring
Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20231006-dt-asoc-header-cleanups-v3-5-13a4f0f7fee6@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-25ASoC: stm: convert not to use asoc_xxx()Kuninori Morimoto
ASoC is now unified asoc_xxx() into snd_soc_xxx(). This patch convert asoc_xxx() to snd_soc_xxx(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87y1hcqnjo.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-01ASoC: dmaengine: Drop unused iov_iter for process callbackTakashi Iwai
Passing the iov_iter to the process callback is rather buggy, as the iterator has been already processed for playback. Similarly, it makes the copy for capture buggy after the process callback reading the iterator out. Moreover, all existing process callbacks don't refer to the passed iterator at all. So, it's better to drop the argument from the process callback. Fixes: 9bebd65443c1 ("ASoC: dmaengine: Use iov_iter for process callback, too") Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/r/CAHk-=wje+VkXjjfVTmK-uJdG_M5=ar14QxAwK+XDiq07k_pzBg@mail.gmail.com Reviewed-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230831130457.8180-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-28Merge tag 'asoc-v6.6' of ↵Takashi Iwai
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v6.6 The rest of the updates for v6.6, some of the highlights include: - A big API cleanup from Morimoto-san, rationalising the places we put functions. - Lots of work on the SOF framework, AMD and Intel drivers, including a lot of cleanup and new device support. - Standardisation of the presentation of jacks from drivers. - Provision of some generic sound card DT properties. - Conversion oof more drivers to the maple tree register cache. - New drivers for AMD Van Gogh, AWInic AW88261, Cirrus Logic cs42l43, various Intel platforms, Mediatek MT7986, RealTek RT1017 and StarFive JH7110.
2023-08-18ASoC: dmaengine: Use iov_iter for process callback, tooTakashi Iwai
Along with the conversion to PCM copy ops, use the iov_iter for the pointer to be passed to the dmaengine process callback, too. It avoids the direct reference of iter_iov_addr(), and it can potentially help for the drivers to access memory properly (although both atmel and stm drivers don't use the given buffer address at all for now). Reviewed-by: Mark Brown <broonie@kernel.org> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Claudiu Beznea <claudiu.beznea@microchip.com> Cc: Olivier Moysan <olivier.moysan@foss.st.com> Cc: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com> Link: https://lore.kernel.org/r/20230815190136.8987-23-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-14ASoC: stm: merge DAI call back functions into opsKuninori Morimoto
ALSA SoC merges DAI call backs into .ops. This patch merge these into one. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87edkdb0tq.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-05-22ASoC: stm32: sai: Use the devm_clk_get_optional() helperChristophe JAILLET
Use devm_clk_get_optional() instead of hand writing it. This saves some LoC and improves the semantic. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/f7987f18dadf77bfa09969fd4c82d5a0f4e4e3b7.1684594838.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-20ASoC: stm: stm32_sai_sub: Convert to platform remove callback returning voidUwe Kleine-König
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Takashi Iwai <tiwai@suse.de> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Link: https://lore.kernel.org/r/20230315150745.67084-139-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-11ASoC: Use of_property_present() for testing DT property presenceRob Herring
It is preferred to use typed property access functions (i.e. of_property_read_<type> functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20230310144732.1546328-1-robh@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-06-27ASoC: stm32: Migrate to new style legacy DAI naming flagCharles Keepax
Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). These drivers appear to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220623125250.2355471-9-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-06-09Specify clock provider directly to CPU DAIsMark Brown
Merge series from Charles Keepax <ckeepax@opensource.cirrus.com>: Currently the set_fmt callback always passes clock provider/consumer with respect to the CODEC. This made sense when the framework was directly broken down into platforms and CODECs. However, as things are now broken down into components which can be connected as either the CPU or CODEC side of a DAI link it simplifies things if each side of the link is just told if it is provider or consumer of the clocks. Making this change allows us to remove one of the last parts of the ASoC core that needs to know if a driver is a CODEC driver, where it flips the clock format specifier if a CODEC driver is used on the CPU side of a DAI link, as well as just being conceptually more consistent with componentisation. The basic idea of this patch chain is to change the set_fmt callback from specifying if the CODEC is provider/consumer into directly specifying if the component is provider/consumer. To do this we add some new defines, and then to preserve bisectability, the migration is done by adding a new callback, converting over all existing CPU side drivers, converting the core, and then finally reverting back to the old callback. Converting the platform drivers makes sense as the existing defines are from the perspective of the CODEC and there are more CODEC drivers than platform drivers. Obviously a fair amount of this patch chain I was only able to build test, so any testing that can be done would be greatly appreciated.
2022-06-06ASoC: stm32: sai: Remove useless defineTang Bin
STM_SAI_IS_SUB_B(x) and STM_SAI_BLOCK_NAME(x) are not being used, so remove them. Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com> Acked-by: Olivier Moysan <olivier.moysan@st.com> Link: https://lore.kernel.org/r/20220525135023.6792-1-tangbin@cmss.chinamobile.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-06-06ASoC: stm: Rename set_fmt_new back to set_fmtCharles Keepax
Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220519154318.2153729-49-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-06-06ASoC: stm: Update to use set_fmt_new callbackCharles Keepax
As part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220519154318.2153729-22-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-12-20ASoC: stm: Use dev_err_probe() helperKuninori Morimoto
Use the dev_err_probe() helper, instead of open-coding the same operation. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/20211214020843.2225831-22-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-17ASoC: stm32: sai: increase channels_max limitOlivier Moysan
The SAI peripheral supports up to 16 channels in TDM mode (8L+8R). The driver currently supports TDM over two channels. Increase SAI DAI playback/record channels_max, to also allow up to 16 channels in TDM mode. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Link: https://lore.kernel.org/r/20211117110031.19345-1-olivier.moysan@foss.st.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-17ASoC: stm32: sai: Use devm_platform_get_and_ioremap_resource()Yang Yingliang
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20210617043847.1113092-3-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-28ASoC: stm32: do not request a new clock consummer referenceJerome Brunet
This reverts commit 65d1cce726d4912793d0a84c55ecdb0ef5832130. There is problem with clk_hw_get_hw(). Using it pins the clock provider to itself, making it impossible to remove the module. Revert commit 65d1cce726d4 ("ASoC: stm32: properly get clk from the provider") until this gets sorted out. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20210428122632.46244-2-jbrunet@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-23ASoC: stm32: properly get clk from the providerJerome Brunet
Instead of using the clk embedded in the clk_hw (which is meant to go away), a clock provider which need to interact with its own clock should request clk reference through the clock provider API. Reviewed-by: Stephen Boyd <sboyd@kernel.org> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20210421120512.413057-2-jbrunet@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-09-11ASoC: stm32: sai: add pm_runtime supportOlivier Moysan
Enable support of pm_runtime on STM32 SAI driver to allow SAI power state monitoring. pm_runtime_put_autosuspend() is called from ASoC framework on pcm device close. The pmdown_time delay is available in runtime context, and may be set in SAI driver to take into account shutdown delay on playback. However, this shutdown delay is already handled in the DAPMs of the audio codec linked to SAI CPU DAI. So, the choice is made, not to support this delay on CPU DAI side. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Link: https://lore.kernel.org/r/20200911081507.7276-1-olivier.moysan@st.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23ASoC: stm: use asoc_substream_to_rtd()Kuninori Morimoto
Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87pn8r0yus.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-04-17ASoC: stm32: sai: fix sai probeOlivier Moysan
pcm config must be set before snd_dmaengine_pcm_register() call. Fixes: 0d6defc7e0e4 ("ASoC: stm32: sai: manage rebind issue") Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Link: https://lore.kernel.org/r/20200417142122.10212-1-olivier.moysan@st.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-04-14soc/stm/stm32_sub_sai: Add missing '\n' in log messagesSebastian Fricke
Message logged by 'dev_xxx()' or 'pr_xxx()' should end with a '\n'. Fixes: 3e086ed("ASoC: stm32: add SAI drivers") Signed-off-by: Sebastian Fricke <sebastian.fricke.linux@gmail.com> Link: https://lore.kernel.org/r/20200413042952.7675-1-sebastian.fricke.linux@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-04-06ASoC: stm32: sai: Add missing cleanupJulia Lawall
The commit 0d6defc7e0e4 ("ASoC: stm32: sai: manage rebind issue") converts some function calls to their non-devm equivalents. The appropriate cleanup code was added to the remove function, but not to the probe function. Add a call to snd_dmaengine_pcm_unregister to compensate for the call to snd_dmaengine_pcm_register in case of subsequent failure. Fixes: commit 0d6defc7e0e4 ("ASoC: stm32: sai: manage rebind issue") Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr> Acked-by: Olivier Moysan <olivier.moysan@st.com> Link: https://lore.kernel.org/r/1586099028-5104-1-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-27ASoC: stm: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointerKuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87a747ir4b.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-04Merge branch 'for-5.6' of ↵Mark Brown
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.7
2020-03-04ASoC: stm32: sai: manage rebind issueOlivier Moysan
The commit e894efef9ac7 ("ASoC: core: add support to card rebind") allows to rebind the sound card after a rebind of one of its component. With this commit, the sound card is actually rebound, but may be no more functional. The following problems have been seen with STM32 SAI driver. 1) DMA channel is not requested: With the sound card rebind the simplified call sequence is: stm32_sai_sub_probe snd_soc_register_component snd_soc_try_rebind_card snd_soc_instantiate_card devm_snd_dmaengine_pcm_register The problem occurs because the pcm must be registered, before snd_soc_instantiate_card() is called. Modify SAI driver, to change the call sequence as follows: stm32_sai_sub_probe devm_snd_dmaengine_pcm_register snd_soc_register_component snd_soc_try_rebind_card 2) DMA channel is not released: dma_release_channel() is not called when devm_dmaengine_pcm_release() is executed. This occurs because SND_DMAENGINE_PCM_DRV_NAME component, has already been released through devm_component_release(). devm_dmaengine_pcm_release() should be called before devm_component_release() to avoid this problem. Call snd_dmaengine_pcm_unregister() and snd_soc_unregister_component() explicitly from SAI driver, to have the right sequence. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Message-Id: <20200304102406.8093-1-olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-11ASoC: stm32: sai: improve error management on probe deferralOlivier Moysan
Do not print an error trace when deferring probe for SAI driver. Signed-off-by: Etienne Carriere <etienne.carriere@st.com> Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Link: https://lore.kernel.org/r/20200203100814.22944-5-olivier.moysan@st.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-09ASoC: stm32: sai: fix possible circular lockingOlivier Moysan
In current driver, locks can be taken as follows: - Register access: take a lock on regmap config and then on clock. - Master clock provider: take a lock on clock and then on regmap config. This can lead to the circular locking summarized below. Remove peripheral clock management through regmap framework, and manage peripheral clock in driver instead. On register access, lock on clock is taken first, which allows to avoid possible locking issue. [ 6696.561513] ====================================================== [ 6696.567670] WARNING: possible circular locking dependency detected [ 6696.573842] 4.19.49 #866 Not tainted [ 6696.577397] ------------------------------------------------------ [ 6696.583566] pulseaudio/6439 is trying to acquire lock: [ 6696.588697] 87b0a25b (enable_lock){..-.}, at: clk_enable_lock+0x64/0x128 [ 6696.595377] [ 6696.595377] but task is already holding lock: [ 6696.601197] d858f825 (stm32_sai_sub:1342:(sai->regmap_config)->lock){....} ... [ 6696.812513] Possible unsafe locking scenario: [ 6696.812513] [ 6696.818418] CPU0 CPU1 [ 6696.822935] ---- ---- [ 6696.827451] lock(stm32_sai_sub:1342:(sai->regmap_config)->lock); [ 6696.833618] lock(enable_lock); [ 6696.839350] lock(stm32_sai_sub:1342: (sai->regmap_config)->lock); [ 6696.848035] lock(enable_lock); Fixes: 03e78a242a15 ("ASoC: stm32: sai: add h7 support") Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Link: https://lore.kernel.org/r/20200109083254.478-1-olivier.moysan@st.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-11-05ASoC: stm32: sai: add restriction on mmap supportOlivier Moysan
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>
2019-10-18ASoC: stm32: sai: fix sysclk management on shutdownOlivier Moysan
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>
2019-06-26Merge tag 'v5.2-rc6' into asoc-5.3Mark Brown
Linux 5.2-rc6
2019-06-03ASoC: stm32: sai: manage identification registersOlivier Moysan
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>
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174Thomas Gleixner
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-06Merge branch 'asoc-5.2' into asoc-nextMark Brown
2019-04-26ASoC: stm32: sai: simplify dai driver initialisationArnaud Pouliquen
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 Brown
2019-04-10ASoC: stm32: sai: fix master clock managementOlivier Moysan
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 Pouliquen
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-03-25ASoC: stm32: sai: add power managementOlivier Moysan
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-03ASoC: stm32: sai: fix set_sync serviceOlivier Moysan
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 Moysan
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 Moysan
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 Moysan
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 Moysan
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-18ASoC: stm32: sai: remove set but not used variables 'mask, cr1'YueHaibing
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>
2018-11-13ASoC: stm32: sai: fix invalid use of sizeof in stm32_sai_add_mclk_provider()Wei Yongjun
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 King
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 Moysan
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-19ASoC: stm32: sai: set sai as mclk clock providerOlivier Moysan
Add master clock generation support in STM32 SAI. The master clock provided by SAI can be used to feed a codec. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>