- 10 Sep, 2024 1 commit
-
-
Jens Reidel authored
When using primary mi2s on sm8250-compatible SoCs, the correct clock needs to get enabled to be able to use the mi2s interface. Signed-off-by: Jens Reidel <adrian@travitia.xyz> Tested-by: Danila Tikhonov <danila@jiaxyga.com> # sm7325-nothing-spacewar Link: https://patch.msgid.link/20240826134920.55148-2-adrian@travitia.xyzReviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
-
- 09 Sep, 2024 22 commits
-
-
Mark Brown authored
Merge series from Mark Brown <broonie@kernel.org>: Nathan reported that the newly added mt8365 drivers were causing a number of warnings which break -Werror builds, these were only visible on arm64 since the drivers did not have COMPILE_TEST enabled. Fix this and some other minor stuff I noticed while doing so.
-
Mark Brown authored
Merge series from Binbin Zhou <zhoubinbin@loongson.cn>: This patchset attempts to improve code readability by simplifying code formatting. No functional changes.
-
Uwe Kleine-König authored
After commit 0edb555a ("platform: Make platform_driver::remove() return void") .remove() is (again) the right callback to implement for platform drivers. Convert all drivers below sound/soc to use .remove(), with the eventual goal to drop struct platform_driver::remove_new(). As .remove() and .remove_new() have the same prototypes, conversion is done by just changing the structure member name in the driver initializer. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/20240909151230.909818-2-u.kleine-koenig@baylibre.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Codrin Ciubotariu authored
Remove the interface name from the stream_name. The interface name (and the index of the interface) can be set in DT using the sound-name-prefix string property. [andrei.simion@microchip: Adjust the commit title] Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com> Signed-off-by: Andrei Simion <andrei.simion@microchip.com> Link: https://patch.msgid.link/20240909083530.14695-2-andrei.simion@microchip.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Tang Bin authored
In the file drivers/base/platform.c, the return description of platform_get_irq is 'non-zero IRQ number on success, negative error number on failure.', so the check is wrong, fix it. And when get irq failed, the function platform_get_irq logs an error message. Fixes: 5e240449 ("ASoC: codecs: add MT6357 support") Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com> Link: https://patch.msgid.link/20240908134604.3652-1-tangbin@cmss.chinamobile.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mark Brown authored
There is no build time dependency on anything specific to ARCH_MEDIATEK so enable COMPILE_TEST builds. Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com> Tested-by: Nathan Chancellor <nathan@kernel.org> # build Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://patch.msgid.link/20240907-asoc-fix-mt8365-build-v1-7-7ad0bac20161@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mark Brown authored
Nothing ever calls mt8365_dai_load_dmic_iirc_coeff_table() so the compiler warns about an unused static function. While it seems likely that something should be calling the function I don't know what and this is breaking -Werror builds like allmodconfig so let's just remove it. It can be added again along with the user. Reported-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Tested-by: Nathan Chancellor <nathan@kernel.org> # build Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://patch.msgid.link/20240907-asoc-fix-mt8365-build-v1-6-7ad0bac20161@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mark Brown authored
Silence compiler warnings by removing unused variables. Reported-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Tested-by: Nathan Chancellor <nathan@kernel.org> # build Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://patch.msgid.link/20240907-asoc-fix-mt8365-build-v1-5-7ad0bac20161@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mark Brown authored
The compilers warn if functions without a prototype are not static so add appropriate static declarations. Reported-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Tested-by: Nathan Chancellor <nathan@kernel.org> # build Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://patch.msgid.link/20240907-asoc-fix-mt8365-build-v1-4-7ad0bac20161@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mark Brown authored
The function is not used outside of the file it is defined and the equivalent function for 44.1kHz is not prototyped so remove the prototype for this function. Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com> Tested-by: Nathan Chancellor <nathan@kernel.org> # build Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://patch.msgid.link/20240907-asoc-fix-mt8365-build-v1-3-7ad0bac20161@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mark Brown authored
The regmap APIs take unsigned ints not unsigned longs so casting their arguments to unsigned longs is not a good choice, the constants being cast here are all unsigned ints anyway. Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Tested-by: Nathan Chancellor <nathan@kernel.org> # build Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://patch.msgid.link/20240907-asoc-fix-mt8365-build-v1-2-7ad0bac20161@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mark Brown authored
The mt8365 driver uses bits.h to define bitfields but BIT() uses unsigned long constants so does not play well with being bitwise negated and converted to an unsigned int, the compiler complains about width reduction on a number of architectures. Just open code the shifting to avoid the issue. Generated with s/BIT(/(1U << / Reported-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com> Tested-by: Nathan Chancellor <nathan@kernel.org> # build Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://patch.msgid.link/20240907-asoc-fix-mt8365-build-v1-1-7ad0bac20161@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Binbin Zhou authored
There are a few i2s clock enable operations in loongson_i2s_set_fmt(), convert them to simple helper functions called loongson_i2s_enable_mclk() and loongson_i2s_enable_bclk(). Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://patch.msgid.link/d6f6c818b0ecee87277f704b6a801cbbf5e712ce.1725844530.git.zhoubinbin@loongson.cnSigned-off-by: Mark Brown <broonie@kernel.org>
-
Binbin Zhou authored
The operations for reading the cpu and codec nodes in loongson_card_parse_acpi() are similar, so we convert them into a simple helper function called loongson_card_acpi_find_device(). Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://patch.msgid.link/3b7da05e5fd4326e7944aa749bf06dd44e964f6c.1725844530.git.zhoubinbin@loongson.cnSigned-off-by: Mark Brown <broonie@kernel.org>
-
Binbin Zhou authored
Replace an if statement with a ternary operator, making the code a tiny bit shorter. Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://patch.msgid.link/94ec2ac178610f50af4815ef5b719695915bba31.1725844530.git.zhoubinbin@loongson.cnSigned-off-by: Mark Brown <broonie@kernel.org>
-
Binbin Zhou authored
Deal with illegal conditions first and put the normal process code outside the if condition to improve code readability. Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://patch.msgid.link/98b71f9643970f11bc500c01599c7aeb77ff2a58.1725844530.git.zhoubinbin@loongson.cnSigned-off-by: Mark Brown <broonie@kernel.org>
-
Binbin Zhou authored
Error handling in probe() can be a bit simpler with dev_err_probe(). Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://patch.msgid.link/07855aa6c290ec826d63e68b898e7f4afac5e30d.1725844530.git.zhoubinbin@loongson.cnSigned-off-by: Mark Brown <broonie@kernel.org>
-
Binbin Zhou authored
Simplify the probe() function by using local 'dev' instead of &pdev->dev. Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://patch.msgid.link/1984a20930da515e2a478b02159f83c02498f6be.1725844530.git.zhoubinbin@loongson.cnSigned-off-by: Mark Brown <broonie@kernel.org>
-
Binbin Zhou authored
Where applicable, use BIT() macro instead of shift operation to improve readability. Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://patch.msgid.link/ccca555c96f18c0ecf5f1544c82945ba651d105f.1725844530.git.zhoubinbin@loongson.cnSigned-off-by: Mark Brown <broonie@kernel.org>
-
Arnd Bergmann authored
The mt8365_i2s_enum and mt8365_i2s_hd_str variables are not used anywhere, but cause a warning when building with C=1 or when enabling -Wunused-const-variable: sound/soc/mediatek/mt8365/mt8365-dai-i2s.c:781:27: error: 'mt8365_i2s_hd_str' defined but not used [-Werror=unused-const-variable=] 781 | static const char * const mt8365_i2s_hd_str[] = { | ^~~~~~~~~~~~~~~~~ Remove these for the moment, they can be added back if a user comes up. Fixes: 402bbb13 ("ASoC: mediatek: mt8365: Add I2S DAI support") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Link: https://patch.msgid.link/20240907200053.3027553-1-arnd@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Arnd Bergmann authored
On x86, the header is not already included implicitly, breaking compile-testing: In file included from sound/soc/mediatek/mt8365/mt8365-afe-common.h:19, from sound/soc/mediatek/mt8365/mt8365-afe-pcm.c:18: sound/soc/mediatek/mt8365/mt8365-afe-pcm.c: In function 'mt8365_afe_cm2_mux_conn': sound/soc/mediatek/mt8365/mt8365-reg.h:952:41: error: implicit declaration of function 'FIELD_PREP' [-Wimplicit-function-declaration] 952 | #define CM2_AFE_CM2_CONN_CFG1(x) FIELD_PREP(CM2_AFE_CM2_CONN_CFG1_MASK, (x)) | ^~~~~~~~~~ Included it ahead of the field definitions. Fixes: 38c7c9dd ("ASoC: mediatek: mt8365: Add common header") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Link: https://patch.msgid.link/20240908221754.2210857-1-arnd@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Romain Gantois authored
The TLV320DAC3100 Audio DAC has 25 built-in digital audio processing blocks (PRBs). Each of these PRBs has a static filter structure with programmable coefficients. Once a PRB is selected for use by the DAC, its filter coefficients can be configured via a dedicated set of registers. Define a new optional firmware which can be loaded by the TLV320DAC driver. This firmware describes a full set of filter coefficients for all blocks used by the various PRBs. The firmware's binary format is heavily inspired by the one used in the peb2466 driver. It includes a version marker to allow for potential evolutions of the format. Note that adaptive filtering is not supported i.e. filter coefficients are loaded once before power-on and then cannot be changed while the DAC is powered. This is why only page A coefficients are modified. Page B coefficients are only used for adaptive filtering. Signed-off-by: Romain Gantois <romain.gantois@bootlin.com> Link: https://patch.msgid.link/20240906-tlv320-filter-v1-1-6955f53ff435@bootlin.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 06 Sep, 2024 4 commits
-
-
ying zuxin authored
The devm_clk_get_enabled() helpers: - call devm_clk_get() - call clk_prepare_enable() and register what is needed in order to call clk_disable_unprepare() when needed, as a managed resource. This simplifies the code and avoids the calls to clk_disable_unprepare(). Signed-off-by: ying zuxin <11154159@vivo.com> Link: https://patch.msgid.link/20240906084841.19248-1-yingzuxin@vivo.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
rtd->initialized is used to know whether soc_init_pcm_runtime() was correctly fined, and used to call snd_soc_link_exit(). We don't need to have it as bool, let's make it bit-field same as other flags. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Cc: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Cc: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/87o752k7gq.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Muhammad Usama Anjum authored
Return when error occurs instead of proceeding to for loop which will use val uninitialized. Fixes: f6f7d25b ("ASoC: amd: acp: Add pte configuration for ACP7.0 platform") Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Link: https://patch.msgid.link/20240906103727.222749-1-usama.anjum@collabora.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Tang Bin authored
In the function loongson_asoc_card_probe, it is simpler to return the value of function devm_snd_soc_register_card directly. Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com> Link: https://patch.msgid.link/20240906100523.2142-1-tangbin@cmss.chinamobile.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 05 Sep, 2024 6 commits
-
-
Chen Ni authored
Replace comma between expressions with semicolons. Using a ',' in place of a ';' can have unintended side effects. Although that is not the case here, it is seems best to use ';' unless ',' is intended. Found by inspection. No functional change intended. Compile tested only. Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Link: https://patch.msgid.link/20240905022017.1642550-1-nichen@iscas.ac.cnSigned-off-by: Mark Brown <broonie@kernel.org>
-
Chen Ni authored
Replace comma between expressions with semicolons. Using a ',' in place of a ';' can have unintended side effects. Although that is not the case here, it is seems best to use ';' unless ',' is intended. Found by inspection. No functional change intended. Compile tested only. Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Link: https://patch.msgid.link/20240905032148.1929393-1-nichen@iscas.ac.cnSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mark Brown authored
Merge series from amergnat@baylibre.com: This serie aim to add the following audio support for the Genio 350-evk: - Playback - 2ch Headset Jack (Earphone) - 1ch Line-out Jack (Speaker) - 8ch HDMI Tx - Capture - 1ch DMIC (On-board Digital Microphone) - 1ch AMIC (On-board Analogic Microphone) - 1ch Headset Jack (External Analogic Microphone) Of course, HDMI playback need the MT8365 display patches [1] and a DTS change documented in "mediatek,mt8365-mt6357.yaml".
-
Codrin Ciubotariu authored
The period size represents the size of the DMA descriptor. To ensure all DMA descriptors start from a well-aligned address, the period size must be divided by (sample size * maxburst), not just by maxburst. This adjustment allows for computing a higher maxburst value, thereby increasing the performance of the DMA transfer. Previously, snd_pcm_lib_period_bytes() returned 0 because the runtime HW parameters are computed after the hw_params() callbacks are used. To address this, we now use params_*() functions to compute the period size accurately. This change optimizes the DMA transfer performance by ensuring proper alignment and efficient use of maxburst values. [andrei.simion@microchip.com: Reword commit message and commit title. Add macros with values for maximum DMA chunk size allowed. Add DMA_BURST_ALIGNED preprocessor function to check the alignment of the DMA burst] Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com> Signed-off-by: Andrei Simion <andrei.simion@microchip.com> Link: https://patch.msgid.link/20240905095633.113784-1-andrei.simion@microchip.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Alexandre Mergnat authored
- Add specific config to enable: - MT8365 sound support - MT6357 audio codec support - Add the mt8365 directory and all drivers under it. Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com> Link: https://patch.msgid.link/20240226-audio-i350-v8-2-e80a57d026ce@baylibre.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Nicolas Belin authored
Add the support of MT6357 PMIC audio codec. Signed-off-by: Nicolas Belin <nbelin@baylibre.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com> Link: https://patch.msgid.link/20240226-audio-i350-v8-1-e80a57d026ce@baylibre.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 04 Sep, 2024 4 commits
-
-
Mark Brown authored
Merge series from Zhang Zekun <zhangzekun11@huawei.com>: There are some helper functions which can be used to simplify the code. So, let's use these functions to make code more simple.
-
Zhang Zekun authored
of_get_child_count() can help to get the num of child directly and we don't need to manually count the child num. No functional change with this conversion. Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com> Reviewed-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/20240827070650.11424-3-zhangzekun11@huawei.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Zhang Zekun authored
for_each_child_of_node_scoped() can put the device_node automatically. So, using it to make the code logic more simple and remove the device_node clean up code. Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com> Reviewed-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/20240827070650.11424-2-zhangzekun11@huawei.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Liu Jing authored
Utilize the defined parameter 'dev' to make the code cleaner. Signed-off-by: Liu Jing <liujing@cmss.chinamobile.com> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Link: https://patch.msgid.link/20240903093623.7120-1-liujing@cmss.chinamobile.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 03 Sep, 2024 3 commits
-
-
Mark Brown authored
Merge series from Venkata Prasad Potturu <venkataprasad.potturu@amd.com>: 1. Refactor acp generic driver to support all platforms. 2. Add i2s/tdm and support for acp7.0 and acp7.1 platforms.
-
Mark Brown authored
Merge series from Heiko Stuebner <heiko@sntech.de>: The Nanopc-T6 board does contain some devicetree errors, that came to light with recent changes to the board.
-
Mark Brown authored
Merge series from Alexandre Mergnat <amergnat@baylibre.com>: This serie aim to add the following audio support for the Genio 350-evk: - Playback - 2ch Headset Jack (Earphone) - 1ch Line-out Jack (Speaker) - 8ch HDMI Tx - Capture - 1ch DMIC (On-board Digital Microphone) - 1ch AMIC (On-board Analogic Microphone) - 1ch Headset Jack (External Analogic Microphone) Of course, HDMI playback need the MT8365 display patches [1] and a DTS change documented in "mediatek,mt8365-mt6357.yaml". Applied patch: - mfd: mt6397-core: register mt6357 sound codec Test passed: - mixer-test log: [3] - pcm-test log: [4] [1]: https://lore.kernel.org/all/20231023-display-support-v1-0-5c860ed5c33b@baylibre.com/ [2]: https://lore.kernel.org/all/20240313110147.1267793-1-angelogioacchino.delregno@collabora.com/ [3]: https://pastebin.com/pc43AVrT [4]: https://pastebin.com/cCtGhDpg [5]: https://gitlab.baylibre.com/baylibre/mediatek/bsp/linux/-/commits/sound/for-next/add-i350-audio-support
-