platform/kernel/linux-starfive.git
2 years agoUntested TAS2562 power setting fixes
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.)

2 years agoASoC: soc-pcm.c: random cleanup
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

2 years agoASoC: apple: mca: Postpone requesting of DMA channels
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>
2 years agoASoC: SOF: Introduce function sof_of_machine_select
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>
2 years agoASoC: wm_adsp: Handle optional legacy support
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>
2 years agoASoC: tas2562: Fix mute/unmute
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>
2 years agoASoC: tas2562: Drop conflicting set_bias_level power setting
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>
2 years agoASoC: soc-pcm.c: check fe condition at out of loop
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>
2 years agoASoC: soc-pcm.c: add soc_pcm_ret()
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>
2 years agoASoC: soc-pcm.c: remove unnecessary codec2codec_close_delayed_work()
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>
2 years agoASoC: rsnd: Add check for rsnd_mod_power_on
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>
2 years agoMAINTAINERS: Fix file pattern for ARM/APPLE MACHINE SOUND DRIVERS
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>
2 years agoASoC: apple: mca: Unselect COMMON_CLK in Kconfig
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>
2 years agoASoC: codecs: rk817: drop I2C dependencies
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>
2 years agoASoC: codecs: wcd934x: add Slimbus dependency
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>
2 years agoASoC: codecs: minor cppcheck cleanups
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.

2 years agoASoC: SOF: compress: Add support for timestamp on capture
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.

2 years agoASoC: max98396: Make data monitor features configurable
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>
2 years agoASoC: dt-bindings: max98396: Document data monitor properties
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>
2 years agoASoC: ti: omap-mcbsp: remove useless assignment
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>
2 years agoASoC: fsl: fsl-utils: remove useless assignment
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>
2 years agoASoC: wcd9335: remove always-true condition
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>
2 years agoASoC: wcd-mbhc-v2: remove always-true condition
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>
2 years agoASoC: hdmi-codec: remove unused definitions
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>
2 years agoASoC: SOF: compress: Add copy function for capture case
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>
2 years agoASoC: SOF: compress: Move sof_compr_copy functionality
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>
2 years agoASoC: amd: fix spelling mistake: "i.e" -> "i.e."
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>
2 years agoAdd Pink Sardine platform ASoC driver
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.

2 years agoASoC: codecs: rk817: fix missing I2C dependency in compile test
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>
2 years agoASoC: amd: enable Pink sardine platform machine driver build.
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>
2 years agoASoC: amd: add Pink Sardine machine driver using dmic
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>
2 years agoASoC: amd: create platform device for acp6.2 machine driver
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>
2 years agoASoC: amd: enable Pink Sardine acp6.2 drivers build
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>
2 years agoASoC: amd: add acp6.2 pdm driver pm ops
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>
2 years agoASoC: amd: add acp6.2 pci driver pm ops
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>
2 years agoASoC: amd: add acp6.2 pdm driver dma ops
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>
2 years agoASoC: amd: add acp6.2 irq handler
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>
2 years agoASoC: amd: add acp6.2 pdm platform driver
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>
2 years agoASoC: amd: add platform devices for acp6.2 pdm driver and dmic driver
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>
2 years agoASoC: amd: add acp6.2 init/de-init functions
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>
2 years agoASoC: amd: add Pink Sardine ACP PCI driver
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>
2 years agoASoC: amd: add Pink Sardine platform ACP IP register header
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>
2 years agoTAS2764 fixes/extensions
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.

2 years agoASoC: codecs: max98088: remove redundant ret variable
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>
2 years agoASoC: codecs: allow compile testing without MFD drivers
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>
2 years agodt-bindings: mediatek: Add axi clock in mt8173 dts example
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>
2 years agoASoC: amd: acp: Modify dai_id macros to be more generic
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>
2 years agoASoC: Cleanup deprecated regmap-irq functionality
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/
2 years agoASoC: wcd938x: Remove spurious type_base from irq chip
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>
2 years agoASoC: wcd9335: Convert irq chip to config regs
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>
2 years agoASoC: tas2764: Export highpass filter setting
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>
2 years agoASoC: tas2764: Add IRQ handling
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>
2 years agoASoC: tas2764: Fix mute/unmute
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>
2 years agoASoC: tas2764: Drop conflicting set_bias_level power setting
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>
2 years agoASoC: tas2764: Allow mono streams
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>
2 years agoASoC: soc-pcm.c: call __soc_pcm_close() in soc_pcm_close()
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>
2 years agoASoC platform driver for Apple MCA
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.

