linux-2.6-microblaze.git
2 years agoASoC: mediatek: mt8195: add missing of_node_put in probe
Trevor Wu [Tue, 28 Sep 2021 06:35:20 +0000 (14:35 +0800)]
ASoC: mediatek: mt8195: add missing of_node_put in probe

dp node and hdmi node are retrieved from of_parse_phandle(), so using
of_node_put() on them before return.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
Link: https://lore.kernel.org/r/20210928063520.23927-1-trevor.wu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: imx: add header file for ops
Pierre-Louis Bossart [Tue, 28 Sep 2021 07:28:07 +0000 (10:28 +0300)]
ASoC: SOF: imx: add header file for ops

Sparse (make C=2) complains about undeclared variables. Fix by adding
a real prototype instead of 'extern' in sof-of-dev.c

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Paul Olaru <paul.olaru@oss.nxp.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20210928072807.27838-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: pm: fix a stale comment
Ranjani Sridharan [Tue, 28 Sep 2021 07:40:30 +0000 (10:40 +0300)]
ASoC: SOF: pm: fix a stale comment

There is no restore_stream flag anymmore.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Paul Olaru <paul.olaru@oss.nxp.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20210928074030.30553-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: Intel: hda-stream: Print stream name on STREAM_SD_OFFSET timeout
Peter Ujfalusi [Tue, 28 Sep 2021 08:17:44 +0000 (11:17 +0300)]
ASoC: SOF: Intel: hda-stream: Print stream name on STREAM_SD_OFFSET timeout

In order to provide more information in case of timeout observed while
reading STREAM_SD_OFFSET, print out the stream name or in case there is
no audio stream associated (like dma-trace), print "--"

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/20210928081744.4785-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoMerge series "add driver to support firmware loading on Cirrus Logic DSPs" from Simon...
Mark Brown [Mon, 27 Sep 2021 17:32:10 +0000 (18:32 +0100)]
Merge series "add driver to support firmware loading on Cirrus Logic DSPs" from Simon Trimmer <simont@opensource.cirrus.com>:

This series of patches gradually separates the ASoC specific wm_adsp
code from that required to manage firmware in Cirrus Logic DSPs.

The series starts with renaming, progresses to splitting the
functionality before finally moving the independent functionality into
drivers/firmware so that it can be used by both the existing ASoC
wm_adsp and new non-audio parts.

Charles Keepax (3):
  ASoC: wm_adsp: Move check for control existence
  ASoC: wm_adsp: Switch to using wm_coeff_read_ctrl for compressed
    buffers
  ASoC: wm_adsp: Move sys_config_size to wm_adsp

Simon Trimmer (13):
  ASoC: wm_adsp: Remove use of snd_ctl_elem_type_t
  ASoC: wm_adsp: Cancel ongoing work when removing controls
  ASoC: wm_adsp: Rename generic DSP support
  ASoC: wm_adsp: Introduce cs_dsp logging macros
  ASoC: wm_adsp: Separate some ASoC and generic functions
  ASoC: wm_adsp: Split DSP power operations into helper functions
  ASoC: wm_adsp: Separate generic cs_dsp_coeff_ctl handling
  ASoC: wm_adsp: Move check of dsp->running to better place
  ASoC: wm_adsp: Pass firmware names as parameters when starting DSP
    core
  ASoC: wm_adsp: move firmware loading to client
  ASoC: wm_adsp: Split out struct cs_dsp from struct wm_adsp
  ASoC: wm_adsp: Separate wm_adsp specifics in cs_dsp_client_ops
  firmware: cs_dsp: add driver to support firmware loading on Cirrus
    Logic DSPs

 MAINTAINERS                                   |   11 +
 drivers/firmware/Kconfig                      |    1 +
 drivers/firmware/Makefile                     |    1 +
 drivers/firmware/cirrus/Kconfig               |    5 +
 drivers/firmware/cirrus/Makefile              |    3 +
 drivers/firmware/cirrus/cs_dsp.c              | 3109 ++++++++++++++++
 include/linux/firmware/cirrus/cs_dsp.h        |  242 ++
 .../linux/firmware/cirrus}/wmfw.h             |    8 +-
 sound/soc/codecs/Kconfig                      |    1 +
 sound/soc/codecs/cs47l15.c                    |   22 +-
 sound/soc/codecs/cs47l24.c                    |   20 +-
 sound/soc/codecs/cs47l35.c                    |   24 +-
 sound/soc/codecs/cs47l85.c                    |   32 +-
 sound/soc/codecs/cs47l90.c                    |   34 +-
 sound/soc/codecs/cs47l92.c                    |   20 +-
 sound/soc/codecs/madera.c                     |   18 +-
 sound/soc/codecs/wm2200.c                     |   30 +-
 sound/soc/codecs/wm5102.c                     |   16 +-
 sound/soc/codecs/wm5110.c                     |   24 +-
 sound/soc/codecs/wm_adsp.c                    | 3188 ++---------------
 sound/soc/codecs/wm_adsp.h                    |  105 +-
 21 files changed, 3794 insertions(+), 3120 deletions(-)
 create mode 100644 drivers/firmware/cirrus/Kconfig
 create mode 100644 drivers/firmware/cirrus/Makefile
 create mode 100644 drivers/firmware/cirrus/cs_dsp.c
 create mode 100644 include/linux/firmware/cirrus/cs_dsp.h
 rename {sound/soc/codecs => include/linux/firmware/cirrus}/wmfw.h (91%)

--
2.33.0

2 years agoASoC: ak4458: Use modern ASoC DAI format terminology
Mark Brown [Mon, 20 Sep 2021 16:38:17 +0000 (17:38 +0100)]
ASoC: ak4458: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the ak4458 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210920163817.16490-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: ak5558: Use modern ASoC DAI format terminology
Mark Brown [Mon, 20 Sep 2021 16:47:53 +0000 (17:47 +0100)]
ASoC: ak5558: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the ak5558 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210920164753.17030-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: dmaengine: Introduce module option prealloc_buffer_size_kbytes
Sugar Zhang [Thu, 23 Sep 2021 10:50:46 +0000 (18:50 +0800)]
ASoC: dmaengine: Introduce module option prealloc_buffer_size_kbytes

Currently, The fixed 512KB prealloc buffer size is too larger for
tiny memory kernel (such as 16MB memory). This patch adds the module
option "prealloc_buffer_size_kbytes" to specify prealloc buffer size.

