platform/kernel/linux-rpi.git
2 years agoASoC: DAI clocking terminology modernisation
Mark Brown [Wed, 8 Jun 2022 09:59:02 +0000 (10:59 +0100)]
ASoC: DAI clocking terminology modernisation

Merge series from Mark Brown <broonie@kernel.org>:

Update the last batch of CODEC drivers without specific
maintainers to use the new defines for DAI clocking.

2 years agoASoC: ssm: Use modern ASoC DAI format terminology
Mark Brown [Tue, 7 Jun 2022 15:10:51 +0000 (16:10 +0100)]
ASoC: ssm: Use modern ASoC DAI format terminology

Merge series from Mark Brown <broonie@kernel.org>:

Trivial updates to modernise the various ssm* drivers to the new
DAI clocking constants.

2 years agoASoC: SOF: AMD/Mediatek updates for 5.20
Mark Brown [Tue, 7 Jun 2022 13:58:44 +0000 (14:58 +0100)]
ASoC: SOF: AMD/Mediatek updates for 5.20

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

Small patches reviewed on SOF GitHub.

2 years agoASoC: mediatek: mt8173-rt5650: Fix refcount leak in mt8173_rt5650_dev_probe
Miaoqian Lin [Fri, 3 Jun 2022 12:42:41 +0000 (16:42 +0400)]
ASoC: mediatek: mt8173-rt5650: Fix refcount leak in mt8173_rt5650_dev_probe

of_parse_phandle() returns a node pointer with refcount
incremented, we should use of_node_put() on it when not need anymore.
Fix refcount leak in some error paths.

Fixes: 0f83f9296d5c ("ASoC: mediatek: Add machine driver for ALC5650 codec")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220603124243.31358-1-linmq006@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: simple-card-utils: Make asoc_simple_clean_reference() return void
Uwe Kleine-König [Sun, 5 Jun 2022 15:35:37 +0000 (17:35 +0200)]
ASoC: simple-card-utils: Make asoc_simple_clean_reference() return void

asoc_simple_clean_reference() returns zero unconditionally. Letting it
return void instead makes it easier to see in the caller that there is no
error to handle.

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/20220605153537.26591-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: wm8731: update wlf,wm8731.yaml reference
Mauro Carvalho Chehab [Mon, 6 Jun 2022 15:25:44 +0000 (16:25 +0100)]
ASoC: wm8731: update wlf,wm8731.yaml reference

Changeset 0e336eeaf467 ("ASoC: wm8731: Convert DT bindings to YAML format")
renamed: Documentation/devicetree/bindings/sound/wm8731.txt
to: Documentation/devicetree/bindings/sound/wlf,wm8731.yaml.

Update its cross-reference accordingly.

Fixes: 0e336eeaf467 ("ASoC: wm8731: Convert DT bindings to YAML format")
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/e56e54fe0ebb1b6e8dd2e245c398190016eb0a34.1654529011.git.mchehab@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: Intel: broadwell: Make broadwell_disable_jack() return void
Uwe Kleine-König [Sun, 5 Jun 2022 15:39:04 +0000 (17:39 +0200)]
ASoC: Intel: broadwell: Make broadwell_disable_jack() return void

broadwell_disable_jack() returns zero unconditionally. Letting it
return void instead makes it easier to see in the callers that there is no
error to handle.

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

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220605153904.26921-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoAdd Machine driver support for nau8825, max98560 and rt5682s, rt1019
Mark Brown [Tue, 7 Jun 2022 10:54:03 +0000 (11:54 +0100)]
Add Machine driver support for nau8825, max98560 and rt5682s, rt1019

Merge series from V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>:

Add support for some new AMD machines.

2 years agoASoC: Drop some i2c noop remove callbacks
Mark Brown [Tue, 7 Jun 2022 10:54:01 +0000 (11:54 +0100)]
ASoC: Drop some i2c noop remove callbacks

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

From: Uwe Kleine-König <uwe@kleine-koenig.org>

Hello,

I intended to send this after -rc1 was cut, but found a few spare
minutes to prepare this series. All four patches were sent already
before based on v5.18, but there were some conflicting changes added in
the merge window. This series contains the four patches on top of
current linus/master and so bases on a tree including the conflicting
changes. Expecting no more sound changes in this merge window, this
should apply cleanly on top of -rc1.

Best regards
Uwe

Uwe Kleine-König (4):
  ASoC: ak4642: Drop no-op remove function
  ASoC: da7219: Drop no-op remove function
  ASoC: lm49453: Drop no-op remove function
  ASoC: da732x: Drop no-op remove function

 sound/soc/codecs/ak4613.c  | 6 ------
 sound/soc/codecs/da7219.c  | 6 ------
 sound/soc/codecs/da732x.c  | 6 ------
 sound/soc/codecs/lm49453.c | 6 ------
 4 files changed, 24 deletions(-)

base-commit: 50fd82b3a9a9335df5d50c7ddcb81c81d358c4fc
--
2.36.1

2 years agoSwitch to use internal PLL for iMCLK
Mark Brown [Tue, 7 Jun 2022 10:53:44 +0000 (11:53 +0100)]
Switch to use internal PLL for iMCLK

Merge series from Hui Wang <hui.wang@canonical.com>:

Taking your advice and try to enable internal PLL to get a more
accurate sample rate. And I also changed the fsl-asoc-card.c to support
the nau8822 codec, now the sound quality is pretty good on my imx6sx
EVB.

2 years agoASoC: trivial changes for cppcheck warnings
Mark Brown [Tue, 7 Jun 2022 10:52:12 +0000 (11:52 +0100)]
ASoC: trivial changes for cppcheck warnings

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

This can probably wait for the next merge window, I found a number of
cppcheck warnings that I didn't see in my last checks. The irony is
that the only really important issue found by cppcheck was on one of
my previous DPCM changes (submitted separately as a fix).

2 years agoOPE support on Tegra210 and later
Mark Brown [Tue, 7 Jun 2022 10:52:10 +0000 (11:52 +0100)]
OPE support on Tegra210 and later

Merge series from Sameer Pujar <spujar@nvidia.com>:

This series adds support for Output Prcoessing Module (OPE) module on
Tegra210 and later generations of SoCs. OPE is a client of AHUB and
it has sub blocks of PEQ (Parametric Equalizer) and MBDRC (Multi Band
Dynamic Range Compressor) for data processing.

