sfrench/cifs-2.6.git
22 months agoASoC: audio-graph-card2.c: remove pre-alloced Codec2Codec space
Kuninori Morimoto [Fri, 1 Jul 2022 05:18:27 +0000 (05:18 +0000)]
ASoC: audio-graph-card2.c: remove pre-alloced Codec2Codec space

Because Codec2Codec settings becomes optional, we don't need to keep
its parameter space when init time. This patch removes its default
memory allocation from simple-card-utils.c, and allocate it at
audio-graph-card2 ondemand.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87edz5s95o.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: audio-graph-card2.c: make Codec2Codec settings optional
Kuninori Morimoto [Fri, 1 Jul 2022 05:18:21 +0000 (05:18 +0000)]
ASoC: audio-graph-card2.c: make Codec2Codec settings optional

Current audio-graph-card2 can use Codec2Codec, and having its
original parameter (= rate) on DT is mandatory for now.

But simple-card-utils.c has asoc_simple_init_for_codec2codec() to
setup *default* Codec2Codec settings.

This patch makes Audio Graph Card2 Codec2Codec rate settings
optional.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87fsjls95u.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: audio-graph-card2.c: use of_property_read_u32() for rate
Kuninori Morimoto [Fri, 1 Jul 2022 05:18:14 +0000 (05:18 +0000)]
ASoC: audio-graph-card2.c: use of_property_read_u32() for rate

Audio Graph Card2 is using of_get_property(), but it should use
of_property_read_u32() to getting rate. Otherwise the setting will be
strange value. This patch fixup it.

Fixes: c3a15c92a67b701 ("ASoC: audio-graph-card2: add Codec2Codec support")
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87h741s961.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: fsl_utils: Don't use plain integer as NULL pointer
Shengjiu Wang [Thu, 7 Jul 2022 11:20:06 +0000 (19:20 +0800)]
ASoC: fsl_utils: Don't use plain integer as NULL pointer

Fix sparse warning:
sound/soc/fsl/fsl_utils.c:125:31: sparse: warning: Using plain integer as NULL pointer
sound/soc/fsl/fsl_utils.c:125:42: sparse: warning: Using plain integer as NULL pointer

Fixes: 7bad8125549c ("ASoC: fsl_utils: Add function to handle PLL clock source")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1657192806-10569-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: cleanups and improvements for jz4740-i2s
Mark Brown [Thu, 7 Jul 2022 13:53:16 +0000 (14:53 +0100)]
ASoC: cleanups and improvements for jz4740-i2s

Merge series from Aidan MacDonald <aidanmacdonald.0x0@gmail.com>:

This series is a preparatory cleanup of the jz4740-i2s driver before
adding support for a new SoC.

22 months agoASoC: jz4740-i2s: Refactor DMA channel setup
Aidan MacDonald [Wed, 6 Jul 2022 21:13:21 +0000 (22:13 +0100)]
ASoC: jz4740-i2s: Refactor DMA channel setup

It's simpler to set up the playback and capture DMA settings
at driver probe time instead of during DAI probing.

Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
Acked-by: Paul Cercueil <paul@crapouillou.net>
Link: https://lore.kernel.org/r/20220706211330.120198-3-aidanmacdonald.0x0@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: jz4740-i2s: Remove Open Firmware dependency
Aidan MacDonald [Wed, 6 Jul 2022 21:13:20 +0000 (22:13 +0100)]
ASoC: jz4740-i2s: Remove Open Firmware dependency

This driver doesn't require Open Firmware support. Remove the
OF-specific includes and drop the Kconfig dependency.

Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
Acked-by: Paul Cercueil <paul@crapouillou.net>
Link: https://lore.kernel.org/r/20220706211330.120198-2-aidanmacdonald.0x0@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: amd: fix ACPI dependency compile errors and warnings
Vijendar Mukunda [Wed, 6 Jul 2022 20:55:14 +0000 (02:25 +0530)]
ASoC: amd: fix ACPI dependency compile errors and warnings

Fixed ACPI dependency complie errors and warnings as listed below.

All warnings (new ones prefixed by >>):

sound/soc/soc-acpi.c:34:1: error: redefinition of 'snd_soc_acpi_find_machine'
  34 | snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines)
     | ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from sound/soc/soc-acpi.c:9:
include/sound/soc-acpi.h:38:1: note: previous definition of
'snd_soc_acpi_find_machine'
with type 'struct snd_soc_acpi_mach *(struct snd_soc_acpi_mach *)'
38 | snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines)
   | ^~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/soc-acpi.c: In function 'snd_soc_acpi_find_package':
sound/soc/soc-acpi.c:58:36: error: implicit declaration of function
'acpi_fetch_acpi_dev';
did you mean 'device_match_acpi_dev'?
[-Werror=implicit-function-declaration]
58 | struct acpi_device *adev = acpi_fetch_acpi_dev(handle);
   |                            ^~~~~~~~~~~~~~~~~~~
   |                            device_match_acpi_dev
>> sound/soc/soc-acpi.c:58:36: warning: initialization of
   'struct acpi_device *' from 'int' makes pointer from integer
   without a cast [-Wint-conversion]
sound/soc/soc-acpi.c:64:25: error: invalid use of undefined type
'struct acpi_device'