It's suitable for cards which use the generic dmaengine pcm driver
with no config.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Link: https://lore.kernel.org/r/1632394246-59341-1-git-send-email-sugar.zhang@rock-chips.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: dwc-i2s: Update to modern clocking terminology
Mark Brown [Tue, 21 Sep 2021 20:53:13 +0000 (21:53 +0100)]
ASoC: dwc-i2s: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the dwc-i2s driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210921205313.46710-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: ak4671: Use modern ASoC DAI format terminology
Mark Brown [Mon, 20 Sep 2021 16:42:11 +0000 (17:42 +0100)]
ASoC: ak4671: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the ak4671 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210920164211.16718-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: alc5623: Use modern ASoC DAI format terminology
Mark Brown [Mon, 20 Sep 2021 16:50:36 +0000 (17:50 +0100)]
ASoC: alc5623: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the alc5623 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210920165036.17142-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: bcm: Convert to modern clocking terminology
Mark Brown [Thu, 16 Sep 2021 14:34:23 +0000 (15:34 +0100)]
ASoC: bcm: Convert to modern clocking terminology

As part of the effort to remove our old APIs based on outdated terminology
update the Broadcom drivers to use modern terminology.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210916143423.24025-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: cpcap: Use modern ASoC DAI format terminology
Mark Brown [Tue, 21 Sep 2021 21:30:34 +0000 (22:30 +0100)]
ASoC: cpcap: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the cpcap driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210921213034.31427-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: meson: aiu: Fix spelling mistake "Unsupport" -> "Unsupported"
Colin Ian King [Fri, 24 Sep 2021 23:12:42 +0000 (00:12 +0100)]
ASoC: meson: aiu: Fix spelling mistake "Unsupport" -> "Unsupported"

There is a spelling mistake in a dev_err error message. Fix it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20210924231242.144692-1-colin.king@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: dt-bindings: wlf,wm8978: Fix I2C address in example
Geert Uytterhoeven [Fri, 24 Sep 2021 12:47:32 +0000 (14:47 +0200)]
ASoC: dt-bindings: wlf,wm8978: Fix I2C address in example

According to the WM8978 datasheet, the address of the device is fixed as
0011010 in 2-wire mode.

Fixes: 5bd5699c494f42a3 ("ASoC: dt-bindings: Add WM8978 Binding")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/c99fc865e3fca6ea623661c52de7dc6a3c36c8b4.1632487554.git.geert+renesas@glider.be
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: codecs: Fix spelling mistake "Unsupport" -> "Unsupported"
Colin Ian King [Fri, 24 Sep 2021 23:10:03 +0000 (00:10 +0100)]
ASoC: codecs: Fix spelling mistake "Unsupport" -> "Unsupported"

There are spelling mistakes in dev_err error messages. Fix them.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210924231003.144502-1-colin.king@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: ad193x: Update to modern clocking terminology
Mark Brown [Thu, 16 Sep 2021 14:22:32 +0000 (15:22 +0100)]
ASoC: ad193x: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the ad193x driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210916142232.33914-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: tegra: Constify static snd_soc_dai_ops structs
Rikard Falkeborn [Wed, 22 Sep 2021 20:54:38 +0000 (22:54 +0200)]
ASoC: tegra: Constify static snd_soc_dai_ops structs

The only usage of these is to assign their address to the ops field in
the snd_soc_dai_driver struct, which is a pointer to const. Make them
const to allow the compiler to put them in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Acked-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/20210922205438.34519-1-rikard.falkeborn@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: cs42l42: Use two thresholds and increased wait time for manual type detection
Stefan Binding [Mon, 27 Sep 2021 11:14:37 +0000 (12:14 +0100)]
ASoC: cs42l42: Use two thresholds and increased wait time for manual type detection

Some headsets require very different comparator thresholds for type detection,
as well as longer settling times. In order to detect a larger number of headsets,
use 2 thresholds to give maximum coverage (1.25V and 1.75V), as well as a longer
settling time of 100ms. This will not affect default audotodetect mode
and applies to manual mode type detection only.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210927111437.18113-1-vitalyr@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: adav80x: Update to modern clocking terminology
Mark Brown [Thu, 16 Sep 2021 15:18:06 +0000 (16:18 +0100)]
ASoC: adav80x: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the adav80x driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210916151806.20756-6-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: adau1977: Update to modern clocking terminology
Mark Brown [Thu, 16 Sep 2021 15:18:05 +0000 (16:18 +0100)]
ASoC: adau1977: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the adau1977 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210916151806.20756-5-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: adau17x1: Update to modern clocking terminology
Mark Brown [Thu, 16 Sep 2021 15:18:04 +0000 (16:18 +0100)]
ASoC: adau17x1: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the adau17x1 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210916151806.20756-4-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: adau1701: Update to modern clocking terminology
Mark Brown [Thu, 16 Sep 2021 15:18:03 +0000 (16:18 +0100)]
ASoC: adau1701: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the adau1701 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210916151806.20756-3-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: adau1373: Update to modern clocking terminology
Mark Brown [Thu, 16 Sep 2021 15:18:02 +0000 (16:18 +0100)]
ASoC: adau1373: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the adau1373 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210916151806.20756-2-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: adau1372: Update to modern clocking terminology
Mark Brown [Thu, 16 Sep 2021 15:18:01 +0000 (16:18 +0100)]
ASoC: adau1372: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the adau1372 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210916151806.20756-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: ad1836: Update to modern clocking terminology
Mark Brown [Thu, 16 Sep 2021 14:21:25 +0000 (15:21 +0100)]
ASoC: ad1836: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the ad1836 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210916142125.7226-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: ep93xx: Convert to modern clocking terminology
Mark Brown [Thu, 16 Sep 2021 14:38:28 +0000 (15:38 +0100)]
ASoC: ep93xx: Convert to modern clocking terminology

As part of the effort to remove our old APIs based on outdated terminology
update the EP93xx drivers to use modern terminology.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210916143828.36215-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: samsung: add missing "fallthrough;"
Arnd Bergmann [Mon, 27 Sep 2021 09:54:34 +0000 (11:54 +0200)]
ASoC: samsung: add missing "fallthrough;"

With gcc, we get a warning in this file:

In file included from include/linux/io.h:13,
                 from sound/soc/samsung/s3c-i2s-v2.c:16:
sound/soc/samsung/s3c-i2s-v2.c: In function 's3c2412_i2s_trigger':
arch/arm/include/asm/io.h:92:22: error: this statement may fall through [-Werror=implicit-fallthrough=]
 #define __raw_writel __raw_writel
                      ^
arch/arm/include/asm/io.h:299:29: note: in expansion of macro '__raw_writel'
 #define writel_relaxed(v,c) __raw_writel((__force u32) cpu_to_le32(v),c)
                             ^~~~~~~~~~~~
arch/arm/include/asm/io.h:307:36: note: in expansion of macro 'writel_relaxed'
 #define writel(v,c)  ({ __iowmb(); writel_relaxed(v,c); })
                                    ^~~~~~~~~~~~~~
sound/soc/samsung/s3c-i2s-v2.c:398:3: note: in expansion of macro 'writel'
   writel(0x0, i2s->regs + S3C2412_IISFIC);
   ^~~~~~