An ASoC component is registered for OPE, which includes PEQ and MBDRC
functions as well. This can be plugged in audio path using ALSA mixer
controls. The series adds necessary binding documentaion, driver and
DT binding patches to enable OPE module on Jetson platforms.

2 years agoASoC: Intel: avs: Machine boards and HDA codec support
Mark Brown [Tue, 7 Jun 2022 10:52:09 +0000 (11:52 +0100)]
ASoC: Intel: avs: Machine boards and HDA codec support

Merge series from Cezary Rojewski <cezary.rojewski@intel.com>
From there on is a range of boards appended. All of them follow the same:

This series focuses on populating boards/ subdirectory with supported
configurations by the avs-driver. Note: it is independent of recently
provided "Driver code and PCM operations" series [1], that is, code
found here should not collide with it.

Series starts with a small change that adds a helper to sound pcm
header, allowing for retrieving string naming a direction without the
need of substream pointer. Said helper is used by codec driver code that
follows it but I believe it's generic and helpful enough that it can be
called an independent addition to the sound core.

Code for generic HD-Audio codec driver follows. It is a ASoC wrapper for
existing HD-Audio codec code found in sound/pci/hda/. There is basically
no custom logic involved up to the point that driver follows
HDA_DEV_LEGACY convention, rather than the HDA_DEV_ASOC one. Commit
message for the given patch iterates on this and explains crucial parts
of the implementation.

From there on is a range of boards appended. All of them follow the same
scheme:

- define avs_create_dai_link() so DAI-LINKs can be created dynamically,
  based on the link_mask (I2S) or the number of entries in the
  ->pcm_list_head list (HDA)
- define avs_create_dapm_routes() so DAPM routes can be created
  dynamically, same rules as above apply
- define probe() function that creates new ASoC card, assign all
  required operations and resources along with calling the two above

Changes in v2:
- 'link_mask' usage replaced with 'i2s_link_mask' as requested by
  Pierre
- 'ssp_test' board renamed to 'i2s_test' to match naming convention used
  for other i2s machine boards
- enriched commit message and Kconfig for the 'HD-Audio codec driver'
  patch as requested by Kai

[1]: https://lore.kernel.org/all/20220426172346.3508411-1-cezary.rojewski@intel.com/

Amadeusz Sławiński (1):
  ASoC: Intel: avs: Add max98373 machine board

Cezary Rojewski (13):
  ALSA: Add snd_pcm_direction_name() helper
  ASoC: codecs: Add HD-Audio codec driver
  ASoC: Intel: avs: Add HDAudio machine board
  ASoC: Intel: avs: Add DMIC machine board
  ASoC: Intel: avs: Add I2S-test machine board
  ASoC: Intel: avs: Add rt274 machine board
  ASoC: Intel: avs: Add rt286 machine board
  ASoC: Intel: avs: Add rt298 machine board
  ASoC: Intel: avs: Add rt5682 machine board
  ASoC: Intel: avs: Add nau8825 machine board
  ASoC: Intel: avs: Add ssm4567 machine board
  ASoC: Intel: avs: Add max98357a machine board
  ASoC: Intel: avs: Add da7219 machine board

 include/sound/pcm.h                    |  19 +-
 sound/soc/codecs/Kconfig               |  10 +
 sound/soc/codecs/Makefile              |   2 +
 sound/soc/codecs/hda-dai.c             | 102 +++++++
 sound/soc/codecs/hda.c                 | 395 +++++++++++++++++++++++++
 sound/soc/codecs/hda.h                 |  19 ++
 sound/soc/intel/Kconfig                |   3 +
 sound/soc/intel/avs/Makefile           |   3 +
 sound/soc/intel/avs/boards/Kconfig     | 121 ++++++++
 sound/soc/intel/avs/boards/Makefile    |  27 ++
 sound/soc/intel/avs/boards/da7219.c    | 282 ++++++++++++++++++
 sound/soc/intel/avs/boards/dmic.c      |  93 ++++++
 sound/soc/intel/avs/boards/hdaudio.c   | 294 ++++++++++++++++++
 sound/soc/intel/avs/boards/i2s_test.c  | 180 +++++++++++
 sound/soc/intel/avs/boards/max98357a.c | 154 ++++++++++
 sound/soc/intel/avs/boards/max98373.c  | 239 +++++++++++++++
 sound/soc/intel/avs/boards/nau8825.c   | 353 ++++++++++++++++++++++
 sound/soc/intel/avs/boards/rt274.c     | 310 +++++++++++++++++++
 sound/soc/intel/avs/boards/rt286.c     | 281 ++++++++++++++++++
 sound/soc/intel/avs/boards/rt298.c     | 281 ++++++++++++++++++
 sound/soc/intel/avs/boards/rt5682.c    | 340 +++++++++++++++++++++
 sound/soc/intel/avs/boards/ssm4567.c   | 271 +++++++++++++++++
 22 files changed, 3775 insertions(+), 4 deletions(-)
 create mode 100644 sound/soc/codecs/hda-dai.c
 create mode 100644 sound/soc/codecs/hda.c
 create mode 100644 sound/soc/codecs/hda.h
 create mode 100644 sound/soc/intel/avs/boards/Kconfig
 create mode 100644 sound/soc/intel/avs/boards/Makefile
 create mode 100644 sound/soc/intel/avs/boards/da7219.c
 create mode 100644 sound/soc/intel/avs/boards/dmic.c
 create mode 100644 sound/soc/intel/avs/boards/hdaudio.c
 create mode 100644 sound/soc/intel/avs/boards/i2s_test.c
 create mode 100644 sound/soc/intel/avs/boards/max98357a.c
 create mode 100644 sound/soc/intel/avs/boards/max98373.c
 create mode 100644 sound/soc/intel/avs/boards/nau8825.c
 create mode 100644 sound/soc/intel/avs/boards/rt274.c
 create mode 100644 sound/soc/intel/avs/boards/rt286.c
 create mode 100644 sound/soc/intel/avs/boards/rt298.c
 create mode 100644 sound/soc/intel/avs/boards/rt5682.c
 create mode 100644 sound/soc/intel/avs/boards/ssm4567.c

--
2.25.1

2 years agoASoC: Intel: soc-acpi and machine driver updates
Mark Brown [Tue, 7 Jun 2022 10:52:07 +0000 (11:52 +0100)]
ASoC: Intel: soc-acpi and machine driver updates

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

Small updates to add initial tables for MeteorLake, SoundWire machine
driver support for tests without HDMI and RT1019 for consistency on
Chromebooks.

