- 26 1月, 2019 2 次提交
-
-
由 Shunli Wang 提交于
Signed-off-by: NShunli Wang <shunli.wang@mediatek.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Shunli Wang 提交于
add mt8183 audio platform and affiliated drivers. Signed-off-by: NShunli Wang <shunli.wang@mediatek.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 25 1月, 2019 1 次提交
-
-
由 Colin Ian King 提交于
Don't populate the const arrays on the stack but instead make it static. Makes the object code smaller, for example: Before: text data bss dec hex filename 14107 8832 224 23163 5a7b bytcht_es8316.o After: text data bss dec hex filename 14015 8896 224 23135 5a5f bytcht_es8316.o (gcc version 8.2.0 x86_64) Signed-off-by: NColin Ian King <colin.king@canonical.com> Acked-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 23 1月, 2019 1 次提交
-
-
由 Mark Brown 提交于
Revert 10dff9b0 (ASoC: soc-core: use for_each_link_codecs() for dai_link codecs) for now as Sylwester Nawrocki reports that it causes oopses on at least Odroid boards. Reported-by: NSylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 22 1月, 2019 7 次提交
-
-
由 Kuninori Morimoto 提交于
Current simple-card is using asoc_simple_card_canonicalize_dailink(). Its naming is "dailink", but is for "platform". We already have asoc_simple_card_canonicalize_cpu() for "cpu", let's follow same naming rule. It never return error, so, void function is better idea. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
We can use for_each_link_codecs() without waiting for_each_rtd_codec_dai() on soc_bind_dai_link(). Let's use for_each macro Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
We need to cleanup component when soc_probe_component() was failed, or when soc_remove_component() was called. But they are cleanuping component on each way. (And soc_probe_component() doesn't call snd_soc_dapm_free(), but it should). Same code in many places makes code un-understandable. This patch adds new soc_cleanup_component() and call it from snd_probe_component() and snd_remove_component(). Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
Deep nested codec is not readable. Let's reduce if/else nest. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
We need to cleanup card resources when snd_soc_instantiate_card() was failed, or when snd_soc_unbind_card() was called. But they are cleanuping card resources on each way. Same code in many places makes code un-understandable. This patch reuses soc_cleanup_card_resources() for cleanuping code resource. Then, it makes avoiding cleanup order. It will be called from snd_soc_instantiate_card() and snd_soc_unbind_card(). Then, original soc_cleanup_card_resources() included snd_soc_flush_all_delayed_work(), but it is now separated. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
soc-core is calling flush_delayed_work() many times for same purpose. Same code in many places makes code un-understandable. This patch adds new snd_soc_flush_all_delayed_work() for it. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
Current snd_soc_dai_link is starting to use snd_soc_dai_link_component (= modern) style for Platform, but it is still assuming single Platform so far. We will need to have multi Platform support in the not far future. Currently only simple card is using it as sound card driver, and other drivers are converted to it from legacy style by snd_soc_init_platform(). To avoid future problem of multi Platform support, let's add num_platforms before it is too late. In the same time, to make it same naming mothed, "platform" should be "platforms". This patch fixup it too. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 19 1月, 2019 9 次提交
-
-
由 Kuninori Morimoto 提交于
Current ALSA SoC is assuming 1 CPU 1 Platform (= DMA) style system. Because of this background, it is directly using xxx_name / xxx_of_node / xxx_dai_name on dai_link. Let's call it as legacy style here. More complex style system like multi CPU multi Platform (= DMA) will coming. To supporting it, we can use snd_soc_dai_link_component on dai_link. Let's call it as modern style here. But current ALSA SoC can't support it so far. Thus, we need to have multi CPU / multi Codec / multi Platform style in the future on ALSA SoC. Currently we already have multi Codec support. Platform is starting to use modern style on dai_link, but still style only. Multi Platform is not yet implemented. And we still don't have multi CPU support on ALSA SoC, and not have modern style either. Currently, if driver is using legacy style Codec/Platform, it will be converted to modern style on soc-core. This means, we are using glue code for legacy vs modern style so far on ALSA SoC. We can fully switch to modern style on all drivers if ALSA SoC supported modern style for CPU, and then, legacy style code will be removed from ALSA SoC. Untile then, we need to keep both legacy/modern style and its glue code. This patch adds such future plan and background on soc.h Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Mark Brown 提交于
ASoC: Fixes for v5.0 Quite a big batch of fixes here. There's a couple of things going on, the main one is that we found some issues with not deferring probe when we should, causing us to skip some driver initialization. The fixes for this then in turn exposed some issues with how we were searching for components which had previously gone unnoticed due to the original issue. There's also been the normal driver specific stuff and there's been what looks like several batches of automated scanning for issues which have generated quite a large set of smaller fixes for potential crashes and missed error handling.
-
由 Shengjiu Wang 提交于
When stopping audio, ASoC will first stop DMA then CPU DAI. Sometimes there is a delay between DMA stop and CPU DAI stop, which triggers an underrun error. Now, because of the delay introduced by dev_err another underrun error will occur causing a vicious circle making impossible to stop CPU DAI. Signed-off-by: NShengjiu Wang <shengjiu.wang@nxp.com> Signed-off-by: NDaniel Baluta <daniel.baluta@nxp.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Stefan Agner 提交于
Deferred probes shouldn't cause error messages in the boot log, so change the dev_err() to the more harmless dev_info(). Signed-off-by: NStefan Agner <stefan@agner.ch> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Stefan Agner 提交于
Probe deferral is to be expected during normal operation, so avoid printing an error when it is encountered. Removing the goto would not be strictly necessary. However, if code gets added later, the cleanup in the EPROBE_DEFER case likely would get missed. Signed-off-by: NStefan Agner <stefan@agner.ch> Reviewed-by: NDaniel Baluta <daniel.baluta@nxp.com> Acked-by: NNicolin Chen <nicoleotsuka@gmail.com> Reviewed-by: NFabio Estevam <festevam@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Stefan Agner 提交于
Probe deferral is to be expected during normal operation, so avoid printing an error when it is encountered. Signed-off-by: NStefan Agner <stefan@agner.ch> Reviewed-by: NDaniel Baluta <daniel.baluta@nxp.com> Acked-by: NNicolin Chen <nicoleotsuka@gmail.com> Reviewed-by: NFabio Estevam <festevam@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Stefan Agner 提交于
Probe deferral is to be expected during normal operation, so avoid printing an error when it is encountered. Signed-off-by: NStefan Agner <stefan@agner.ch> Reviewed-by: NDaniel Baluta <daniel.baluta@nxp.com> Acked-by: NNicolin Chen <nicoleotsuka@gmail.com> Reviewed-by: NFabio Estevam <festevam@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Stefan Agner 提交于
Not finding the codec/SSI instance can be due to probe deferral. Do not print error messages in those cases. Signed-off-by: NStefan Agner <stefan@agner.ch> Reviewed-by: NDaniel Baluta <daniel.baluta@nxp.com> Acked-by: NNicolin Chen <nicoleotsuka@gmail.com> Reviewed-by: NFabio Estevam <festevam@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Stefan Agner 提交于
Make sure to properly put the of node in case finding the codec fails. Fixes: 81e8e492 ("ASoC: fsl: add sgtl5000 clock support for imx-sgtl5000") Signed-off-by: NStefan Agner <stefan@agner.ch> Reviewed-by: NDaniel Baluta <daniel.baluta@nxp.com> Acked-by: NNicolin Chen <nicoleotsuka@gmail.com> Reviewed-by: NFabio Estevam <festevam@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 17 1月, 2019 2 次提交
-
-
由 Bard liao 提交于
Add a default pdata which can fit most HW design. So we don't need to add a lot of DMI checking in this driver. Signed-off-by: NBard liao <yung-chuan.liao@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Cheng-Yi Chiang 提交于
Set codec DAI format for dmic codec in startup. Signed-off-by: NCheng-Yi Chiang <cychiang@chromium.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 16 1月, 2019 7 次提交
-
-
由 Cheng-Yi Chiang 提交于
Select SND_SOC_MAX98927 for SND_SOC_SDM845. Acked-by: NSrinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: NRohit kumar <rohitkr@codeaurora.org> Signed-off-by: NCheng-Yi Chiang <cychiang@chromium.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Gustavo A. R. Silva 提交于
Check return value from call to devm_kzalloc() in order to prevent a potential NULL pointer dereference. Also, notice that it makes no sense to allocate any resources if res = platform_get_resource(pdev, IORESOURCE_MEM, 0); fails, so move the call to devm_kzalloc() below the mentioned code. Lastly, improve the use of sizeof in the call to devm_kzalloc() by changing it from sizeof(struct i2s_dev_data) to sizeof(*adata) This issue was detected with the help of Coccinelle. Fixes: ac289c7e ("ASoC: amd: add ACP3x PCM platform driver") Cc: stable@vger.kernel.org Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Silvio Cesare 提交于
Change snprintf to scnprintf. There are generally two cases where using snprintf causes problems. 1) Uses of size += snprintf(buf, SIZE - size, fmt, ...) In this case, if snprintf would have written more characters than what the buffer size (SIZE) is, then size will end up larger than SIZE. In later uses of snprintf, SIZE - size will result in a negative number, leading to problems. Note that size might already be too large by using size = snprintf before the code reaches a case of size += snprintf. 2) If size is ultimately used as a length parameter for a copy back to user space, then it will potentially allow for a buffer overflow and information disclosure when size is greater than SIZE. When the size is used to index the buffer directly, we can have memory corruption. This also means when size = snprintf... is used, it may also cause problems since size may become large. Copying to userspace is mitigated by the HARDENED_USERCOPY kernel configuration. The solution to these issues is to use scnprintf which returns the number of characters actually written to the buffer, so the size variable will never exceed SIZE. Signed-off-by: NSilvio Cesare <silvio.cesare@gmail.com> Cc: Timur Tabi <timur@kernel.org> Cc: Nicolin Chen <nicoleotsuka@gmail.com> Cc: Mark Brown <broonie@kernel.org> Cc: Xiubo Li <Xiubo.Lee@gmail.com> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Dan Carpenter <dan.carpenter@oracle.com> Cc: Kees Cook <keescook@chromium.org> Cc: Will Deacon <will.deacon@arm.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: NWilly Tarreau <w@1wt.eu> Acked-by: NNicolin Chen <nicoleotsuka@gmail.com> Reviewed-by: NKees Cook <keescook@chromium.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Gustavo A. R. Silva 提交于
There is a potential NULL pointer dereference in case devm_kzalloc() fails and returns NULL. Fix this by adding a NULL check on rt5514_dsp. This issue was detected with the help of Coccinelle. Fixes: 6eebf35b ("ASoC: rt5514: add rt5514 SPI driver") Cc: stable@vger.kernel.org Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Silvio Cesare 提交于
Change snprintf to scnprintf. There are generally two cases where using snprintf causes problems. 1) Uses of size += snprintf(buf, SIZE - size, fmt, ...) In this case, if snprintf would have written more characters than what the buffer size (SIZE) is, then size will end up larger than SIZE. In later uses of snprintf, SIZE - size will result in a negative number, leading to problems. Note that size might already be too large by using size = snprintf before the code reaches a case of size += snprintf. 2) If size is ultimately used as a length parameter for a copy back to user space, then it will potentially allow for a buffer overflow and information disclosure when size is greater than SIZE. When the size is used to index the buffer directly, we can have memory corruption. This also means when size = snprintf... is used, it may also cause problems since size may become large. Copying to userspace is mitigated by the HARDENED_USERCOPY kernel configuration. The solution to these issues is to use scnprintf which returns the number of characters actually written to the buffer, so the size variable will never exceed SIZE. Signed-off-by: NSilvio Cesare <silvio.cesare@gmail.com> Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Cc: Dan Carpenter <dan.carpenter@oracle.com> Cc: Kees Cook <keescook@chromium.org> Cc: Will Deacon <will.deacon@arm.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: NWilly Tarreau <w@1wt.eu> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Shuming Fan 提交于
Fix typo which causes headphone no sound while using BCLK as PLL source. Signed-off-by: NShuming Fan <shumingf@realtek.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Matthias Reichl 提交于
cpu and platform are optional components in DAI links. For example codec-codec links usually have no platform set. Call snd_soc_find_component only if the name or of_node of a cpu or platform is set. Otherwise it will return NULL and soc_init_dai_link bails out immediately with -EPROBE_DEFER, meaning registering a card with NULL cpu or platform in DAI links can never succeed. Fixes: 8780cf11 ("ASoC: soc-core: defer card probe until all component is added to list") Signed-off-by: NMatthias Reichl <hias@horus.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 15 1月, 2019 6 次提交
-
-
由 Mark Brown 提交于
There are some use cases where you're checking for a lot of things on a card and it makes sense that you might end up trying to call snd_soc_find_component() without either a name or an of_node. Currently in that case we try to dereference the name and crash but it's more useful to allow the caller to just treat that as a case where we don't find anything, that error handling will already exist. Inspired by a patch from Ajit Pandey fixing some callers. Fixes: 8780cf11 ("ASoC: soc-core: defer card probe until all component is added to list") Reported-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Curtis Malainey 提交于
snd_soc_init_platform initializes pointers to snd_soc_dai_link which is statically allocated and it does this by devm_kzalloc. In the event of an EPROBE_DEFER the memory will be freed and the pointers are left dangling. snd_soc_init_platform sees the dangling pointers and assumes they are pointing to initialized memory and does not reallocate them on the second probe attempt which results in a use after free bug since devm has freed the memory from the first probe attempt. Since the intention for snd_soc_dai_link->platform is that it can be set statically by the machine driver we need to respect the pointer in the event we did not set it but still catch dangling pointers. The solution is to add a flag to track whether the pointer was dynamically allocated or not. Signed-off-by: NCurtis Malainey <cujomalainey@chromium.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
AES channel status carries various audio parameters. If channel status is detected, current patch extracts sample rate and bit depth parameters of the incoming stream during capture. Signed-off-by: NMaruthi Srinivas Bayyavarapu <maruthi.srinivas.bayyavarapu@xilinx.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Axel Lin 提交于
Fix below build error: ERROR: "__devm_regmap_init_mmio_clk" [sound/soc/codecs/snd-soc-msm8916-digital.ko] undefined! Signed-off-by: NAxel Lin <axel.lin@ingics.com> Acked-by: NSrinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Srinivas Kandagatla 提交于
This patch removes unused variables which also fixes below warnings: msm8916-wcd-digital.c:245:30: warning: 'rx2_mix2_inp1_chain_enum' defined but not used [-Wunused-const-variable=] static const struct soc_enum rx2_mix2_inp1_chain_enum = SOC_ENUM_SINGLE( ^~~~~~~~~~~~~~~~~~~~~~~~ msm8916-wcd-digital.c:234:30: warning: 'rx_mix2_inp1_chain_enum' defined but not used [-Wunused-const-variable=] static const struct soc_enum rx_mix2_inp1_chain_enum = SOC_ENUM_SINGLE( ^~~~~~~~~~~~~~~~~~~~~~~ msm8916-wcd-digital.c:224:26: warning: 'adc2_mux_text' defined but not used [-Wunused-const-variable=] static const char *const adc2_mux_text[] = { "ZERO", "INP2", "INP3" }; ^~~~~~~~~~~~~ msm8916-wcd-digital.c:223:26: warning: 'rx_mix2_text' defined but not used [-Wunused-const-variable=] Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Anders Roxell 提交于
The driver cs4341 can be built with SPI and/or I2C, but it has to be one of them at least. When I2C is set as a module we see the warning below: sound/soc/codecs/cs4341.c:213:12: warning: ‘cs4341_probe’ defined but not used [-Wunused-function] static int cs4341_probe(struct device *dev) ^~~~~~~~~~~~ Rework so that we use IS_ENABLED instead of defined. Also change so SND_SOC_CS4341 depends on SND_SOC_I2C_AND_SPI to we dont' get a link error when SND_SOC_CS4341=y, I2C=m and REGMAP_I2C=m is set. Suggested-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NAnders Roxell <anders.roxell@linaro.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 10 1月, 2019 4 次提交
-
-
由 Rohit kumar 提交于
soc_init_dai_link() calls soc_find_component() which needs to be within client_mutex lock. Add client_mutex lock around soc_init_dai_link() in snd_soc_register_card() to avoid lockdep warning. Fixes: 8780cf11 ("ASoC: soc-core: defer card probe until all component is added to list") Reported-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NRohit kumar <rohitkr@codeaurora.org> Signed-off-by: NAjit Pandey <ajitp@codeaurora.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Wei Yongjun 提交于
The snd_byt_cht_es8316_mc_remove() use the platform drvdata as a type of 'struct byt_cht_es8316_private', but snd_byt_cht_es8316_mc_probe() set it to 'struct snd_soc_card', as suggested by Dan Carpenter, fix the usage in snd_byt_cht_es8316_mc_remove(). Fixes: 0d3e91da ("ASoC: Intel: bytcht_es8316: Add external speaker mux support") Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com> Acked-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Mac Chiang 提交于
move the codec PLL to rt5682_codec_init, because codec only need to config the clock source/PLL once. As the result, remove the platform_clock_controls since no need to control clock anymore. Signed-off-by: NShuming Fan <shumingf@realtek.com> Signed-off-by: NMac Chiang <mac.chiang@intel.com> Acked-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 b-ak 提交于
SND_SOC_DAPM_MICBIAS is deprecated, replace it with SND_SOC_DAPM_SUPPLY. MICBIAS voltage wasn't supplied to the microphone with the older SND_SOC_DAPM_MICBIAS widget, hence the microphone wouldn't work. This patch fixes the problem. Signed-off-by: Nb-ak <anur.bhargav@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 09 1月, 2019 1 次提交
-
-
由 Adam Thomson 提交于
By making MCLK parent of DAI clocks, when querying the rate of the clock the rate returned is now given from the parent clock so gives the MCLK rate rather than 0 as previously returned. This is a bit misleading, and actually there's no major reason why we can't at least return the DAI WCLK rate, as set in HW, so that's what we now do. Signed-off-by: NAdam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-