sound/soc/samsung/s3c-i2s-v2.c:400:2: note: here
  case SNDRV_PCM_TRIGGER_RESUME:
  ^~~~

From all I can tell, this was indeed meant to fall through, so
add "fallthrough;" statement to avoid the warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link: https://lore.kernel.org/r/20210927095449.1070639-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: ak4642: Use modern ASoC DAI format terminology
Mark Brown [Mon, 20 Sep 2021 16:40:42 +0000 (17:40 +0100)]
ASoC: ak4642: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the ak4642 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210920164042.16624-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: wcd9335: Use correct version to initialize Class H
Yassine Oudjana [Sat, 25 Sep 2021 02:24:19 +0000 (02:24 +0000)]
ASoC: wcd9335: Use correct version to initialize Class H

The versioning scheme was changed in an earlier patch, which caused the version
being used to initialize WCD9335 to be interpreted as if it was WCD937X, which
changed code paths causing broken headphones output. Pass WCD9335 instead of
WCD9335_VERSION_2_0 to wcd_clsh_ctrl_alloc to fix it.

Fixes: 19c5d1f6a0c3 ("ASoC: codecs: wcd-clsh: add new version support")
Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210925022339.786296-1-y.oudjana@protonmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: alc5632: Use modern ASoC DAI format terminology
Mark Brown [Mon, 20 Sep 2021 16:51:28 +0000 (17:51 +0100)]
ASoC: alc5632: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the alc5632 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210920165128.17224-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: ak4104: Update to modern clocking terminology
Mark Brown [Thu, 16 Sep 2021 15:09:22 +0000 (16:09 +0100)]
ASoC: ak4104: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the ak4104 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210916150922.20183-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: ak4118: Update to modern clocking terminology
Mark Brown [Thu, 16 Sep 2021 15:08:04 +0000 (16:08 +0100)]
ASoC: ak4118: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the ak4118 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210916150804.20058-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: zl38060: Update to modern clocking terminology
Mark Brown [Tue, 21 Sep 2021 20:51:17 +0000 (21:51 +0100)]
ASoC: zl38060: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the zl38060 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210921205117.4393-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: q6afe: q6asm: Fix typos in qcom,q6afe.txt and qcom,q6asm.txt
Masanari Iida [Fri, 24 Sep 2021 07:00:44 +0000 (16:00 +0900)]
ASoC: q6afe: q6asm: Fix typos in qcom,q6afe.txt and qcom,q6asm.txt

This patch fixes two spelling typos in qcom,q6afe.txt
and qcom,q6asm.txt

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Link: https://lore.kernel.org/r/20210924070044.569541-1-standby24x7@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agofirmware: cs_dsp: add driver to support firmware loading on Cirrus Logic DSPs
Simon Trimmer [Mon, 13 Sep 2021 16:00:57 +0000 (17:00 +0100)]
firmware: cs_dsp: add driver to support firmware loading on Cirrus Logic DSPs

wm_adsp originally provided firmware loading on some audio DSP and was
implemented as an ASoC codec driver. However, the firmware loading now
covers a wider range of DSP cores and peripherals containing them,
beyond just audio. So it needs to be available to non-audio drivers. All
the core firmware loading support has been moved into a new driver
cs_dsp, leaving only the ASoC-specific parts in wm_adsp.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-17-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: wm_adsp: Separate wm_adsp specifics in cs_dsp_client_ops
Simon Trimmer [Mon, 13 Sep 2021 16:00:56 +0000 (17:00 +0100)]
ASoC: wm_adsp: Separate wm_adsp specifics in cs_dsp_client_ops

This is preparation for moving the generic DSP support out of ASoC.
The event callbacks let the client add custom handling of events.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-16-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: wm_adsp: Split out struct cs_dsp from struct wm_adsp
Simon Trimmer [Mon, 13 Sep 2021 16:00:55 +0000 (17:00 +0100)]
ASoC: wm_adsp: Split out struct cs_dsp from struct wm_adsp

In preparation for moving the generic DSP support out of ASoC split
struct wm_adsp into two parts, one will form the structure for the new
generic DSP code and embed that one into wm_adsp.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-15-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: wm_adsp: move firmware loading to client
Simon Trimmer [Mon, 13 Sep 2021 16:00:54 +0000 (17:00 +0100)]
ASoC: wm_adsp: move firmware loading to client

This is preparation for moving the generic DSP support out of ASoC.
Passing the firmware as parameters into the power_up functions
simplifies the generic code that will be moved out of wm_adsp.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-14-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: wm_adsp: Pass firmware names as parameters when starting DSP core
Simon Trimmer [Mon, 13 Sep 2021 16:00:53 +0000 (17:00 +0100)]
ASoC: wm_adsp: Pass firmware names as parameters when starting DSP core

As preparation for moving the generic DSP support out of ASoC pass the
firmware names used when loading files as parameters as the generic code
can't refer directly to the array specific to wm_adsp. The code
remaining in wm_adsp.c doesn't need to change, it can continue to use
the string arrays directly.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-13-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: wm_adsp: Move check of dsp->running to better place
Simon Trimmer [Mon, 13 Sep 2021 16:00:52 +0000 (17:00 +0100)]
ASoC: wm_adsp: Move check of dsp->running to better place

In preparation for moving the generic DSP support out of ASoC, move
the check of dsp->running to a more appropriate place that will move
to the generic code.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-12-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: wm_adsp: Separate generic cs_dsp_coeff_ctl handling
Simon Trimmer [Mon, 13 Sep 2021 16:00:51 +0000 (17:00 +0100)]
ASoC: wm_adsp: Separate generic cs_dsp_coeff_ctl handling

This is preparation for moving the generic DSP support out of ASoC. The
majority of the handling of firmware controls is generic and this change
separates the generic and ASoC specific details into separate structures
and functions and renames the generic code named wm_* to cs_*.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-11-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: wm_adsp: Move sys_config_size to wm_adsp
Charles Keepax [Mon, 13 Sep 2021 16:00:50 +0000 (17:00 +0100)]
ASoC: wm_adsp: Move sys_config_size to wm_adsp

sys_config_size is part of the compressed stream support, move it from
what will become generic DSP code so that it remains in ASoC.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-10-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: wm_adsp: Split DSP power operations into helper functions
Simon Trimmer [Mon, 13 Sep 2021 16:00:49 +0000 (17:00 +0100)]
ASoC: wm_adsp: Split DSP power operations into helper functions

This is preparation for moving the generic DSP support out of
ASoC. This change separates the generic handling of power and state
transitions from the DAPM API wrapper.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-9-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: wm_adsp: Separate some ASoC and generic functions
Simon Trimmer [Mon, 13 Sep 2021 16:00:48 +0000 (17:00 +0100)]
ASoC: wm_adsp: Separate some ASoC and generic functions