2 years agoALSA: hda: cirrus: Add initial DSP support and firmware loading
Mark Brown [Tue, 7 Jun 2022 10:52:06 +0000 (11:52 +0100)]
ALSA: hda: cirrus: Add initial DSP support and firmware loading

Merge series from Vitaly Rodionov <vitalyr@opensource.cirrus.com>:

The CS35L41 Amplifier contains a DSP, capable of running firmware.
The firmware can run algorithms such as Speaker Protection, to ensure
that playback at high gains do not harm the speakers.  This exports some
interfaces to allow more use of this DSP by the HDA version of the driver.

2 years agoASoC: SOF: mediatek: mt8195 suspend check dsp idle
YC Hung [Mon, 6 Jun 2022 21:02:12 +0000 (16:02 -0500)]
ASoC: SOF: mediatek: mt8195 suspend check dsp idle

During suspend flow, sof_suspend will be called and the pm_ops->ctx_save
callback notifies DSP of the upcoming power down.

Upon receipt of the ctx_save IPC, the DSP will start the D3 transition.
Before the DSP enter idle, an interrupt is generated to notify the host of
the power state change.

Since the host and DSP are two different processors, there could be a
race condition, which can be avoided by polling with 1s timeout and 500us
intervals

Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: YC Hung <yc.hung@mediatek.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220606210212.146626-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: mediatek: mt8195 modify dram type as non-cache
YC Hung [Mon, 6 Jun 2022 21:02:11 +0000 (16:02 -0500)]
ASoC: SOF: mediatek: mt8195 modify dram type as non-cache

Modify dram as non-cache memory type to avoid wrong access between
host and dsp side and get the size of shared dma from device tree.

Reviewed-by: Curtis Malainey <cujomalainey@chromium.org>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: YC Hung <yc.hung@mediatek.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220606210212.146626-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: mediatek: Add shared_size for mediatek common chip information
YC Hung [Mon, 6 Jun 2022 21:02:10 +0000 (16:02 -0500)]
ASoC: SOF: mediatek: Add shared_size for mediatek common chip information

Add shared_size for mediatek common chip information which is used for
audio and trace dma.

Reviewed-by: Curtis Malainey <cujomalainey@chromium.org>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: YC Hung <yc.hung@mediatek.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220606210212.146626-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: mediatek: revise mt8195 clock sequence
YC Hung [Mon, 6 Jun 2022 21:02:09 +0000 (16:02 -0500)]
ASoC: SOF: mediatek: revise mt8195 clock sequence

clock enable : enable and set audio_h selection as 26M.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: YC Hung <yc.hung@mediatek.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220606210212.146626-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: amd: Add SOF pm ops callback for Renoir
Ajit Kumar Pandey [Mon, 6 Jun 2022 21:02:08 +0000 (16:02 -0500)]
ASoC: SOF: amd: Add SOF pm ops callback for Renoir

Add SOF PM ops callback in renoir dsp ops to power off and on ACP
IP block during system suspend and resume on Renoir platform.

Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220606210212.146626-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: Intel: sof_sdw: allow HDaudio/HDMI disable
Pierre-Louis Bossart [Mon, 6 Jun 2022 20:46:22 +0000 (15:46 -0500)]
ASoC: Intel: sof_sdw: allow HDaudio/HDMI disable

For tests, it's rather common to disable the HDaudio links and codecs
in the build. Since we already get a codec_mask parameter indicating
that there are no codecs detected, it's straightforward to skip the
HDMI dailink creation and create a card.

Note that when disabling HDMI, a modified topology without HDMI
pipelines needs to be provided as well.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220606204622.144424-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: Intel: boards: rename RTL1019 compatible driver to rt1019p
Yong Zhi [Mon, 6 Jun 2022 20:46:21 +0000 (15:46 -0500)]
ASoC: Intel: boards: rename RTL1019 compatible driver to rt1019p

Use rt1019p for rt1015p.c compatible codec and reserve the name rt1019
for 10EC1019 matched driver in sof_realtek_common.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220606204622.144424-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: Intel: add MeteorLake machines
Bard Liao [Mon, 6 Jun 2022 20:46:20 +0000 (15:46 -0500)]
ASoC: SOF: Intel: add MeteorLake machines

Add support for MeteorLake (MTL) machines support, starting with mockup
devices.

Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220606204622.144424-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mediatek: mt8186: add misc driver and register definitions
Jiaxin Yu [Mon, 23 May 2022 13:28:51 +0000 (21:28 +0800)]
ASoC: mediatek: mt8186: add misc driver and register definitions

Add mt8186 platform misc driver and data tables/register definitions files.

Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Link: https://lore.kernel.org/r/20220523132858.22166-14-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mediatek: mt8186: support gpio control in platform driver
Jiaxin Yu [Mon, 23 May 2022 13:28:50 +0000 (21:28 +0800)]
ASoC: mediatek: mt8186: support gpio control in platform driver

Add gpio control for all audio interface separately.

Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Link: https://lore.kernel.org/r/20220523132858.22166-13-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mediatek: mt8186: support audio clock control in platform driver
Jiaxin Yu [Mon, 23 May 2022 13:28:49 +0000 (21:28 +0800)]
ASoC: mediatek: mt8186: support audio clock control in platform driver

Add audio clock control with CCF interface.

Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Link: https://lore.kernel.org/r/20220523132858.22166-12-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mediatek: mt8186: support tdm in platform driver
Jiaxin Yu [Mon, 23 May 2022 13:28:48 +0000 (21:28 +0800)]
ASoC: mediatek: mt8186: support tdm in platform driver

Add mt8186 tdm dai driver.

Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Link: https://lore.kernel.org/r/20220523132858.22166-11-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mediatek: mt8186: support src in platform driver
Jiaxin Yu [Mon, 23 May 2022 13:28:47 +0000 (21:28 +0800)]
ASoC: mediatek: mt8186: support src in platform driver

Add mt8186 src dai driver

Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Link: https://lore.kernel.org/r/20220523132858.22166-10-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mediatek: mt8186: support pcm in platform driver
Jiaxin Yu [Mon, 23 May 2022 13:28:46 +0000 (21:28 +0800)]
ASoC: mediatek: mt8186: support pcm in platform driver

Add mt8186 pcm dai driver.

Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220523132858.22166-9-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mediatek: mt8186: support i2s in platform driver
Jiaxin Yu [Mon, 23 May 2022 13:28:45 +0000 (21:28 +0800)]
ASoC: mediatek: mt8186: support i2s in platform driver