64 |  if (adev && adev->status.present && adev->status.functional) {
   |                  ^~
sound/soc/soc-acpi.c:64:49: error: invalid use of undefined type
'struct acpi_device'
64 |  if (adev && adev->status.present && adev->status.functional) {
   |                                          ^~
sound/soc/soc-acpi.c:80:26: error: implicit declaration of function
'acpi_extract_package'  [-Werror=implicit-function-declaration]
 80 | status = acpi_extract_package(myobj,
    |          ^~~~~~~~~~~~~~~~~~~~
 sound/soc/soc-acpi.c: At top level:
 sound/soc/soc-acpi.c:95:6: error: redefinition of
 'snd_soc_acpi_find_package_from_hid'
 95 | bool snd_soc_acpi_find_package_from_hid(const u8 hid[ACPI_ID_LEN],
    |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 In file included from sound/soc/soc-acpi.c:9:
 include/sound/soc-acpi.h:44:1: note: previous definition of
 'snd_soc_acpi_find_package_from_hid'
   with type 'bool(const u8 *, struct snd_soc_acpi_package_context *)'
   {aka '_Bool(const unsigned char *,
               struct snd_soc_acpi_package_context *)'}
   44 | snd_soc_acpi_find_package_from_hid(const u8 hid[ACPI_ID_LEN],
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   sound/soc/soc-acpi.c:109:27: error: redefinition of
   'snd_soc_acpi_codec_list'
   109 | struct snd_soc_acpi_mach *snd_soc_acpi_codec_list(void *arg)
       |                           ^~~~~~~~~~~~~~~~~~~~~~~
In file included from sound/soc/soc-acpi.c:9:
include/sound/soc-acpi.h:51:41: note: previous definition of
'snd_soc_acpi_codec_list' with type 'struct snd_soc_acpi_mach *(void *)'
51 | static inline struct snd_soc_acpi_mach
     *snd_soc_acpi_codec_list(void *arg)
   | ^~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/20220706205515.2485601-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: rsnd: Emit useful error messages in .remove()
Uwe Kleine-König [Tue, 5 Jul 2022 06:36:13 +0000 (08:36 +0200)]
ASoC: rsnd: Emit useful error messages in .remove()

If more than one call of rsnd_dai_call(remove, ...) fails the platform
remove callback returns all values orred together which then makes the
driver core emit a generic error message which is little helpful.

Instead emit details of which call failed exactly and return 0. Note
returning 0 instead of an error code doesn't make a difference in the
driver core apart from the error message.

This is a preparation for making platform remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20220705063613.93770-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: Intel: avs: Fix i2s_test card name initialization
Cezary Rojewski [Wed, 6 Jul 2022 06:29:52 +0000 (08:29 +0200)]
ASoC: Intel: avs: Fix i2s_test card name initialization

Update printf formatting as 'ssp_port' argument is of type 'int', not
'long int'.

Fixes: e39acc4cfd92 ("ASoC: Intel: avs: Add I2S-test machine board")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220706062952.251704-1-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: imx-card: Fix DSD/PDM mclk frequency
Shengjiu Wang [Wed, 6 Jul 2022 09:42:55 +0000 (17:42 +0800)]
ASoC: imx-card: Fix DSD/PDM mclk frequency

The DSD/PDM rate not only DSD64/128/256/512, which are the
multiple rate of 44.1kHz,  but also support the multiple
rate of 8kHz, so can't force all mclk frequency to be
22579200Hz, need to assign the frequency according to
rate.

Fixes: aa736700f42f ("ASoC: imx-card: Add imx-card machine driver")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1657100575-8261-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoI2S driver changes for Jadeite platform
Mark Brown [Wed, 6 Jul 2022 11:06:46 +0000 (12:06 +0100)]
I2S driver changes for Jadeite platform

Merge series from Vijendar Mukunda <Vijendar.Mukunda@amd.com>:

Jadeite(JD) platform is Stoney APU varaint which uses I2S MICSP
instance and ES8336 Codec.
This patch series creates I2S platform devices for JD platform,
adds I2S MICSP instance support and Machine driver support

22 months agoAdd support of two Audio PLL source
Mark Brown [Wed, 6 Jul 2022 11:06:44 +0000 (12:06 +0100)]
Add support of two Audio PLL source

Merge series from Shengjiu Wang <shengjiu.wang@nxp.com>:

i.MX8MQ/MN/MM/MP platforms typically have 2 AUDIO PLLs being
configured to handle 8kHz and 11kHz series audio rates.

The patches implement the functionality to select at runtime
the appropriate AUDIO PLL for root clock, if there is no
two PLL registered, then no action taken.

22 months agoASoC: SOF: Intel: byt: remove duplicating driver data retrieval
Andy Shevchenko [Tue, 5 Jul 2022 16:11:02 +0000 (19:11 +0300)]
ASoC: SOF: Intel: byt: remove duplicating driver data retrieval

device_get_match_data() in ACPI case calls similar to acpi_match_device().
Hence there is no need to duplicate the call. Just assign what is in
the id->driver_data.

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/20220705161102.76250-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: SOF: Intel: bdw: remove duplicating driver data retrieval
Andy Shevchenko [Tue, 5 Jul 2022 16:11:01 +0000 (19:11 +0300)]
ASoC: SOF: Intel: bdw: remove duplicating driver data retrieval

device_get_match_data() in ACPI case calls similar to acpi_match_device().
Hence there is no need to duplicate the call. Just assign what is in
the id->driver_data.

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/20220705161102.76250-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: tegra: tegra20_das: Drop write-only driver data member
Uwe Kleine-König [Wed, 29 Jun 2022 19:42:24 +0000 (21:42 +0200)]
ASoC: tegra: tegra20_das: Drop write-only driver data member

The dev member of struct tegra20_das is only written once in .probe().
There is no loss of functionality if the member and the assignment go away.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20220629194224.175607-5-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: tegra: tegra20_das: Make helper functions return void
Uwe Kleine-König [Wed, 29 Jun 2022 19:42:23 +0000 (21:42 +0200)]
ASoC: tegra: tegra20_das: Make helper functions return void

These only ever return a value != 0 if the parameter das is NULL. In the
only caller however it's already asserted this isn't the case.

So convert the functions to return void and simplify the caller
accordingly.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20220629194224.175607-4-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: tegra: tegra20_das: Get rid of global pointer for driver data
Uwe Kleine-König [Wed, 29 Jun 2022 19:42:22 +0000 (21:42 +0200)]
ASoC: tegra: tegra20_das: Get rid of global pointer for driver data

This enables the driver (at least theoretically) to bind to more than one
device.

The remove function has nothing to do now, so it is dropped.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20220629194224.175607-3-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: tegra: tegra20_das: Remove unused function tegra20_das_read
Uwe Kleine-König [Wed, 29 Jun 2022 19:42:21 +0000 (21:42 +0200)]
ASoC: tegra: tegra20_das: Remove unused function tegra20_das_read

This function is unused since commit 7203a62562dc ("ASoC: convert
Tegra20 DAS driver to regmap").

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20220629194224.175607-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: tegra: tegra20_das: Fold header file into only user
Uwe Kleine-König [Wed, 29 Jun 2022 19:42:20 +0000 (21:42 +0200)]
ASoC: tegra: tegra20_das: Fold header file into only user

Since commit fcff5f99742e ("ASoC: tegra: remove unnecessary includes")
the header file (which at the time was named tegra_das.h) there is only
the actual driver that includes it. Just move the definitions into the
driver, drop the exports and remove the completely unused function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20220629194224.175607-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: rockchip: i2s: Fix error code when fail to read I2S_CLR
Judy Hsiao [Fri, 1 Jul 2022 02:14:27 +0000 (02:14 +0000)]
ASoC: rockchip: i2s: Fix error code when fail to read I2S_CLR

Add the error code '-EBUSY' when fail to read I2S_CLR
in rockchip_snd_rxctrl() and rockchip_snd_txctrl()

Fixes: 44f362c2cc6d ("ASoC: rockchip: i2s: switch BCLK to GPIO")
Signed-off-by: Judy Hsiao <judyhsiao@chromium.org>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Link: https://lore.kernel.org/r/20220701021427.3120549-1-judyhsiao@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: dt-bindings: qcom,sm8250: add SDM845 sound
Krzysztof Kozlowski [Tue, 5 Jul 2022 18:28:02 +0000 (20:28 +0200)]
ASoC: dt-bindings: qcom,sm8250: add SDM845 sound

The Qualcomm SDM845 sound card bindings are almost the same as SM8250,
except "pin-switches" and "widgets" properties.  These were not
documented in SDM845 text bindings but are actually valid for SDM845.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20220705182802.775803-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: Intel: catpt: remove duplicating driver data retrieval
Andy Shevchenko [Tue, 5 Jul 2022 15:58:13 +0000 (18:58 +0300)]
ASoC: Intel: catpt: remove duplicating driver data retrieval

device_get_match_data() in ACPI case calls similar to acpi_match_device().
Hence there is no need to duplicate the call. Just assign what is in
the id->driver_data.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220705155813.75917-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: Intel: avs: correct config reference for I2S test board
Lukas Bulwahn [Tue, 5 Jul 2022 10:32:38 +0000 (12:32 +0200)]
ASoC: Intel: avs: correct config reference for I2S test board

Commit e39acc4cfd92 ("ASoC: Intel: avs: Add I2S-test machine board") adds
the config "SND_SOC_INTEL_AVS_MACH_I2S_TEST", but in the Makefile refers
to  config "SND_SOC_INTEL_AVS_MACH_i2s_TEST" (notice the uppercase and
lowercase difference).

Adjust the Makefile to refer to the actual existing config.

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Acked-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20220705103238.7484-1-lukas.bulwahn@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: xilinx: Suppress second error message about reset failure in .remove()
Uwe Kleine-König [Tue, 5 Jul 2022 09:26:45 +0000 (11:26 +0200)]
ASoC: xilinx: Suppress second error message about reset failure in .remove()

Returning an error value in a platform remove callback results in an error
message being emitted by the platform core, but otherwise it doesn't make
a difference. If ret is != 0, there is already an error message and another
very generic doesn't add any value, so return 0 unconditionally.

This is a preparation for making platform remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20220705092645.101343-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: codecs: wsa883x: fix warning using-module-alias-sdw.cocci
Gaosheng Cui [Tue, 5 Jul 2022 00:53:15 +0000 (08:53 +0800)]
ASoC: codecs: wsa883x: fix warning using-module-alias-sdw.cocci

This patch adds missing MODULE_DEVICE_TABLE definition which generates
correct modalias for automatic loading of this driver when it is built
as an external module.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
Link: https://lore.kernel.org/r/20220705005315.663920-1-cuigaosheng1@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: madera: Replace kernel.h with the necessary inclusions
Andy Shevchenko [Fri, 3 Jun 2022 17:07:07 +0000 (20:07 +0300)]
ASoC: madera: Replace kernel.h with the necessary inclusions

When kernel.h is used in the headers it adds a lot into dependency hell,
especially when there are circular dependencies are involved.

Replace kernel.h inclusion with the list of what is really being used.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220603170707.48728-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: rt5640: Add the MICBIAS1 to the dapm routing
Oder Chiou [Tue, 5 Jul 2022 10:11:34 +0000 (18:11 +0800)]
ASoC: rt5640: Add the MICBIAS1 to the dapm routing

The patch adds the MICBIAS1 to the dapm routing while the HDA header used.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Reported-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/20220705101134.16792-2-oder_chiou@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: amd: enable machine driver build for Jadeite platform
Vijendar Mukunda [Fri, 1 Jul 2022 11:41:07 +0000 (17:11 +0530)]
ASoC: amd: enable machine driver build for Jadeite platform

Enable machine driver build for Jadeite platform using ES8336 Codec.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220701114107.1105948-6-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: amd: add Machine driver for Jadeite platform
Vijendar Mukunda [Fri, 1 Jul 2022 11:41:06 +0000 (17:11 +0530)]
ASoC: amd: add Machine driver for Jadeite platform

Add Machine driver for Jadeite platform which uses ES8336 codec.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220701114107.1105948-5-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: amd: add I2S MICSP instance support
Vijendar Mukunda [Fri, 1 Jul 2022 11:41:05 +0000 (17:11 +0530)]
ASoC: amd: add I2S MICSP instance support

Add I2S MICSP instance support for Stoney variant.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220701114107.1105948-4-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: dt-bindings: fsl-sai: Add two PLL clock source
Shengjiu Wang [Fri, 1 Jul 2022 09:32:41 +0000 (17:32 +0800)]
ASoC: dt-bindings: fsl-sai: Add two PLL clock source

Add two PLL clock source, they are the parent clocks of root clock
one is for 8kHz series rates, another one is for 11kHz series rates.
They are optional clocks, if there are such clocks, then driver
can switch between them for supporting more accurate rates.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/1656667961-1799-7-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: dt-bindings: fsl_spdif: Add two PLL clock source
Shengjiu Wang [Fri, 1 Jul 2022 09:32:40 +0000 (17:32 +0800)]
ASoC: dt-bindings: fsl_spdif: Add two PLL clock source

Add two PLL clock source, they are the parent clocks of root clock
one is for 8kHz series rates, another one is for 11kHz series rates.
They are optional clocks, if there are such clocks, then driver
can switch between them for supporting more accurate rates.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/1656667961-1799-6-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: fsl_sai: Add support for PLL switch at runtime
Shengjiu Wang [Fri, 1 Jul 2022 09:32:39 +0000 (17:32 +0800)]
ASoC: fsl_sai: Add support for PLL switch at runtime

i.MX8MQ/MN/MM/MP platforms typically have 2 AUDIO PLLs being
configured to handle 8kHz and 11kHz series audio rates.

The patch implements the functionality to select at runtime
the appropriate AUDIO PLL as function of sysclk rate.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1656667961-1799-5-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: fsl_micfil: Add support for PLL switch at runtime
Shengjiu Wang [Fri, 1 Jul 2022 09:32:38 +0000 (17:32 +0800)]
ASoC: fsl_micfil: Add support for PLL switch at runtime

i.MX8MQ/MN/MM/MP platforms typically have 2 AUDIO PLLs being
configured to handle 8kHz and 11kHz series audio rates.

The patch implements the functionality to select at runtime
the appropriate AUDIO PLL as function of audio file rate.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1656667961-1799-4-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: fsl_spdif: Add support for PLL switch at runtime.
Shengjiu Wang [Fri, 1 Jul 2022 09:32:37 +0000 (17:32 +0800)]
ASoC: fsl_spdif: Add support for PLL switch at runtime.

i.MX8MQ/MN/MM/MP platforms typically have 2 AUDIO PLLs being
configured to handle 8kHz and 11kHz series audio rates.

The patch implements the functionality to select at runtime
the appropriate AUDIO PLL as function of audio file rate.
As the clock parent may be changed, need to probe txclk
according to sample rate again.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1656667961-1799-3-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: fsl_utils: Add function to handle PLL clock source
Shengjiu Wang [Fri, 1 Jul 2022 09:32:36 +0000 (17:32 +0800)]
ASoC: fsl_utils: Add function to handle PLL clock source

i.MX8MQ/MN/MM/MP platforms typically have 2 AUDIO PLLs being
configured to handle 8kHz and 11kHz series audio rates.
Add common function in fsl_utils to handle these two PLL
clock source, which are needed by CPU DAI drivers

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1656667961-1799-2-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: tegra20_ac97: Fix missing error code in tegra20_ac97_platform_probe()
Jiapeng Chong [Fri, 1 Jul 2022 07:28:50 +0000 (15:28 +0800)]
ASoC: tegra20_ac97: Fix missing error code in tegra20_ac97_platform_probe()

The error code is missing in this code scenario, add the error code
'-EINVAL' to the return value 'ret'.

This was found by coccicheck:

sound/soc/tegra/tegra20_ac97.c:357 tegra20_ac97_platform_probe() warn: missing error code 'ret'.

Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Link: https://lore.kernel.org/r/20220701072850.62408-1-jiapeng.chong@linux.alibaba.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: fsl_asrc_dma: Add legacy_dai_naming flag
Shengjiu Wang [Mon, 4 Jul 2022 01:50:17 +0000 (09:50 +0800)]
ASoC: fsl_asrc_dma: Add legacy_dai_naming flag

Need to add legacy_dai_naming flag otherwise there
will be issue when registerring component, that cause
the probe failure.

Fixes: 1e63fcc74ace ("ASoC: fsl: Migrate to new style legacy DAI naming flag")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1656899417-4775-2-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: fsl_micfil: Add legacy_dai_naming flag
Shengjiu Wang [Mon, 4 Jul 2022 01:50:16 +0000 (09:50 +0800)]
ASoC: fsl_micfil: Add legacy_dai_naming flag

Need to add legacy_dai_naming flag otherwise there
will be issue when registerring component, that cause
the probe failure.

Fixes: 1e63fcc74ace ("ASoC: fsl: Migrate to new style legacy DAI naming flag")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1656899417-4775-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: codes: Add support for ES8316 producer mode
Zhu Ning [Mon, 4 Jul 2022 01:24:16 +0000 (09:24 +0800)]
ASoC: codes: Add support for ES8316 producer mode

The AMD acp-es8336 machine driver requires ES8316 run in producer
mode, which is not supported previously.

Signed-off-by: David Yang <yangxiaohua@everest-semi.com>
Signed-off-by: Zhu Ning <zhuning0077@gmail.com>
Link: https://lore.kernel.org/r/20220704012416.3165-1-zhuning0077@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: fsl: pcm030-audio-fabric: use platform_device_unregsiter()
Yang Yingliang [Mon, 4 Jul 2022 07:51:34 +0000 (15:51 +0800)]
ASoC: fsl: pcm030-audio-fabric: use platform_device_unregsiter()

Replace platform_device_del/put() with platform_device_unregsiter()
to simplify code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220704075134.26230-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: codecs: max98088: Clean up some inconsistent indenting
Jiapeng Chong [Fri, 1 Jul 2022 07:30:39 +0000 (15:30 +0800)]
ASoC: codecs: max98088: Clean up some inconsistent indenting

This was found by coccicheck:

sound/soc/codecs/max98088.c:1761 max98088_i2c_probe() warn: inconsistent indenting.

Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Link: https://lore.kernel.org/r/20220701073039.64556-1-jiapeng.chong@linux.alibaba.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: dt-bindings: convert designware-i2s to dt-schema
Conor Dooley [Fri, 1 Jul 2022 19:22:49 +0000 (20:22 +0100)]
ASoC: dt-bindings: convert designware-i2s to dt-schema

Convert the Synopsys DesignWare I2S controller binding to dt-schema.
There was no listed maintainer but Jose Abreu was the last editor of the
txt binding so add him as maintainer.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20220701192300.2293643-4-conor@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: qcom: Fix missing of_node_put() in asoc_qcom_lpass_cpu_platform_probe()
Liang He [Sat, 2 Jul 2022 02:01:09 +0000 (10:01 +0800)]
ASoC: qcom: Fix missing of_node_put() in asoc_qcom_lpass_cpu_platform_probe()

We should call of_node_put() for the reference 'dsp_of_node' returned by
of_parse_phandle() which will increase the refcount.

Fixes: 9bae4880acee ("ASoC: qcom: move ipq806x specific bits out of lpass driver.")
Co-authored-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Liang He <windhl@126.com>
Link: https://lore.kernel.org/r/20220702020109.263980-1-windhl@126.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: codecs: wsa883x: add missing break statement
Srinivas Kandagatla [Fri, 1 Jul 2022 12:55:15 +0000 (13:55 +0100)]
ASoC: codecs: wsa883x: add missing break statement

Add missing break in one of the switch statement.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: cdb09e623143 ("ASoC: codecs: wsa883x: add control, dapm widgets and map")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220701125515.32332-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: codecs: wsa883x: handle timeouts in resume path
Srinivas Kandagatla [Thu, 30 Jun 2022 13:00:23 +0000 (14:00 +0100)]
ASoC: codecs: wsa883x: handle timeouts in resume path

Currently we do not check if SoundWire slave initialization timeout
expired before continuing to access its registers.

Its possible that the registers are not accessible if timeout is
expired. Handle this by returning timeout in resume path.

Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Fixes: 43b8c7dc85a1 ("ASoC: codecs: add wsa883x amplifier support")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220630130023.9308-2-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: codecs: wsa881x: handle timeouts in resume path
Srinivas Kandagatla [Thu, 30 Jun 2022 13:00:22 +0000 (14:00 +0100)]
ASoC: codecs: wsa881x: handle timeouts in resume path

Currently we do not check if SoundWire slave initialization timeout
expired before continuing to access its registers.

Its possible that the registers are not accessible if timeout is
expired. Handle this by returning timeout in resume path.

Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Fixes: 8dd552458361 ("ASoC: codecs: wsa881x: add runtime pm support")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220630130023.9308-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: soc-core.c: fixup snd_soc_of_get_dai_link_cpus()
Mark Brown [Thu, 30 Jun 2022 15:09:32 +0000 (16:09 +0100)]
ASoC: soc-core.c: fixup snd_soc_of_get_dai_link_cpus()

Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

Current ASoC has fixup both snd_soc_of_get_dai_link_cpus/codecs().
I guess cpu was copied from codec, but it is using "codec" naming everwhere
in "cpu" function. It is strange, and thus, error case will be issue
(It should call cpu function instead of codec).

This patch tidyup it, and try to cleanup.
[1/2] is for bug-fix,
[2/2] is for new feature.

22 months agoASoC: tegra: delete a semicolon
Li kunyu [Thu, 30 Jun 2022 02:03:47 +0000 (10:03 +0800)]
ASoC: tegra: delete a semicolon

extra semicolons could be deleted.

Signed-off-by: Li kunyu <kunyu@nfschina.com>
Link: https://lore.kernel.org/r/20220630020347.7148-1-kunyu@nfschina.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: wm_adsp: Minor clean and redundant code removal
Charles Keepax [Thu, 30 Jun 2022 10:14:59 +0000 (11:14 +0100)]
ASoC: wm_adsp: Minor clean and redundant code removal

The cs_dsp core will return an error if passed a NULL cs_dsp struct so
there is no need for the wm_adsp_write|read_ctl functions to manually
check that. The cs_dsp core will also check the data is within bounds of
the control so the additional bounds check is redundant too. Simplify
things a bit by removing said code.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220630101459.3442327-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: samsung: change neo1973_audio from a global to static
Tom Rix [Wed, 29 Jun 2022 20:18:11 +0000 (16:18 -0400)]
ASoC: samsung: change neo1973_audio from a global to static

sparse reports
sound/soc/samsung/neo1973_wm8753.c:347:24: warning: symbol 'neo1973_audio' was not declared. Should it be static?

neo1973_audio is only used in neo1973_wm8753.c, so it's
storage class specifier should be static.

Fixes: e26a2abcc246 ("ASoC: samsung: neo1973: turn into platform driver")
Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220629201811.2537853-1-trix@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: codecs: wsa883x: add control, dapm widgets and map
Srinivas Kandagatla [Thu, 30 Jun 2022 12:36:33 +0000 (13:36 +0100)]
ASoC: codecs: wsa883x: add control, dapm widgets and map

Add controls, dapm widgets along with route.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220630123633.8047-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: dt-bindings: Add bindings for WCD9335 DAIs
Mark Brown [Thu, 30 Jun 2022 11:45:02 +0000 (12:45 +0100)]
ASoC: dt-bindings: Add bindings for WCD9335 DAIs

Merge series from Yassine Oudjana <yassine.oudjana@gmail.com>:

Add DT bindings for WCD9335 DAIs and use them in the driver as well
as all device trees currently using WCD9335.

22 months agoASoC: doc: Update dead links
Marek Vasut [Tue, 28 Jun 2022 16:58:07 +0000 (18:58 +0200)]
ASoC: doc: Update dead links

The alsa-project documentation is now part of the kernel docs,
the original links are long dead, update links.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Mark Brown <broonie@kernel.org>
Cc: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20220628165807.152191-1-marex@denx.de
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: samsung: change gpiod_speaker_power and rx1950_audio from global to static...
Tom Rix [Wed, 29 Jun 2022 18:53:45 +0000 (14:53 -0400)]
ASoC: samsung: change gpiod_speaker_power and rx1950_audio from global to static variables

sparse reports
sound/soc/samsung/rx1950_uda1380.c:131:18: warning: symbol 'gpiod_speaker_power' was not declared. Should it be static?
sound/soc/samsung/rx1950_uda1380.c:231:24: warning: symbol 'rx1950_audio' was not declared. Should it be static?

Both gpiod_speaker_power and rx1950_audio are only used in rx1950_uda1380.c,
so their storage class specifiers should be static.

Fixes: 83d74e354200 ("ASoC: samsung: rx1950: turn into platform driver")
Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220629185345.910406-1-trix@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: wcd9335: Use DT bindings instead of local DAI definitions
Yassine Oudjana [Wed, 22 Jun 2022 16:13:21 +0000 (20:13 +0400)]
ASoC: wcd9335: Use DT bindings instead of local DAI definitions

Get DAI indices from DT bindings and remove the currently used
local definitions.

Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220622161322.168017-3-y.oudjana@protonmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: dt-bindings: Add bindings for WCD9335 DAIs
Yassine Oudjana [Wed, 22 Jun 2022 16:13:20 +0000 (20:13 +0400)]
ASoC: dt-bindings: Add bindings for WCD9335 DAIs

Add bindings for the DAIs available in WCD9335 to avoid
having to use unclear number indices in device trees.

Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220622161322.168017-2-y.oudjana@protonmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: soc-core.c: share code for snd_soc_of_get_dai_link_cpus/codecs()
Kuninori Morimoto [Wed, 22 Jun 2022 05:54:13 +0000 (05:54 +0000)]
ASoC: soc-core.c: share code for snd_soc_of_get_dai_link_cpus/codecs()

ASoC has snd_soc_of_get_dai_link_cpus/codecs(), and these are almost same
code. The main difference are below.

for_each_link_cpus() dai_link->cpus dai_link->num_cpus
for_each_link_codecs() dai_link->codecs dai_link->num_codecs

Because we need to use these parameters, we can't share full-code for now,
but can share some codes.
This patch adds __snd_soc_of_get/put_xxx() functions, and share the code.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87y1xpp7ju.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: soc-core.c: fixup snd_soc_of_get_dai_link_cpus()
Kuninori Morimoto [Wed, 22 Jun 2022 05:54:06 +0000 (05:54 +0000)]
ASoC: soc-core.c: fixup snd_soc_of_get_dai_link_cpus()

commit 900dedd7e47cc3f ("ASoC: Introduce snd_soc_of_get_dai_link_cpus")
adds new snd_soc_of_get_dai_link_cpus(), but it is using
"codec" everywhere. It is very strange, and is issue when error case.
It should call cpu instead of codec in error case.
This patch tidyup it.

Fixes: 900dedd7e47cc3f ("ASoC: Introduce snd_soc_of_get_dai_link_cpus")
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/87zgi5p7k1.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: Refactor non_legacy_dai_naming flag
Mark Brown [Wed, 29 Jun 2022 15:58:08 +0000 (16:58 +0100)]
ASoC: Refactor non_legacy_dai_naming flag

Merge series from Charles Keepax <ckeepax@opensource.cirrus.com>:

Historically, the legacy DAI naming scheme was applied to platform
drivers and the newer scheme to CODEC drivers. During componentisation
the core lost the knowledge of if a driver was a CODEC or platform, they
were all now components. To continue to support the legacy naming on
older platform drivers a flag was added to the snd_soc_component_driver
structure, non_legacy_dai_naming, to indicate to use the new scheme and
this was applied to all CODECs as part of the migration.

However, a slight issue appears to be developing with respect to this
flag being opt in for the non-legacy scheme, which presumably we want to
be the primary scheme used. Many codec drivers appear to forget to
include this flag:

  grep -l -r "snd_soc_component_driver" sound/soc/codecs/*.c |
  xargs grep -L "non_legacy_dai_naming" | wc
     48      48    556

Whilst in many cases the configuration of the DAIs themselves will cause
the core to apply the new scheme anyway, it would seem more sensible to
change the flag to legacy_dai_naming making the new scheme opt out. This
patch series migrates across to such a scheme.

22 months agoASoC: codecs: add WSA883x support
Mark Brown [Wed, 29 Jun 2022 14:43:09 +0000 (15:43 +0100)]
ASoC: codecs: add WSA883x support

Merge series from Srinivas Kandagatla <srinivas.kandagatla@linaro.org>:

This patchset adds support for WSA883x smart speaker amplifier codec
connected via SoundWire. This codec also has a temperature sensor used
for speaker protection, support for this is not added yet.

Most of the code is derived from Qualcomm downstream msm-5.10 kernel.
Thanks to Patrick Lai's Team.

This codec is tested on SM8450 MTP.

22 months agoASoC: rockchip: i2s: Remove unwanted dma settings in rockchip_i2s_probe
Judy Hsiao [Wed, 29 Jun 2022 08:04:21 +0000 (08:04 +0000)]
ASoC: rockchip: i2s: Remove unwanted dma settings in rockchip_i2s_probe

Remove the unwanted dma settings in rockchip_i2s_probe.

Fixes: 44f362c2cc6d ("ASoC: rockchip: i2s: switch BCLK to GPIO")
Signed-off-by: Judy Hsiao <judyhsiao@chromium.org>
Link: https://lore.kernel.org/r/20220629080421.2427933-1-judyhsiao@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: dt-bindings: fsl,micfil: Convert format to json-schema
Shengjiu Wang [Tue, 28 Jun 2022 03:13:25 +0000 (11:13 +0800)]
ASoC: dt-bindings: fsl,micfil: Convert format to json-schema

Convert the NXP MICFIL binding to DT schema format using json-schema.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/1656386005-29376-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: fsl_micfil: change micfil default settings
Shengjiu Wang [Tue, 28 Jun 2022 08:39:49 +0000 (16:39 +0800)]
ASoC: fsl_micfil: change micfil default settings

Previous default settings resulted in loose dynamic
range and low sound level.
New default configuration changes:
- outgain = 2
- quality mode = VLOW0
- dc remover = bypass

Signed-off-by: Irina Patru <ioana-irina.patru@nxp.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1656405589-29850-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: max98396: Fix TDM mode BSEL settings
Daniel Mack [Wed, 29 Jun 2022 05:06:30 +0000 (07:06 +0200)]
ASoC: max98396: Fix TDM mode BSEL settings

In TDM mode, the BSEL register value must be set according to table 5 in the
datasheet. This patch adds a lookup function and uses it in
max98396_dai_tdm_slot().

As the first 3 entries can also be used for non-TDM setups, the code re-uses
the same table for such scenarios.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Link: https://lore.kernel.org/r/20220629050630.2848317-1-daniel@zonque.org
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: rockchip: i2s: Fix the debug level on missing pinctrl
Judy Hsiao [Wed, 29 Jun 2022 08:03:45 +0000 (08:03 +0000)]
ASoC: rockchip: i2s: Fix the debug level on missing pinctrl

Use dev_dbg on missing i2s->pinctrl as the pinctrl property is optional.

Fixes: 44f362c2cc6d ("ASoC: rockchip: i2s: switch BCLK to GPIO")
Signed-off-by: Judy Hsiao <judyhsiao@chromium.org>
Link: https://lore.kernel.org/r/20220629080345.2427872-1-judyhsiao@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoMAINTAINERS: add ASoC Qualcomm codecs
Srinivas Kandagatla [Wed, 29 Jun 2022 09:06:44 +0000 (10:06 +0100)]
MAINTAINERS: add ASoC Qualcomm codecs

Add missing Qualcomm codes to the list.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220629090644.67982-5-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: codecs: add wsa883x amplifier support
Srinivas Kandagatla [Wed, 29 Jun 2022 09:06:42 +0000 (10:06 +0100)]
ASoC: codecs: add wsa883x amplifier support

This patch adds support to WSA8830/WSA8812/WSA8835 Class-D Smart
Speaker Amplifier. This Amplifier is primarily interfaced with
SoundWire.

This patch is tested on SM8450 MTP Board.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220629090644.67982-3-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: dt-bindings: Add WSA883x bindings
Srinivas Kandagatla [Wed, 29 Jun 2022 09:06:41 +0000 (10:06 +0100)]
ASoC: dt-bindings: Add WSA883x bindings

This patch adds bindings for WSA883x Smart Speaker Amplifier.
This Amplifier also has a simple thermal sensor for temperature
measurments with speaker protection.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220629090644.67982-2-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: qcom: Add driver support for audioreach solution
Srinivasa Rao Mandadapu [Mon, 27 Jun 2022 10:44:22 +0000 (16:14 +0530)]
ASoC: qcom: Add driver support for audioreach solution

Add Machine driver support for audioreach solution, which uses
ADSP in SC7280 based paltforms.

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Link: https://lore.kernel.org/r/1656326662-14524-1-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: qcom: lpass: Fix apq8016 compat string to match yaml
Bryan O'Donoghue [Tue, 28 Jun 2022 12:04:34 +0000 (13:04 +0100)]
ASoC: qcom: lpass: Fix apq8016 compat string to match yaml

The documented yaml compat string for the apq8016 is
"qcom,apq8016-lpass-cpu" not "qcom,lpass-cpu-apq8016". Looking at the other
lpass compat strings the general form is "qcom,socnum-lpass-cpu".

We need to fix both the driver and dts to match.

Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Link: https://lore.kernel.org/r/20220628120435.3044939-2-bryan.odonoghue@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoAdd PDM/DSD/dataline configuration support
Mark Brown [Tue, 28 Jun 2022 10:30:11 +0000 (11:30 +0100)]
Add PDM/DSD/dataline configuration support

Merge series from Shengjiu Wang <shengjiu.wang@nxp.com>:

Support PDM format and DSD format.
Add new dts property to configure dataline. The SAI has multiple
successive FIFO registers, but in some use
case the required dataline/FIFOs are not successive.

22 months agoASoC: use pm_runtime_resume_and_get() when possible
Mark Brown [Tue, 28 Jun 2022 10:30:10 +0000 (11:30 +0100)]
ASoC: use pm_runtime_resume_and_get() when possible

Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

After a set of SOF-specific changes, this patchset correct problematic
uses of pm_runtime_get_sync() in ASoC, or simplifies the flow with no
functional changes. Two patches for Intel platforms also add a test on
resume success.

Additional changes were initially suggested to completely remove the
use of pm_runtime_get_sync(). These changes were dropped since they
are way too invasive, specifically in cases where the return values
were not tested, which would lead to duplicate pm_runtime_put(). The
remaining uses of pm_runtime_get_sync() cannot really be blindly
modified without context and knowledge of each driver.

22 months agoASoC: samsung: h1940_uda1380: include proepr GPIO consumer header
Krzysztof Kozlowski [Mon, 27 Jun 2022 14:19:00 +0000 (16:19 +0200)]
ASoC: samsung: h1940_uda1380: include proepr GPIO consumer header

h1940_uda1380 uses gpiod*/GPIOD* so it should include GPIO consumer
header.

Fixes: 9666e27f90b9 ("ASoC: samsung: h1940: turn into platform driver")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220627141900.470469-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: samsung: Enable compile test
Krzysztof Kozlowski [Mon, 27 Jun 2022 14:34:12 +0000 (16:34 +0200)]
ASoC: samsung: Enable compile test

Allow compile testing of Samsung SoC Sound drivers.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220627143412.477226-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: samsung: s3c24xx-i2s: Drop unneeded gpio.h include
Krzysztof Kozlowski [Mon, 27 Jun 2022 14:34:11 +0000 (16:34 +0200)]
ASoC: samsung: s3c24xx-i2s: Drop unneeded gpio.h include

The module does not use anything from gpio.h header.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220627143412.477226-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: samsung: s3c-i2s-v2: Allow build for unsupported hardware
Krzysztof Kozlowski [Mon, 27 Jun 2022 14:34:10 +0000 (16:34 +0200)]
ASoC: samsung: s3c-i2s-v2: Allow build for unsupported hardware

There is no particular need to restrict building of S3C I2S driver to
supported platforms within the C unit, because Kconfig does it.
Removing such restricting #ifdef from s3c-i2s-v2 allows compile testing
it on other platforms.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220627143412.477226-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: max98396: Some assorted fixes and additions
Mark Brown [Mon, 27 Jun 2022 20:45:57 +0000 (21:45 +0100)]
ASoC: max98396: Some assorted fixes and additions

Merge series from Daniel Mack <daniel@zonque.org>:

This is a series of some patches that I collected while using the
max98396 driver is a TDM mode setup.

They correct BSEL and PCM mode configs, add support for power supplies
and add some bits to the documentation.

The code is tested in TDM-16 and TDM-8 mode with 32 channel width.

22 months agoASoC: sun50i-codec-analog: Internal bias support
Mark Brown [Mon, 27 Jun 2022 20:45:56 +0000 (21:45 +0100)]
ASoC: sun50i-codec-analog: Internal bias support

Merge series from Samuel Holland <samuel@sholland.org>:

This series adds support for enabling the codec's internal microphone
bias, which is needed on at least some versions of the PinePhone.

Changes in v2:
 - Move register update from component probe to device probe

Arnaud Ferraris (2):
  ASoC: dt-bindings: sun50i-codec: Add binding for internal bias
  ASoC: sun50i-codec-analog: Add support for internal bias

Samuel Holland (1):
  arm64: dts: allwinner: pinephone: Enable internal HMIC bias

 .../bindings/sound/allwinner,sun50i-a64-codec-analog.yaml | 5 +++++
 .../arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts | 4 ++++
 .../arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts | 4 ++++
 sound/soc/sunxi/sun50i-codec-analog.c                     | 8 ++++++++
 4 files changed, 21 insertions(+)

--
2.35.1

22 months agoASoC: samsung: s3c24xx-i2s: Fix typo in DAIFMT handling
Charles Keepax [Mon, 27 Jun 2022 09:43:35 +0000 (10:43 +0100)]
ASoC: samsung: s3c24xx-i2s: Fix typo in DAIFMT handling

The conversion of the set_fmt callback to direct clock specification
included a small typo, correct the affected code.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220627094335.3051210-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: Merge up fixes
Mark Brown [Mon, 27 Jun 2022 17:27:03 +0000 (18:27 +0100)]
ASoC: Merge up fixes

Further development will need some of the fixes.

22 months agoASoC: fsl_sai: Configure dataline/FIFO information from dts property
Shengjiu Wang [Fri, 17 Jun 2022 07:44:37 +0000 (15:44 +0800)]
ASoC: fsl_sai: Configure dataline/FIFO information from dts property

The SAI has multiple successive FIFO registers, but in some use
case the required dataline/FIFOs are not successive, so need
get such information from dts property "fsl,dataline"

fsl,dataline has 3 values for each configuration:
first one means the type: I2S(1) or DSD(2),
second one is dataline mask for 'rx',
third one is dataline mask for 'tx'.

Also set dma peripheral address and TRCE bits according to data lane.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Link: https://lore.kernel.org/r/1655451877-16382-8-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: dt-bindings: fsl-sai: Add new property to configure dataline
Shengjiu Wang [Fri, 17 Jun 2022 07:44:36 +0000 (15:44 +0800)]
ASoC: dt-bindings: fsl-sai: Add new property to configure dataline

"fsl,dataline" is added to configure the dataline of SAI.
It has 3 value for each configuration, first one means the type:
I2S(1) or PDM(2), second one is dataline mask for 'rx', third one is
dataline mask for 'tx'. for example:

fsl,dataline = <1 0xff 0xff 2 0xff 0x11>,

it means I2S type rx mask is 0xff, tx mask is 0xff, PDM type
rx mask is 0xff, tx mask is 0x11 (dataline 1 and 4 enabled).

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1655451877-16382-7-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: fsl_sai: Make res a member of struct fsl_sai
Shengjiu Wang [Fri, 17 Jun 2022 07:44:35 +0000 (15:44 +0800)]
ASoC: fsl_sai: Make res a member of struct fsl_sai

The resource info need to be accessed by hw_params()
function for multi fifo case, the start address may
be not the FIFO0. So move it to be a member of
struct fsl_sai.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1655451877-16382-6-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoc: fsl_sai: Add pinctrl operation for PDM and DSD
Shengjiu Wang [Fri, 17 Jun 2022 07:44:34 +0000 (15:44 +0800)]
ASoc: fsl_sai: Add pinctrl operation for PDM and DSD

With DSD format, the pinctrl is different compare with
I2S format, because one dataline only has one channel
data, and the codec always mux the LRCLK pin to DSD
data line, and on i.MX8MQ the BCLK pin can route to
codec on DSD case for the MCLK is too high.

Add pinctrl operation that the pinctrl can be switched
on runtime according to the I2S format or DSD format

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1655451877-16382-5-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: fsl_sai: Add support for more sample rates
Shengjiu Wang [Fri, 17 Jun 2022 07:44:33 +0000 (15:44 +0800)]
ASoC: fsl_sai: Add support for more sample rates

Add support for more sample rates, because PDM format
bitstream has higher sample rates. for example DSD512
format, the bit clock is 22.5792MHz, if the word width
is U8_LE, then the max sample rate is 2822400.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1655451877-16382-4-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: fsl_sai: Add DSD bit format support
Shengjiu Wang [Fri, 17 Jun 2022 07:44:32 +0000 (15:44 +0800)]
ASoC: fsl_sai: Add DSD bit format support

Support DSD_U8, DSD_U16_LE, DSD_U32_LE.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1655451877-16382-3-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: fsl_sai: Add PDM daifmt support
Shengjiu Wang [Fri, 17 Jun 2022 07:44:31 +0000 (15:44 +0800)]
ASoC: fsl_sai: Add PDM daifmt support

PDM format is used for 1-bit stream, so clear the FBT and SYWD,
and the each dataline only has one channel data.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1655451877-16382-2-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: sun50i-codec-analog: Add support for internal bias
Arnaud Ferraris [Tue, 21 Jun 2022 03:54:51 +0000 (22:54 -0500)]
ASoC: sun50i-codec-analog: Add support for internal bias

In order to properly bias headset microphones, there should be a pull-up
resistor between pins HBIAS and MIC2P. This can be an external resistor,
but the codec also provides an internal 2.2K resistor which is enabled
by a register.

This patch enables or disables the internal bias resistor based on a
device tree property.

Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
[Samuel: split binding and implementation; move to device probe]
Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20220621035452.60272-3-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: dt-bindings: sun50i-codec: Add binding for internal bias
Arnaud Ferraris [Tue, 21 Jun 2022 03:54:50 +0000 (22:54 -0500)]
ASoC: dt-bindings: sun50i-codec: Add binding for internal bias

In order to properly bias headset microphones, there should be a pull-up
resistor between pins HBIAS and MIC2P. This can be an external resistor,
but the codec also provides an internal 2.2K resistor which is enabled
by a register.

This patch adds a device-tree property to the sun50i-codec-analog driver
to take advantage of this feature.

Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
[Samuel: split binding and implementation patches]
Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20220621035452.60272-2-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: ti: davinci-mcasp: use pm_runtime_resume_and_get()
Pierre-Louis Bossart [Thu, 16 Jun 2022 22:04:27 +0000 (17:04 -0500)]
ASoC: ti: davinci-mcasp: use pm_runtime_resume_and_get()

The use of pm_runtime_get_sync() is buggy with no use of put_noidle on
error.

Use pm_runtime_resume_and_get() instead.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220616220427.136036-12-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: tas2552: use pm_runtime_resume_and_get()
Pierre-Louis Bossart [Thu, 16 Jun 2022 22:04:26 +0000 (17:04 -0500)]
ASoC: tas2552: use pm_runtime_resume_and_get()

The use of pm_runtime_get_sync() is buggy with no use of put_noidle() on
error.

Use pm_runtime_resume_and_get() instead.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220616220427.136036-11-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: rockchip: pdm: use pm_runtime_resume_and_get()
Pierre-Louis Bossart [Thu, 16 Jun 2022 22:04:25 +0000 (17:04 -0500)]
ASoC: rockchip: pdm: use pm_runtime_resume_and_get()

Simplify the flow.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220616220427.136036-10-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: img: img-i2s-out: use pm_runtime_resume_and_get()
Pierre-Louis Bossart [Thu, 16 Jun 2022 22:04:24 +0000 (17:04 -0500)]
ASoC: img: img-i2s-out: use pm_runtime_resume_and_get()

Simplify the flow.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220616220427.136036-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: fsl: fsl_sai: use pm_runtime_resume_and_get()
Pierre-Louis Bossart [Thu, 16 Jun 2022 22:04:23 +0000 (17:04 -0500)]
ASoC: fsl: fsl_sai: use pm_runtime_resume_and_get()

Simplify the flow.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220616220427.136036-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: rockchip: i2s_tdm: use pm_runtime_resume_and_get()
Pierre-Louis Bossart [Thu, 16 Jun 2022 22:04:22 +0000 (17:04 -0500)]
ASoC: rockchip: i2s_tdm: use pm_runtime_resume_and_get()

simplify the flow. No functionality change, except that on -EACCESS
the reference count will be decreased.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220616220427.136036-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: wsa881x: use pm_runtime_resume_and_get()
Pierre-Louis Bossart [Thu, 16 Jun 2022 22:04:21 +0000 (17:04 -0500)]
ASoC: wsa881x: use pm_runtime_resume_and_get()

simplify the flow. No functionality change, except that on -EACCESS
the reference count will be decreased.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220616220427.136036-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: wcd-mbhc-v2: use pm_runtime_resume_and_get()
Pierre-Louis Bossart [Thu, 16 Jun 2022 22:04:20 +0000 (17:04 -0500)]
ASoC: wcd-mbhc-v2: use pm_runtime_resume_and_get()

simplify the flow. No functionality change, except that on -EACCESS
the reference count will be decreased.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220616220427.136036-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
22 months agoASoC: Intel: skylake: skl-pcm: use pm_runtime_resume_and_get()
Pierre-Louis Bossart [Thu, 16 Jun 2022 22:04:18 +0000 (17:04 -0500)]
ASoC: Intel: skylake: skl-pcm: use pm_runtime_resume_and_get()

The current code does not check for errors and does not release the
reference on errors.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Acked-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220616220427.136036-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>