Split some functions into ASoC and generic portions so that existing
interfaces can be retained whilst allowing the implementation to be
moved out of ASoC.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-8-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: wm_adsp: Introduce cs_dsp logging macros
Simon Trimmer [Mon, 13 Sep 2021 16:00:47 +0000 (17:00 +0100)]
ASoC: wm_adsp: Introduce cs_dsp logging macros

In preparation for moving the generic DSP support out of ASoC, add
some new logging macros that will be used from the generic code.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-7-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: wm_adsp: Rename generic DSP support
Simon Trimmer [Mon, 13 Sep 2021 16:00:46 +0000 (17:00 +0100)]
ASoC: wm_adsp: Rename generic DSP support

This rename is preparation for moving the generic DSP support out of
ASoC, generic code named wm_* will be renamed to cs_*.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-6-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: wm_adsp: Cancel ongoing work when removing controls
Simon Trimmer [Mon, 13 Sep 2021 16:00:45 +0000 (17:00 +0100)]
ASoC: wm_adsp: Cancel ongoing work when removing controls

Removes wm_adsp_ctl_work and integrates the work_struct into
wm_coeff_ctl so it may be referenced.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-5-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: wm_adsp: Switch to using wm_coeff_read_ctrl for compressed buffers
Charles Keepax [Mon, 13 Sep 2021 16:00:44 +0000 (17:00 +0100)]
ASoC: wm_adsp: Switch to using wm_coeff_read_ctrl for compressed buffers

When parsing a compressed buffer from the firmware the driver currently
open codes reading the firmware coefficient containing the buffer
description. Improve this slightly by using the coefficient read
functions already provided by the wm_adsp driver. It is worth noting
this change requires the running variable to be set before
wm_adsp_buffer_init is called, however this is safe, since its all still
under the power lock and nothing in the compressed code gates itself on
running.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-4-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: wm_adsp: Move check for control existence
Charles Keepax [Mon, 13 Sep 2021 16:00:43 +0000 (17:00 +0100)]
ASoC: wm_adsp: Move check for control existence

Checking earlier in the function if a control already exists avoids
superfluous string construction and also prepares for future
refactoring.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-3-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: wm_adsp: Remove use of snd_ctl_elem_type_t
Simon Trimmer [Mon, 13 Sep 2021 16:00:42 +0000 (17:00 +0100)]
ASoC: wm_adsp: Remove use of snd_ctl_elem_type_t

In preparation for moving the generic DSP support out of ASoC, remove
the use of the ALSA specific types for the control type. The use of an
ALSA type was unnecessary, the simplified code is easier to read and
avoids Sparse warnings.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-2-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: pl1022_rdk: Update to modern clocking terminology
Mark Brown [Tue, 21 Sep 2021 21:35:42 +0000 (22:35 +0100)]
ASoC: pl1022_rdk: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the pl1022_rdk driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210921213542.31688-16-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: pl1022_ds: Update to modern clocking terminology
Mark Brown [Tue, 21 Sep 2021 21:35:41 +0000 (22:35 +0100)]
ASoC: pl1022_ds: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the pl1022_ds driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210921213542.31688-15-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mpc8610_hpcd: Update to modern clocking terminology
Mark Brown [Tue, 21 Sep 2021 21:35:40 +0000 (22:35 +0100)]
ASoC: mpc8610_hpcd: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the mpc8610_hpcd driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210921213542.31688-14-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: imx-sgtl5000: Update to modern clocking terminology
Mark Brown [Tue, 21 Sep 2021 21:35:39 +0000 (22:35 +0100)]
ASoC: imx-sgtl5000: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the imx-sgtl5000 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210921213542.31688-13-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: imx-rpmsg: Update to modern clocking terminology
Mark Brown [Tue, 21 Sep 2021 21:35:38 +0000 (22:35 +0100)]
ASoC: imx-rpmsg: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the imx-rpmsg driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210921213542.31688-12-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: imx-hdmi: Update to modern clocking terminology
Mark Brown [Tue, 21 Sep 2021 21:35:37 +0000 (22:35 +0100)]
ASoC: imx-hdmi: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the imx-hdmi driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210921213542.31688-11-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: imx-es8328: Update to modern clocking terminology
Mark Brown [Tue, 21 Sep 2021 21:35:36 +0000 (22:35 +0100)]
ASoC: imx-es8328: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the imx-es8328 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210921213542.31688-10-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: imx-card: Update to modern clocking terminology
Mark Brown [Tue, 21 Sep 2021 21:35:35 +0000 (22:35 +0100)]
ASoC: imx-card: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the imx-card driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210921213542.31688-9-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: imx-audmix: Update to modern clocking terminology
Mark Brown [Tue, 21 Sep 2021 21:35:34 +0000 (22:35 +0100)]
ASoC: imx-audmix: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the imx-audmix driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210921213542.31688-8-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: fsl_ssi: Update to modern clocking terminology
Mark Brown [Tue, 21 Sep 2021 21:35:33 +0000 (22:35 +0100)]
ASoC: fsl_ssi: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the fsl_ssi driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210921213542.31688-7-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: fsl_sai: Update to modern clocking terminology
Mark Brown [Tue, 21 Sep 2021 21:35:32 +0000 (22:35 +0100)]
ASoC: fsl_sai: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the fsl_sai driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210921213542.31688-6-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: fsl-mqs: Update to modern clocking terminology
Mark Brown [Tue, 21 Sep 2021 21:35:31 +0000 (22:35 +0100)]
ASoC: fsl-mqs: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the fsl-mqs driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210921213542.31688-5-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: fsl-esai: Update to modern clocking terminology
Mark Brown [Tue, 21 Sep 2021 21:35:30 +0000 (22:35 +0100)]
ASoC: fsl-esai: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the fsl-esai driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210921213542.31688-4-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: fsl-audmix: Update to modern clocking terminology
Mark Brown [Tue, 21 Sep 2021 21:35:29 +0000 (22:35 +0100)]
ASoC: fsl-audmix: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the fsl-audmix driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210921213542.31688-3-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: fsl-asoc-card: Update to modern clocking terminology
Mark Brown [Tue, 21 Sep 2021 21:35:28 +0000 (22:35 +0100)]
ASoC: fsl-asoc-card: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the fsl-asoc-card driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210921213542.31688-2-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: eureka-tlv320: Update to modern clocking terminology
Mark Brown [Tue, 21 Sep 2021 21:35:27 +0000 (22:35 +0100)]
ASoC: eureka-tlv320: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the eureka-tlv320 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210921213542.31688-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: cros_ec_codec: Use modern ASoC DAI format terminology
Mark Brown [Mon, 20 Sep 2021 17:04:14 +0000 (18:04 +0100)]
ASoC: cros_ec_codec: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the cros_ec_codec driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20210920170414.17903-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: Fix warning related to 'sound-name-prefix' binding
Sameer Pujar [Tue, 21 Sep 2021 15:41:00 +0000 (21:11 +0530)]
ASoC: Fix warning related to 'sound-name-prefix' binding

