Kuninori Morimoto [Fri, 9 Sep 2022 01:20:48 +0000 (01:20 +0000)]
ASoC: hdmi-codec.c: use devm_kzalloc() for DMA data
hdmi-codec.c is using kzalloc(), but we can replace it to
devm_kzalloc() and then, we can remove .remove callback.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/874jxhmjgw.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Fri, 9 Sep 2022 11:43:32 +0000 (14:43 +0300)]
ASoC: SOF: Intel: Add mtrace type information for IPC4
Set the mtrace type for platforms supported by IPC4.
Note: currently only SOF_IPC4_MTRACE_INTEL_CAVS_2 type is supported by
the ipc4-mtrace driver, which is used by CAVS 2.x platforms (ICL, TGL, ADL)
and ACE (MTL).
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220909114332.31393-8-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Fri, 9 Sep 2022 11:43:31 +0000 (14:43 +0300)]
ASoC: SOF: Intel: icl: Set IPC4-specific DSP ops
Add implementation of low level, platform dependent IPC4 message handling
and set the DSP ops for IPC4 for ICL platform.
Suggested-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220909114332.31393-7-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Fri, 9 Sep 2022 11:43:30 +0000 (14:43 +0300)]
ASoC: SOF: ipc4: Add support for mtrace log extraction
One of the debugging/logging features for an IPC4 based firmware is the use
of the debug window to deliver log messages to host via the shared SRAM.
The initial implementation of the mtrace supports only TGL/MTL style of
logging, but can be extended to support other types, like APL, SKL, CNL,
etc.
The window is split into 16 'slots' where the first slot contains the
descriptors for the remaining 15 slots.
Each DSP core logs to a separate slot and the slot allocation is not fixed,
we can not assume that the first slot is always used by core0 for example.
The firmware sends LOG_BUFFER_STATUS message when new log batch is
available from one of the cores (after it updated the write_ptr in the
given slot).
Host should update the read_ptr in the same slot when it has taken out log
data.
The patch also updates the sof_ipc4_fw_data struct with parameters needed
for the mtrace to be enabled and used safely.
Co-developed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Rander Wang <rander.wang@intel.com>
Co-developed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220909114332.31393-6-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Fri, 9 Sep 2022 11:43:29 +0000 (14:43 +0300)]
ASoC: SOF: ipc4: Configure the debug box offset
The debug window for IPC4 compatible firmware is always window #2,
set the debug_box.offset accordingly.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220909114332.31393-5-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Fri, 9 Sep 2022 11:43:28 +0000 (14:43 +0300)]
ASoC: SOF: ipc4: Add define for the outbox window index
Instead of using the index number directly, add a define for the outbox
window index.
It is always window 1 with IPC4.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220909114332.31393-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Fri, 9 Sep 2022 11:43:27 +0000 (14:43 +0300)]
ASoC: SOF: ipc4: Add macro to get core ID from log buffer status message
The LOG_BUFFER_STATUS message includes the ID of the core which updated
its log buffer.
With IPC4 each core logs to a different slot in the debug window.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220909114332.31393-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Fri, 9 Sep 2022 11:43:26 +0000 (14:43 +0300)]
ASoC: SOF: ipc4: Only print LOG BUFFER update message info if requested
Do not print messages when the SOF_DBG_PRINT_DMA_POSITION_UPDATE_LOGS flag
is not set to reduce the amount of prints when the tracing is used.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220909114332.31393-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Thu, 8 Sep 2022 12:31:27 +0000 (13:31 +0100)]
ASoC: soc-dapm.c: random cleanup retry
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
These are remains of my previous cleanup patch-set.
Shengjiu Wang [Thu, 8 Sep 2022 07:31:56 +0000 (15:31 +0800)]
ASoC: ak4458: Remove component probe() and remove()
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>
ye xingchen [Thu, 8 Sep 2022 01:03:04 +0000 (01:03 +0000)]
ASoC: sti-sas: Remove the unneeded result variable
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>
Steve Lee [Thu, 8 Sep 2022 06:03:59 +0000 (15:03 +0900)]
ASoC: max98390: Remove unnecessary amp on/off conrtol
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>
Kuninori Morimoto [Thu, 8 Sep 2022 02:45:27 +0000 (02:45 +0000)]
ASoC: soc-dapm.c: tidyup snd_soc_dai_link_event_pre_pmu()
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>
Kuninori Morimoto [Thu, 8 Sep 2022 02:45:12 +0000 (02:45 +0000)]
ASoC: soc-dapm.c: add comment for kzalloc()/kfree() on 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>
Mark Brown [Wed, 7 Sep 2022 14:28:51 +0000 (15:28 +0100)]
ASoC: Fixes for MT8195 SOF support
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).
Mark Brown [Wed, 7 Sep 2022 13:37:12 +0000 (14:37 +0100)]
ASoC: soc-dapm.c: random cleanup
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.
Kuninori Morimoto [Mon, 5 Sep 2022 23:17:57 +0000 (23:17 +0000)]
ASoC: soc-dapm.c: fixup snd_soc_dapm_new_control_unlocked() error handling
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>
Kuninori Morimoto [Mon, 5 Sep 2022 23:17:43 +0000 (23:17 +0000)]
ASoC: soc-dapm.c: don't use WARN_ON() at snd_soc_dai_link_event_pre_pmu()
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>
Krzysztof Kozlowski [Tue, 6 Sep 2022 12:11:10 +0000 (14:11 +0200)]
ASoC: dt-bindings: qcom,q6core: remove binding
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>
Dmitry Torokhov [Tue, 6 Sep 2022 19:06:09 +0000 (12:06 -0700)]
ASoC: simple-card-utils: switch to using gpiod API
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>
AngeloGioacchino Del Regno [Tue, 6 Sep 2022 09:27:27 +0000 (11:27 +0200)]
ASoC: SOF: mediatek: mt8195: Add devicetree support to select topologies
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>
AngeloGioacchino Del Regno [Tue, 6 Sep 2022 09:27:26 +0000 (11:27 +0200)]
ASoC: SOF: mediatek: mt8195: Add generic pcm_{open,close} callbacks
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>
AngeloGioacchino Del Regno [Tue, 6 Sep 2022 09:27:25 +0000 (11:27 +0200)]
ASoC: SOF: mediatek: mt8195: Add mailbox generic callbacks for IPC
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>
AngeloGioacchino Del Regno [Tue, 6 Sep 2022 09:27:24 +0000 (11:27 +0200)]
ASoC: SOF: mediatek: mt8195: Import namespace SND_SOC_SOF_MTK_COMMON
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>
AngeloGioacchino Del Regno [Tue, 6 Sep 2022 09:27:23 +0000 (11:27 +0200)]
ASoC: mediatek: mt8195-mt6359: Properly register sound card for SOF
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>
Mark Brown [Mon, 5 Sep 2022 15:49:32 +0000 (16:49 +0100)]
lib/string_helpers: Introduce parse_int_array_user()
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.
Mark Brown [Mon, 5 Sep 2022 15:27:19 +0000 (16:27 +0100)]
Untested TAS2562 power setting fixes
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.)
Mark Brown [Mon, 5 Sep 2022 15:27:13 +0000 (16:27 +0100)]
ASoC: soc-pcm.c: random cleanup
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
These are not related, but random cleanup patches for soc-pcm.c
Cezary Rojewski [Sun, 4 Sep 2022 10:28:40 +0000 (12:28 +0200)]
ASoC: SOF: Remove strsplit_u32() and tokenize_input()
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>
Cezary Rojewski [Sun, 4 Sep 2022 10:28:39 +0000 (12:28 +0200)]
lib/string_helpers: Introduce parse_int_array_user()
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>
Martin Povišer [Mon, 5 Sep 2022 07:40:30 +0000 (09:40 +0200)]
ASoC: apple: mca: Postpone requesting of DMA channels
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>
Chunxu Li [Sat, 3 Sep 2022 03:21:51 +0000 (11:21 +0800)]
ASoC: SOF: Introduce function sof_of_machine_select
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>
Cristian Ciocaltea [Thu, 25 Aug 2022 22:05:30 +0000 (01:05 +0300)]
ASoC: wm_adsp: Handle optional legacy support
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>
Martin Povišer [Thu, 25 Aug 2022 14:22:26 +0000 (16:22 +0200)]
ASoC: tas2562: Fix mute/unmute
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>
Martin Povišer [Thu, 25 Aug 2022 14:22:25 +0000 (16:22 +0200)]
ASoC: tas2562: Drop conflicting set_bias_level power setting
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>
Kuninori Morimoto [Tue, 30 Aug 2022 03:17:19 +0000 (03:17 +0000)]
ASoC: soc-pcm.c: check fe condition at out of loop
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>
Kuninori Morimoto [Tue, 30 Aug 2022 03:17:12 +0000 (03:17 +0000)]
ASoC: soc-pcm.c: add soc_pcm_ret()
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>
Kuninori Morimoto [Tue, 30 Aug 2022 03:17:03 +0000 (03:17 +0000)]
ASoC: soc-pcm.c: remove unnecessary codec2codec_close_delayed_work()
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>
Jiasheng Jiang [Fri, 2 Sep 2022 01:30:30 +0000 (09:30 +0800)]
ASoC: rsnd: Add check for rsnd_mod_power_on
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>
Martin Povišer [Thu, 1 Sep 2022 11:34:15 +0000 (13:34 +0200)]
MAINTAINERS: Fix file pattern for ARM/APPLE MACHINE SOUND DRIVERS
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>
Martin Povišer [Thu, 1 Sep 2022 11:34:14 +0000 (13:34 +0200)]
ASoC: apple: mca: Unselect COMMON_CLK in Kconfig
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>
Krzysztof Kozlowski [Thu, 1 Sep 2022 10:14:58 +0000 (13:14 +0300)]
ASoC: codecs: rk817: drop I2C dependencies
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>
Krzysztof Kozlowski [Thu, 1 Sep 2022 10:14:57 +0000 (13:14 +0300)]
ASoC: codecs: wcd934x: add Slimbus dependency
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>
Mark Brown [Wed, 31 Aug 2022 12:51:56 +0000 (13:51 +0100)]
ASoC: codecs: minor cppcheck cleanups
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.
Mark Brown [Wed, 31 Aug 2022 12:40:16 +0000 (13:40 +0100)]
ASoC: SOF: compress: Add support for timestamp on capture
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.
Daniel Mack [Fri, 26 Aug 2022 08:59:27 +0000 (10:59 +0200)]
ASoC: max98396: Make data monitor features configurable
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>
Daniel Mack [Fri, 26 Aug 2022 08:59:26 +0000 (10:59 +0200)]
ASoC: dt-bindings: max98396: Document data monitor properties
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>
Pierre-Louis Bossart [Mon, 22 Aug 2022 18:42:39 +0000 (20:42 +0200)]
ASoC: ti: omap-mcbsp: remove useless assignment
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>
Pierre-Louis Bossart [Mon, 22 Aug 2022 18:42:38 +0000 (20:42 +0200)]
ASoC: fsl: fsl-utils: remove useless assignment
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>
Pierre-Louis Bossart [Mon, 22 Aug 2022 18:42:37 +0000 (20:42 +0200)]
ASoC: wcd9335: remove always-true condition
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>
Pierre-Louis Bossart [Mon, 22 Aug 2022 18:42:36 +0000 (20:42 +0200)]
ASoC: wcd-mbhc-v2: remove always-true condition
cppcheck warning:
'cross_conn<0' is always true [knownConditionTrueFalse]
} else if (cross_conn < 0) /* Error */
^
'!cross_conn' is not redundant
} else if (!cross_conn) { /* no cross connection */
^
is always true
} else if (cross_conn < 0) /* Error */
^
sound/soc/codecs/wcd-mbhc-v2.c:1192:26: style: Condition
sound/soc/codecs/wcd-mbhc-v2.c:1188:15: note: Assuming that condition
sound/soc/codecs/wcd-mbhc-v2.c:1192:26: note: Condition 'cross_conn<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-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Mon, 22 Aug 2022 18:42:35 +0000 (20:42 +0200)]
ASoC: hdmi-codec: remove unused definitions
cppcheck warning:
sound/soc/codecs/hdmi-codec.c:24:16: style: struct member
'hdmi_codec_channel_ma`p_table::map' is never used. [unusedStructMember]
unsigned char map; /* ALSA API channel map position */
^
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-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Laurentiu Mihalcea [Mon, 22 Aug 2022 10:15:02 +0000 (13:15 +0300)]
ASoC: SOF: compress: Add copy function for capture case
Added a new copy function used to copy data to user buffer
in the case of compress capture.
Reviewed-by: Paul Olaru <paul.olaru@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Link: https://lore.kernel.org/r/20220822101502.17644-3-laurentiu.mihalcea@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Laurentiu Mihalcea [Mon, 22 Aug 2022 10:15:01 +0000 (13:15 +0300)]
ASoC: SOF: compress: Move sof_compr_copy functionality
Since we're preparing to add support for compress capture,
we need to move the content of sof_compr_copy into a
separate function which handles the playback direction just
like the initial sof_compr_copy.
Reviewed-by: Paul Olaru <paul.olaru@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Link: https://lore.kernel.org/r/20220822101502.17644-2-laurentiu.mihalcea@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Syed Saba kareem [Tue, 30 Aug 2022 13:22:55 +0000 (18:52 +0530)]
ASoC: amd: fix spelling mistake: "i.e" -> "i.e."
trivial fix to spelling mistake in Kconfig File.
Reported by : Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20220830132259.7759-1-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Tue, 30 Aug 2022 10:08:12 +0000 (11:08 +0100)]
Add Pink Sardine platform ASoC driver
Merge series from Syed Saba Kareem <Syed.SabaKareem@amd.com>:
Pink Sardine platform is new APU series based on acp6.2 design.
This patch set adds an ASoC driver for the ACP (Audio CoProcessor) block
on AMD Pink Sardine APU with DMIC endpoint support.
Krzysztof Kozlowski [Tue, 30 Aug 2022 07:58:55 +0000 (10:58 +0300)]
ASoC: codecs: rk817: fix missing I2C dependency in compile test
SND_SOC_RK817 uses I2C regmap so compile testing without parent MFD_RK808, requires I2C:
WARNING: unmet direct dependencies detected for REGMAP_I2C
Depends on [n]: I2C [=n]
Selected by [y]:
- SND_SOC_RK817 [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && (MFD_RK808 [=n] || COMPILE_TEST [=y])
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/20220830075855.278046-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Syed Saba Kareem [Sat, 27 Aug 2022 16:56:57 +0000 (22:26 +0530)]
ASoC: amd: enable Pink sardine platform machine driver build.
This patch enables Pink Sardine platform machine driver build.
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220827165657.2343818-14-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Syed Saba Kareem [Sat, 27 Aug 2022 16:56:56 +0000 (22:26 +0530)]
ASoC: amd: add Pink Sardine machine driver using dmic
Add Pink Sardine platform machine driver using dmic.
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220827165657.2343818-13-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Syed Saba Kareem [Sat, 27 Aug 2022 16:56:55 +0000 (22:26 +0530)]
ASoC: amd: create platform device for acp6.2 machine driver
Create platform device for acp6.2 machine driver.
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220827165657.2343818-12-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Syed Saba Kareem [Sat, 27 Aug 2022 16:56:54 +0000 (22:26 +0530)]
ASoC: amd: enable Pink Sardine acp6.2 drivers build
Pink Sardine ACP6.2 drivers can be built by selecting necessary
kernel config option.
The patch enables build support of the same.
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220827165657.2343818-11-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Syed Saba Kareem [Sat, 27 Aug 2022 16:56:53 +0000 (22:26 +0530)]
ASoC: amd: add acp6.2 pdm driver pm ops
Add acp6.2 pdm driver pm ops.
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220827165657.2343818-10-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Syed Saba Kareem [Sat, 27 Aug 2022 16:56:52 +0000 (22:26 +0530)]
ASoC: amd: add acp6.2 pci driver pm ops
Add acp6.2 pci driver pm ops.
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220827165657.2343818-9-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Syed Saba Kareem [Sat, 27 Aug 2022 16:56:51 +0000 (22:26 +0530)]
ASoC: amd: add acp6.2 pdm driver dma ops
This patch adds PDM driver DMA operations for Pink Sardine Platform.
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220827165657.2343818-8-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Syed Saba Kareem [Sat, 27 Aug 2022 16:56:50 +0000 (22:26 +0530)]
ASoC: amd: add acp6.2 irq handler
Add ACP6.2 irq handler for handling irq events for ACP IP.
Add pdm irq events handling.
Whenever audio data equal to the PDM watermark level are consumed,
interrupt is generated. Acknowledge the interrupt.
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220827165657.2343818-7-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Syed Saba Kareem [Sat, 27 Aug 2022 16:56:49 +0000 (22:26 +0530)]
ASoC: amd: add acp6.2 pdm platform driver
PDM platform driver binds to the platform device created by
ACP6.2 PCI device. PDM driver registers ALSA DMA and CPU DAI
components with ASoC framework.
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220827165657.2343818-6-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Syed Saba Kareem [Sat, 27 Aug 2022 16:56:48 +0000 (22:26 +0530)]
ASoC: amd: add platform devices for acp6.2 pdm driver and dmic driver
ACP6.2 IP has PDM decoder block.
Create a platform device for it, so that the PDM platform driver
can be bound to this device.
Pass PCI resources like MMIO to this platform device.
Create a platform device for generic dmic codec driver.
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220827165657.2343818-5-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Syed Saba Kareem [Sat, 27 Aug 2022 16:56:47 +0000 (22:26 +0530)]
ASoC: amd: add acp6.2 init/de-init functions
Add Pink Sardine platform ACP6.2 PCI driver init/deinit functions.
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220827165657.2343818-4-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Syed Saba Kareem [Sat, 27 Aug 2022 16:56:46 +0000 (22:26 +0530)]
ASoC: amd: add Pink Sardine ACP PCI driver
ACP is a PCI audio device.
This patch adds PCI driver to bind to this device and get
PCI resources for Pink Sardine Platform.
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220827165657.2343818-3-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Syed Saba Kareem [Sat, 27 Aug 2022 16:56:45 +0000 (22:26 +0530)]
ASoC: amd: add Pink Sardine platform ACP IP register header
Add ACP IP Register header for Pink Sardine platform.
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220827165657.2343818-2-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Mon, 29 Aug 2022 15:56:25 +0000 (16:56 +0100)]
TAS2764 fixes/extensions
Merge series from Martin Povišer <povik+lin@cutebit.org>:
First three patches are fixes analogical to those recently done to
the TAS2770 driver.
Link: https://lore.kernel.org/asahi/20220808141246.5749-1-povik+lin@cutebit.org/T/#t
The latter two add IRQ handler to log faults and expose a new control.
Jinpeng Cui [Mon, 29 Aug 2022 09:13:19 +0000 (09:13 +0000)]
ASoC: codecs: max98088: remove redundant ret variable
Return value from devm_snd_soc_register_component() directly
instead of taking this in another redundant variable.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
Link: https://lore.kernel.org/r/20220829091319.266068-1-cui.jinpeng2@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Krzysztof Kozlowski [Fri, 26 Aug 2022 09:36:59 +0000 (12:36 +0300)]
ASoC: codecs: allow compile testing without MFD drivers
Motorola CPCAP, Lochnagar Sound, Rockchip RK817 and Qualcomm
WCD9340/WCD9341 do not depend on parent MFD driver in build time and can
be compile tested without respective MFD part for increased build
coverage.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220826093659.1059276-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Xiangsheng Hou [Mon, 25 Jul 2022 12:02:05 +0000 (20:02 +0800)]
dt-bindings: mediatek: Add axi clock in mt8173 dts example
For mt8173, it is needed to add the axi clock for dma mode.
Signed-off-by: Xiangsheng Hou <xiangsheng.hou@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220725120204.10834-1-xiangsheng.hou@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Venkata Prasad Potturu [Fri, 26 Aug 2022 06:42:45 +0000 (12:12 +0530)]
ASoC: amd: acp: Modify dai_id macros to be more generic
Change dai_id macros to make I2S instances in order.
Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://lore.kernel.org/r/20220826064250.3302260-1-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Sun, 28 Aug 2022 20:58:57 +0000 (21:58 +0100)]
ASoC: Cleanup deprecated regmap-irq functionality
Merge series from Aidan MacDonald <aidanmacdonald.0x0@gmail.com>:
Update two ASoC codec drivers to remove uses of regmap-irq type
registers, which have recently been deprecated by the "regmap-irq
cleanups and refactoring" series in linux-next.
Link: https://lore.kernel.org/lkml/20220623211420.918875-1-aidanmacdonald.0x0@gmail.com/
Aidan MacDonald [Thu, 21 Jul 2022 10:25:58 +0000 (11:25 +0100)]
ASoC: wcd938x: Remove spurious type_base from irq chip
There is no reason to set type_base here: the chip doesn't set
num_type_regs and none of the IRQs have type information so it's
not possible for regmap-irq to configure IRQ types.
Type registers are also deprecated in regmap-irq, so any IRQ type
support in the future should be implemented using config registers
instead.
Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
Link: https://lore.kernel.org/r/20220721102558.25457-3-aidanmacdonald.0x0@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Aidan MacDonald [Thu, 21 Jul 2022 10:25:57 +0000 (11:25 +0100)]
ASoC: wcd9335: Convert irq chip to config regs
Type registers in regmap-irq have been deprecated in favor of config
registers, which are more general. Chips using type_base can switch
over to a single config base register and a standard ->set_irq_type()
callback provided by regmap-irq, which uses the type info associated
with each 'struct regmap_irq' to update type registers in the same
way as the old code did.
Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
Link: https://lore.kernel.org/r/20220721102558.25457-2-aidanmacdonald.0x0@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Martin Povišer [Thu, 25 Aug 2022 14:02:41 +0000 (16:02 +0200)]
ASoC: tas2764: Export highpass filter setting
Expose a control for the setting of 'DC blocker' highpass filter in the
playback path of TAS2764.
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220825140241.53963-6-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Martin Povišer [Thu, 25 Aug 2022 14:02:40 +0000 (16:02 +0200)]
ASoC: tas2764: Add IRQ handling
Add an IRQ handler which logs detected faults (but doesn't do anything
else).
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220825140241.53963-5-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Martin Povišer [Thu, 25 Aug 2022 14:02:39 +0000 (16:02 +0200)]
ASoC: tas2764: Fix mute/unmute
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.)
Fixes:
827ed8a0fa50 ("ASoC: tas2764: Add the driver for the TAS2764")
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220825140241.53963-4-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Martin Povišer [Thu, 25 Aug 2022 14:02:38 +0000 (16:02 +0200)]
ASoC: tas2764: Drop conflicting set_bias_level power setting
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.)
Fixes:
827ed8a0fa50 ("ASoC: tas2764: Add the driver for the TAS2764")
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220825140241.53963-3-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Martin Povišer [Thu, 25 Aug 2022 14:02:37 +0000 (16:02 +0200)]
ASoC: tas2764: Allow mono streams
The part is a mono speaker amp, but it can do downmix and switch between
left and right channel, so the right channel range is 1 to 2.
(This mirrors commit
bf54d97a835d ("ASoC: tas2770: Allow mono streams")
which was a fix to the tas2770 driver.)
Fixes:
827ed8a0fa50 ("ASoC: tas2764: Add the driver for the TAS2764")
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220825140241.53963-2-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Mon, 22 Aug 2022 02:35:32 +0000 (02:35 +0000)]
ASoC: soc-pcm.c: call __soc_pcm_close() in soc_pcm_close()
commit
b7898396f4bbe16 ("ASoC: soc-pcm: Fix and cleanup DPCM locking")
added __soc_pcm_close() for non-lock version of soc_pcm_close().
But soc_pcm_close() is not using it. It is no problem, but confusable.
static int __soc_pcm_close(...)
{
=> return soc_pcm_clean(rtd, substream, 0);
}
static int soc_pcm_close(...)
{
...
snd_soc_dpcm_mutex_lock(rtd);
=> soc_pcm_clean(rtd, substream, 0);
snd_soc_dpcm_mutex_unlock(rtd);
return 0;
}
This patch use it.
Fixes:
b7898396f4bbe16 ("ASoC: soc-pcm: Fix and cleanup DPCM locking")
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87czctgg3w.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Thu, 25 Aug 2022 15:24:42 +0000 (16:24 +0100)]
ASoC platform driver for Apple MCA
Merge series from Martin Povišer <povik+lin@cutebit.org>:
sending what should be the final touches on Apple MCA driver. It most
likely goes without saying but please do not merge the DT additions
into the ASoC tree.
Yang Yingliang [Thu, 25 Aug 2022 12:35:25 +0000 (20:35 +0800)]
ASoC: sigmadsp: switch to use kmemdup_nul() helper
Use kmemdup_nul() helper instead of open-coding to
simplify the code.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220825123525.1845695-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Martin Povišer [Wed, 24 Aug 2022 16:07:12 +0000 (18:07 +0200)]
ASoC: Add Apple MCA I2S transceiver bindings
Add binding schema for MCA I2S transceiver found on Apple M1 and other
chips.
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220824160715.95779-2-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Martin Povišer [Wed, 24 Aug 2022 16:07:15 +0000 (18:07 +0200)]
ASoC: apple: mca: Add locking
In DAI ops, accesses to the native cluster (of the DAI), and to data of
clusters related to it by a DPCM frontend-backend link, should have
been synchronized by the 'pcm_mutex' lock at ASoC level.
What is not covered are the 'port_driver' accesses on foreign clusters
to which the current cluster has no a priori relation, so fill in
locking for that. (This should only matter in bizarre configurations of
sharing one MCA peripheral between ASoC cards.)
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220824160715.95779-5-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Martin Povišer [Wed, 24 Aug 2022 16:07:14 +0000 (18:07 +0200)]
ASoC: apple: mca: Start new platform driver
Add ASoC platform driver for the MCA peripheral found on Apple M1 and
other chips.
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220824160715.95779-4-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Thu, 25 Aug 2022 12:37:57 +0000 (13:37 +0100)]
ASoC: SOF: mediatek: update SOF driver for mt8186
Merge series from Chunxu Li <chunxu.li@mediatek.com>:
In these patches, we update SOF driver for mt8186
Tommaso Merciai [Thu, 25 Aug 2022 10:17:13 +0000 (12:17 +0200)]
ASoC: max98088: add support for noise gate reg
Add support for Noise Gate Threshold reg (ANTH reg 0x40 bit 4 to 7)
References:
- https://datasheets.maximintegrated.com/en/ds/MAX98089.pdf, p75
Signed-off-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
Link: https://lore.kernel.org/r/20220825101714.81580-1-tommaso.merciai@amarulasolutions.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Zhu Ning [Thu, 25 Aug 2022 01:49:52 +0000 (09:49 +0800)]
ASoC: codecs: add suspend and resume for ES8316
The registers may be lost after suspend due to powerdown.
regcache_sync solves this issue.
Signed-off-by: Zhu Ning <zhuning@everest-semi.com>
Link: https://lore.kernel.org/r/20220825014952.1038508-1-zhuning0077@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Chunxu Li [Thu, 25 Aug 2022 06:54:11 +0000 (14:54 +0800)]
ASoC: SOF: mediatek: Use generic implementation for .ipc_msg_data field
Use generic sof_ipc_msg_data instead of specific implementation as
they do the same things
Signed-off-by: Chunxu Li <chunxu.li@mediatek.com>
Link: https://lore.kernel.org/r/20220825065411.31279-4-chunxu.li@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Chunxu Li [Thu, 25 Aug 2022 06:54:10 +0000 (14:54 +0800)]
ASoC: SOF: mediatek: add snd_sof_dsp_ops callbacks for pcm and mail box
Use generic IPC stream and mailbox ops for mt8186
Signed-off-by: Chunxu Li <chunxu.li@mediatek.com>
Link: https://lore.kernel.org/r/20220825065411.31279-3-chunxu.li@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Chunxu Li [Thu, 25 Aug 2022 06:54:09 +0000 (14:54 +0800)]
ASoC: SOF: mediatek: Add dai driver for mt8186
Add dsp ops callback to register AFE DL1/DL2/UL1/UL2 SOF dai's with ALSA
Signed-off-by: Chunxu Li <chunxu.li@mediatek.com>
Link: https://lore.kernel.org/r/20220825065411.31279-2-chunxu.li@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Wed, 24 Aug 2022 16:23:44 +0000 (17:23 +0100)]
ASoC: mediatek: dt-bindings: modify machine
Merge series from Chunxu Li <chunxu.li@mediatek.com>:
Add SOF related field.
1. Add a property "mediatek,adsp", Only when adsp phandle could be retrieved,
from DTS, the SOF related part of machine driver is executed.
2. Add a property "mediatek,dai-link" to support dai-links could be specified
from DTS
chunxu.li [Wed, 24 Aug 2022 12:23:19 +0000 (20:23 +0800)]
ASoC: mediatek: dt-bindings: modify machine bindings for SOF
Add SOF related field.
1. Add a property "mediatek,adsp", Only when adsp phandle could be
retrieved, from DTS, the SOF related part of machine driver is executed.
2. Add a property "mediatek,dai-link" to support dai-links could be
specified from DTS
Signed-off-by: chunxu.li <chunxu.li@mediatek.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220824122319.23918-3-chunxu.li@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
chunxu.li [Wed, 24 Aug 2022 12:23:18 +0000 (20:23 +0800)]
ASoC: mediatek: dt-bindings: modify machine bindings for SOF
Add SOF related field.
1. Add a property "mediatek,adsp", Only when adsp phandle could be
retrieved, from DTS, the SOF related part of machine driver is executed.
2. Add a property "mediatek,dai-link" to support dai-links could be
specified from DTS
Signed-off-by: chunxu.li <chunxu.li@mediatek.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220824122319.23918-2-chunxu.li@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Yang Yingliang [Wed, 24 Aug 2022 01:32:34 +0000 (09:32 +0800)]
ASoC: SOF: imx8ulp: add missing of_node_put() in imx8ulp_probe()
After using 'res_node' returned by of_parse_phandle(), of_node_put()
need be called to decrease the refcount.
Fixes:
fb5319af6ad8 ("ASoC: SOF: imx: Add i.MX8ULP HW support")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220824013234.375738-2-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Nathan Chancellor [Tue, 23 Aug 2022 15:19:40 +0000 (08:19 -0700)]
ASoC: codes: src4xxx: Avoid clang -Wsometimes-uninitialized in src4xxx_hw_params()
Clang warns:
sound/soc/codecs/src4xxx.c:280:3: error: variable 'd' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized]
default:
^~~~~~~
sound/soc/codecs/src4xxx.c:298:59: note: uninitialized use occurs here
ret = regmap_write(src4xxx->regmap, SRC4XXX_RCV_PLL_11, d);
^
sound/soc/codecs/src4xxx.c:223:20: note: initialize the variable 'd' to silence this warning
int val, pj, jd, d;
^
= 0
sound/soc/codecs/src4xxx.c:280:3: error: variable 'jd' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized]
default:
^~~~~~~
sound/soc/codecs/src4xxx.c:293:59: note: uninitialized use occurs here
ret = regmap_write(src4xxx->regmap, SRC4XXX_RCV_PLL_10, jd);
^~
sound/soc/codecs/src4xxx.c:223:17: note: initialize the variable 'jd' to silence this warning
int val, pj, jd, d;
^
= 0
sound/soc/codecs/src4xxx.c:280:3: error: variable 'pj' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized]
default:
^~~~~~~
sound/soc/codecs/src4xxx.c:288:59: note: uninitialized use occurs here
ret = regmap_write(src4xxx->regmap, SRC4XXX_RCV_PLL_0F, pj);
^~
sound/soc/codecs/src4xxx.c:223:13: note: initialize the variable 'pj' to silence this warning
int val, pj, jd, d;
^
= 0
3 errors generated.
The datasheet does not have any default values for these regmap values
so pick some arbitrary values and print to the user that this is the
case to silence the warnings.
Link: https://github.com/ClangBuiltLinux/linux/issues/1691
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: "Sudip Mukherjee (Codethink)" <sudipm.mukherjee@gmail.com>
Suggested-by: Matt Flax <flatmax@flatmax.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Matt Flax <flatmax@flatmax.com>
Link: https://lore.kernel.org/r/20220823151939.2493697-1-nathan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>