Add mt8186 i2s dai driver.

Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220523132858.22166-8-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mediatek: mt8186: support hw gain in platform driver
Jiaxin Yu [Mon, 23 May 2022 13:28:44 +0000 (21:28 +0800)]
ASoC: mediatek: mt8186: support hw gain in platform driver

Add mt8186 hw gain dai driver.

Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220523132858.22166-7-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mediatek: mt8186: support hostless in platform driver
Jiaxin Yu [Mon, 23 May 2022 13:28:43 +0000 (21:28 +0800)]
ASoC: mediatek: mt8186: support hostless in platform driver

Add mt8186 hostless dai driver.

Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220523132858.22166-6-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mediatek: mt8186: support adda in platform driver
Jiaxin Yu [Mon, 23 May 2022 13:28:42 +0000 (21:28 +0800)]
ASoC: mediatek: mt8186: support adda in platform driver

Add mt8186 adda dai driver.

Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220523132858.22166-5-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mediatek: mt8186: support audsys clock control
Jiaxin Yu [Mon, 23 May 2022 13:28:41 +0000 (21:28 +0800)]
ASoC: mediatek: mt8186: support audsys clock control

Add mt8186 audio cg control. Audio clock gates are registered to
CCF for reference count and clock parent management.

Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220523132858.22166-4-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mediatek: mt6366: support for mt6366 codec
Jiaxin Yu [Mon, 23 May 2022 13:28:39 +0000 (21:28 +0800)]
ASoC: mediatek: mt6366: support for mt6366 codec

Mt6366 is a new version of mt6358, and they are same about audio part.
So we can reuse the driver of mt6358 that add a new compatible string
inside of the mt6358 driver.

Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Link: https://lore.kernel.org/r/20220523132858.22166-2-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: tlv320dac3x: Use modern ASoC DAI format terminology
Mark Brown [Thu, 2 Jun 2022 13:53:16 +0000 (15:53 +0200)]
ASoC: tlv320dac3x: Use modern ASoC DAI format terminology

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

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220602135316.3554400-21-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: tlv320aic33: Use modern ASoC DAI format terminology
Mark Brown [Thu, 2 Jun 2022 13:53:15 +0000 (15:53 +0200)]
ASoC: tlv320aic33: Use modern ASoC DAI format terminology

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

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220602135316.3554400-20-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: tlv320aic32x4: Use modern ASoC DAI format terminology
Mark Brown [Thu, 2 Jun 2022 13:53:14 +0000 (15:53 +0200)]
ASoC: tlv320aic32x4: Use modern ASoC DAI format terminology

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

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220602135316.3554400-19-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: tlv320aic31xx: Use modern ASoC DAI format terminology
Mark Brown [Thu, 2 Jun 2022 13:53:13 +0000 (15:53 +0200)]
ASoC: tlv320aic31xx: Use modern ASoC DAI format terminology

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

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220602135316.3554400-18-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: tlv320aic26: Use modern ASoC DAI format terminology
Mark Brown [Thu, 2 Jun 2022 13:53:12 +0000 (15:53 +0200)]
ASoC: tlv320aic26: Use modern ASoC DAI format terminology

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

Signed-off-by: Mark Brown <broonie@kernel.org>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/20220602135316.3554400-17-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: tlv320aic23: Use modern ASoC DAI format terminology
Mark Brown [Thu, 2 Jun 2022 13:53:11 +0000 (15:53 +0200)]
ASoC: tlv320aic23: Use modern ASoC DAI format terminology

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

Signed-off-by: Mark Brown <broonie@kernel.org>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/20220602135316.3554400-16-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: tlv320adcx140: Use modern ASoC DAI format terminology
Mark Brown [Thu, 2 Jun 2022 13:53:10 +0000 (15:53 +0200)]
ASoC: tlv320adcx140: Use modern ASoC DAI format terminology

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

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220602135316.3554400-15-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: tlv320adc3xxx: Use modern ASoC DAI format terminology
Mark Brown [Thu, 2 Jun 2022 13:53:09 +0000 (15:53 +0200)]
ASoC: tlv320adc3xxx: Use modern ASoC DAI format terminology

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

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220602135316.3554400-14-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: uda1334: Use modern ASoC DAI format terminology
Mark Brown [Thu, 2 Jun 2022 13:53:08 +0000 (15:53 +0200)]
ASoC: uda1334: Use modern ASoC DAI format terminology

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

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220602135316.3554400-13-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: tas6424: Use modern ASoC DAI format terminology
Mark Brown [Thu, 2 Jun 2022 13:53:07 +0000 (15:53 +0200)]
ASoC: tas6424: Use modern ASoC DAI format terminology

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

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220602135316.3554400-12-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: tas5720: Use modern ASoC DAI format terminology
Mark Brown [Thu, 2 Jun 2022 13:53:06 +0000 (15:53 +0200)]
ASoC: tas5720: Use modern ASoC DAI format terminology

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

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220602135316.3554400-11-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: tas5086: Use modern ASoC DAI format terminology
Mark Brown [Thu, 2 Jun 2022 13:53:05 +0000 (15:53 +0200)]
ASoC: tas5086: Use modern ASoC DAI format terminology

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

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220602135316.3554400-10-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: tas2770: Use modern ASoC DAI format terminology
Mark Brown [Thu, 2 Jun 2022 13:53:04 +0000 (15:53 +0200)]
ASoC: tas2770: Use modern ASoC DAI format terminology

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

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220602135316.3554400-9-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: tas2552: Use modern ASoC DAI format terminology
Mark Brown [Thu, 2 Jun 2022 13:53:03 +0000 (15:53 +0200)]
ASoC: tas2552: Use modern ASoC DAI format terminology

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

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220602135316.3554400-8-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: sti-sas: Use modern ASoC DAI format terminology
Mark Brown [Thu, 2 Jun 2022 13:53:02 +0000 (15:53 +0200)]
ASoC: sti-sas: Use modern ASoC DAI format terminology

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

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220602135316.3554400-7-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: sta350: Use modern ASoC DAI format terminology
Mark Brown [Thu, 2 Jun 2022 13:53:01 +0000 (15:53 +0200)]
ASoC: sta350: Use modern ASoC DAI format terminology

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

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220602135316.3554400-6-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: sta32x: Use modern ASoC DAI format terminology
Mark Brown [Thu, 2 Jun 2022 13:53:00 +0000 (15:53 +0200)]
ASoC: sta32x: Use modern ASoC DAI format terminology

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

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220602135316.3554400-5-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: rk3328: Use modern ASoC DAI format terminology
Mark Brown [Thu, 2 Jun 2022 13:52:59 +0000 (15:52 +0200)]
ASoC: rk3328: Use modern ASoC DAI format terminology

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

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220602135316.3554400-4-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: max98090: Use modern ASoC DAI format terminology
Mark Brown [Thu, 2 Jun 2022 13:52:58 +0000 (15:52 +0200)]
ASoC: max98090: Use modern ASoC DAI format terminology

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

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220602135316.3554400-3-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: cx2072x: Use modern ASoC DAI format terminology
Mark Brown [Thu, 2 Jun 2022 13:52:57 +0000 (15:52 +0200)]
ASoC: cx2072x: Use modern ASoC DAI format terminology

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

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220602135316.3554400-2-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: cs42l51: Correct minimum value for SX volume control
Charles Keepax [Thu, 2 Jun 2022 16:21:19 +0000 (17:21 +0100)]
ASoC: cs42l51: Correct minimum value for SX volume control