commit 82d3ec1d89fa ("ASoC: Use schema reference for sound-name-prefix")
added name-prefix.yaml schema and the same reference was used in couple
of other schemas. But this is causing following warning and the same is
fixed in current patch.

 Documentation/devicetree/bindings/sound/nxp,tfa989x.example.dt.yaml:
 audio-codec@34: 'sound-name-prefix' does not match any of the regexes:
 'pinctrl-[0-9]+'
  From schema: Documentation/devicetree/bindings/sound/nxp,tfa989x.yaml
 Documentation/devicetree/bindings/sound/nxp,tfa989x.example.dt.yaml:
 audio-codec@36: 'sound-name-prefix' does not match any of the regexes:
 'pinctrl-[0-9]+'
  From schema: Documentation/devicetree/bindings/sound/nxp,tfa989x.yaml

Fixes: 82d3ec1d89fa ("ASoC: Use schema reference for sound-name-prefix")
Reported-by: Rob Herring <robh+dt@kernel.org>
Suggested-by: Rob Herring <robh+dt@kernel.org>
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/1632238860-16947-1-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: qdsp6: q6afe-dai: Fix spelling mistake "Fronend" -> "Frontend"
Colin Ian King [Mon, 20 Sep 2021 18:41:52 +0000 (19:41 +0100)]
ASoC: qdsp6: q6afe-dai: Fix spelling mistake "Fronend" -> "Frontend"

There is a spelling mistake in the module description. Fix it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210920184152.18109-1-colin.king@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: fsl_spdif: Add support for i.MX8ULP
Shengjiu Wang [Fri, 10 Sep 2021 01:49:22 +0000 (09:49 +0800)]
ASoC: fsl_spdif: Add support for i.MX8ULP

On i.MX8ULP the spdif works with EDMA, so add compatible
string and soc specific data for i.MX8ULP.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1631238562-27081-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: fsl: Constify static snd_soc_ops
Rikard Falkeborn [Mon, 20 Sep 2021 19:39:47 +0000 (21:39 +0200)]
ASoC: fsl: Constify static snd_soc_ops

These are only assigned to the ops field in the snd_soc_dai_link struct
which is a pointer to const struct snd_soc_ops. Make them const to allow
the compiler to put them in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20210920193947.10237-1-rikard.falkeborn@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: Drop mistakenly applied SPI patch
Mark Brown [Mon, 20 Sep 2021 15:21:19 +0000 (16:21 +0100)]
ASoC: Drop mistakenly applied SPI patch