2 years agoASoC: sigmadsp: switch to use kmemdup_nul() helper
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>
2 years agoASoC: Add Apple MCA I2S transceiver bindings
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>
2 years agoASoC: apple: mca: Add locking
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>
2 years agoASoC: apple: mca: Start new platform driver
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>
2 years agoASoC: SOF: mediatek: update SOF driver for mt8186
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

2 years agoASoC: max98088: add support for noise gate reg
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>
2 years agoASoC: codecs: add suspend and resume for ES8316
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>
2 years agoASoC: SOF: mediatek: Use generic implementation for .ipc_msg_data field
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>
2 years agoASoC: SOF: mediatek: add snd_sof_dsp_ops callbacks for pcm and mail box
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>
2 years agoASoC: SOF: mediatek: Add dai driver for mt8186
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>
2 years agoASoC: mediatek: dt-bindings: modify machine
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

2 years agoASoC: mediatek: dt-bindings: modify machine bindings for SOF
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>
2 years agoASoC: mediatek: dt-bindings: modify machine bindings for SOF
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>
2 years agoASoC: SOF: imx8ulp: add missing of_node_put() in imx8ulp_probe()
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>
2 years agoASoC: codes: src4xxx: Avoid clang -Wsometimes-uninitialized in src4xxx_hw_params()
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>
2 years agoASoC: SOF: Intel: hda: Skip IMR boot after a firmware crash or boot failure
Peter Ujfalusi [Tue, 23 Aug 2022 12:43:59 +0000 (15:43 +0300)]
ASoC: SOF: Intel: hda: Skip IMR boot after a firmware crash or boot failure

To make sure that we start from a clean state next time when the DSP is
powered up after a firmware crash or boot failure we must skip the IMR
booting attempt.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220823124359.24865-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: dt-bindings: Add missing (unevaluated|additional)Properties on child nodes
Rob Herring [Tue, 23 Aug 2022 14:56:39 +0000 (09:56 -0500)]
ASoC: dt-bindings: Add missing (unevaluated|additional)Properties on child nodes

In order to ensure only documented properties are present, node schemas
must have unevaluatedProperties or additionalProperties set to false
(typically).

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220823145649.3118479-8-robh@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: ipc4-loader: Verify ext manifest magic number
Peter Ujfalusi [Tue, 23 Aug 2022 12:42:19 +0000 (15:42 +0300)]
ASoC: SOF: ipc4-loader: Verify ext manifest magic number

Firmware image must start with an extended manifest. Add a check to make
sure that the image does contain it.

The magic number (the first u32 of a firmware image if manifest is present)
for an IPC4 image must be 0x31454124 (ASCI "$AE1").

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220823124219.927-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: imx: imx8ulp: declare ops structure as static
Pierre-Louis Bossart [Tue, 23 Aug 2022 15:40:27 +0000 (17:40 +0200)]
ASoC: SOF: imx: imx8ulp: declare ops structure as static

Sparse warning:

sound/soc/sof/imx/imx8ulp.c:416:24: error: symbol 'sof_imx8ulp_ops'
was not declared. Should it be static?

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220823154027.762889-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: fsl_sai: Update slots number according to bclk_ratio
Shengjiu Wang [Fri, 5 Aug 2022 06:45:26 +0000 (14:45 +0800)]
ASoC: fsl_sai: Update slots number according to bclk_ratio