The minimum value for the PGA Volume is given as 0x1A, however the
values from there to 0x19 are all the same volume and this is not
represented in the TLV structure. The number of volumes given is correct
so this leads to all the volumes being shifted. Move the minimum value
up to 0x19 to fix this.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220602162119.3393857-7-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: cs42l56: Correct typo in minimum level for SX volume controls
Charles Keepax [Thu, 2 Jun 2022 16:21:18 +0000 (17:21 +0100)]
ASoC: cs42l56: Correct typo in minimum level for SX volume controls

A couple of the SX volume controls specify 0x84 as the lowest volume
value, however the correct value from the datasheet is 0x44. The
datasheet don't include spaces in the value it displays as binary so
this was almost certainly just a typo reading 1000100.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220602162119.3393857-6-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: cs42l52: Correct TLV for Bypass Volume
Charles Keepax [Thu, 2 Jun 2022 16:21:17 +0000 (17:21 +0100)]
ASoC: cs42l52: Correct TLV for Bypass Volume

The Bypass Volume is accidentally using a -6dB minimum TLV rather than
the correct -60dB minimum. Add a new TLV to correct this.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220602162119.3393857-5-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: cs53l30: Correct number of volume levels on SX controls
Charles Keepax [Thu, 2 Jun 2022 16:21:16 +0000 (17:21 +0100)]
ASoC: cs53l30: Correct number of volume levels on SX controls

This driver specified the maximum value rather than the number of volume
levels on the SX controls, this is incorrect, so correct them.

Reported-by: David Rhodes <david.rhodes@cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220602162119.3393857-4-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: cs35l36: Update digital volume TLV
Charles Keepax [Thu, 2 Jun 2022 16:21:15 +0000 (17:21 +0100)]
ASoC: cs35l36: Update digital volume TLV

The digital volume TLV specifies the step as 0.25dB but the actual step
of the control is 0.125dB. Update the TLV to correct this.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220602162119.3393857-3-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: cs42l52: Fix TLV scales for mixer controls
Charles Keepax [Thu, 2 Jun 2022 16:21:14 +0000 (17:21 +0100)]
ASoC: cs42l52: Fix TLV scales for mixer controls

The datasheet specifies the range of the mixer volumes as between
-51.5dB and 12dB with a 0.5dB step. Update the TLVs for this.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220602162119.3393857-2-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: Intel: cirrus-common: fix incorrect channel mapping
xliu [Thu, 2 Jun 2022 05:19:22 +0000 (13:19 +0800)]
ASoC: Intel: cirrus-common: fix incorrect channel mapping

The default mapping of ASPRX1 (DAC source) is slot 0. Change the slot
mapping of right amplifiers (WR and TR) to slot 1 to receive right
channel data. Also update the ACPI instance ID mapping according to HW
configuration.

Signed-off-by: xliu <xiang.liu@cirrus.com>
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/20220602051922.1232457-1-brent.lu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: qcom: lpass-platform: Update VMA access permissions in mmap callback
Srinivasa Rao Mandadapu [Fri, 27 May 2022 14:10:08 +0000 (19:40 +0530)]
ASoC: qcom: lpass-platform: Update VMA access permissions in mmap callback

Replace page protection permissions from noncashed to writecombine,
in lpass codec DMA path mmp callabck, to support 64 bit chromeOS.
Avoid SIGBUS error in userspace caused by noncached permissions in
64 bit chromeOS.

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Link: https://lore.kernel.org/r/1653660608-27245-1-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: nau8822: Add operation for internal PLL off and on
Hui Wang [Mon, 30 May 2022 04:01:50 +0000 (12:01 +0800)]
ASoC: nau8822: Add operation for internal PLL off and on

We tried to enable the audio on an imx6sx EVB with the codec nau8822,
after setting the internal PLL fractional parameters, the audio still
couldn't work and the there was no sdma irq at all.

After checking with the section "8.1.1 Phase Locked Loop (PLL) Design
Example" of "NAU88C22 Datasheet Rev 0.6", we found we need to
turn off the PLL before programming fractional parameters and turn on
the PLL after programming.

After this change, the audio driver could record and play sound and
the sdma's irq is triggered when playing or recording.

Cc: David Lin <ctlin0@nuvoton.com>
Cc: John Hsu <kchsu0@nuvoton.com>
Cc: Seven Li <wtli@nuvoton.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20220530040151.95221-2-hui.wang@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: wm_adsp: Fix event generation for wm_adsp_fw_put()
Mark Brown [Fri, 3 Jun 2022 11:50:03 +0000 (13:50 +0200)]
ASoC: wm_adsp: Fix event generation for wm_adsp_fw_put()

Currently wm_adsp_fw_put() returns 0 rather than 1 when updating the value
of the control, meaning that no event is generated to userspace. Fix this
by setting the default return value to 1, the code already exits early with
a return value of 0 if the value is unchanged.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220603115003.3865834-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: stm32: dfsdm: fix typo in comment
Julia Lawall [Sat, 21 May 2022 11:11:26 +0000 (13:11 +0200)]
ASoC: stm32: dfsdm: fix typo in comment

