platform/kernel/linux-rpi.git
20 months agoASoC: fsl_ssi: Rename AC'97 streams to avoid collisions with AC'97 CODEC
Mark Brown [Fri, 6 Jan 2023 23:15:06 +0000 (23:15 +0000)]
ASoC: fsl_ssi: Rename AC'97 streams to avoid collisions with AC'97 CODEC

The SSI driver calls the AC'97 playback and transmit streams "AC97 Playback"
and "AC97 Capture" respectively. This is the same name used by the generic
AC'97 CODEC driver in ASoC, creating confusion for the Freescale ASoC card
when it attempts to use these widgets in routing. Add a "CPU" in the name
like the regular DAIs registered by the driver to disambiguate.

Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230106-asoc-udoo-probe-v1-1-a5d7469d4f67@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: dt-bindings: nau8822: add nuvoton,spk-btl property to dtschema
Emanuele Ghidoli [Wed, 4 Jan 2023 19:53:50 +0000 (20:53 +0100)]
ASoC: dt-bindings: nau8822: add nuvoton,spk-btl property to dtschema

Add nuvoton,spk-btl to configure the two loudspeaker outputs
as Bridge Tied Load

Cc: David Lin <CTLIN0@nuvoton.com>
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230104195350.149300-1-francesco@dolcini.it
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: nau8822: add speaker Bridge Tied Output
Mark Brown [Mon, 9 Jan 2023 16:29:02 +0000 (16:29 +0000)]
ASoC: nau8822: add speaker Bridge Tied Output

Merge series from Francesco Dolcini <francesco@dolcini.it>:

Add support for BTL (Bridge Tied Load) configuration to NAU8822 audio codec,
since this requires adding a new property to the binding convert it from
txt to yaml first.

20 months agoAdd support for XCVR on i.MX93 platform
Mark Brown [Mon, 9 Jan 2023 16:28:56 +0000 (16:28 +0000)]
Add support for XCVR on i.MX93 platform

Merge series from Chancel Liu <chancel.liu@nxp.com>:

This patchset supports XCVR on i.MX93 platform.

changes in v2:
- remove unnecessary code which causes kernel test robot reporting error

Chancel Liu (3):
  ASoC: dt-bindings: fsl,xcvr: Add compatible string for i.MX93 platform
  ASoC: fsl_xcvr: Add support for i.MX93 platform
  ASoC: fsl_xcvr: Add constraints of period size while using eDMA

 .../devicetree/bindings/sound/fsl,xcvr.yaml   |   1 +
 sound/soc/fsl/fsl_xcvr.c                      | 155 ++++++++++++------
 sound/soc/fsl/fsl_xcvr.h                      |   7 +
 3 files changed, 115 insertions(+), 48 deletions(-)

--
2.25.1

20 months agoASoC: dt-bindings: qcom,lpass-tx-macro: correct clocks on SC7280
Krzysztof Kozlowski [Sun, 25 Dec 2022 11:59:07 +0000 (12:59 +0100)]
ASoC: dt-bindings: qcom,lpass-tx-macro: correct clocks on SC7280

On SC7280 ADSP bypassed platform, there are only three clocks for TX
macro.  This is already reflected in "clock-names" but not in "clocks"
property:

  sc7280-herobrine-zombie-lte.dtb: codec@3220000: clocks: [[219, 8], [219, 7], [220]] is too short

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20221225115907.55250-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: dt-bindings: qcom,lpass-wsa-macro: correct clocks on SM8250
Krzysztof Kozlowski [Sun, 25 Dec 2022 11:59:06 +0000 (12:59 +0100)]
ASoC: dt-bindings: qcom,lpass-wsa-macro: correct clocks on SM8250

SM8250 DTS uses additional "va" clock in WSA macro device node:

  sm8250-sony-xperia-edo-pdx203.dtb: codec@3240000: clock-names: ['mclk', 'npl', 'macro', 'dcodec', 'va', 'fsgen'] is too long

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20221225115907.55250-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: nau8315: remove dependency on GPIOLIB
Ajye Huang [Sun, 8 Jan 2023 11:43:51 +0000 (19:43 +0800)]
ASoC: nau8315: remove dependency on GPIOLIB

commit dcc2c012c7691 ("ASoC: Fix gpiolib dependencies") removed a
series of unnecessary dependencies on GPIOLIB when the gpio was
optional.

A similar simplification seems valid for nau8315, so remove the
dependency as well. This will avoid the following warning

  WARNING: unmet direct dependencies detected for SND_SOC_NAU8315

   Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] &&
                   GPIOLIB [=n]
   Selected by [y]:

     - SND_SOC_INTEL_SOF_NAU8825_MACH [=y] && SOUND [=y] && !UML &&
       SND [=y] && SND_SOC [=y] && SND_SOC_INTEL_MACH [=y] &&
       (SND_SOC_SOF_HDA_LINK [=y] || SND_SOC_SOF_BAYTRAIL [=n]) &&
       I2C [=y] && ACPI [=y] && SND_HDA_CODEC_HDMI [=y] &&
       SND_SOC_SOF_HDA_AUDIO_CODEC [=y] && (MFD_INTEL_LPSS [=n] ||
       COMPILE_TEST [=y])

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>
Link: https://lore.kernel.org/r/20230108114351.539786-1-ajye_huang@compal.corp-partner.google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: dt-bindings: simple-card: correct DAI subnodes pattern
Krzysztof Kozlowski [Mon, 9 Jan 2023 08:33:01 +0000 (09:33 +0100)]
ASoC: dt-bindings: simple-card: correct DAI subnodes pattern

The simple-audio-card,dai-link node does not allow address/size-cells
thus children (cpu, codec) should come without unit addresses.  For
cases with multiple nodes of same type, require a dash before index
(e.g. cpu-x) and add trailing $ to the pattern to disallow other
characters.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230109083301.76282-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: mediatek: mt8186-rt5682: primary_codec_init() warn: missing error code? 'ret'
Ajye Huang [Sat, 7 Jan 2023 17:59:33 +0000 (01:59 +0800)]
ASoC: mediatek: mt8186-rt5682: primary_codec_init() warn: missing error code? 'ret'

The function primary_codec_init() should return 0 if dmic_sel is null.

Here is the warning message reported by 0-DAY CI Kernel Test Service.

smatch warnings:
primary_codec_init() warn: missing error code? 'ret'
...
2022-11-02  141       if (!priv->dmic_sel) {
2022-11-02  142               dev_info(card->dev, "dmic_sel is null\n");
2022-11-02 @143               return ret;

return -EIVNAL;?  return 0;?

2022-11-02  144       }

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>
Link: https://lore.kernel.org/r/20230107175933.12973-1-ajye_huang@compal.corp-partner.google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: amd: ps: Fix uninitialized ret in create_acp64_platform_devs()
Nathan Chancellor [Fri, 6 Jan 2023 00:43:39 +0000 (17:43 -0700)]
ASoC: amd: ps: Fix uninitialized ret in create_acp64_platform_devs()