The bclk_ratio is set by .set_bclk_ratio API.
bclk_ratio = slots * slot_width
So if slots is not set by .set_tdm_slot, then it can be calculated
by bclk_ratio.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1659681926-13493-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: Intel: hda: Correct Firmware State Register use
Mark Brown [Tue, 23 Aug 2022 18:48:41 +0000 (19:48 +0100)]
ASoC: SOF: Intel: hda: Correct Firmware State Register use

Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

Hi,

The FSR (Firmware State Register) holds the ROM state information, it does not
contain error information.
The FSR itself is a bit more complicated as well as the state depends on the
module currently in use.

The error code from ROM or the status code from the firmware is located at the
next register.

Fix the handling of the FSR in order to provide usable and human readable (in
most cases) report on the status and error.

Regards,
Peter
---
Peter Ujfalusi (3):
  ASoC: SOF: Intel: hda: Correct the ROM/FW state reporting code
  ASoC: SOF: Intel: hda-loader: Use the FSR state definitions during
    bootup
  ASoC: SOF: Intel: hda: Drop no longer used ROM state definitions

 sound/soc/sof/intel/hda-loader.c |  10 +--
 sound/soc/sof/intel/hda.c        | 147 ++++++++++++++++++++++++++-----
 sound/soc/sof/intel/hda.h        |  69 +++++++++++++--
 3 files changed, 194 insertions(+), 32 deletions(-)

--
2.37.0

2 years agoIntroduce sof_of_machine_select
Mark Brown [Tue, 23 Aug 2022 18:48:39 +0000 (19:48 +0100)]
Introduce sof_of_machine_select

Merge series from Chunxu Li <chunxu.li@mediatek.com>:

In these patches, we introduce function sof_of_machine_select for SOF

2 years agoASoC: SOF: mediatek: Add sof_mt8186_machs for mt8186
Chunxu Li [Fri, 5 Aug 2022 07:04:49 +0000 (15:04 +0800)]
ASoC: SOF: mediatek: Add sof_mt8186_machs for mt8186

Add .of_machines field sof_mt8186_machs for mt8186

Signed-off-by: Chunxu Li <chunxu.li@mediatek.com>
Link: https://lore.kernel.org/r/20220805070449.6611-3-chunxu.li@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: Introduce function sof_of_machine_select
Chunxu Li [Fri, 5 Aug 2022 07:04:48 +0000 (15:04 +0800)]
ASoC: SOF: Introduce function sof_of_machine_select

From current design in sof_machine_check and snd_sof_new_platform_drv,
the SOF can only support ACPI type machine.

1. 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.

2. In snd_sof_new_platform_drv the component driver need a driver name
to do ignore_machine, currently the driver name is obtained from
machine->drv_name, and the type of machine is snd_soc_acpi_mach.

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>
Link: https://lore.kernel.org/r/20220805070449.6611-2-chunxu.li@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: Intel: hda: Drop no longer used ROM state definitions
Peter Ujfalusi [Tue, 12 Jul 2022 12:57:34 +0000 (15:57 +0300)]
ASoC: SOF: Intel: hda: Drop no longer used ROM state definitions

All code have been switched to use the new FSR defines and macros for
ROM/FW state tracking.
The old definitions can be dropped now.

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/20220712125734.30512-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: Intel: hda-loader: Use the FSR state definitions during bootup
Peter Ujfalusi [Tue, 12 Jul 2022 12:57:33 +0000 (15:57 +0300)]
ASoC: SOF: Intel: hda-loader: Use the FSR state definitions during bootup

Switch to use the newly added FSR (Firmware State Register) definitions
for DSP state handling and targeting.

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/20220712125734.30512-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: fsl_sai: Add support multi fifo sdma script
Shengjiu Wang [Tue, 23 Aug 2022 01:36:13 +0000 (09:36 +0800)]
ASoC: fsl_sai: Add support multi fifo sdma script

With disabling combine mode, the multiple successive
FIFO registers or non successive FIFO registers of SAI module
can work with the sdma multi fifo script.

This patch is to configure the necessary information to
the SDMA engine driver for support multi fifo script.