Spelling mistake (triple letters) in comment.
Detected with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Link: https://lore.kernel.org/r/20220521111145.81697-76-Julia.Lawall@inria.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: fsl_mqs: simplify the code with adding fsl_mqs_soc_data
Shengjiu Wang [Wed, 25 May 2022 05:23:41 +0000 (13:23 +0800)]
ASoC: fsl_mqs: simplify the code with adding fsl_mqs_soc_data

Add soc specific data struct fsl_mqs_soc_data, move the
definition of control register, each function bits to it,
then the code can be simplified.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1653456221-21613-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: max9860: Use modern ASoC DAI format terminology
Mark Brown [Thu, 2 Jun 2022 12:58:12 +0000 (14:58 +0200)]
ASoC: max9860: Use modern ASoC DAI format terminology

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

Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Peter Rosin <peda@axentia.se>
Link: https://lore.kernel.org/r/20220602125812.3551947-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mediatek: remove unnecessary check of clk_disable_unprepare
Minghao Chi [Thu, 2 Jun 2022 07:18:09 +0000 (07:18 +0000)]
ASoC: mediatek: remove unnecessary check of clk_disable_unprepare

Because clk_disable_unprepare already checked NULL clock
parameter, so the additional checks are unnecessary, just remove them.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Link: https://lore.kernel.org/r/20220602071809.278134-1-chi.minghao@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: codecs: da7210: add check for i2c_add_driver
Jiasheng Jiang [Tue, 31 May 2022 09:47:12 +0000 (17:47 +0800)]
ASoC: codecs: da7210: add check for i2c_add_driver

As i2c_add_driver could return error if fails, it should be
better to check the return value.
However, if the CONFIG_I2C and CONFIG_SPI_MASTER are both true,
the return value of i2c_add_driver will be covered by
spi_register_driver.
Therefore, it is necessary to add check and return error if fails.

Fixes: aa0e25caafb7 ("ASoC: da7210: Add support for spi regmap")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Link: https://lore.kernel.org/r/20220531094712.2376759-1-jiasheng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mt6797-mt6351: Fix refcount leak in mt6797_mt6351_dev_probe
Miaoqian Lin [Fri, 3 Jun 2022 08:34:15 +0000 (12:34 +0400)]
ASoC: mt6797-mt6351: Fix refcount leak in mt6797_mt6351_dev_probe

of_parse_phandle() returns a node pointer with refcount
incremented, we should use of_node_put() on it when not need anymore.
Add missing of_node_put() to avoid refcount leak.

Fixes: f0ab0bf250da ("ASoC: add mt6797-mt6351 driver and config option")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220603083417.9011-1-linmq006@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: tfa9879: Use modern ASoC DAI format terminology
Mark Brown [Thu, 2 Jun 2022 13:10:58 +0000 (15:10 +0200)]
ASoC: tfa9879: Use modern ASoC DAI format terminology

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

Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Peter Rosin <peda@axentia.se>
Link: https://lore.kernel.org/r/20220602131058.3552621-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: qcom: soundwire: Add support for controlling audio CGCR from HLOS
Srinivasa Rao Mandadapu [Wed, 18 May 2022 12:42:35 +0000 (18:12 +0530)]
ASoC: qcom: soundwire: Add support for controlling audio CGCR from HLOS

Add support for controlling soundwire audio CGCR interface using clock
framework to make hclk ungating with software. As per new hardware
changes, software has to always ungate hclk if soundwire is operational
and keep it running. This requirement is for latest LPASS chipsets for
RX, TX and WSA path to work.

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Link: https://lore.kernel.org/r/1652877755-25120-1-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: ops: Remove unneeded delay.h inclusion
Mark Brown [Thu, 2 Jun 2022 10:18:33 +0000 (12:18 +0200)]
ASoC: ops: Remove unneeded delay.h inclusion

The ops code does not do any sleeps or delays so does not need delay.h.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220602101833.3481641-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: stm32: sai: Remove useless define
Tang Bin [Wed, 25 May 2022 13:50:23 +0000 (21:50 +0800)]
ASoC: stm32: sai: Remove useless define

STM_SAI_IS_SUB_B(x) and STM_SAI_BLOCK_NAME(x) are
not being used, so remove them.

Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
Acked-by: Olivier Moysan <olivier.moysan@st.com>
Link: https://lore.kernel.org/r/20220525135023.6792-1-tangbin@cmss.chinamobile.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: fsl_xcvr:Fix unbalanced pm_runtime_enable in fsl_xcvr_probe
zhangqilong [Thu, 2 Jun 2022 07:20:24 +0000 (15:20 +0800)]
ASoC: fsl_xcvr:Fix unbalanced pm_runtime_enable in fsl_xcvr_probe

a) Add missing pm_runtime_disable() when probe error out. It could
avoid pm_runtime implementation complains when removing and probing
again the driver.
b) Add remove for missing pm_runtime_disable().

Fix:c590fa80b3928 ("ASoC: fsl_xcvr: register platform component before registering cpu dai")

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://lore.kernel.org/r/20220602072024.33236-1-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: cs35l45: Make cs35l45_remove() return void
Uwe Kleine-König [Fri, 20 May 2022 17:33:49 +0000 (19:33 +0200)]
ASoC: cs35l45: Make cs35l45_remove() return void

cs35l45_remove() always returns zero. Make it return no value which
makes it easier to see in the callers that there is no error to handle.

Also the return value of i2c driver remove callbacks is ignored anyway.
This prepares making i2c remove callbacks return void, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220520173349.774366-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: nau8822: Don't reconfigure PLL to the same values
Mark Brown [Fri, 3 Jun 2022 10:35:30 +0000 (12:35 +0200)]
ASoC: nau8822: Don't reconfigure PLL to the same values

When we configure the PLL record the input and output frequency, then if we
get asked to configure the same values again just skip reprogramming the
hardware. This makes things a bit easier to use for machine drivers since
it means they don't need to keep track of if they've programmed the PLL
so much.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220603103530.3844527-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: simple-card-utils: rename asoc_simple_init_dai_link_params() to asoc_simple_ini...
Kuninori Morimoto [Mon, 30 May 2022 04:28:44 +0000 (04:28 +0000)]
ASoC: simple-card-utils: rename asoc_simple_init_dai_link_params() to asoc_simple_init_for_codec2codec()

