- 02 Oct, 2023 1 commit
-
-
Gustavo A. R. Silva authored
If, for any reason, the open-coded arithmetic causes a wraparound, the protection that `struct_size()` adds against potential integer overflows is defeated. Fix this by hardening call to `struct_size()` with `size_add()`. Fixes: f9efae95 ("ASoC: SOF: ipc4-topology: Add support for base config extension") Signed-off-by: "Gustavo A. R. Silva" <gustavoars@kernel.org> Reviewed-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/ZQSr15AYJpDpipg6@workSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 29 Sep, 2023 7 commits
-
-
Cezary Rojewski authored
HDAudio streams are decoupled on startup() and, decoupling them again on prepare() is redundant. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/20230929112436.787058-7-amadeuszx.slawinski@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Wu Zhou authored
When audio controller is passed-through to the guest machine in virtualized environment, the basefw load will fail the next time guest OS reboots. Disable the DSP main core before loading the base firmware to sanitize the environment. Signed-off-by: Wu Zhou <wu.zhou@intel.com> Signed-off-by: Libin Yang <libin.yang@intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/20230929112436.787058-6-amadeuszx.slawinski@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Cezary Rojewski authored
To prevent rmmod and similar behave unexpectedly when invoked on snd_soc_avs module while the AudioDSP firmware tracing is ongoing, increase the module refcount until the tracing is stopped. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/20230929112436.787058-5-amadeuszx.slawinski@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Amadeusz Sławiński authored
In order to instantiate modules on the firmware side, the driver sends payload with module configuration. In some case size of this information is not known before hand, so driver allocates temporary memory during module creation and frees it after use. Optimize the flow a bit, by preallocating maximum buffer. This removes the time spend on allocating memory, as well as potential OOM errors during module initialization. Handlers for modules, where configuration data fits on stack, are left as is. Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/20230929112436.787058-4-amadeuszx.slawinski@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Amadeusz Sławiński authored
Instead of using PAGE_SIZE as base of definitions in headers, use generic size defines. While x86 platforms use 4096 as page size, there are platforms which use different page sizes. Two of changed defines are for memory windows on DSP side, which have fixed size independent of host side page size. Another one is for CLDMA buffer which also doesn't need to change with page size. Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/20230929112436.787058-3-amadeuszx.slawinski@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Cezary Rojewski authored
Code size can be reduced if avs_dsp_send_xxx_msg()s take responsibility for dumping logs in case of an IPC message failure. In consequence, avs_ipc_err() helper is removed. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/20230929112436.787058-2-amadeuszx.slawinski@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Rob Herring authored
There's generally no need to use definitions to reference from individual properties. All the property names are the same, and all the defined properties are used by all the users. Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/20230928194126.1146622-1-robh@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 28 Sep, 2023 17 commits
-
-
Amadeusz Sławiński authored
There are examples in documentation for codec to codec connection. However they show method before recent series of patches which renamed the fields. Update documentation accordingly. Fixes: 7ddc7f91 ("ASoC: soc.h: clarify Codec2Codec params") Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/20230928134706.662947-1-amadeuszx.slawinski@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mark Brown authored
Merge series from wangweidong.a@awinic.com: The awinic aw87390 is a new high efficiency, low noise, constant large volume, 6th Smart K audio amplifier.
-
Mark Brown authored
Merge series from cy_huang@richtek.com: This patch series create a TDM source select property and use it to decide which TDM data source is connected. Following by the below patch disccuion https://lore.kernel.org/lkml/1695780376-32301-1-git-send-email-cy_huang@richtek.com/#t It may not be a good choice to add the user controlable mixer control item. Since it follows the board design, make it as a device property.
-
Weidong Wang authored
Add i2c and amplifier registration for aw87390 and their associated operation functions. Signed-off-by: Weidong Wang <wangweidong.a@awinic.com> Link: https://lore.kernel.org/r/20230928105727.47273-11-wangweidong.a@awinic.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Weidong Wang authored
Change the transmission mode of the "aw88261_dev_get_prof_name" function parameter Signed-off-by: Weidong Wang <wangweidong.a@awinic.com> Link: https://lore.kernel.org/r/20230928105727.47273-10-wangweidong.a@awinic.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Weidong Wang authored
Rename "sync-flag" to "awinic,sync-flag", this is to be consistent with the "awinic,aw88395.yaml" file Signed-off-by: Weidong Wang <wangweidong.a@awinic.com> Link: https://lore.kernel.org/r/20230928105727.47273-9-wangweidong.a@awinic.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Weidong Wang authored
Add aw87390 compatible code to the aw88395_lib.c file so that it can parse aw87390's bin file Signed-off-by: Weidong Wang <wangweidong.a@awinic.com> Link: https://lore.kernel.org/r/20230928105727.47273-8-wangweidong.a@awinic.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Weidong Wang authored
Change the name of the i2c driver, this is to be consistent with the "awinic,aw88395.yaml" file Signed-off-by: Weidong Wang <wangweidong.a@awinic.com> Link: https://lore.kernel.org/r/20230928105727.47273-7-wangweidong.a@awinic.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Weidong Wang authored
Change the transmission mode of the "aw88395_dev_get_prof_name" function parameter, Instead of using return values for data transfer, parameters are used Signed-off-by: Weidong Wang <wangweidong.a@awinic.com> Link: https://lore.kernel.org/r/20230928105727.47273-6-wangweidong.a@awinic.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Weidong Wang authored
Rename "sound-channel" to "awinic,audio-channel", this is to be consistent with the "awinic,aw88395.yaml" file Signed-off-by: Weidong Wang <wangweidong.a@awinic.com> Link: https://lore.kernel.org/r/20230928105727.47273-5-wangweidong.a@awinic.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Weidong Wang authored
Remove the "fade-enable" property because the "fade_step" property already implement this functionality. Signed-off-by: Weidong Wang <wangweidong.a@awinic.com> Link: https://lore.kernel.org/r/20230928105727.47273-4-wangweidong.a@awinic.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Weidong Wang authored
Add a DT schema for describing awinic aw87390 audio amplifiers. They are controlled using I2C. Signed-off-by: Weidong Wang <wangweidong.a@awinic.com> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20230928105727.47273-3-wangweidong.a@awinic.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Weidong Wang authored
Add two properties, the "awinic,audio-channel" property and the "awinic,sync-flag". The "awinic,audio-channel" is used to make different PA load different configurations, the "awinic,sync-flag" is used to synchronize the phases of multiple PA. These two properties will be read by the corresponding driver, allowing multi-PA to achieve better playback effect. Signed-off-by: Weidong Wang <wangweidong.a@awinic.com> Acked-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20230928105727.47273-2-wangweidong.a@awinic.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Jiapeng Chong authored
The assignment of the else and if branches is the same, so the else here is redundant, so we remove it. ./sound/soc/codecs/cs42l43-sdw.c:35:1-3: WARNING: possible condition with no effect (if == else). Reported-by: Abaci Robot <abaci@linux.alibaba.com> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6712Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230928085200.48635-1-jiapeng.chong@linux.alibaba.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
ChiYuan Huang authored
Pase the property to decide the TDM input source comes from 'DATA1' or 'DATA2 pin. Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> Link: https://lore.kernel.org/r/1695872468-24433-3-git-send-email-cy_huang@richtek.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
ChiYuan Huang authored
Create a boolean property to select TDM input source coms from 'DATA2'. Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> Link: https://lore.kernel.org/r/1695872468-24433-2-git-send-email-cy_huang@richtek.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
"asoc_simple_card_info" was renamed to "simple_util_info" by commit ad484cc9 ("ASoC: remove asoc_xxx() compatible macro"). This patch fixup it For SH7724 boards. Fixes: ad484cc9 ("ASoC: remove asoc_xxx() compatible macro") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202309280417.rOLRdrdM-lkp@intel.com/Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87ttrfgo3j.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 27 Sep, 2023 1 commit
-
-
Chancel Liu authored
The commit 1da681e5 ("ASoC: soc-pcm.c: Clear DAIs parameters after stream_active is updated") tries to make sure DAI parameters can be cleared properly through moving the cleanup to the place where stream active status is updated. However, it will cause the cleanup only happening in soc_pcm_close(). Suppose a case: aplay -Dhw:0 44100.wav 48000.wav. The case calls soc_pcm_open()->soc_pcm_hw_params()->soc_pcm_hw_free()-> soc_pcm_hw_params()->soc_pcm_hw_free()->soc_pcm_close() in order. The parameters would be remained in the system even if the playback of 44100.wav is finished. The case requires us clearing parameters in phase of soc_pcm_hw_free(). However, moving the DAI parameters cleanup back to soc_pcm_hw_free() has the risk that DAIs parameters never be cleared if there're more than one stream, see commit 1da681e5 ("ASoC: soc-pcm.c: Clear DAIs parameters after stream_active is updated") for more details. To meet all these requirements, in addition to do DAI parameters cleanup in soc_pcm_hw_free(), also check it in soc_pcm_close() to make sure DAI parameters cleared if the DAI becomes inactive. Fixes: 1da681e5 ("ASoC: soc-pcm.c: Clear DAIs parameters after stream_active is updated") Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Link: https://lore.kernel.org/r/20230920153621.711373-2-chancel.liu@nxp.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 26 Sep, 2023 10 commits
-
-
Kuninori Morimoto authored
No driver is using asoc_xxx() any more. This patch removes compatible macro for asoc_xxx(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/878r8tfo06.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
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/87sf71fo32.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
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/87zg19fo4o.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
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/874jjhh2q1.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
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/877codh2qg.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
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/875y3xihf7.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mark Brown authored
For the benefit of CI.
-
Mark Brown authored
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>: ASoC is using 2 type of prefix (asoc_xxx() vs snd_soc_xxx()), but there is no particular reason about that [1]. To reduce confusing, standarding these to snd_soc_xxx() is sensible. This patch adds asoc_xxx() macro to keep compatible for a while. It will be removed if all drivers were switched to new style. Link: https://lore.kernel.org/r/87h6td3hus.wl-kuninori.morimoto.gx@renesas.com [1]
-
Shengjiu Wang authored
As the pll_id and pll_id can be zero (WM8960_SYSCLK_AUTO) with the commit 2bbc2df4 ("ASoC: wm8960: Make automatic the default clocking mode") Then the machine driver will skip to call set_sysclk() and set_pll() for codec, when the sysclk rate is different with what wm8960 read at probe, the output sound frequency is wrong. So change the fll_id and pll_id initial value, still keep machine driver's behavior same as before. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1695202992-24864-1-git-send-email-shengjiu.wang@nxp.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Rob Herring authored
Just as unevaluatedProperties or additionalProperties are required at the top level of schemas, they should (and will) also be required for child node schemas. That ensures only documented properties are present for any node. Add unevaluatedProperties or additionalProperties as appropriate. Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: Herve Codina <herve.codina@bootlin.com> Link: https://lore.kernel.org/r/20230925220947.2031536-1-robh@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 25 Sep, 2023 4 commits
-
-
Geert Uytterhoeven authored
sound/soc/sh/dma-sh7760.c: In function ‘camelot_prepare’: ./include/linux/kern_levels.h:5:25: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘unsigned int’ [-Wformat=] 5 | #define KERN_SOH "\001" /* ASCII Start Of Header */ sound/soc/sh/dma-sh7760.c:198:9: note: in expansion of macro ‘pr_debug’ 198 | pr_debug("PCM data: addr 0x%08lx len %d\n", | ^~~~~~~~ Fix this by using "%pad" and taking the address to format the DMA address. While at it, use "%zu" to format size_t. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202309250903.XNAjFuxy-lkp@intel.com/Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20230925125646.3681807-1-geert+renesas@glider.beSigned-off-by: Mark Brown <broonie@kernel.org>
-
Christophe JAILLET authored
"io-channel-names" is expected to have few values, so there is no real point to allocate audio_iio_aux_chan structure with a dedicate memory allocation. Using a flexible array for struct audio_iio_aux->chans avoids the overhead of an additional, managed, memory allocation. This also saves an indirection when the array is accessed. Finally, __counted_by() can be used for run-time bounds checking if configured and supported by the compiler. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/1c0090aaf49504eaeaff5e7dd119fd37173290b5.1695540940.git.christophe.jaillet@wanadoo.frSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
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/87cyyop8so.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
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/87edj4p8st.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-