'words_per_fifo' is the channels for each dataline
'n_fifos_src' and 'n_fifos_dst' are the fifo number
'stride_fifos_src' and 'stride_fifos_dst' are the stride
between enable FIFOs
'maxburst' is the multiply of datalines

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1661218573-2154-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: compress: Remove dai_posn variable
Daniel Baluta [Mon, 22 Aug 2022 17:49:37 +0000 (20:49 +0300)]
ASoC: SOF: compress: Remove dai_posn variable

dai_posn is set but never used. Initial intention was
to use dai_posn to shorthen one code line but it looks fine
without it too.

Fixes: c1a731c71359 ("ASoC: SOF: compress: Add support for computing timestamps")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20220822174937.254873-1-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: atmel_ssc_dai: Remove the unneeded result variable
ye xingchen [Tue, 23 Aug 2022 07:53:35 +0000 (07:53 +0000)]
ASoC: atmel_ssc_dai: Remove the unneeded result variable

Return the value from asoc_ssc_init() 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/20220823075335.209072-1-ye.xingchen@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mediatek: mt8186: rename sound card name
chunxu.li [Tue, 23 Aug 2022 09:07:35 +0000 (17:07 +0800)]
ASoC: mediatek: mt8186: rename sound card name

The field 'topology_shortname' in 'snd_soc_card' is defined as char[32],
Current card name will be truncated when SOF is enabled, so rename the
sound card name.

Signed-off-by: chunxu.li <chunxu.li@mediatek.com>
Link: https://lore.kernel.org/r/20220823090735.12176-1-chunxu.li@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: samsung: Use iio_get_channel_type() accessor.
Jonathan Cameron [Sun, 21 Aug 2022 16:09:14 +0000 (17:09 +0100)]
ASoC: samsung: Use iio_get_channel_type() accessor.

struct iio_chan_spec is meant to be opaque to IIO consumer drivers
which should only use the interfaces in linux/iio/consumer.h.
Use the provided accessor function to find get the type of the
channel instead of directly reading it form the structure.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Link: https://lore.kernel.org/r/20220821160914.2207116-1-jic23@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: soc-pcm.c: summarize related settings at soc_new_pcm()
Kuninori Morimoto [Mon, 22 Aug 2022 02:46:25 +0000 (02:46 +0000)]
ASoC: soc-pcm.c: summarize related settings at soc_new_pcm()

soc_new_pcm() sets pcm->no_device_suspend, but it sets other pcm->xxx
at the same function with different timing.
pcm->no_device_suspend setup timing has no effect. This patch tidyup it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87bksdgflq.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mediatek: support SOF for mt8186
Mark Brown [Fri, 19 Aug 2022 22:46:57 +0000 (23:46 +0100)]
ASoC: mediatek: support SOF for mt8186

Merge series from Chunxu Li <chunxu.li@mediatek.com>:

In these patches, we add SOF support for mt8186 which have HiFi5 DSP
inside.

2 years agoASoC: amd: acp: remove unnecessary NULL checks
Dan Carpenter [Fri, 19 Aug 2022 05:23:09 +0000 (08:23 +0300)]
ASoC: amd: acp: remove unnecessary NULL checks

The list iterator can never be NULL.  Delete the bogus NULL checks.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/Yv8ePUuBfzaRu6xV@kili
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: Change handling of unimplemented set_bclk_ratio
Martin Povišer [Thu, 18 Aug 2022 16:53:36 +0000 (18:53 +0200)]
ASoC: Change handling of unimplemented set_bclk_ratio

If a 'set_bclk_ratio' call is attempted on a DAI not implementing the
method, make it an -ENOSUPP error instead of -EINVAL. Assume the DAI can
still be okay with the ratio, just does not care to register a handler.