commit 95cfc0a0aaf5752071 ("ASoC: simple-card: Add support for
codec2codec DAI links") added the function
asoc_simple_init_dai_link_params() to initialize dai_link "params".
It is very straight naming, but difficult to noticed that it is for
Codec2Codec support. Handling Codec2Codec is one of very tricky part
on ALSA SoC, thus it is very important to clarify it. This patch
renames the function name.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87o7zflk3n.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: fsl_asrc_dma: enable dual fifo for ASRC P2P
Shengjiu Wang [Fri, 20 May 2022 03:06:00 +0000 (11:06 +0800)]
ASoC: fsl_asrc_dma: enable dual fifo for ASRC P2P

The SSI and SPDIF has dual fifos, enhance P2P for these
case with using the sdma_peripheral_config struct

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1653015960-15474-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: dt-bindings: nxp,tfa989x: Add tfa9890 support
Alexander Martinz [Thu, 2 Jun 2022 16:45:04 +0000 (18:45 +0200)]
ASoC: dt-bindings: nxp,tfa989x: Add tfa9890 support

Document TFA9890 binding for tfa989x.

Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
Reviewed-by: Stephan Gerhold <stephan@gerhold.net>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220602164504.261361-2-amartinz@shiftphones.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: codecs: tfa989x: Add support for tfa9890
Alexander Martinz [Thu, 2 Jun 2022 16:45:03 +0000 (18:45 +0200)]
ASoC: codecs: tfa989x: Add support for tfa9890

The initialization sequence is taken from the version provided
by the supplier [1].

This allows speakers using the TFA9890 amplifier to work, which are
used by various mobile phones such as the SHIFT6mq.

[1]: https://source.codeaurora.org/external/mas/tfa98xx/tree/src/tfa_init.c?id=d2cd12931fbc48df988b62931fb9960d4e9dc05d#n1827

Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
Reviewed-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20220602164504.261361-1-amartinz@shiftphones.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: max98390: use linux/gpio/consumer.h to fix build
Randy Dunlap [Sun, 5 Jun 2022 16:31:23 +0000 (09:31 -0700)]
ASoC: max98390: use linux/gpio/consumer.h to fix build

Change the header file to fix build errors in max98390.c:

../sound/soc/codecs/max98390.c: In function 'max98390_i2c_probe':
../sound/soc/codecs/max98390.c:1076:22: error: implicit declaration of function 'devm_gpiod_get_optional'; did you mean 'devm_regulator_get_optional'? [-Werror=implicit-function-declaration]
 1076 |         reset_gpio = devm_gpiod_get_optional(&i2c->dev,
../sound/soc/codecs/max98390.c:1077:55: error: 'GPIOD_OUT_HIGH' undeclared (first use in this function); did you mean 'GPIOF_INIT_HIGH'?
 1077 |                                              "reset", GPIOD_OUT_HIGH);
../sound/soc/codecs/max98390.c:1077:55: note: each undeclared identifier is reported only once for each function it appears in
../sound/soc/codecs/max98390.c:1083:17: error: implicit declaration of function 'gpiod_set_value_cansleep'; did you mean 'gpio_set_value_cansleep'? [-Werror=implicit-function-declaration]
 1083 |                 gpiod_set_value_cansleep(reset_gpio, 0);

Fixes: 397ff0249606 ("ASoC: max98390: Add reset gpio control")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Steve Lee <steve.lee.analog@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: alsa-devel@alsa-project.org
Link: https://lore.kernel.org/r/20220605163123.23537-1-rdunlap@infradead.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mediatek: mt8173: Fix refcount leak in mt8173_rt5650_rt5676_dev_probe
Miaoqian Lin [Thu, 2 Jun 2022 03:41:42 +0000 (07:41 +0400)]
ASoC: mediatek: mt8173: Fix refcount leak in mt8173_rt5650_rt5676_dev_probe

of_parse_phandle() returns a node pointer with refcount
incremented, we should use of_node_put() on it when not need anymore.
Fix missing of_node_put() in error paths.

Fixes: 94319ba10eca ("ASoC: mediatek: Use platform_of_node for machine drivers")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220602034144.60159-1-linmq006@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: fsl_sai: add error message in case of missing imx-pcm-dma support
Marco Felsch [Wed, 1 Jun 2022 09:23:42 +0000 (11:23 +0200)]
ASoC: fsl_sai: add error message in case of missing imx-pcm-dma support

If the imx-pcm-dma is required we need to have the module enabled. For
all NXP/FSL sound cards using the ASoC architecture this is the case but
in case of using the simple-audio-card sound card this isn't the case.

In such case the driver probe fails silently and the card isn't
available. It took a while to find the missing Kconfig. Make this easier
for others by printing a error if this the module isn't available but
required by the HW.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://lore.kernel.org/r/20220601092342.3328644-3-m.felsch@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: fsl_sai: use local device pointer
Marco Felsch [Wed, 1 Jun 2022 09:23:40 +0000 (11:23 +0200)]
ASoC: fsl_sai: use local device pointer

Use a local variable to dereference the device pointer once and use the
local variable in further calls. No functional changes.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://lore.kernel.org/r/20220601092342.3328644-1-m.felsch@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: ops: Clarify snd_soc_info_volsw_sx()
Mark Brown [Thu, 2 Jun 2022 09:29:20 +0000 (11:29 +0200)]
ASoC: ops: Clarify snd_soc_info_volsw_sx()

Currently snd_soc_info_volsw_sx() is implemented indirectly, wrapping
snd_soc_info_volsw() and modifying the values it sets up rather than
directly setting up the values reported to userspace. This makes it much
harder to follow what the intended behaviour of these controls is. Let's
rewrite the function to be self contained with a clarifying comment at the
top in an effort to help maintainability.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Tested-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220602092921.3302713-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: amd: acp: fix typo in comment
Julia Lawall [Sat, 21 May 2022 11:11:29 +0000 (13:11 +0200)]
ASoC: amd: acp: fix typo in comment

Spelling mistake (triple letters) in comment.
Detected with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Link: https://lore.kernel.org/r/20220521111145.81697-79-Julia.Lawall@inria.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: ab8500: Remove some leftover from the "Replace GPLv2 boilerplate/reference...
Christophe JAILLET [Sat, 28 May 2022 08:00:53 +0000 (10:00 +0200)]
ASoC: ab8500: Remove some leftover from the "Replace GPLv2 boilerplate/reference with SPDX" rules

The "Replace GPLv2 boilerplate/reference with SPDX" has left some empty
"License terms" paragraphs.
Remove them as well.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/28c0833d4a11f8f75f385e5aad93c23721b06c7e.1653724847.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: imx-audmux: Silence a clang warning
Fabio Estevam [Thu, 26 May 2022 01:05:43 +0000 (22:05 -0300)]
ASoC: imx-audmux: Silence a clang warning

Change the of_device_get_match_data() cast to (uintptr_t)
to silence the following clang warning:

sound/soc/fsl/imx-audmux.c:301:16: warning: cast to smaller integer type 'enum imx_audmux_type' from 'const void *' [-Wvoid-pointer-to-enum-cast]

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 6a8b8b582db1 ("ASoC: imx-audmux: Remove unused .id_table")
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20220526010543.1164793-1-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: ux500: Remove some leftover from the "Replace GPLv2 boilerplate/reference with...
Christophe JAILLET [Sat, 28 May 2022 07:59:22 +0000 (09:59 +0200)]
ASoC: ux500: Remove some leftover from the "Replace GPLv2 boilerplate/reference with SPDX" rules

The "Replace GPLv2 boilerplate/reference with SPDX" has left some empty
"License terms" paragraphs.
Remove them as well.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/84d94977c57deee9e85249f18394ebf8d72497bc.1653724723.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: samsung: Fix error handling in aries_audio_probe
Miaoqian Lin [Fri, 3 Jun 2022 13:06:39 +0000 (17:06 +0400)]
ASoC: samsung: Fix error handling in aries_audio_probe

of_get_child_by_name() returns a node pointer with refcount
incremented, we should use of_node_put() on it when not need anymore.
This function is missing of_node_put(cpu) in the error path.
Fix this by goto out label. of_node_put() will check NULL pointer.

Fixes: 7a3a7671fa6c ("ASoC: samsung: Add driver for Aries boards")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220603130640.37624-1-linmq006@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: cros_ec_codec: Fix refcount leak in cros_ec_codec_platform_probe
Miaoqian Lin [Fri, 3 Jun 2022 13:10:43 +0000 (17:10 +0400)]
ASoC: cros_ec_codec: Fix refcount leak in cros_ec_codec_platform_probe

of_parse_phandle() returns a node pointer with refcount
incremented, we should use of_node_put() on it when not need anymore.
Add missing of_node_put() to avoid refcount leak.

Fixes: b6bc07d4360d ("ASoC: cros_ec_codec: support WoV")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Link: https://lore.kernel.org/r/20220603131043.38907-1-linmq006@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: meson: remove useless initialization
Pierre-Louis Bossart [Fri, 20 May 2022 21:17:19 +0000 (16:17 -0500)]
ASoC: meson: remove useless initialization

cppcheck complains about invalid NULL dereferences but there's indeed
no need to initialize a loop variable.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20220520211719.607543-17-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: samsung: snow: simplify error handling
Pierre-Louis Bossart [Fri, 20 May 2022 21:17:18 +0000 (16:17 -0500)]
ASoC: samsung: snow: simplify error handling

cppcheck warning:

sound/soc/samsung/snow.c:219:9: warning: Identical condition and
return expression 'ret', return value is always 0
[identicalConditionAfterEarlyExit]
 return ret;
        ^
sound/soc/samsung/snow.c:215:6: note: If condition 'ret' is true, the
function will return/exit
if (ret)
     ^
sound/soc/samsung/snow.c:219:9: note: Returning identical expression
'ret'
 return ret;
        ^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20220520211719.607543-16-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: rockchip: simplify error handling
Pierre-Louis Bossart [Fri, 20 May 2022 21:17:17 +0000 (16:17 -0500)]
ASoC: rockchip: simplify error handling

cppcheck warning:

sound/soc/rockchip/rk3288_hdmi_analog.c:256:9: warning: Identical
condition and return expression 'ret', return value is always 0
[identicalConditionAfterEarlyExit]
 return ret;
        ^
sound/soc/rockchip/rk3288_hdmi_analog.c:252:6: note: If condition
'ret' is true, the function will return/exit
 if (ret)
     ^
sound/soc/rockchip/rk3288_hdmi_analog.c:256:9: note: Returning
identical expression 'ret'
 return ret;
        ^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20220520211719.607543-15-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: qcom: q6dsp: remove spurious space
Pierre-Louis Bossart [Fri, 20 May 2022 21:17:16 +0000 (16:17 -0500)]
ASoC: qcom: q6dsp: remove spurious space

cppcheck warning:

sound/soc/qcom/qdsp6/q6adm.c:183:14: warning:inconclusive: Found
suspicious oper ator '*' [constStatement]
  } __packed * open = data->payload;
             ^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20220520211719.607543-14-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: qcom: q6dsp: q6adm: remove useless initializations
