summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-09-09ASoC: mediatek: mt8186: Allow setting shared clocks from machine driverNícolas F. R. A. Prado2-0/+29
Add a new function to configure the shared clock between two i2s ports, and export it. This will allow the clock sharing to be set from the machine driver instead of the devicetree. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220908161154.648557-9-nfraprado@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-09arm64: dts: mediatek: kukui: Remove i2s-share propertiesNícolas F. R. A. Prado1-5/+0
The i2sN-share properties were never documented in the dt-binding and thus shouldn't be used. Now that the ASoC machine drivers are setting the I2S clock sharing internally, these properties are no longer needed, so remove them. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220908161154.648557-8-nfraprado@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-09ASoC: mediatek: mt8183: Remove clock share parsing from DTNícolas F. R. A. Prado1-31/+0
Now that the clock sharing for i2s ports can be configured from the sound machine driver, remove the logic that was used to parse the properties from the devicetree. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220908161154.648557-7-nfraprado@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-09ASoC: mediatek: mt8183: Configure shared clocksNícolas F. R. A. Prado2-0/+66
i2s0 and i2s5 are paired input/output connected to the same codec and should share the same clock. Likewise for i2s2 and i2s3. Set the clock sharing for each pair during the DAI initialization. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220908161154.648557-6-nfraprado@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-09ASoC: mediatek: mt8183: Allow setting shared clocks from machine driverNícolas F. R. A. Prado2-0/+29
Add a new function to configure the shared clock between two i2s ports, and export it. This will allow the clock sharing to be set from the machine driver instead of the devicetree. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220908161154.648557-5-nfraprado@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-09ASoC: mediatek: mt8192: Remove clock share parsing from DTNícolas F. R. A. Prado1-35/+0
Now that the clock sharing for i2s ports can be configured from the sound machine driver, remove the logic that was used to parse the properties from the devicetree. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220908161154.648557-4-nfraprado@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-09ASoC: mediatek: mt8192-mt6359: Make i2s9 share the clock from i2s8Nícolas F. R. A. Prado1-0/+9
Both i2s8 and i2s9 are connected to the rt5682 codec and should share the same clock to work in a full-duplex manner. Set the clock sharing during the initialization for rt5682. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220908161154.648557-3-nfraprado@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-09ASoC: mediatek: mt8192: Allow setting shared clocks from machine driverNícolas F. R. A. Prado2-0/+29
Add a new function to configure the shared clock between two i2s ports, and export it. This will allow the clock sharing to be set from the machine driver instead of the devicetree. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220908161154.648557-2-nfraprado@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-08ASoC: soc-dapm.c: random cleanup retryMark Brown1-5/+15
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>: These are remains of my previous cleanup patch-set.
2022-09-08ASoC: ak4458: Remove component probe() and remove()Shengjiu Wang1-46/+7
Most function in ak4458_probe() and ak4458_remove() are duplicate with dai ops, so remove them and move dsd_path setting to dai ops. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Link: https://lore.kernel.org/r/1662622316-23426-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-08ASoC: sti-sas: Remove the unneeded result variableye xingchen1-8/+2
Return the value regmap_write() and sti_sas_init_sas_registers() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Link: https://lore.kernel.org/r/20220908010304.342760-1-ye.xingchen@zte.com.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-08ASoC: max98390: Remove unnecessary amp on/off conrtolSteve Lee1-7/+10
The Amp is already control in userspace before trigger calibrate function. Remove unnecessary control in calibrate function and add condition to check calibration is ready. Signed-off-by: Steve Lee <steve.lee.analog@gmail.com> Link: https://lore.kernel.org/r/20220908060359.13606-1-steve.lee.analog@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-08ASoC: soc-dapm.c: tidyup snd_soc_dai_link_event_pre_pmu()Kuninori Morimoto1-5/+4
snd_soc_dai_link_event_pre_pmu() is using if/else for config->formats check, but "else" case is for just error. Unnecessary if/else is not good for readable code. this patch checks if config->formats was zero as error case. Moreover, we don't need to indicate config->formats value in error message, because it is zero. This patch tidyup it, too. => if (config->formats) { ... } else { dev_warn(w->dapm->dev, "ASoC: Invalid format %llx specified\n", => config->formats); ... } Link: https://lore.kernel.org/all/YxiDkDOwRsbXeZ17@sirena.org.uk/ Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/877d2ebn3t.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-08ASoC: soc-dapm.c: add comment for kzalloc()/kfree() on ↵Kuninori Morimoto1-0/+11
snd_soc_dai_link_event_pre_pmu() snd_soc_dai_link_event_pre_pmu() is using kzalloc()/kfree() for params. It looks we don't need to use these, but are necessary. But, it is difficult to know why it is necessary without any comments. This patch adds the reasons via comment. Link: https://lore.kernel.org/all/Yxc2wzbZsSVZNf8Y@sirena.org.uk/ Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/878rmubn47.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-07ASoC: Fixes for MT8195 SOF supportMark Brown2-9/+29
Merge series from AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>: This series fixes Sound Open Firmware support for MT8195 by making sure that the sound card driver is actually able to probe and IPC can finally happen. It is now possible to get DSP support for audio. Tested on MT8195 Tomato - Acer Chromebook Spin 513 CP513-2H (Pipewire).
2022-09-07ASoC: soc-dapm.c: random cleanupMark Brown1-15/+14
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>: These are cleanup patches for soc-dapm.c. Each patches are not related, very random cleanup.
2022-09-07ASoC: soc-dapm.c: fixup snd_soc_dapm_new_control_unlocked() error handlingKuninori Morimoto1-14/+13
Current snd_soc_dapm_new_control_unlocked() error handling is wrong. It is using "goto request_failed" (A), but error message is using "w->name" (B) which is not yet created in such timing. snd_soc_dapm_new_control_unlocked(xxx) { ... switch (w->id) { case xxx: ... if (IS_ERR(...)) { ret = PTR_ERR(...); (A) goto request_failed; } ... } prefix = soc_dapm_prefix(...); if (prefix) (B) w->name = kasprintf(...); else (B) w->name = kstrdup_const(...); ... (A) request_failed: if (ret != -EPROBE_DEFER) (B) dev_err(..., w->name, ...); return ...; } we can create "w->name" at beginning of this function. In such case, we need to call kfree_const(w->name) at error case. This patch do these. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87wnah8l7e.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-07ASoC: soc-dapm.c: don't use WARN_ON() at snd_soc_dai_link_event_pre_pmu()Kuninori Morimoto1-1/+1
Current snd_soc_dai_link_event_pre_pmu() is checking "config". It is using dev_err() (A) if it was NULL, so we don't need to use WARN_ON() (B) to check it, it is over-kill. This patch removes it. (B) if (WARN_ON(!config)) { (A) dev_err(...); ... } Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87zgfd8l7s.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-07ASoC: dt-bindings: qcom,q6core: remove bindingKrzysztof Kozlowski1-21/+0
qcom,q6core is already described in soc/qcom/qcom,apr.yaml. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20220906121110.301900-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-07ASoC: simple-card-utils: switch to using gpiod APIDmitry Torokhov1-13/+15
This patch switches the driver away from legacy gpio/of_gpio API to gpiod API, and removes use of of_get_named_gpio_flags() which I want to make private to gpiolib. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/YxeaITtlJexygQo9@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-07ASoC: SOF: mediatek: mt8195: Add devicetree support to select topologiesAngeloGioacchino Del Regno1-0/+13
Support devicetree by adding a snd_soc_of_mach array, specifying SOF topologies for a generic MT8195 machine and for Google Tomato Chromebooks. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220906092727.37324-6-angelogioacchino.delregno@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-07ASoC: SOF: mediatek: mt8195: Add generic pcm_{open,close} callbacksAngeloGioacchino Del Regno1-0/+4
Use the generic sof_stream_pcm_{open,close}() functions for the pcm_{open,close} callbacks. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220906092727.37324-5-angelogioacchino.delregno@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-07ASoC: SOF: mediatek: mt8195: Add mailbox generic callbacks for IPCAngeloGioacchino Del Regno1-9/+5
Add the .mailbox_{read,write} generic callbacks for SOF IPC and, while at it, also change the ipc_msg_data callback to use the SOF API sof_ipc_msg_data() instead of the custom function mt8195_ipc_msg_data(). Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220906092727.37324-4-angelogioacchino.delregno@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-07ASoC: SOF: mediatek: mt8195: Import namespace SND_SOC_SOF_MTK_COMMONAngeloGioacchino Del Regno1-0/+1
Here we're using function mtk_adsp_dump() from mtk-adsp-common: explicitly import its namespace. Fixes: 3a054f90e955 ("ASoC: SOF: mediatek: Add mt8195 debug dump") Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220906092727.37324-3-angelogioacchino.delregno@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-07ASoC: mediatek: mt8195-mt6359: Properly register sound card for SOFAngeloGioacchino Del Regno1-0/+6
Adding a probe callback on this snd_soc_card is required when Sound Open Firmware support is desired, as we need to appropriately populate the stream_name for SOF to be able to bind widgets. Failing to do so will produce errors when applying the SOF topology leading to card registration failure (so, no sound). While at it, also make sure to fill the topology_shortname as required. Fixes: 0caf1120c583 ("ASoC: mediatek: mt8195: extract SOF common code") Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220906092727.37324-2-angelogioacchino.delregno@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-05lib/string_helpers: Introduce parse_int_array_user()Mark Brown3-89/+61
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>: Continuation of recent upstream discussion [1] regarding user string tokenization. First, parse_int_array_user() is introduced to allow for splitting specified user string into a sequence of integers. Makes use of get_options() internally so the parsing logic is not duplicated. With that done, redundant parts of the sound driver are removed. Originally similar functionality was added for the SOF sound driver. As more users are on the horizon, it is desirable to update existing string_helpers code and provide a unified solution.
2022-09-05Untested TAS2562 power setting fixesMark Brown1-61/+29
Merge series from Martin Povišer <povik+lin@cutebit.org>: The tas2562 driver does the same thing with the setting of PWR_CTRL field as the tas2764/tas2770 drivers were doing. Link: https://lore.kernel.org/alsa-devel/20220808141246.5749-1-povik+lin@cutebit.org/T/#t Link: https://lore.kernel.org/alsa-devel/20220825140241.53963-1-povik+lin@cutebit.org/T/#t These are blindly written patches without testing since I don't have the hardware. (I even tried TI's formal sample request program but was refused there. CCing @ti.com addresses I found on other series recently submitted.)
2022-09-05ASoC: soc-pcm.c: random cleanupMark Brown1-65/+47
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>: These are not related, but random cleanup patches for soc-pcm.c
2022-09-05ASoC: SOF: Remove strsplit_u32() and tokenize_input()Cezary Rojewski1-89/+15
Make use of global integer-array parsing helper instead of the internal one as both serve same purpose. With that, both strsplit_u32() and tokenize_input() become unused so remove them. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220904102840.862395-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-05lib/string_helpers: Introduce parse_int_array_user()Cezary Rojewski2-0/+46
Add new helper function to allow for splitting specified user string into a sequence of integers. Internally it makes use of get_options() so the returned sequence contains the integers extracted plus an additional element that begins the sequence and specifies the integers count. Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220904102840.862395-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-05ASoC: apple: mca: Postpone requesting of DMA channelsMartin Povišer1-33/+46
Move the requesting of DMA channels further down from 'probe' to 'pcm_new'. This is to spare the allocated DMA channel resources as we typically only ever use one or two of the clusters for PCM streaming. Before we would request DMA channels for all clusters. (This is prompted by a change in the Audio DMA Controller driver, which will now be allocating cache SRAM to channels.) Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Link: https://lore.kernel.org/r/20220905074030.1293-1-povik+lin@cutebit.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-05ASoC: SOF: Introduce function sof_of_machine_selectChunxu Li1-0/+29
From current design in sof_machine_check the SOF can only support ACPI type machine. In sof_machine_check if there is no ACPI machine exist, the function will return -ENODEV directly, that's we don't expected if we do not base on ACPI machine. So we add a new function named sof_of_machine_select that we can pass sof_machine_check and obtain info required by snd_sof_new_platform_drv. Signed-off-by: Chunxu Li <chunxu.li@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220903032151.13664-1-chunxu.li@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-05ASoC: wm_adsp: Handle optional legacy supportCristian Ciocaltea1-1/+3
The tracing capabilities for the speaker protection fw enabled via commit c55b3e46cb99 ("ASoC: wm_adsp: Add trace caps to speaker protection FW") are not be available on all platforms, such as the Valve's Steam Deck which is based on the Halo Core DSP. As a consequence, whenever the firmware is loaded, a rather misleading 'Failed to parse legacy: -19' error message is written to the kernel ring buffer: [ 288.977412] steamdeck kernel: cs35l41 spi-VLV1776:01: DSP1: Firmware version: 3 [ 288.978002] steamdeck kernel: cs35l41 spi-VLV1776:01: DSP1: cs35l41-dsp1-spk-prot.wmfw: Fri 02 Apr 2021 21:03:50 W. Europe Daylight Time [ 289.094065] steamdeck kernel: cs35l41 spi-VLV1776:01: DSP1: Firmware: 400a4 vendor: 0x2 v0.33.0, 2 algorithms [ 289.095073] steamdeck kernel: cs35l41 spi-VLV1776:01: DSP1: 0: ID cd v29.53.0 XM@94 YM@e [ 289.095665] steamdeck kernel: cs35l41 spi-VLV1776:01: DSP1: 1: ID f20b v0.0.1 XM@170 YM@0 [ 289.096275] steamdeck kernel: cs35l41 spi-VLV1776:01: DSP1: Protection: C:\Users\ocanavan\Desktop\cirrusTune_july2021.bin [ 291.172383] steamdeck kernel: cs35l41 spi-VLV1776:01: DSP1: Failed to parse legacy: -19 Update wm_adsp_buffer_init() to print a more descriptive info message when wm_adsp_buffer_parse_legacy() returns -ENODEV. Fixes: c55b3e46cb99 ("ASoC: wm_adsp: Add trace caps to speaker protection FW") Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220825220530.1205141-1-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-05ASoC: tas2562: Fix mute/unmuteMartin Povišer1-26/+29
Because the PWR_CTRL field is modeled as the power state of the DAC widget, and at the same time it is used to implement mute/unmute, we need some additional book-keeping to have the right end result no matter the sequence of calls. Without this fix, one permanently mutes an ongoing stream by toggling the associated speaker pin control. (This mirrors commit 1e5907bcb3a3 ("ASoC: tas2770: Fix handling of mute/unmute") which was a fix to the tas2770 driver.) Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Link: https://lore.kernel.org/r/20220825142226.80929-3-povik+lin@cutebit.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-05ASoC: tas2562: Drop conflicting set_bias_level power settingMartin Povišer1-35/+0
The driver is setting the PWR_CTRL field in both the set_bias_level callback and on DAPM events of the DAC widget (and also in the mute_stream method). Drop the set_bias_level callback altogether as the power setting it does is in conflict with the other code paths. (This mirrors commit c8a6ae3fe1c8 ("ASoC: tas2770: Drop conflicting set_bias_level power setting") which was a fix to the tas2770 driver.) Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Link: https://lore.kernel.org/r/20220825142226.80929-2-povik+lin@cutebit.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-05ASoC: soc-pcm.c: check fe condition at out of loopKuninori Morimoto1-4/+4
Current dpcm_add_paths() is checking fe condition in loop (= A), but fe condition (X) is not related to the loop (B). (X) static int dpcm_add_paths(fe, stream, ...) { ... (B) for_each_dapm_widgets(list, i, widget) { ... (A) if (!fe->dpcm[stream].runtime && !fe->fe_compr) continue; ... } ... } This patch checks fe condition at out of loop Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87pmgi4dz4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-05ASoC: soc-pcm.c: add soc_pcm_ret()Kuninori Morimoto1-48/+36
Current soc-pcm.c has many similar code for error case. This patch adds soc_pcm_ret() and share the code and error message. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87r10y4dzb.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-05ASoC: soc-pcm.c: remove unnecessary codec2codec_close_delayed_work()Kuninori Morimoto1-13/+7
commit 4bf2e385aa59c2fae ("ASoC: core: Init pcm runtime work early to avoid warnings") has added generic close_delayed_work() which checks close_delayed_work_func static void close_delayed_work(...) { ... => if (rtd->close_delayed_work_func) rtd->close_delayed_work_func(rtd); } So, we don't need to have NULL function for Codec2Codec. => static void codec2codec_close_delayed_work() { /* * Currently nothing to do for c2c links * Since c2c links are internal nodes in the DAPM graph and * don't interface with the outside world or application layer * we don't have to do any special handling on close. */ } int soc_new_pcm(...) { ... if (rtd->dai_link->params) => rtd->close_delayed_work_func = codec2codec_close_delayed_work; else rtd->close_delayed_work_func = snd_soc_close_delayed_work; ... } Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87sfle4dzk.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-02ASoC: rsnd: Add check for rsnd_mod_power_onJiasheng Jiang5-5/+22
As rsnd_mod_power_on() can return negative numbers, it should be better to check the return value and deal with the exception. Fixes: e7d850dd10f4 ("ASoC: rsnd: use mod base common method on SSI-parent") Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/20220902013030.3691266-1-jiasheng@iscas.ac.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-01MAINTAINERS: Fix file pattern for ARM/APPLE MACHINE SOUND DRIVERSMartin Povišer1-1/+1
This is what was meant of course. Fixes: 3df5d0d97289 ("ASoC: apple: mca: Start new platform driver") Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Link: https://lore.kernel.org/r/20220901113415.27449-2-povik+lin@cutebit.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-01ASoC: apple: mca: Unselect COMMON_CLK in KconfigMartin Povišer1-1/+0
The MCA driver selects COMMON_CLK, which leads to misconfiguration on platforms with HAVE_LEGACY_CLK (under compile test). Kconfig catches the conflict with the following warning: WARNING: unmet direct dependencies detected for COMMON_CLK Depends on [n]: !HAVE_LEGACY_CLK [=y] Selected by [m]: - SND_SOC_APPLE_MCA [=m] && SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] && (ARCH_APPLE || COMPILE_TEST [=y]) Eventually the build fails with errors like: >> drivers/clk/clk.c:867:6: error: redefinition of 'clk_unprepare' 867 | void clk_unprepare(struct clk *clk) | ^~~~~~~~~~~~~ In file included from drivers/clk/clk.c:9: include/linux/clk.h:303:20: note: previous definition of 'clk_unprepare' with type 'void(struct clk *)' 303 | static inline void clk_unprepare(struct clk *clk) | ^~~~~~~~~~~~~ which appears to be because COMMON_CLK is selected but HAVE_CLK_PREPARE is not. In the end it seems we had no business selecting COMMON_CLK from an unrelated driver like that, so remove the selection. The linux/clk.h API is there anyway. Fixes: 3df5d0d97289 ("ASoC: apple: mca: Start new platform driver") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Link: https://lore.kernel.org/r/20220901113415.27449-1-povik+lin@cutebit.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-01ASoC: codecs: rk817: drop I2C dependenciesKrzysztof Kozlowski1-2/+1
The RK817 codec uses regmap API and not directly regmap I2C. It is the parent MFD who uses and selects regmap I2C. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20220901101458.365354-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-01ASoC: codecs: wcd934x: add Slimbus dependencyKrzysztof Kozlowski1-0/+1
The WCD934X codec is a Slimbus driver, so it must depend on SLIMBUS, also for compile tests: ERROR: modpost: "slim_stream_prepare" [sound/soc/codecs/snd-soc-wcd934x.ko] undefined! Reported-by: kernel test robot <lkp@intel.com> Fixes: 5b7f4e5de61b ("ASoC: codecs: allow compile testing without MFD drivers") Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20220901101458.365354-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-31ASoC: codecs: minor cppcheck cleanupsMark Brown5-10/+4
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>: Small number of cleanups that were either missed in previous versions or detected by new cppcheck version.
2022-08-31ASoC: SOF: compress: Add support for timestamp on captureMark Brown1-8/+39
Merge series from Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>: The purpose of this patch series is to add support for timestamping on capture direction using the compress API. This is simply done by splitting sof_compr_copy into 2 functions: sof_compr_copy_playback and sof_compr_copy_capture. Each of these functions handles one of the possible directions: capture or playback and is called in sof_compr_copy based on the stream's direction. The only difference between sof_compr_copy_playback and sof_compr_copy_capture is the fact that on playback case we need to copy data from user space and on capture we need to copy data to user space.
2022-08-31ASoC: max98396: Make data monitor features configurableDaniel Mack2-0/+116
Allow the data monitor features to be enabled explicitly, and enable control over their details. Signed-off-by: Daniel Mack <daniel@zonque.org> Link: https://lore.kernel.org/r/20220826085927.2336224-2-daniel@zonque.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-31ASoC: dt-bindings: max98396: Document data monitor propertiesDaniel Mack1-0/+34
This device features a data monitor that puts the device in software reset upon a configurable set of events. Signed-off-by: Daniel Mack <daniel@zonque.org> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20220826085927.2336224-1-daniel@zonque.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-31ASoC: ti: omap-mcbsp: remove useless assignmentPierre-Louis Bossart1-1/+1
sound/soc/ti/omap-mcbsp.c:617:10: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] int ret = 0; ^ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Chao Song <chao.song@intel.com> Link: https://lore.kernel.org/r/20220822184239.169757-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-31ASoC: fsl: fsl-utils: remove useless assignmentPierre-Louis Bossart1-1/+1
cppcheck warning: sound/soc/fsl/fsl_utils.c:127:10: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] int ret = 0; ^ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Chao Song <chao.song@intel.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20220822184239.169757-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-31ASoC: wcd9335: remove always-true conditionPierre-Louis Bossart1-3/+1
cppcheck warning: sound/soc/codecs/wcd9335.c:1824:22: style: Condition 'tx_port==13' is always true [knownConditionTrueFalse] } else if (tx_port == 13) { ^ sound/soc/codecs/wcd9335.c:1802:16: note: Assuming that condition 'tx_port==12' is not redundant if ((tx_port == 12) || (tx_port >= 14)) { ^ sound/soc/codecs/wcd9335.c:1802:35: note: Assuming that condition 'tx_port>=14' is not redundant if ((tx_port == 12) || (tx_port >= 14)) { ^ sound/soc/codecs/wcd9335.c:1824:22: note: Condition 'tx_port==13' is always true } else if (tx_port == 13) { ^ sound/soc/codecs/wcd9335.c:1845:22: style: Condition 'tx_port==13' is always true [knownConditionTrueFalse] } else if (tx_port == 13) { ^ sound/soc/codecs/wcd9335.c:1802:16: note: Assuming that condition 'tx_port==12' is not redundant if ((tx_port == 12) || (tx_port >= 14)) { ^ sound/soc/codecs/wcd9335.c:1802:35: note: Assuming that condition 'tx_port>=14' is not redundant if ((tx_port == 12) || (tx_port >= 14)) { ^ sound/soc/codecs/wcd9335.c:1845:22: note: Condition 'tx_port==13' is always true } else if (tx_port == 13) { ^ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Chao Song <chao.song@intel.com> Link: https://lore.kernel.org/r/20220822184239.169757-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>