Clang warns:

  sound/soc/amd/ps/pci-ps.c:218:2: error: variable 'ret' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized]
          default:
          ^~~~~~~
  sound/soc/amd/ps/pci-ps.c:239:9: note: uninitialized use occurs here
          return ret;
                 ^~~
  sound/soc/amd/ps/pci-ps.c:190:9: note: initialize the variable 'ret' to silence this warning
          int ret;
                 ^
                  = 0
  1 error generated.

ret is used uninitialized if 'goto de_init' is taken. As this is not an
error nor should the ACP be deinitialized, just directly return 0 in
this case statement, which resolves the warning.

Fixes: 1d325cdaf7a2 ("ASoC: amd: ps: refactor platform device creation logic")
Link: https://github.com/ClangBuiltLinux/linux/issues/1779
Suggested-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Syed Saba Kareem <syed.sabakareem@amd.com>
Link: https://lore.kernel.org/r/20230105-wsometimes-uninitialized-pci-ps-c-v2-1-c50321676325@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: dt-bindings: qcom,lpass-cpu: Correct and constrain clocks, interrupts, reg
Krzysztof Kozlowski [Tue, 27 Dec 2022 16:31:35 +0000 (17:31 +0100)]
ASoC: dt-bindings: qcom,lpass-cpu: Correct and constrain clocks, interrupts, reg

The binding allowed multiple variations and number of
reg/interrupts/clocks properties for SC7180 and SC7280.  Maybe this was
done for different use-cases of LPASS CPU audio node, but DTS is
supposed to be a complete picture of the hardware.  The upstreamed
SC7180 and SC7280 DTSes contain the widest set of these
reg/interrupts/clocks, sometimes being even sum of these different
variations.

Correct and narrow the reg, interrupts and clocks to match existing DTS:

  sc7280-herobrine-evoker-lte.dtb: audio@3987000: clock-names: 'oneOf' conditional failed, one must be fixed:
    ['aon_cc_audio_hm_h', 'audio_cc_ext_mclk0', 'core_cc_sysnoc_mport_core', 'core_cc_ext_if0_ibit', 'core_cc_ext_if1_ibit',
     'audio_cc_codec_mem', 'audio_cc_codec_mem0', 'audio_cc_codec_mem1', 'audio_cc_codec_mem2', 'aon_cc_va_mem0'] is too long
    'core_cc_sysnoc_mport_core' was expected
    'audio_cc_codec_mem' was expected
    'audio_cc_codec_mem0' was expected
    'audio_cc_codec_mem1' was expected
    'audio_cc_codec_mem2' was expected
    'aon_cc_va_mem0' was expected

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20221227163135.102559-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: dt-bindings: qcom,lpass-cpu: Fix DAI children pattern
Krzysztof Kozlowski [Tue, 27 Dec 2022 16:31:34 +0000 (17:31 +0100)]
ASoC: dt-bindings: qcom,lpass-cpu: Fix DAI children pattern

DAI children (as subnodes) can come with two-digit unit addresses:

  sc7280-herobrine-crd.dtb: audio@3987000: Unevaluated properties are not allowed ('dai-link@19', 'dai-link@25' were unexpected)

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20221227163135.102559-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: dt-bindings: qcom,lpass-cpu: Document required-opps
Krzysztof Kozlowski [Tue, 27 Dec 2022 16:31:33 +0000 (17:31 +0100)]
ASoC: dt-bindings: qcom,lpass-cpu: Document required-opps

SC7280 LPASS CPU device node comes with required-opps:

  sc7280-herobrine-crd.dtb: audio@3987000: Unevaluated properties are not allowed ('required-opps' was unexpected)

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20221227163135.102559-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: fsl_xcvr: Add constraints of period size while using eDMA
Chancel Liu [Wed, 4 Jan 2023 02:39:53 +0000 (10:39 +0800)]
ASoC: fsl_xcvr: Add constraints of period size while using eDMA

eDMA on i.MX93 platform requires the period size to be multiple of
maxburst.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://lore.kernel.org/r/20230104023953.2973362-4-chancel.liu@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: fsl_xcvr: Add support for i.MX93 platform
Chancel Liu [Wed, 4 Jan 2023 02:39:52 +0000 (10:39 +0800)]
ASoC: fsl_xcvr: Add support for i.MX93 platform

Add compatible string and specific soc data to support XCVR on i.MX93
platform. XCVR IP on i.MX93 is cut to SPDIF only by removing external
PHY.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://lore.kernel.org/r/20230104023953.2973362-3-chancel.liu@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: dt-bindings: fsl,xcvr: Add compatible string for i.MX93 platform
Chancel Liu [Wed, 4 Jan 2023 02:39:51 +0000 (10:39 +0800)]
ASoC: dt-bindings: fsl,xcvr: Add compatible string for i.MX93 platform

Add compatible string "fsl,imx93-xcvr" for i.MX93 platform.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Link: https://lore.kernel.org/r/20230104023953.2973362-2-chancel.liu@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: nau8822: add speaker Bridge Tied Output configuration
Emanuele Ghidoli [Wed, 4 Jan 2023 14:04:12 +0000 (15:04 +0100)]
ASoC: nau8822: add speaker Bridge Tied Output configuration

Allow configuring the two loudspeaker outputs as a
single Bridge Tied Load output getting higher output power.

Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Link: https://lore.kernel.org/r/20230104140412.35575-4-francesco@dolcini.it
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: dt-bindings: nau8822: convert to the dtschema
Emanuele Ghidoli [Wed, 4 Jan 2023 14:04:10 +0000 (15:04 +0100)]
ASoC: dt-bindings: nau8822: convert to the dtschema

Convert nau8822 devicetree binding to dtschema.
Change file name to match dtschema naming.

Cc: David Lin <CTLIN0@nuvoton.com>
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230104140412.35575-2-francesco@dolcini.it
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: dt-bindings: qcom,lpass-tx-macro: correct clocks on SC7280
Krzysztof Kozlowski [Sun, 25 Dec 2022 11:59:07 +0000 (12:59 +0100)]
ASoC: dt-bindings: qcom,lpass-tx-macro: correct clocks on SC7280

On SC7280 ADSP bypassed platform, there are only three clocks for TX
macro.  This is already reflected in "clock-names" but not in "clocks"
property:

  sc7280-herobrine-zombie-lte.dtb: codec@3220000: clocks: [[219, 8], [219, 7], [220]] is too short

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20221225115907.55250-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: dt-bindings: qcom,lpass-wsa-macro: correct clocks on SM8250
Krzysztof Kozlowski [Sun, 25 Dec 2022 11:59:06 +0000 (12:59 +0100)]
ASoC: dt-bindings: qcom,lpass-wsa-macro: correct clocks on SM8250