Pierre-Louis Bossart [Fri, 20 May 2022 21:17:15 +0000 (16:17 -0500)]
ASoC: qcom: q6dsp: q6adm: remove useless initializations

cppcheck complains about invalid NULL dereferences but there's
indeed no need to initialize loop variables.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20220520211719.607543-13-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mediatek: mt8195: simplify error handling
Pierre-Louis Bossart [Fri, 20 May 2022 21:17:14 +0000 (16:17 -0500)]
ASoC: mediatek: mt8195: simplify error handling

cppcheck warnings:

sound/soc/mediatek/mt8195/mt8195-afe-clk.c:311:9: warning: Identical
condition and return expression 'ret', return value is always 0
[identicalConditionAfterEarlyExit]
 return ret;
        ^
sound/soc/mediatek/mt8195/mt8195-afe-clk.c:297:6: note: If condition
'ret' is true, the function will return/exit
 if (ret)
     ^
sound/soc/mediatek/mt8195/mt8195-afe-clk.c:311:9: note: Returning
identical expression 'ret'
 return ret;
        ^
sound/soc/mediatek/mt8195/mt8195-afe-clk.c:341:9: warning: Identical
condition and return expression 'ret', return value is always 0
[identicalConditionAfterEarlyExit]
 return ret;
        ^
sound/soc/mediatek/mt8195/mt8195-afe-clk.c:338:6: note: If condition
'ret' is true, the function will return/exit
if (ret)
     ^
sound/soc/mediatek/mt8195/mt8195-afe-clk.c:341:9: note: Returning
identical expression 'ret'
return ret;
        ^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20220520211719.607543-12-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: Intel: sof_pcm512x: remove unnecessary init
Pierre-Louis Bossart [Fri, 20 May 2022 21:17:13 +0000 (16:17 -0500)]
ASoC: Intel: sof_pcm512x: remove unnecessary init

cppcheck complains about an invalid NULL dereference but indeed there
is no need to initialize a loop variable.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20220520211719.607543-11-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>