No current in-tree users of snd_soc_dai_set_bclk_ratio seem to inspect
the return value, but -ENOSUPP disables an error print from within the
common soc_dai_ret return filter. With the new behavior a machine
driver can do a blanket 'set_bclk_ratio' on all DAIs on a bus, some of
which may care about the ratio, some of which may not.

Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220818165336.76403-1-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: amd: acp: add a label to make error path more clean
Yang Yingliang [Fri, 19 Aug 2022 07:37:58 +0000 (15:37 +0800)]
ASoC: amd: acp: add a label to make error path more clean

Move platform_device_unregister() to a new label to make code more clean.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220819073758.1273160-3-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: amd: acp: switch to use dev_err_probe()
Yang Yingliang [Fri, 19 Aug 2022 07:37:57 +0000 (15:37 +0800)]
ASoC: amd: acp: switch to use dev_err_probe()

Use dev_err_probe() to simplify code and print error code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220819073758.1273160-2-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: amd: acp: add missing platform_device_unregister() in acp_pci_probe()
Yang Yingliang [Fri, 19 Aug 2022 07:37:56 +0000 (15:37 +0800)]
ASoC: amd: acp: add missing platform_device_unregister() in acp_pci_probe()

Add missing platform_device_unregister() in error path in acp_pci_probe().

Fixes: c49f5e74a11e ("ASoC: amd: acp: Add error handling cases")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220819073758.1273160-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: imx: Add i.MX8ULP HW support
Zhang Peng [Thu, 18 Aug 2022 01:53:54 +0000 (09:53 +0800)]
ASoC: SOF: imx: Add i.MX8ULP HW support

This adds skeleton support for the audio DSP hardware found on
NXP i.MX8ULP platform.

On i.MX8ULP resources (clocks, power, etc) are managed by the
System Integration Module in LPAV domain and XRDC which is handled
by arm trusted firmware.

Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/1660787634-28550-2-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agodt-bindings: dsp: fsl: Add SOF compatile string for i.MX8ULP
Shengjiu Wang [Thu, 18 Aug 2022 01:53:53 +0000 (09:53 +0800)]
dt-bindings: dsp: fsl: Add SOF compatile string for i.MX8ULP

Add SOF compatile string "fsl,imx8ulp-dsp" for supporting DSP
device on i.MX8ULP platform.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/1660787634-28550-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mediatek: mt8186: add SOF support on mt8186-mt6366-da7219-max98357
Chunxu Li [Thu, 18 Aug 2022 02:51:13 +0000 (10:51 +0800)]
ASoC: mediatek: mt8186: add SOF support on mt8186-mt6366-da7219-max98357

1. Add widgets, routes and dai-links required by SOF

2. Only when adsp phandle could be retrieved from DTS, the SOF related part
of machine driver is executed.

3. Support dai-links could be specified from DTS, so that
we can disable AP side hardware controls when DSP SOF controls the same
audio FE.

Signed-off-by: Chunxu Li <chunxu.li@mediatek.com>
Link: https://lore.kernel.org/r/20220818025113.17144-4-chunxu.li@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mediatek: mt8186: add SOF support on mt8186-mt6366-rt1019-rt5682s
Chunxu Li [Thu, 18 Aug 2022 02:51:12 +0000 (10:51 +0800)]
ASoC: mediatek: mt8186: add SOF support on mt8186-mt6366-rt1019-rt5682s

1. Add widgets, routes and dai-links required by SOF

2. Only when adsp phandle could be retrieved from DTS, the SOF related part
of machine driver is executed.

3. Support dai-links could be specified from DTS, so that
we can disable AP side hardware controls when DSP SOF controls the same
audio FE.

Signed-off-by: Chunxu Li <chunxu.li@mediatek.com>
Link: https://lore.kernel.org/r/20220818025113.17144-3-chunxu.li@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mediatek: mt8186: support DSP downlink
Chunxu Li [Thu, 18 Aug 2022 02:51:11 +0000 (10:51 +0800)]
ASoC: mediatek: mt8186: support DSP downlink

1. add DSP downlink link widget
2. add DSP to I2S route path

Signed-off-by: Chunxu Li <chunxu.li@mediatek.com>
Link: https://lore.kernel.org/r/20220818025113.17144-2-chunxu.li@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>