Revert 6e8cc4ddce828 ("spi: tegra20-slink: Declare runtime suspend and
resume functions conditionally") which was mistakenly applied to the
ASoC tree not the SPI tree (where it was also applied.

Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoMerge series "ASoC: compress: Support module_get on stream open" from Peter Ujfalusi...
Mark Brown [Mon, 20 Sep 2021 14:46:54 +0000 (15:46 +0100)]
Merge series "ASoC: compress: Support module_get on stream open" from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

Hi,

SOF is marking all componet drivers with module_get_upon_open = 1 which works
fine with normal PCM streams, however on compressed side the module get upon
open is not supported. The module_get works when module_get_upon_open is not set
becasue the snd_soc_component_module_get_when_probe() will pass NULL for the
substream parameter of snd_soc_component_module_get().

In order to re-use the existing infrastructure for module_get, the proposal is
to convert the mark_module to void pointer (like the pm mark) and implement
matching code for the compressed open/free to pcm open/close.

Regards,
Peter
---
Peter Ujfalusi (2):
  ASoC: soc-component: Convert the mark_module to void*
  ASoC: compress/component: Use module_get_when_open/put_when_close for
    cstream

 include/sound/soc-component.h | 14 ++++----
 sound/soc/soc-component.c     | 61 +++++++++++++++--------------------
 sound/soc/soc-compress.c      | 43 +++++++++++++++++++++---
 3 files changed, 71 insertions(+), 47 deletions(-)

--
2.33.0

2 years agoMerge series "Extend AHUB audio support for Tegra210 and later" from Sameer Pujar...
Mark Brown [Mon, 20 Sep 2021 14:46:53 +0000 (15:46 +0100)]
Merge series "Extend AHUB audio support for Tegra210 and later" from Sameer Pujar <spujar@nvidia.com>:

Earlier as part of series [0], support for ADMAIF and I/O modules (such
as I2S, DMIC and DSPK) was added. This series aims at exposing some of
the AHUB internal modules (listed below), which can be used for audio
pre or post processing.

  * SFC (Sampling Frequency Converter)
  * MVC (Master Volume Control)
  * AMX (Audio Multiplexer)
  * ADX (Audio Demultiplexer)
  * Mixer

These modules can be plugged into audio paths and relevant processing
can be done. The MUX routes are extended to allow add or remove above
modules in the path via mixer controls. This is similar to how specific
ADMAIF channels are connected to relevant I/O module instances at the
moment.

Some of these modules can alter PCM parameters. Consider example of
resampler (44.1 -> 48 kHz) in the path.

  aplay(44.1 kHz) -> ADMAIF -> SFC -> (48 kHz) I2S -> (48kHz) Codec

The modules following SFC should be using converted sample rate and DAIs
need to be configured accordingly. The audio-graph driver provides a
mechanism to fixup the new parameters which can be specified in DT for a
given DAI. Then core uses these new values via fixup callback and then
pass it to respective DAIs hw_param() callback. The "convert-rate",
described in [1], property can be used when there is rate conversion in
the audio path. Similarly "convert-channels" can be used when there is
channel conversion in the path. There is no "convert-xxx" property for
sample size conversions. It can be added if necessary.

[0] https://www.lkml.org/lkml/2020/7/21/1357
[1] Documentation/devicetree/bindings/sound/audio-graph-port.yaml

Changelog
=========

v1 -> v2
--------
 * Put comments for soft reset application in the drivers.
 * Split out mute/volume control logic in put() calls of MVC driver and
   use separate callbacks for the respective kcontrols.
 * Update kcontrol put() callback in MVC driver to return 1 whenever
   there is change. Similar change is done in other drivers too.
 * Use name-prefix.yaml reference for the driver documentation now.
 * Add sound-name-prefix pattern for MIXER driver and use prefix
   accordingly in DT.

Sameer Pujar (13):
  ASoC: soc-pcm: Don't reconnect an already active BE
  ASoC: simple-card-utils: Increase maximum DAI links limit to 512
  ASoC: audio-graph: Fixup CPU endpoint hw_params in a BE<->BE link
  ASoC: dt-bindings: tegra: Few more Tegra210 AHUB modules
  ASoC: tegra: Add routes for few AHUB modules
  ASoC: tegra: Add Tegra210 based MVC driver
  ASoC: tegra: Add Tegra210 based SFC driver
  ASoC: tegra: Add Tegra210 based AMX driver
  ASoC: tegra: Add Tegra210 based ADX driver
  ASoC: tegra: Add Tegra210 based Mixer driver
  arm64: defconfig: Enable few Tegra210 based AHUB drivers
  arm64: tegra: Add few AHUB devices for Tegra210 and later
  arm64: tegra: Extend APE audio support on Jetson platforms

 .../bindings/sound/nvidia,tegra210-adx.yaml        |   76 +
 .../bindings/sound/nvidia,tegra210-ahub.yaml       |   20 +
 .../bindings/sound/nvidia,tegra210-amx.yaml        |   76 +
 .../bindings/sound/nvidia,tegra210-mixer.yaml      |   74 +
 .../bindings/sound/nvidia,tegra210-mvc.yaml        |   76 +
 .../bindings/sound/nvidia,tegra210-sfc.yaml        |   73 +
 arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts | 1554 ++++++++-
 arch/arm64/boot/dts/nvidia/tegra186.dtsi           |  120 +
 arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts | 1493 +++++++-
 .../arm64/boot/dts/nvidia/tegra194-p3509-0000.dtsi | 1520 ++++++++-
 arch/arm64/boot/dts/nvidia/tegra194.dtsi           |  116 +
 arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts |  876 +++++
 arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts |  876 +++++
 arch/arm64/boot/dts/nvidia/tegra210.dtsi           |   77 +
 arch/arm64/configs/defconfig                       |    5 +
 include/sound/simple_card_utils.h                  |    2 +-
 sound/soc/generic/audio-graph-card.c               |    4 +-
 sound/soc/soc-pcm.c                                |    4 +
 sound/soc/tegra/Kconfig                            |   48 +
 sound/soc/tegra/Makefile                           |   10 +
 sound/soc/tegra/tegra210_adx.c                     |  531 +++
 sound/soc/tegra/tegra210_adx.h                     |   72 +
 sound/soc/tegra/tegra210_ahub.c                    |  511 ++-
 sound/soc/tegra/tegra210_amx.c                     |  600 ++++
 sound/soc/tegra/tegra210_amx.h                     |   93 +
 sound/soc/tegra/tegra210_mixer.c                   |  674 ++++
 sound/soc/tegra/tegra210_mixer.h                   |  100 +
 sound/soc/tegra/tegra210_mvc.c                     |  645 ++++
 sound/soc/tegra/tegra210_mvc.h                     |  117 +
 sound/soc/tegra/tegra210_sfc.c                     | 3549 ++++++++++++++++++++
 sound/soc/tegra/tegra210_sfc.h                     |   78 +
 31 files changed, 13647 insertions(+), 423 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-adx.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-amx.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-mixer.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-mvc.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-sfc.yaml
 create mode 100644 sound/soc/tegra/tegra210_adx.c
 create mode 100644 sound/soc/tegra/tegra210_adx.h
 create mode 100644 sound/soc/tegra/tegra210_amx.c
 create mode 100644 sound/soc/tegra/tegra210_amx.h
 create mode 100644 sound/soc/tegra/tegra210_mixer.c
 create mode 100644 sound/soc/tegra/tegra210_mixer.h
 create mode 100644 sound/soc/tegra/tegra210_mvc.c
 create mode 100644 sound/soc/tegra/tegra210_mvc.h
 create mode 100644 sound/soc/tegra/tegra210_sfc.c
 create mode 100644 sound/soc/tegra/tegra210_sfc.h

--
2.7.4

2 years agoASoC: codecs: max98390: simplify getting the adapter of a client
Wolfram Sang [Sat, 18 Sep 2021 21:35:52 +0000 (23:35 +0200)]
ASoC: codecs: max98390: simplify getting the adapter of a client

We have a dedicated pointer for that, so use it. Much easier to read and
less computation involved.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20210918213553.14514-2-wsa+renesas@sang-engineering.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: Intel: boards: Update to modern clocking terminology
Peter Ujfalusi [Mon, 20 Sep 2021 06:55:08 +0000 (09:55 +0300)]
ASoC: Intel: boards: Update to modern clocking terminology

As part of the effort to remove our old APIs based on outdated terminology
update the Intel board drivers to use modern terminology.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Link: https://lore.kernel.org/r/20210920065508.7854-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: dt-bindings: rt5682s: correct several errors
Krzysztof Kozlowski [Mon, 20 Sep 2021 11:21:06 +0000 (13:21 +0200)]
ASoC: dt-bindings: rt5682s: correct several errors

Correct several errors in rt5682s dtschema:
1. The examples should be under "examples":
    'example' is not one of ['$id', '$schema', 'title', 'description', 'examples', ...

2. Missing type for vendor properties

3. clock-names should be an array:
    properties:clock-names:items: {'const': 'mclk'} is not of type 'array'

4. Example DTS should include headers:
    [scripts/Makefile.lib:386: Documentation/devicetree/bindings/sound/realtek,rt5682s.example.dt.yaml] Error 1

5. Node name in example DTS misses unit address and does not match DT
   convention (generic name):
    Warning (reg_format): /example-0/rt5682s:reg: property has invalid length (4 bytes) (#address-cells == 1, #size-cells == 1)

6. Node address should be in size-cells:0 block in example DTS:
    Warning (reg_format): /example-0/codec@1a:reg: property has invalid length (4 bytes) (#address-cells == 1, #size-cells == 1)

Fixes: 50159fdb144b ("ASoC: dt-bindings: rt5682s: add bindings for rt5682s")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link: https://lore.kernel.org/r/20210920112106.140918-1-krzysztof.kozlowski@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: ab8500: Update to modern clocking terminology
Mark Brown [Thu, 16 Sep 2021 14:13:35 +0000 (15:13 +0100)]
ASoC: ab8500: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the ab8500 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20210916141335.43818-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: Remove struct sof_ops_table and sof_get_ops() macro
Peter Ujfalusi [Mon, 20 Sep 2021 06:41:56 +0000 (09:41 +0300)]
ASoC: SOF: Remove struct sof_ops_table and sof_get_ops() macro

sof_get_ops() is not used and the struct sof_ops_table is only used by that
macro.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210920064156.4763-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: rt5682s: make rt5682s_aif2_dai_ops and rt5682s_soc_component_dev
Jiapeng Chong [Sat, 18 Sep 2021 09:02:06 +0000 (17:02 +0800)]
ASoC: rt5682s: make rt5682s_aif2_dai_ops and rt5682s_soc_component_dev

This symbol is not used outside of rt5682s.c, so marks it static.

Fix the following sparse warning:

sound/soc/codecs/rt5682s.c:2848:39: warning: symbol
'rt5682s_soc_component_dev' was not declared. Should it be static?

sound/soc/codecs/rt5682s.c:2842:30: warning: symbol
'rt5682s_aif2_dai_ops' was not declared. Should it be static?

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Link: https://lore.kernel.org/r/1631955726-77693-1-git-send-email-jiapeng.chong@linux.alibaba.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: tegra: Add Tegra210 based Mixer driver
Sameer Pujar [Mon, 13 Sep 2021 16:42:18 +0000 (22:12 +0530)]
ASoC: tegra: Add Tegra210 based Mixer driver

The Mixer supports mixing of up to ten 7.1 audio input streams and
generate five outputs (each of which can be any combination of the
ten input streams)

This patch registers Mixer driver with ASoC framework. The component
driver exposes DAPM widgets, routes and kcontrols for the device.
The DAI driver exposes Mixer interfaces, which can be used to connect
different components in the ASoC layer. Makefile and Kconfig support
is added to allow build the driver. It can be enabled in the DT via
"nvidia,tegra210-amixer" compatible binding.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/1631551342-25469-11-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: tegra: Add Tegra210 based ADX driver
Sameer Pujar [Mon, 13 Sep 2021 16:42:17 +0000 (22:12 +0530)]
ASoC: tegra: Add Tegra210 based ADX driver

The Audio Demultiplexer (ADX) block takes an input stream with up to
16 channels and demultiplexes it into four output streams of up to 16
channels each. A byte RAM helps to form output frames by any combination
of bytes from the input frame. Its design is identical to that of byte
RAM in the AMX except that the data flow direction is reversed.

This patch registers ADX driver with ASoC framework. The component driver
exposes DAPM widgets, routes and kcontrols for the device. The DAI driver
exposes ADX interfaces, which can be used to connect different components
in the ASoC layer. Makefile and Kconfig support is added to allow build
the driver. It can be enabled in the DT via "nvidia,tegra210-adx"
compatible binding.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/1631551342-25469-10-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: tegra: Add Tegra210 based AMX driver
Sameer Pujar [Mon, 13 Sep 2021 16:42:16 +0000 (22:12 +0530)]
ASoC: tegra: Add Tegra210 based AMX driver

The Audio Multiplexer (AMX) block can multiplex up to four input streams
each of which can have maximum 16 channels and generate an output stream
with maximum 16 channels. A byte RAM helps to form an output frame by
any combination of bytes from the input frames.

This patch registers AMX driver with ASoC framework. The component driver
exposes DAPM widgets, routes and kcontrols for the device. The DAI driver
exposes AMX interfaces, which can be used to connect different components
in the ASoC layer. Makefile and Kconfig support is added to allow build
the driver. It can be enabled in the DT via "nvidia,tegra210-amx" for
Tegra210 and Tegra186. For Tegra194 and later, "nvidia,tegra194-amx" can
be used.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/1631551342-25469-9-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: tegra: Add Tegra210 based SFC driver
Sameer Pujar [Mon, 13 Sep 2021 16:42:15 +0000 (22:12 +0530)]
ASoC: tegra: Add Tegra210 based SFC driver

The Sampling Frequency Converter (SFC) converts the sampling frequency
of the input signal from one frequency to another. It supports sampling
frequency conversions of streams of up to two channels (stereo).

This patch registers SFC driver with ASoC framework. The component driver
exposes DAPM widgets, routes and kcontrols for the device. The DAI driver
exposes SFC interfaces, which can be used to connect different components
in the ASoC layer. Makefile and Kconfig support is added to allow build
the driver. It can be enabled in the DT via "nvidia,tegra210-sfc"
compatible binding.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/1631551342-25469-8-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: tegra: Add Tegra210 based MVC driver
Sameer Pujar [Mon, 13 Sep 2021 16:42:14 +0000 (22:12 +0530)]
ASoC: tegra: Add Tegra210 based MVC driver

The Master Volume Control (MVC) provides gain or attenuation to a digital
signal path. It can be used in input or output signal path for per-stream
volume control or it can be used as master volume control. The MVC block
has one input and one output. The input digital stream can be mono or
multi-channel (up to 7.1 channels) stream. An independent mute control is
also included in the MVC block.

This patch registers MVC driver with ASoC framework. The component driver
exposes DAPM widgets, routes and kcontrols for the device. The DAI driver
exposes MVC interfaces, which can be used to connect different components
in the ASoC layer. Makefile and Kconfig support is added to allow build
the driver. It can be enabled in the DT via "nvidia,tegra210-mvc"
compatible binding.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/1631551342-25469-7-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: tegra: Add routes for few AHUB modules
Sameer Pujar [Mon, 13 Sep 2021 16:42:13 +0000 (22:12 +0530)]
ASoC: tegra: Add routes for few AHUB modules

Add routing support for following modules of AHUB:
 * SFC (Sampling Frequency Converter)
 * MVC (Master Volume Control)
 * AMX (Audio Multiplexer)
 * ADX (Audio Demultiplexer)
 * Mixer

These modules can be plugged into audio path as per the need using
routing controls similar to the already existing routes to I/O modules
such as I2S, DMIC and DSPK.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/1631551342-25469-6-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: dt-bindings: tegra: Few more Tegra210 AHUB modules
Sameer Pujar [Mon, 13 Sep 2021 16:42:12 +0000 (22:12 +0530)]
ASoC: dt-bindings: tegra: Few more Tegra210 AHUB modules

This patch adds YAML schema for DT bindings of few AHUB modules.
These devices will be registered as ASoC components and bindings
will be used on Tegra210 and later chips. The bindings for below
mentioned modules are added:

 * SFC (Sampling Frequency Converter)
 * MVC (Master Volume Control)
 * AMX (Audio Multiplexer)
 * ADX (Audio Demultiplexer)
 * Mixer

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Cc: Rob Herring <robh+dt@kernel.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/1631551342-25469-5-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: audio-graph: Fixup CPU endpoint hw_params in a BE<->BE link
Sameer Pujar [Mon, 13 Sep 2021 16:42:11 +0000 (22:12 +0530)]
ASoC: audio-graph: Fixup CPU endpoint hw_params in a BE<->BE link

When multiple components are connected back to back in an audio path,
hw_param fixup may be required for CPU or Codec endpoint of BE<->BE
DAI links. Currently fixup support is available for Codec and this
commit adds similar feature for CPU endpoint of a BE<->BE link.

For example a resampler component can be plugged into an audio path.
  [ FE -> BE1 -> ... -> resampler -> ... BEn ]

The resampler DAI links can be:
  BEx (CPU)              -> resampler input (Codec)
  resampler output (CPU) -> BEy (Codec)

Thus input and output sample rate parameters for resampler can be
fixed up as per the resample requirement.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/1631551342-25469-4-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: simple-card-utils: Increase maximum DAI links limit to 512
Sameer Pujar [Mon, 13 Sep 2021 16:42:10 +0000 (22:12 +0530)]
ASoC: simple-card-utils: Increase maximum DAI links limit to 512

The current limit of 128 is not sufficient when more components are
added to the audio map on Tegra210 and later platforms. Thus it is
resulting in probe failure.

The requirement is of nearly ~200 DAI links. To give sufficient room
for future additions the maximum limit is increased to 512 DAI links.
This is a preparatory patch to add more components like resampler,
mixer, multiplexers, demultiplexers and volume controllers to Tegra210
and later platforms.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/1631551342-25469-3-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: soc-pcm: Don't reconnect an already active BE
Sameer Pujar [Mon, 13 Sep 2021 16:42:09 +0000 (22:12 +0530)]
ASoC: soc-pcm: Don't reconnect an already active BE

In some cases, multiple FE components have the same BE component in their
respective DPCM paths. One such example would be a mixer component, which
can receive two or more inputs and sends a mixed output. In such cases,
to avoid reconfiguration of already active DAI (mixer output DAI in this
case), check the BE stream state to filter out the redundancy.

In summary, allow connection of BE if the respective current stream state
is either NEW or CLOSED.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/1631551342-25469-2-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: compress/component: Use module_get_when_open/put_when_close for cstream
Peter Ujfalusi [Wed, 1 Sep 2021 09:52:55 +0000 (12:52 +0300)]
ASoC: compress/component: Use module_get_when_open/put_when_close for cstream

Currently the try_module_get() and module_put() is not possible for
compressed streams if the module_get_upon_open is set to 1 which means that\
the components are not protected in a same way as components when normal
audio is used.

SOF is setting module_get_upon_open to 1 for component drivers which works
correctly for audio stream but when compressed stream is used then the
module is not protected.

Convert the compress open and free operation to mimic the steps of it's
pcm counterpart to fix this issue.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20210901095255.3617-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: soc-component: Convert the mark_module to void*
Peter Ujfalusi [Wed, 1 Sep 2021 09:52:54 +0000 (12:52 +0300)]
ASoC: soc-component: Convert the mark_module to void*

The mark_module of the snd_soc_component is strict snd_pcm_substream type
which prevents it to be used by compressed streams.

Change the type to void* along with the snd_soc_component_module_get()
and snd_soc_component_module_put() to allow the same mark to be used by
compressed when it's module_get_upon_open is set to 1.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20210901095255.3617-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoMerge series "ASoC: SOF: ipc: Small cleanups for message handler functions" from...
Mark Brown [Fri, 17 Sep 2021 13:56:43 +0000 (14:56 +0100)]
Merge series "ASoC: SOF: ipc: Small cleanups for message handler functions" from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

Hi,

Rename the parameter for ipc_trace_message() to match it's content and use
%#x" for hexadecimal prints in remaining places.

Regards,
Peter
---
Peter Ujfalusi (2):
  ASoC: SOF: ipc: Clarify the parameter name for ipc_trace_message()
  ASoC: SOF: ipc: Print 0x prefix for errors in
    ipc_trace/stream_message()

 sound/soc/sof/ipc.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

--
2.33.0

2 years agoASoC: 88pm860x: Update to modern clocking terminology
Mark Brown [Thu, 16 Sep 2021 14:08:47 +0000 (15:08 +0100)]
ASoC: 88pm860x: Update to modern clocking terminology

As part of moving to remove the old style defines for the bus clocks update
the 88pm860x driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210916140847.50900-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: Rename sof_arch_ops to dsp_arch_ops
Peter Ujfalusi [Thu, 16 Sep 2021 13:03:08 +0000 (16:03 +0300)]
ASoC: SOF: Rename sof_arch_ops to dsp_arch_ops

From the name sof_arch_ops one can not decipher that these ops are DSP
architecture ops.
Rename it to dsp_arch_ops and change also the macro to retrieve the DSP
architecture specific ops as well.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210916130308.7969-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: ipc: Remove redundant error check from sof_ipc_tx_message_unlocked
Peter Ujfalusi [Thu, 16 Sep 2021 12:57:25 +0000 (15:57 +0300)]
ASoC: SOF: ipc: Remove redundant error check from sof_ipc_tx_message_unlocked

If the snd_sof_dsp_send_msg() failed then we have already returned from
sof_ipc_tx_message_unlocked() with the error message.

There is no need to check if ret is really 0 after this and we can return
directly the return value from tx_wait_done()

At the same time make the remaining checks for error (ret) to match.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210916125725.25934-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: ipc: Print 0x prefix for errors in ipc_trace/stream_message()
Peter Ujfalusi [Fri, 17 Sep 2021 08:58:23 +0000 (11:58 +0300)]
ASoC: SOF: ipc: Print 0x prefix for errors in ipc_trace/stream_message()

The dev_err() in ipc_trace_message() and ipc_stream_message() is missing
the 0x prefix for the hexadecimal number when printed.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20210917085823.27222-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: ipc: Clarify the parameter name for ipc_trace_message()
Peter Ujfalusi [Fri, 17 Sep 2021 08:58:22 +0000 (11:58 +0300)]
ASoC: SOF: ipc: Clarify the parameter name for ipc_trace_message()

ipc_trace_message() receives the type not the ID.
Use the same naming as the ipc_stream_message() function: msg_type to
help the reader to follow the code.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Link: https://lore.kernel.org/r/20210917085823.27222-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoMerge series "ASoC: cs42l42: Implement Manual Type detection as fallback" from Vitaly...
Mark Brown [Thu, 16 Sep 2021 15:06:47 +0000 (16:06 +0100)]
Merge series "ASoC: cs42l42: Implement Manual Type detection as fallback" from Vitaly Rodionov <vitalyr@opensource.cirrus.com>:

For some headsets CS42L42 autodetect mode is not working correctly.
They will be detected as unknown types or as headphones. According
to the CS42L42 datasheet, if the headset autodetect failed,
then the driver should switch to manual mode and perform a manual steps sequence.
These steps were missing in the current driver code. This patch will add manual
mode fallback steps in case autodetect failed. The default behavior is not affected,
manual mode runs only when autodetect failed.

Tested for regression with autodetect with all known headsets - no regression.
Tested with all headsets customers reported as false detected:
Gumdrop DropTech B1 - detected as headset OK
HUAWEI AM115 - detected as headset OK
UGREEN EP103 - detected as headset OK
HONOR AM116 - detected as headset OK

Stefan Binding (1):
  ASoC: cs42l42: Implement Manual Type detection as fallback

 sound/soc/codecs/cs42l42.c | 104 ++++++++++++++++++++++++++++++++-----
 sound/soc/codecs/cs42l42.h |  54 +++++++++++++++++++
 2 files changed, 146 insertions(+), 12 deletions(-)

--
2.25.1