SM8250 DTS uses additional "va" clock in WSA macro device node:

  sm8250-sony-xperia-edo-pdx203.dtb: codec@3240000: clock-names: ['mclk', 'npl', 'macro', 'dcodec', 'va', 'fsgen'] is too long

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20221225115907.55250-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: qcom: Fix building APQ8016 machine driver without SOUNDWIRE
Stephan Gerhold [Sat, 31 Dec 2022 11:55:06 +0000 (12:55 +0100)]
ASoC: qcom: Fix building APQ8016 machine driver without SOUNDWIRE

Older Qualcomm platforms like APQ8016 do not have hardware support for
SoundWire, so kernel configurations made specifically for those platforms
will usually not have CONFIG_SOUNDWIRE enabled.

Unfortunately commit 8d89cf6ff229 ("ASoC: qcom: cleanup and fix
dependency of QCOM_COMMON") breaks those kernel configurations, because
SOUNDWIRE is now a required dependency for SND_SOC_QCOM_COMMON (and in
turn also SND_SOC_APQ8016_SBC). Trying to migrate such a kernel config
silently disables SND_SOC_APQ8016_SBC and breaks audio functionality.

The soundwire helpers in common.c are only used by two of the Qualcomm
audio machine drivers, so building and requiring CONFIG_SOUNDWIRE for
all platforms is unnecessary.

There is no need to stuff all common code into a single module. Fix the
issue by moving the soundwire helpers to a separate SND_SOC_QCOM_SDW
module/option that is selected only by the machine drivers that make
use of them. This also allows reverting the imply/depends changes from
the previous fix because both SM8250 and SC8280XP already depend on
SOUNDWIRE, so the soundwire helpers will be only built if SOUNDWIRE
is really enabled.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Fixes: 8d89cf6ff229 ("ASoC: qcom: cleanup and fix dependency of QCOM_COMMON")
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20221231115506.82991-1-stephan@gerhold.net
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: fsl_micfil: Correct the number of steps on SX controls
Chancel Liu [Wed, 4 Jan 2023 02:57:54 +0000 (10:57 +0800)]
ASoC: fsl_micfil: Correct the number of steps on SX controls

The parameter "max" of SOC_SINGLE_SX_TLV() means the number of steps
rather than maximum value. This patch corrects the minimum value to -8
and the number of steps to 15.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://lore.kernel.org/r/20230104025754.3019235-1-chancel.liu@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: amd: ps: use static function
Pierre-Louis Bossart [Wed, 4 Jan 2023 14:57:08 +0000 (08:57 -0600)]
ASoC: amd: ps: use static function

Sparse warning:

error: symbol 'acp63_fill_platform_dev_info' was not declared. Should
it be static?

Also reduce line lines below 100 characters.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230104145708.25051-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: amd: ps: remove unused variable
Vijendar Mukunda [Wed, 4 Jan 2023 05:54:31 +0000 (11:24 +0530)]
ASoC: amd: ps: remove unused variable

Remove unused acp63_audio_mode variable.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230104055435.321327-3-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: amd: ps: use acp_lock to protect common registers in pdm driver
Vijendar Mukunda [Wed, 4 Jan 2023 05:54:30 +0000 (11:24 +0530)]
ASoC: amd: ps: use acp_lock to protect common registers in pdm driver

Retrieve acp_lock mutex as platform data and use it for protecting
ACP common registers access in acp pdm driver.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230104055435.321327-2-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: amd: ps: add mutex lock for accessing common registers
Vijendar Mukunda [Wed, 4 Jan 2023 05:54:29 +0000 (11:24 +0530)]
ASoC: amd: ps: add mutex lock for accessing common registers

Add mutex lock for accessing ACP common registers across different
modules.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230104055435.321327-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: Intel: sof-wm8804: Replace open coded acpi_dev_put()
Andy Shevchenko [Mon, 2 Jan 2023 20:30:37 +0000 (22:30 +0200)]
ASoC: Intel: sof-wm8804: Replace open coded acpi_dev_put()

Instead of calling put_device(&adev->dev) where adev is a pointer
to an ACPI device, use specific call, i.e. acpi_dev_put().

Also move it out of the conditional to make it more visible in case
some other code will be added which may use that pointer. We need
to keep a reference as long as we use the pointer.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230102203037.16120-5-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: Intel: cht_bsw_rt5672: Replace open coded acpi_dev_put()
Andy Shevchenko [Mon, 2 Jan 2023 20:30:36 +0000 (22:30 +0200)]
ASoC: Intel: cht_bsw_rt5672: Replace open coded acpi_dev_put()

Instead of calling put_device(&adev->dev) where adev is a pointer
to an ACPI device, use specific call, i.e. acpi_dev_put().

Also move it out of the conditional to make it more visible in case
some other code will be added which may use that pointer. We need
to keep a reference as long as we use the pointer.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230102203037.16120-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: Intel: cht_bsw_rt5645: Replace open coded acpi_dev_put()
Andy Shevchenko [Mon, 2 Jan 2023 20:30:35 +0000 (22:30 +0200)]
ASoC: Intel: cht_bsw_rt5645: Replace open coded acpi_dev_put()

Instead of calling put_device(&adev->dev) where adev is a pointer
to an ACPI device, use specific call, i.e. acpi_dev_put().

Also move it out of the conditional to make it more visible in case
some other code will be added which may use that pointer. We need
to keep a reference as long as we use the pointer.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230102203037.16120-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: Intel: bytcht_da7213: Replace open coded acpi_dev_put()
Andy Shevchenko [Mon, 2 Jan 2023 20:30:34 +0000 (22:30 +0200)]
ASoC: Intel: bytcht_da7213: Replace open coded acpi_dev_put()

Instead of calling put_device(&adev->dev) where adev is a pointer
to an ACPI device, use specific call, i.e. acpi_dev_put().

Also move it out of the conditional to make it more visible in case
some other code will be added which may use that pointer. We need
to keep a reference as long as we use the pointer.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230102203037.16120-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: Intel: bytcht_cx2072x: Replace open coded acpi_dev_put()
Andy Shevchenko [Mon, 2 Jan 2023 20:30:33 +0000 (22:30 +0200)]
ASoC: Intel: bytcht_cx2072x: Replace open coded acpi_dev_put()

Instead of calling put_device(&adev->dev) where adev is a pointer
to an ACPI device, use specific call, i.e. acpi_dev_put().

Also move it out of the conditional to make it more visible in case
some other code will be added which may use that pointer. We need
to keep a reference as long as we use the pointer.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230102203037.16120-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: Intel: sof_ssp_amp: remove unused variable
Brent Lu [Tue, 3 Jan 2023 07:37:04 +0000 (15:37 +0800)]
ASoC: Intel: sof_ssp_amp: remove unused variable

The variable becomes useless since we moved the snd_soc_jack
structure from a static array to sof_hdmi_pcm structure.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230103073704.722027-1-brent.lu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: qcom: lpass-cpu: Fix fallback SD line index handling
Brian Norris [Sat, 31 Dec 2022 06:15:45 +0000 (22:15 -0800)]
ASoC: qcom: lpass-cpu: Fix fallback SD line index handling

These indices should reference the ID placed within the dai_driver
array, not the indices of the array itself.

This fixes commit 4ff028f6c108 ("ASoC: qcom: lpass-cpu: Make I2S SD
lines configurable"), which among others, broke IPQ8064 audio
(sound/soc/qcom/lpass-ipq806x.c) because it uses ID 4 but we'd stop
initializing the mi2s_playback_sd_mode and mi2s_capture_sd_mode arrays
at ID 0.

Fixes: 4ff028f6c108 ("ASoC: qcom: lpass-cpu: Make I2S SD lines configurable")
Cc: <stable@vger.kernel.org>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20221231061545.2110253-1-computersforpeace@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoAdd new AMP MAX98360A for RT5682S
Mark Brown [Thu, 29 Dec 2022 22:49:17 +0000 (22:49 +0000)]
Add new AMP MAX98360A for RT5682S

Merge series from tongjian <tongjian@huaqin.corp-partner.google.com>:

Add MAX98360A for RT5682S, MAX98360A works same as rt1019. So, it can
be supported.

20 months agoASoC: wm8904: fix wrong outputs volume after power reactivation
Emanuele Ghidoli [Fri, 23 Dec 2022 08:02:47 +0000 (09:02 +0100)]
ASoC: wm8904: fix wrong outputs volume after power reactivation

Restore volume after charge pump and PGA activation to ensure
that volume settings are correctly applied when re-enabling codec
from SND_SOC_BIAS_OFF state.
CLASS_W, CHARGE_PUMP and POWER_MANAGEMENT_2 register configuration
affect how the volume register are applied and must be configured first.

Fixes: a91eb199e4dc ("ASoC: Initial WM8904 CODEC driver")
Link: https://lore.kernel.org/all/c7864c35-738c-a867-a6a6-ddf9f98df7e7@gmail.com/
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20221223080247.7258-1-francesco@dolcini.it
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: dt-bindings: cirrus,cs35l41: cleanup $ref and example
Krzysztof Kozlowski [Sat, 24 Dec 2022 15:42:10 +0000 (16:42 +0100)]
ASoC: dt-bindings: cirrus,cs35l41: cleanup $ref and example

Non-functional cleanup:
1. Drop unneeded quotes form $ref,
2. Example: Use generic node name, use define for GPIO flag, adjust
   indentation to consistent 4-space style.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20221224154210.43356-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: dt-bindings: cirrus,cs35l41: add interrupts
Krzysztof Kozlowski [Sat, 24 Dec 2022 15:42:09 +0000 (16:42 +0100)]
ASoC: dt-bindings: cirrus,cs35l41: add interrupts

Both DTS (SM8250 and SM8350 based Sony Xperia boards) and Linux driver
mention interrupt, so allow it to fix:

  sm8350-sony-xperia-sagami-pdx215.dtb: cs35l41@41: Unevaluated properties are not allowed ('interrupt-parent', 'interrupts' were unexpected)

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20221224154210.43356-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: support machine driver with max98360
Mars Chen [Wed, 28 Dec 2022 10:38:12 +0000 (18:38 +0800)]
ASoC: support machine driver with max98360

Signed-off-by: Mars Chen <chenxiangrui@huaqin.corp-partner.google.com>
Link: https://lore.kernel.org/r/20221228103812.450956-1-chenxiangrui@huaqin.corp-partner.google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: amd: yc: Add ASUS M5402RA into DMI table
Aniol Martí [Tue, 27 Dec 2022 22:49:32 +0000 (23:49 +0100)]
ASoC: amd: yc: Add ASUS M5402RA into DMI table

ASUS VivoBook 13 OLED (M5402RA) needs this quirk to get the built-in microphone working properly.

Signed-off-by: Aniol Martí <aniol@aniolmarti.cat>
Link: https://lore.kernel.org/r/20221227224932.9771-1-aniol@aniolmarti.cat
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: rt9120: Make dev PM runtime bind AsoC component PM
ChiYuan Huang [Thu, 29 Dec 2022 08:03:53 +0000 (16:03 +0800)]
ASoC: rt9120: Make dev PM runtime bind AsoC component PM

RT9120 uses PM runtime autosuspend to decrease the frequently on/off
spent time. This exists one case, when pcm is closed and dev PM is
waiting for autosuspend time expired to enter runtime suspend state.
At the mean time, system is going to enter suspend, dev PM runtime
suspend won't be called. It makes the rt9120 suspend consumption
current not as expected.

This patch can fix the rt9120 dev PM issue during runtime autosuspend
and system suspend by binding dev PM runtime and ASoC component PM.

Fixes: 80b949f332e3 ("ASoC: rt9120: Use pm_runtime and regcache to optimize 'pwdnn' logic")
Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
Link: https://lore.kernel.org/r/1672301033-3675-1-git-send-email-u0084500@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: mediatek: mt8186: Add machine support for max98357a
Allen-KH Cheng [Wed, 28 Dec 2022 11:57:56 +0000 (19:57 +0800)]
ASoC: mediatek: mt8186: Add machine support for max98357a

Add support for mt8186 with mt6366 and max98357a.

Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
Link: https://lore.kernel.org/r/20221228115756.28014-1-allen-kh.cheng@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: dt-bindings: mt8186-mt6366: add new compatible for max98360a
tongjian [Wed, 28 Dec 2022 12:22:30 +0000 (20:22 +0800)]
ASoC: dt-bindings: mt8186-mt6366: add new compatible for max98360a

Adds new compatible string "mt8186-mt6366-rt5682s-max98360-sound" for machines
with max98360a and rt5682s.

Signed-off-by: tongjian <tongjian@huaqin.corp-partner.google.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20221228122230.3818533-3-tongjian@huaqin.corp-partner.google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: mediatek: mt8186: support rt5682s_max98360
tongjian [Wed, 28 Dec 2022 12:22:29 +0000 (20:22 +0800)]
ASoC: mediatek: mt8186: support rt5682s_max98360

Add support for using the rt5682s codec together with max98360a on
MT8186-MT6366-RT1019-RT5682S machines.

Signed-off-by: tongjian <tongjian@huaqin.corp-partner.google.com>
Link: https://lore.kernel.org/r/20221228122230.3818533-2-tongjian@huaqin.corp-partner.google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agospi: mediatek: Enable irq before the spi registration
Ricardo Ribalda [Sun, 25 Dec 2022 08:37:12 +0000 (09:37 +0100)]
spi: mediatek: Enable irq before the spi registration

If the irq is enabled after the spi si registered, there can be a race
with the initialization of the devices on the spi bus.

Eg:
mtk-spi 1100a000.spi: spi-mem transfer timeout
spi-nor: probe of spi0.0 failed with error -110
Unable to handle kernel NULL pointer dereference at virtual address
0000000000000010
...
Call trace:
 mtk_spi_can_dma+0x0/0x2c

Fixes: c6f7874687f7 ("spi: mediatek: Enable irq when pdata is ready")
Reported-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Tested-by: Daniel Golle <daniel@makrotopia.org>
Link: https://lore.kernel.org/r/20221225-mtk-spi-fixes-v1-0-bb6c14c232f8@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: microchip: power saving features and cleanups
Mark Brown [Tue, 27 Dec 2022 12:56:08 +0000 (12:56 +0000)]
ASoC: microchip: power saving features and cleanups

Merge series from Claudiu Beznea <claudiu.beznea@microchip.com>:

The following series adds runtime PM and suspend to RAM features for
mchp-pdmc driver.

Along with it 2 cleanup patches were added:
- patch 1/4: use vendor,device.yaml file format for Microchip AT91 ASoC
  bindings
- patch 4/4: use FIELD_PREP() in mchp-spdiftx.c

20 months agoASoC: SOF: Extend the IPC ops optionality
Mark Brown [Tue, 27 Dec 2022 11:55:11 +0000 (11:55 +0000)]
ASoC: SOF: Extend the IPC ops optionality

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

This series will extend the IPC ops optionality to cover it up to the existence
of the top level ipc pointer itself. There is no functionality change.

The reason for the extended optionality is that we have "DSPless"
debug/development support coming up (currently it is in SOF's topic/sof-dev
stable branch) initially supporting Intel's HDA platforms.

As the name suggests, in this mode the DSP is completely ignored by the linux
driver stack (no firmware loaded, only using HDA directly).

The DSPless mode is aimed to help us to verify our Linux stack on new platforms
where the firmware is not yet in the state that we can reliably use it, but the
hardware and programming flows can be tested already.
There is no plan to make DSPless a production target for SOF Linux stack.

While this is preparatory series aimed to unblock the DSPless support, it has
been integrated into sof-dev separately and we have lots of new features
depending on it (went in between this set and the DSPless support).

I still have some minor tasks to complete for the DSPless to make it a bit more
versatile, but I don't want to block other, stable features for upstreaming.

20 months agoASoC: Drop empty platform remove functions
Mark Brown [Tue, 27 Dec 2022 11:55:04 +0000 (11:55 +0000)]
ASoC: Drop empty platform remove functions

Merge series from Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:

Hello,

this patch series removes all platform remove functions that only return
zero below sound/soc. There is no reason to have these, as the only
caller is platform core code doing:

        if (drv->remove) {
                int ret = drv->remove(dev);

                ...
        }

(in platform_remove()) and so having no remove function is both
equivalent and simpler.

20 months agoAdd support for DSP volume controls
Mark Brown [Tue, 27 Dec 2022 11:54:56 +0000 (11:54 +0000)]
Add support for DSP volume controls

Merge series from Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>:

Some devices like DMIC don't expose native controls or need volume limit
due to possible HW damage. Add support for volume controls allowing to
change volume level in DSP. Maximum volume level is imposed by the
topology file which defines given path.

20 months agoASoC: SOF: Fixes for suspend after firmware crash
Mark Brown [Tue, 27 Dec 2022 00:03:16 +0000 (00:03 +0000)]
ASoC: SOF: Fixes for suspend after firmware crash

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

This series contails 2 patches to fix device suspend after a firmware
crash and another patch to allow reading the FW state from debugfs.

20 months agoASoC: Intel: sof-nau8825: fix module alias overflow
Arnd Bergmann [Wed, 21 Dec 2022 13:24:56 +0000 (14:24 +0100)]
ASoC: Intel: sof-nau8825: fix module alias overflow

The maximum name length for a platform_device_id entry is 20 characters
including the trailing NUL byte. The sof_nau8825.c file exceeds that,
which causes an obscure error message:

sound/soc/intel/boards/snd-soc-sof_nau8825.mod.c:35:45: error: illegal character encoding in string literal [-Werror,-Winvalid-source-encoding]
MODULE_ALIAS("platform:adl_max98373_nau8825<U+0018><AA>");
                                                   ^~~~
include/linux/module.h:168:49: note: expanded from macro 'MODULE_ALIAS'
                                                ^~~~~~
include/linux/module.h:165:56: note: expanded from macro 'MODULE_INFO'
                                                       ^~~~
include/linux/moduleparam.h:26:47: note: expanded from macro '__MODULE_INFO'
                = __MODULE_INFO_PREFIX __stringify(tag) "=" info

I could not figure out how to make the module handling robust enough
to handle this better, but as a quick fix, using slightly shorter
names that are still unique avoids the build issue.

Fixes: 8d0872f6239f ("ASoC: Intel: add sof-nau8825 machine driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20221221132515.2363276-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: Intel: fix sof-nau8825 link failure
Arnd Bergmann [Wed, 21 Dec 2022 13:25:48 +0000 (14:25 +0100)]
ASoC: Intel: fix sof-nau8825 link failure

The snd-soc-sof_nau8825.ko module fails to link unless the
sof_realtek_common support is also enabled:

ERROR: modpost: "sof_rt1015p_codec_conf" [sound/soc/intel/boards/snd-soc-sof_nau8825.ko] undefined!
ERROR: modpost: "sof_rt1015p_dai_link" [sound/soc/intel/boards/snd-soc-sof_nau8825.ko] undefined!

Fixes: 8d0872f6239f ("ASoC: Intel: add sof-nau8825 machine driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20221221132559.2402341-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: Intel: sof_nau8825: add variant with nau8318 amplifier.
Ajye Huang [Thu, 22 Dec 2022 04:26:24 +0000 (12:26 +0800)]
ASoC: Intel: sof_nau8825: add variant with nau8318 amplifier.

This patch adds the driver data for two nau8318 speaker amplifiers on
SSP1 and nau8825 on SSP0 for ADL platform.

The nau8315 and nau8318 are both Nuvoton Amp chips. They use the same
Amp driver nau8315.c. The acpi_device_id for nau8315 is "NVTN2010",
for nau8318 is "NVTN2012".
The nau8825 is one of Nuvoton headset codec, and its acpi_device_id is
"10508825".

Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20221222042624.557869-1-ajye_huang@compal.corp-partner.google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: amd: yc: Add Razer Blade 14 2022 into DMI table
Wim Van Boven [Fri, 16 Dec 2022 08:18:27 +0000 (09:18 +0100)]
ASoC: amd: yc: Add Razer Blade 14 2022 into DMI table

Razer Blade 14 (2022) - RZ09-0427 needs the quirk to enable the built in microphone

Signed-off-by: Wim Van Boven <wimvanboven@gmail.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20221216081828.12382-1-wimvanboven@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: Intel: soc-acpi: add configuration for variant of 0C11 product
Gongjun Song [Mon, 26 Dec 2022 01:09:17 +0000 (09:09 +0800)]
ASoC: Intel: soc-acpi: add configuration for variant of 0C11 product

Support configuration with SoundWire RT1318 amplifiers on link1 and
link2, and RT711 on link0 for headphone/headset. This product does
not support local microphones.

Signed-off-by: Gongjun Song <gongjun.song@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20221226010917.2632973-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: Intel: soc-acpi: add configuration for variant of 0C40 product
Gongjun Song [Mon, 26 Dec 2022 01:09:16 +0000 (09:09 +0800)]
ASoC: Intel: soc-acpi: add configuration for variant of 0C40 product

Support configuration with SoundWire RT1316 amplifiers on link0 and
link1, and RT711 on link2 for headphone/headset. This product does
not support local microphones.

Signed-off-by: Gongjun Song <gongjun.song@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20221226010917.2632973-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: amd: ps: move irq handler registration
Vijendar Mukunda [Wed, 21 Dec 2022 17:28:51 +0000 (22:58 +0530)]
ASoC: amd: ps: move irq handler registration

Move irq handler registration prior to platform device creation logic.
This will avoid irq handling missing scenario when platform device
raise interrrupts during it's probe sequence.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20221221172855.1618766-4-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: amd: ps: update dev index value in irq handler
Vijendar Mukunda [Wed, 21 Dec 2022 17:28:50 +0000 (22:58 +0530)]
ASoC: amd: ps: update dev index value in irq handler

Instead of using hard coded index value for platform device index,
retrieve the device index based on platform devices created.
In PDM config case, ACP PCI driver retrieves dev index from
pdm_dev_index variable.
This will avoid overhead when multiple endpoint combinations
support is added later.
platform device index will vary based on audio endpoint
configuration.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20221221172855.1618766-3-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: amd: ps: refactor platform device creation logic
Vijendar Mukunda [Wed, 21 Dec 2022 17:28:49 +0000 (22:58 +0530)]
ASoC: amd: ps: refactor platform device creation logic

Refactor platform device creation implementation.
Based on platform dev count and pdev mask create platform devices.
Use common API to fill platform dev information.
Use pdev count variable in remove callback for unregistering
platform devices.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20221221172855.1618766-2-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: amd: ps: implement api to retrieve acp device config
Vijendar Mukunda [Wed, 21 Dec 2022 17:28:48 +0000 (22:58 +0530)]
ASoC: amd: ps: implement api to retrieve acp device config

Implement API to retrieve acp device config and calculate platform
device count and dev mask for platform device node creation.

Currently for DMIC configuration, mask and dev count are calculated.
Same api will be used to extend support for different ACP device
configurations.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20221221172855.1618766-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: pxa: Drop empty platform remove function
Uwe Kleine-König [Mon, 12 Dec 2022 17:47:37 +0000 (18:47 +0100)]
ASoC: pxa: Drop empty platform remove function

A remove callback just returning 0 is equivalent to no remove callback
at all. So drop the useless function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20221212174737.3740223-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: rt5640: Allow to describe how LOUT is wired
Ondrej Jirman [Fri, 9 Dec 2022 10:56:21 +0000 (10:56 +0000)]
ASoC: rt5640: Allow to describe how LOUT is wired

Depending on HW design, som boards may expect mono differential output
on LOUT. Describe a property that enables it.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
Signed-off-by: Jarrah Gosbell <kernel@undef.tools>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20221209105621.39237-2-kernel@undef.tools
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: rt5640: Allow configuration of LOUT to mono differential mode
Ondrej Jirman [Fri, 9 Dec 2022 10:56:20 +0000 (10:56 +0000)]
ASoC: rt5640: Allow configuration of LOUT to mono differential mode

LOUT output can produce either single-ended stereo signals, or mono
differential signal. Some applications are wired to use LOUT in mono
differential mode. Allow to configure it via device property.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
Signed-off-by: Jarrah Gosbell <kernel@undef.tools>
Link: https://lore.kernel.org/r/20221209105621.39237-1-kernel@undef.tools
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: wm8940: Read chip ID when wm8940 codec probing
Lukasz Majewski [Fri, 16 Dec 2022 09:46:24 +0000 (10:46 +0100)]
ASoC: wm8940: Read chip ID when wm8940 codec probing

The wm8940 provides the chip ID information via I2C. In this
patch this information is read and if not matching expected
value, the probe function is aborted.

This prevents from using (i.e. inserting) other wm89* modules
which use the same I2C bus address.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20221216094624.3849278-3-lukma@denx.de
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: wm8940: Rewrite code to set proper clocks
Lukasz Majewski [Fri, 16 Dec 2022 09:46:23 +0000 (10:46 +0100)]
ASoC: wm8940: Rewrite code to set proper clocks

This patch enables support for internal wm8940's PLL and proper
divider to set proper value for 256x fs clock.

This approach is more flexible and replaces hardcoded clock
values and makes the codec work with the simple-card driver.
Card drivers calling set_pll() and set_clkdiv() directly are
unaffected.

For the reference - code in this commit is based on:
51b2bb3f2568e6d9d81a001d38b8d70c2ba4af99
("ASoC: wm8974: configure pll and mclk divider automatically")

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20221216094624.3849278-2-lukma@denx.de
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: wm8940: Remove warning when no plat data present
Lukasz Majewski [Fri, 16 Dec 2022 09:46:22 +0000 (10:46 +0100)]
ASoC: wm8940: Remove warning when no plat data present

The lack of platform data in the contemporary Linux
shall not be the reason to display warnings to the
kernel logs.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20221216094624.3849278-1-lukma@denx.de
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: SOF: amd: Enable cache for AMD Rembrandt platform
V sujith kumar Reddy [Tue, 13 Dec 2022 07:16:37 +0000 (12:46 +0530)]
ASoC: SOF: amd: Enable cache for AMD Rembrandt platform

Enable DSP cache for ACP memory

Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>
Link: https://lore.kernel.org/r/20221213071640.3038853-1-Vsujithkumar.Reddy@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: da7213: Add support for mono, set frame width to 32 when possible
David Rau [Wed, 14 Dec 2022 04:40:58 +0000 (04:40 +0000)]
ASoC: da7213: Add support for mono, set frame width to 32 when possible

This adds the DAI mono mode support and set the frame width to 32

Signed-off-by: Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com>
Tested-by: David Rau <David.Rau.opensource@dm.renesas.com>
Signed-off-by: David Rau <David.Rau.opensource@dm.renesas.com>
Link: https://lore.kernel.org/r/20221214044058.6289-1-David.Rau.opensource@dm.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: SOF: mediatek: mt8195: remove a redundant comparison of sram
YC Hung [Thu, 15 Dec 2022 06:10:46 +0000 (14:10 +0800)]
ASoC: SOF: mediatek: mt8195: remove a redundant comparison of sram

DSP SRAM is not used for audio shared buffer between host and DSP so
TOTAL_SIZE_SHARED_SRAM_FROM_TAIL is zero. Remove the definition and
redundant comparison to fix coverity "unsigned compared against 0".

Signed-off-by: YC Hung <yc.hung@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angeloigoacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20221215061046.16934-1-yc.hung@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: SOF: IPC3 topology: Print the conflicting bytes sizes
Seppo Ingalsuo [Fri, 16 Dec 2022 11:53:50 +0000 (13:53 +0200)]
ASoC: SOF: IPC3 topology: Print the conflicting bytes sizes

The error "Conflict in bytes vs. priv size." is too brief. With
the printed sizes it's a lot easier to find the size issue in
for binary control if such happens.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20221216115350.28260-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agodt-bindings: sound: tlv320aic3x: Convert to dtschema
Jai Luthra [Wed, 21 Dec 2022 14:52:16 +0000 (20:22 +0530)]
dt-bindings: sound: tlv320aic3x: Convert to dtschema

Convert bindings for TI's TLV320AIC3x audio codecs to dtschema.

The following properties are still found in some old dts files, but will
be ignored by the driver:
- adc-settle-ms
- port

Signed-off-by: Jai Luthra <j-luthra@ti.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20221221145216.11400-1-j-luthra@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: SOF: core: Print out the value of sof_debug if it is set
Peter Ujfalusi [Fri, 16 Dec 2022 11:54:35 +0000 (13:54 +0200)]
ASoC: SOF: core: Print out the value of sof_debug if it is set

The sof_debug value is set by the user, developer intentionally.
To save time on figuring out what value has been passed to the kernel by
the user, developer, print it out if it is not 0.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20221216115435.28427-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: dt-bindings: adi,adau7002: Convert to DT schema
Krzysztof Kozlowski [Fri, 9 Dec 2022 17:59:46 +0000 (18:59 +0100)]
ASoC: dt-bindings: adi,adau7002: Convert to DT schema

Convert the Analog Devices ADAU7002 Stereo PDM-to-I2S/TDM Converter
bindings to DT schema.  During the conversion, add properties already
used by DTS (sc7180-trogdor-coachz.dts) and Linux driver:
1. wakeup-delay-ms,
2. sound-dai-cells (via referencing dai-common.yaml).

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20221209175947.335319-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: rt711-sdca: add jack detection mode for JD2 100K
Shuming Fan [Fri, 23 Dec 2022 05:58:46 +0000 (13:58 +0800)]
ASoC: rt711-sdca: add jack detection mode for JD2 100K

This patch adds another jack detection mode for JD2 with an external resistor of 100k.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://lore.kernel.org/r/20221223055846.3285-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: mchp-spdiftx: use FIELD_PREP() where possible
Claudiu Beznea [Tue, 13 Dec 2022 11:28:51 +0000 (13:28 +0200)]
ASoC: mchp-spdiftx: use FIELD_PREP() where possible

Use FIELD_PREP() in macro definitions.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20221213112851.89212-5-claudiu.beznea@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: mchp-pdmc: add support for suspend to RAM
Claudiu Beznea [Tue, 13 Dec 2022 11:28:50 +0000 (13:28 +0200)]
ASoC: mchp-pdmc: add support for suspend to RAM

Add support for suspend to RAM by re-aranging the lines in switch..case
from mchp_pdmc_trigger() and saving/restoring the enabled interrupts. These
are necessary as AT91 devices has a special power saving mode (called
backup and self-refresh) where most of the SoC parts are powered off
and thus we need to reconfigure the PDMC on resume.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20221213112851.89212-4-claudiu.beznea@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: mchp-pdmc: use runtime pm for clock power saving
Claudiu Beznea [Tue, 13 Dec 2022 11:28:49 +0000 (13:28 +0200)]
ASoC: mchp-pdmc: use runtime pm for clock power saving

Implement clock power saving taking advantage of runtime PM infrastructure.
This simplifies the code and allow using the same infrastructure for
suspend to RAM functionalities.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20221213112851.89212-3-claudiu.beznea@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: dt-bindings: microchip: use proper naming syntax
Claudiu Beznea [Tue, 13 Dec 2022 11:28:48 +0000 (13:28 +0200)]
ASoC: dt-bindings: microchip: use proper naming syntax

Use the following syntax for Microchip ASoC YAML files:
vendor,device.yaml

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20221213112851.89212-2-claudiu.beznea@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: Intel: avs: Peakvol module configuration
Amadeusz Sławiński [Wed, 14 Dec 2022 18:55:00 +0000 (19:55 +0100)]
ASoC: Intel: avs: Peakvol module configuration

Handle creation of peakvol module in FW. When peakvol module is created
it retrieves actual value from kcontrol and sends it to FW as part of
configuration data.

Co-authored-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20221214185500.3896902-5-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: Intel: avs: Parse control tuples
Amadeusz Sławiński [Wed, 14 Dec 2022 18:54:59 +0000 (19:54 +0100)]
ASoC: Intel: avs: Parse control tuples

Add callback to handle loading of kcontrol and linking it to active
widget. In order to link kcontrol to specific modules add additional
field to module data, as well as specify control id in kcontrol data.

Co-authored-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20221214185500.3896902-4-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: Intel: avs: Add control volume operations
Amadeusz Sławiński [Wed, 14 Dec 2022 18:54:58 +0000 (19:54 +0100)]
ASoC: Intel: avs: Add control volume operations

To make introduced peakvol module useful from userspace perspective,
expose ALSA controls allowing DSP volume modification. These provide
even more granular control over volume but are also the only way to
modify volume for devices devoid of codec kcontrols e.g.: DMIC.

Co-authored-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20221214185500.3896902-3-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: Intel: avs: Add peakvol runtime-parameter requests
Amadeusz Sławiński [Wed, 14 Dec 2022 18:54:57 +0000 (19:54 +0100)]
ASoC: Intel: avs: Add peakvol runtime-parameter requests

Peakvol module allows for setting and obtaining DSP volume as well as
modifying shape and duration at which volume actually changes. Add IPC
messages to expose those capabilities.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20221214185500.3896902-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: SOF: nocodec: Drop empty platform remove function
Uwe Kleine-König [Mon, 12 Dec 2022 20:54:06 +0000 (21:54 +0100)]
ASoC: SOF: nocodec: Drop empty platform remove function

A remove callback just returning 0 is equivalent to no remove callback
at all. So drop the useless function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20221212205406.3771071-16-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: pxa: e800_wm9712: Drop empty platform remove function
Uwe Kleine-König [Mon, 12 Dec 2022 20:54:05 +0000 (21:54 +0100)]
ASoC: pxa: e800_wm9712: Drop empty platform remove function

A remove callback just returning 0 is equivalent to no remove callback
at all. So drop the useless function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20221212205406.3771071-15-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: pxa: e750_wm9705: Drop empty platform remove function
Uwe Kleine-König [Mon, 12 Dec 2022 20:54:04 +0000 (21:54 +0100)]
ASoC: pxa: e750_wm9705: Drop empty platform remove function

A remove callback just returning 0 is equivalent to no remove callback
at all. So drop the useless function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20221212205406.3771071-14-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: pxa: e740_wm9705: Drop empty platform remove function
Uwe Kleine-König [Mon, 12 Dec 2022 20:54:03 +0000 (21:54 +0100)]
ASoC: pxa: e740_wm9705: Drop empty platform remove function

A remove callback just returning 0 is equivalent to no remove callback
at all. So drop the useless function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20221212205406.3771071-13-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: wl1273: Drop empty platform remove function
Uwe Kleine-König [Mon, 12 Dec 2022 20:54:02 +0000 (21:54 +0100)]
ASoC: wl1273: Drop empty platform remove function

A remove callback just returning 0 is equivalent to no remove callback
at all. So drop the useless function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20221212205406.3771071-12-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: mc13783: Drop empty platform remove function
Uwe Kleine-König [Mon, 12 Dec 2022 20:54:01 +0000 (21:54 +0100)]
ASoC: mc13783: Drop empty platform remove function

A remove callback just returning 0 is equivalent to no remove callback
at all. So drop the useless function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20221212205406.3771071-11-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: cq93vc: Drop empty platform remove function
Uwe Kleine-König [Mon, 12 Dec 2022 20:54:00 +0000 (21:54 +0100)]
ASoC: cq93vc: Drop empty platform remove function

A remove callback just returning 0 is equivalent to no remove callback
at all. So drop the useless function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20221212205406.3771071-10-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: bt-sco: Drop empty platform remove function
Uwe Kleine-König [Mon, 12 Dec 2022 20:53:59 +0000 (21:53 +0100)]
ASoC: bt-sco: Drop empty platform remove function

A remove callback just returning 0 is equivalent to no remove callback
at all. So drop the useless function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20221212205406.3771071-9-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: adau7002: Drop empty platform remove function
Uwe Kleine-König [Mon, 12 Dec 2022 20:53:58 +0000 (21:53 +0100)]
ASoC: adau7002: Drop empty platform remove function

A remove callback just returning 0 is equivalent to no remove callback
at all. So drop the useless function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20221212205406.3771071-8-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: ac97: Drop empty platform remove function
Uwe Kleine-König [Mon, 12 Dec 2022 20:53:57 +0000 (21:53 +0100)]
ASoC: ac97: Drop empty platform remove function

A remove callback just returning 0 is equivalent to no remove callback
at all. So drop the useless function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20221212205406.3771071-7-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: 88pm860x: Drop empty platform remove function
Uwe Kleine-König [Mon, 12 Dec 2022 20:53:56 +0000 (21:53 +0100)]
ASoC: 88pm860x: Drop empty platform remove function

A remove callback just returning 0 is equivalent to no remove callback
at all. So drop the useless function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20221212205406.3771071-6-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: atmel-pdmic: Drop empty platform remove function
Uwe Kleine-König [Mon, 12 Dec 2022 20:53:55 +0000 (21:53 +0100)]
ASoC: atmel-pdmic: Drop empty platform remove function

A remove callback just returning 0 is equivalent to no remove callback
at all. So drop the useless function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20221212205406.3771071-5-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: atmel-classd: Drop empty platform remove function
Uwe Kleine-König [Mon, 12 Dec 2022 20:53:54 +0000 (21:53 +0100)]
ASoC: atmel-classd: Drop empty platform remove function

A remove callback just returning 0 is equivalent to no remove callback
at all. So drop the useless function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20221212205406.3771071-4-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: amd: Drop empty platform remove function
Uwe Kleine-König [Mon, 12 Dec 2022 20:53:53 +0000 (21:53 +0100)]
ASoC: amd: Drop empty platform remove function

A remove callback just returning 0 is equivalent to no remove callback
at all. So drop the useless function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20221212205406.3771071-3-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: pxa: Drop empty platform remove function
Uwe Kleine-König [Mon, 12 Dec 2022 20:53:52 +0000 (21:53 +0100)]
ASoC: pxa: Drop empty platform remove function

A remove callback just returning 0 is equivalent to no remove callback
at all. So drop the useless function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20221212205406.3771071-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: SOF: trace: No need to check for op pointer in sof_fw_trace_free()
Peter Ujfalusi [Wed, 21 Dec 2022 10:23:28 +0000 (12:23 +0200)]
ASoC: SOF: trace: No need to check for op pointer in sof_fw_trace_free()

If the sdev->fw_trace_is_supported is true then we must have the fw_tracing
ops set, no need to check again.

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>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Link: https://lore.kernel.org/r/20221221102328.9635-12-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: SOF: trace: Use sof_ipc_get_ops() in sof_fw_trace_init
Peter Ujfalusi [Wed, 21 Dec 2022 10:23:27 +0000 (12:23 +0200)]
ASoC: SOF: trace: Use sof_ipc_get_ops() in sof_fw_trace_init

For the sake of safety use the sof_ipc_get_ops() to fetch the fw_tracing
ops to avoid cases when either sdev->ipc or sdev->ipc->ops might be NULL.

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>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Link: https://lore.kernel.org/r/20221221102328.9635-11-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: SOF: sof-priv: Mark fw_tracing ops optional in documentation
Peter Ujfalusi [Wed, 21 Dec 2022 10:23:26 +0000 (12:23 +0200)]
ASoC: SOF: sof-priv: Mark fw_tracing ops optional in documentation

The code treats the fw_tracing as optional feature but the documentation
was not reflecting this.
Correct it by explicitly stating that the fw_tracing is optional.

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>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Link: https://lore.kernel.org/r/20221221102328.9635-10-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
20 months agoASoC: SOF: pm: Extend the optionality of IPC ops to IPC as well
Peter Ujfalusi [Wed, 21 Dec 2022 10:23:25 +0000 (12:23 +0200)]
ASoC: SOF: pm: Extend the optionality of IPC ops to IPC as well

The IPC ops are optional, but they require that the ops struct is to be
allocated with all callbacks set to NULL.

Update the code to extend the optionality to:
sdev->ipc == NULL
sdev->ipc->ops == NULL
sdev->ipc->ops->[pm/tplg] == NULL (treated optional for pm currently)
sdev->ipc->ops->[pm/tplg]->ops == NULL (treated optional currently)

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>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Link: https://lore.kernel.org/r/20221221102328.9635-9-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>