linux-2.6-microblaze.git
3 years agoASoC: fsl: remove unnecessary oom message
Zhen Lei [Thu, 17 Jun 2021 10:31:41 +0000 (18:31 +0800)]
ASoC: fsl: remove unnecessary oom message

Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message

Remove it can help us save a bit of memory.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Link: https://lore.kernel.org/r/20210617103141.1765-1-thunder.leizhen@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge series "ASoC: Intel: machine driver corrections" from Pierre-Louis Bossart...
Mark Brown [Tue, 22 Jun 2021 14:48:07 +0000 (15:48 +0100)]
Merge series "ASoC: Intel: machine driver corrections" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

Some of these patches dealing with Sparse warnings were submitted
earlier but not merged. I grouped them with a couple of fixes from
Kai.

v2:
added Mark Brown in CC, was missed in v1
added Richard Fitzgerald Tested-by

Kai Vehmanen (3):
  ASoC: Intel: sof_sdw: use mach data for ADL RVP DMIC count
  ASoC: Intel: sof_sdw: remove hdac-hdmi support
  ASoC: Intel: skl_hda_dsp_generic: Update Kconfig documentation

Pierre-Louis Bossart (7):
  ASoC: Intel: sof_rt5682: shrink platform_id names below 20 characters
  ASoC: Intel: glk_rt5682_max98357a: shrink platform_id below 20
    characters
  ASoC: Intel: kbl_da7219_max98357a: shrink platform_id below 20
    characters
  ASoC: Intel: sof_da7219_max98373: shrink platform_id below 20
    characters
  ASoC: Intel: sof_sdw: fix signed/unsigned warning
  ASoC: Intel: soc-acpi: add ull suffix for SoundWire _ADR values
  ASoC: Intel: use MODULE_DEVICE_TABLE with platform_device_id tables

 sound/soc/intel/boards/Kconfig                |  7 ++--
 sound/soc/intel/boards/bxt_da7219_max98357a.c |  4 +-
 sound/soc/intel/boards/bxt_rt298.c            |  3 +-
 sound/soc/intel/boards/ehl_rt5660.c           |  2 +-
 sound/soc/intel/boards/glk_rt5682_max98357a.c |  4 +-
 sound/soc/intel/boards/kbl_da7219_max98357a.c |  4 +-
 sound/soc/intel/boards/kbl_da7219_max98927.c  |  5 +--
 sound/soc/intel/boards/kbl_rt5660.c           |  2 +-
 sound/soc/intel/boards/kbl_rt5663_max98927.c  |  3 +-
 .../intel/boards/kbl_rt5663_rt5514_max98927.c |  2 +-
 .../soc/intel/boards/skl_nau88l25_max98357a.c |  3 +-
 sound/soc/intel/boards/skl_nau88l25_ssm4567.c |  3 +-
 sound/soc/intel/boards/skl_rt286.c            |  3 +-
 sound/soc/intel/boards/sof_cs42l42.c          |  3 +-
 sound/soc/intel/boards/sof_da7219_max98373.c  |  6 +--
 sound/soc/intel/boards/sof_rt5682.c           | 20 +++-------
 sound/soc/intel/boards/sof_sdw.c              |  5 +--
 sound/soc/intel/boards/sof_sdw_common.h       |  1 -
 sound/soc/intel/boards/sof_sdw_hdmi.c         | 37 +-----------------
 .../intel/common/soc-acpi-intel-adl-match.c   | 28 +++++++-------
 .../intel/common/soc-acpi-intel-cml-match.c   | 20 +++++-----
 .../intel/common/soc-acpi-intel-cnl-match.c   |  2 +-
 .../intel/common/soc-acpi-intel-glk-match.c   |  2 +-
 .../intel/common/soc-acpi-intel-icl-match.c   | 12 +++---
 .../intel/common/soc-acpi-intel-jsl-match.c   |  6 +--
 .../intel/common/soc-acpi-intel-kbl-match.c   |  2 +-
 .../intel/common/soc-acpi-intel-tgl-match.c   | 38 +++++++++----------
 27 files changed, 83 insertions(+), 144 deletions(-)

--
2.25.1

3 years agoASoC: fsl-asoc-card: change dev_err to dev_dbg for defer probe
Shengjiu Wang [Wed, 2 Jun 2021 06:42:12 +0000 (14:42 +0800)]
ASoC: fsl-asoc-card: change dev_err to dev_dbg for defer probe

Don't need to print error message for defer probe

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/1622616132-10391-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: simple-card: Fill in driver name
Guido Günther [Tue, 22 Jun 2021 08:27:09 +0000 (10:27 +0200)]
ASoC: simple-card: Fill in driver name

alsa-ucm groups by driver name so fill that in as well. Otherwise the
presented information is redundant and doesn't reflect the used
driver. We can't just use 'asoc-simple-card' since the driver name is
restricted to 15 characters.

Before:

 # cat /proc/asound/cards
 0 [Devkit         ]: Librem_5_Devkit - Librem 5 Devkit
                      Librem 5 Devkit
After:

 0 [Devkit         ]: simple-card - Librem 5 Devkit
                      Librem 5 Devkit

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Link: https://lore.kernel.org/r/YNGe3akAntQi8qJD@qwark.sigxcpu.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: SOF: imx: Add missing of_node_put() in imx8_probe()
Yang Yingliang [Thu, 17 Jun 2021 03:27:56 +0000 (11:27 +0800)]
ASoC: SOF: imx: Add missing of_node_put() in imx8_probe()

This node pointer is returned by of_parse_phandle() with refcount
incremented in this function. of_node_put() on it before exiting
this function.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210617032756.599359-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: codecs: wcd938x: fix uninitialized symbol warnings
Srinivas Kandagatla [Mon, 21 Jun 2021 13:45:02 +0000 (14:45 +0100)]
ASoC: codecs: wcd938x: fix uninitialized symbol warnings

This patch fixes below two uninitialized symbol warnings

warning:
sound/soc/codecs/wcd938x.c:2092 wcd938x_tx_swr_ctrl()
error: uninitialized symbol 'rate'

sound/soc/codecs/wcd938x.c:2189 wcd938x_tx_channel_config()
error: uninitialized symbol 'reg'.

First one my brining in check to already existing if condition and
second one by adding a default switch case to avoid any access to reg.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210621134502.19537-2-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: codecs: wcd938x: fix unused variable warning
Srinivas Kandagatla [Mon, 21 Jun 2021 13:45:01 +0000 (14:45 +0100)]
ASoC: codecs: wcd938x: fix unused variable warning

This patch fixes below

warning: unused variable wcd938x_dt_match

by placing device match table under CONFIG_OF

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210621134502.19537-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: skl_hda_dsp_generic: Update Kconfig documentation
Kai Vehmanen [Mon, 21 Jun 2021 19:40:57 +0000 (14:40 -0500)]
ASoC: Intel: skl_hda_dsp_generic: Update Kconfig documentation

The Kconfig documentation for SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH
is a bit misleading as it refers to a set of older platforms,
while in practise this machine driver supports all modern
Intel systems with Smart Sound Technology based DSP and HDA codecs.

Modify the Kconfig text to reflect current state.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210621194057.21711-11-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: use MODULE_DEVICE_TABLE with platform_device_id tables
Pierre-Louis Bossart [Mon, 21 Jun 2021 19:40:56 +0000 (14:40 -0500)]
ASoC: Intel: use MODULE_DEVICE_TABLE with platform_device_id tables

When we have a platform_device_id table, we can use
MODULE_DEVICE_TABLE to automatically generate the modalias. As a
result we can remove the manual insertion of MODULE_ALIAS.

Reported-by: Hulk Robot <hulkci@huawei.com>
Suggested-by: Zou Wei <zou_wei@huawei.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20210621194057.21711-10-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: soc-acpi: add ull suffix for SoundWire _ADR values
Pierre-Louis Bossart [Mon, 21 Jun 2021 19:40:55 +0000 (14:40 -0500)]
ASoC: Intel: soc-acpi: add ull suffix for SoundWire _ADR values

Sparse throws the following type of warnings:

sound/soc/intel/common/soc-acpi-intel-adl-match.c:34:24: error:
constant 0x000020025D071100 is so big it is long

Let's add the 'ull' suffix to make this go away and find real issues.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Paul Olaru <paul.olaru@oss.nxp.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Link: https://lore.kernel.org/r/20210621194057.21711-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: sof_sdw: fix signed/unsigned warning
Pierre-Louis Bossart [Mon, 21 Jun 2021 19:40:54 +0000 (14:40 -0500)]
ASoC: Intel: sof_sdw: fix signed/unsigned warning

Sparse throws the following warning:

sound/soc/intel/boards/sof_sdw.c:796:31: error: incorrect type in argument 6 (different signedness)
sound/soc/intel/boards/sof_sdw.c:796:31:    expected int *group_id
sound/soc/intel/boards/sof_sdw.c:796:31:    got unsigned int *

The group_id cannot be negative, use unsigned int.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Paul Olaru <paul.olaru@oss.nxp.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Link: https://lore.kernel.org/r/20210621194057.21711-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: sof_da7219_max98373: shrink platform_id below 20 characters
Pierre-Louis Bossart [Mon, 21 Jun 2021 19:40:53 +0000 (14:40 -0500)]
ASoC: Intel: sof_da7219_max98373: shrink platform_id below 20 characters

Sparse throws the following warning:

sound/soc/intel/boards/sof_da7219_max98373.c:438:25: error: too long
initializer-string for array of char(no space for nul char)

Fix by using 'mx' acronym for Maxim.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Paul Olaru <paul.olaru@oss.nxp.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Link: https://lore.kernel.org/r/20210621194057.21711-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: kbl_da7219_max98357a: shrink platform_id below 20 characters
Pierre-Louis Bossart [Mon, 21 Jun 2021 19:40:52 +0000 (14:40 -0500)]
ASoC: Intel: kbl_da7219_max98357a: shrink platform_id below 20 characters

Sparse throws the following warnings:

sound/soc/intel/boards/kbl_da7219_max98357a.c:647:25: error: too long
initializer-string for array of char(no space for nul char)

Fix by using the 'mx' acronym for Maxim.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Paul Olaru <paul.olaru@oss.nxp.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Link: https://lore.kernel.org/r/20210621194057.21711-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: glk_rt5682_max98357a: shrink platform_id below 20 characters
Pierre-Louis Bossart [Mon, 21 Jun 2021 19:40:51 +0000 (14:40 -0500)]
ASoC: Intel: glk_rt5682_max98357a: shrink platform_id below 20 characters

Sparse throws the following warning:

sound/soc/intel/boards/glk_rt5682_max98357a.c:622:25: error: too long
initializer-string for array of char(no space for nul char)

Fix by using the 'mx' acronym for Maxim

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Paul Olaru <paul.olaru@oss.nxp.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Link: https://lore.kernel.org/r/20210621194057.21711-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: sof_rt5682: shrink platform_id names below 20 characters
Pierre-Louis Bossart [Mon, 21 Jun 2021 19:40:50 +0000 (14:40 -0500)]
ASoC: Intel: sof_rt5682: shrink platform_id names below 20 characters

Some Chromebooks machine driver aliases exceed 20 characters, which
leads to sparse warnings:

sound/soc/intel/boards/sof_rt5682.c:959:25: error: too long
initializer-string for array of char(no space for nul char)

sound/soc/intel/boards/sof_rt5682.c:989:25: error: too long
initializer-string for array of char(no space for nul char)

sound/soc/intel/boards/sof_rt5682.c:1039:25: error: too long
initializer-string for array of char(no space for nul char)

Fix by using the 'mx' shortcut for Maxim platforms (already used in
platform firmware)

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Paul Olaru <paul.olaru@oss.nxp.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Link: https://lore.kernel.org/r/20210621194057.21711-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: sof_sdw: remove hdac-hdmi support
Kai Vehmanen [Mon, 21 Jun 2021 19:40:49 +0000 (14:40 -0500)]
ASoC: Intel: sof_sdw: remove hdac-hdmi support

Remove support for using hdac_hdmi codec driver. No known products use
this configuration and hdac_hdmi cannot support all the platforms
sof_sdw does.

This change also fixes a bug in Kconfig rules.
SND_SOC_INTEL_SOUNDWIRE_SOF_MACH did not have a select SND_SOC_HDAC_HDMI
and this could cause build failures.

Reported-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Tested-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210621194057.21711-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: sof_sdw: use mach data for ADL RVP DMIC count
Kai Vehmanen [Mon, 21 Jun 2021 19:40:48 +0000 (14:40 -0500)]
ASoC: Intel: sof_sdw: use mach data for ADL RVP DMIC count

On the reference boards, number of PCH dmics may vary and the number
should be taken from driver machine data. Remove the SOF_SDW_PCH_DMIC
quirk to make DMIC number configurable.

Fixes:d25bbe80485f8 ("ASoC: Intel: sof_sdw: add quirk for new ADL-P Rvp")

BugLink: https://github.com/thesofproject/sof/issues/4185
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210621194057.21711-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge series "ASoC: fsl: Use devm_platform_get_and_ioremap_resource()" from Yang...
Mark Brown [Mon, 21 Jun 2021 18:16:54 +0000 (19:16 +0100)]
Merge series "ASoC: fsl: Use devm_platform_get_and_ioremap_resource()" from Yang Yingliang <yangyingliang@huawei.com>:

patch #1 ~ #8:
  Use devm_platform_get_and_ioremap_resource()

patch #9
  check return value of platform_get_resource_byname()

v2:
  change error message in patch #9

Yang Yingliang (9):
  ASoC: fsl_asrc: Use devm_platform_get_and_ioremap_resource()
  ASoC: fsl_aud2htx: Use devm_platform_get_and_ioremap_resource()
  ASoC: fsl_easrc: Use devm_platform_get_and_ioremap_resource()
  ASoC: fsl_esai: Use devm_platform_get_and_ioremap_resource()
  ASoC: fsl_micfil: Use devm_platform_get_and_ioremap_resource()
  ASoC: fsl_sai: Use devm_platform_get_and_ioremap_resource()
  ASoC: fsl_spdif: Use devm_platform_get_and_ioremap_resource()
  ASoC: fsl_ssi: Use devm_platform_get_and_ioremap_resource()
  ASoC: fsl_xcvr: check return value after calling
    platform_get_resource_byname()

 sound/soc/fsl/fsl_asrc.c    | 3 +--
 sound/soc/fsl/fsl_aud2htx.c | 3 +--
 sound/soc/fsl/fsl_easrc.c   | 3 +--
 sound/soc/fsl/fsl_esai.c    | 3 +--
 sound/soc/fsl/fsl_micfil.c  | 3 +--
 sound/soc/fsl/fsl_sai.c     | 3 +--
 sound/soc/fsl/fsl_spdif.c   | 3 +--
 sound/soc/fsl/fsl_ssi.c     | 3 +--
 sound/soc/fsl/fsl_xcvr.c    | 4 ++++
 9 files changed, 12 insertions(+), 16 deletions(-)

--
2.25.1

3 years agoMerge series "ASoC: tidyup snd_soc_of_parse_daifmt()" from Kuninori Morimoto <kuninor...
Mark Brown [Mon, 21 Jun 2021 18:16:53 +0000 (19:16 +0100)]
Merge series "ASoC: tidyup snd_soc_of_parse_daifmt()" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

Hi Mark

These are v3 of parsing for daifmt.

I want to add new audio-graph-card2 sound card driver,
and this is last part of necessary soc-core cleanup for it.

Current some drivers are using DT, and then,
snd_soc_of_parse_daifmt() parses daifmt, but bitclock/frame provider
parsing part is one of headache, because we are assuming below both cases.

A) node {
bitclock-master;
frame-master;
...
};

B) link {
bitclock-master = <&xxx>;
frame-master = <&xxx>;
...
};

The original was style A), and style B) was added later.

snd_soc_of_parse_daifmt() parses A) style as original style,
and user need to update to B) style for clock_provider part if needed.

To handle it more flexibile, this patch-set adds new functions
which separates snd_soc_of_parse_daifmt() helper function.

snd_soc_daifmt_parse_format() : format part
snd_soc_daifmt_parse_clock_provider_as_flag() : clock part for style A)
snd_soc_daifmt_parse_clock_provider_as_phandl() : clock part for style B)
snd_soc_daifmt_parse_clock_provider_as_bitmap() : clock part use with _from_bitmap

v1 -> v2
- tidyup parse_clock_provider functions to _as_flag/phandle/bitmap()
- don't exchange code style on each drivers.

v2 -> v3
- use daifmt as much as possible (don't use daiclk) on each driver.

Link: https://lore.kernel.org/r/875yypdxlm.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/87czsvdc4o.wl-kuninori.morimoto.gx@renesas.com
Kuninori Morimoto (8):
  ASoC: soc-core: add snd_soc_daifmt_clock_provider_from_bitmap()
  ASoC: soc-core: add snd_soc_daifmt_clock_provider_fliped()
  ASoC: soc-core: add snd_soc_daifmt_parse_format/clock_provider()
  ASoC: atmel: switch to use snd_soc_daifmt_parse_format/clock_provider()
  ASoC: fsl: switch to use snd_soc_daifmt_parse_format/clock_provider()
  ASoC: meson: switch to use snd_soc_daifmt_parse_format/clock_provider()
  ASoC: simple-card-utils: switch to use snd_soc_daifmt_parse_format/clock_provider()
  ASoC: soc-core: remove snd_soc_of_parse_daifmt()

 include/sound/soc.h                   |  21 ++++-
 sound/soc/atmel/mikroe-proto.c        |   9 ++-
 sound/soc/fsl/fsl-asoc-card.c         |   7 +-
 sound/soc/generic/simple-card-utils.c |  16 ++--
 sound/soc/meson/meson-card-utils.c    |   6 +-
 sound/soc/soc-core.c                  | 109 +++++++++++++++++---------
 6 files changed, 106 insertions(+), 62 deletions(-)

--
2.25.1

3 years agoMerge series "ASoC: sunxi: Use devm_platform_get_and_ioremap_resource()" from Yang...
Mark Brown [Mon, 21 Jun 2021 18:16:52 +0000 (19:16 +0100)]
Merge series "ASoC: sunxi: Use devm_platform_get_and_ioremap_resource()" from Yang Yingliang <yangyingliang@huawei.com>:

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Yang Yingliang (3):
  ASoC: sunxi: sun4i-codec: Use devm_platform_get_and_ioremap_resource()
  ASoC: sun4i-i2s: Use devm_platform_get_and_ioremap_resource()
  ASoC: sunxi: sun4i-spdif: Use devm_platform_get_and_ioremap_resource()

 sound/soc/sunxi/sun4i-codec.c | 3 +--
 sound/soc/sunxi/sun4i-i2s.c   | 3 +--
 sound/soc/sunxi/sun4i-spdif.c | 3 +--
 3 files changed, 3 insertions(+), 6 deletions(-)

--
2.25.1

3 years agoMerge series "ASoC: samsung: Use devm_platform_get_and_ioremap_resource()" from Yang...
Mark Brown [Mon, 21 Jun 2021 18:16:51 +0000 (19:16 +0100)]
Merge series "ASoC: samsung: Use devm_platform_get_and_ioremap_resource()" from Yang Yingliang <yangyingliang@huawei.com>:

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Yang Yingliang (4):
  ASoC: samsung: i2s: Use devm_platform_get_and_ioremap_resource()
  ASoC: samsung: pcm: Use devm_platform_get_and_ioremap_resource()
  ASoC: samsung: s3c2412-i2s: Use
    devm_platform_get_and_ioremap_resource()
  ASoC: samsung: s3c24xx-i2s: Use
    devm_platform_get_and_ioremap_resource()

 sound/soc/samsung/i2s.c         | 3 +--
 sound/soc/samsung/pcm.c         | 3 +--
 sound/soc/samsung/s3c2412-i2s.c | 3 +--
 sound/soc/samsung/s3c24xx-i2s.c | 3 +--
 4 files changed, 4 insertions(+), 8 deletions(-)

--
2.25.1

3 years agoASoC: fsl_xcvr: disable all interrupts when suspend happens
Shengjiu Wang [Fri, 18 Jun 2021 12:38:33 +0000 (20:38 +0800)]
ASoC: fsl_xcvr: disable all interrupts when suspend happens

There is an unhandled interrupt after suspend, which cause endless
interrupt when system resume, so system may hang.

Disable all interrupts in runtime suspend callback to avoid above
issue.

Fixes: 28564486866f ("ASoC: fsl_xcvr: Add XCVR ASoC CPU DAI driver")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/1624019913-3380-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: tegra: Fix a NULL vs IS_ERR() check
Dan Carpenter [Fri, 18 Jun 2021 13:44:24 +0000 (16:44 +0300)]
ASoC: tegra: Fix a NULL vs IS_ERR() check

The tegra_machine_parse_phandle() function doesn't return NULL, it returns
error pointers.

Fixes: cc8f70f56039 ("ASoC: tegra: Unify ASoC machine drivers")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/YMyjOKFsPe9SietU@mwanda
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: qcom: lpass-cpu: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Tue, 15 Jun 2021 14:07:11 +0000 (22:07 +0800)]
ASoC: qcom: lpass-cpu: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615140711.1676704-2-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: qcom: apq8016_sbc: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Tue, 15 Jun 2021 14:07:10 +0000 (22:07 +0800)]
ASoC: qcom: apq8016_sbc: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615140711.1676704-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: rt711: add two jack detection modes
Shuming Fan [Thu, 17 Jun 2021 09:08:22 +0000 (17:08 +0800)]
ASoC: rt711: add two jack detection modes

Some boards use different circuits for jack detection.
This patch adds two modes as below
1. JD2/2 ports/external resister 100k
2. JD2/1 port/JD voltage 1.8V

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://lore.kernel.org/r/20210617090822.16960-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: samsung: s3c24xx-i2s: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Wed, 16 Jun 2021 09:16:52 +0000 (17:16 +0800)]
ASoC: samsung: s3c24xx-i2s: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link: https://lore.kernel.org/r/20210616091652.2552927-5-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: samsung: s3c2412-i2s: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Wed, 16 Jun 2021 09:16:51 +0000 (17:16 +0800)]
ASoC: samsung: s3c2412-i2s: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link: https://lore.kernel.org/r/20210616091652.2552927-4-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: samsung: pcm: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Wed, 16 Jun 2021 09:16:50 +0000 (17:16 +0800)]
ASoC: samsung: pcm: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link: https://lore.kernel.org/r/20210616091652.2552927-3-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: samsung: i2s: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Wed, 16 Jun 2021 09:16:49 +0000 (17:16 +0800)]
ASoC: samsung: i2s: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link: https://lore.kernel.org/r/20210616091652.2552927-2-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-core: remove snd_soc_of_parse_daifmt()
Kuninori Morimoto [Mon, 14 Jun 2021 00:58:35 +0000 (09:58 +0900)]
ASoC: soc-core: remove snd_soc_of_parse_daifmt()

No driver is using snd_soc_of_parse_daifmt().
This patch removes it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87zgvtuuro.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: simple-card-utils: switch to use snd_soc_daifmt_parse_format/clock_provider()
Kuninori Morimoto [Mon, 14 Jun 2021 00:58:22 +0000 (09:58 +0900)]
ASoC: simple-card-utils: switch to use snd_soc_daifmt_parse_format/clock_provider()

This patch switch to use snd_soc_daifmt_parse_format/clock_provider() from
snd_soc_of_parse_daifmt().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/871r95w9ch.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: meson: switch to use snd_soc_daifmt_parse_format/clock_provider()
Kuninori Morimoto [Mon, 14 Jun 2021 00:58:05 +0000 (09:58 +0900)]
ASoC: meson: switch to use snd_soc_daifmt_parse_format/clock_provider()

This patch switch to use snd_soc_daifmt_parse_format/clock_provider() from
snd_soc_of_parse_daifmt().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/8735tlw9cy.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl: switch to use snd_soc_daifmt_parse_format/clock_provider()
Kuninori Morimoto [Mon, 14 Jun 2021 00:57:51 +0000 (09:57 +0900)]
ASoC: fsl: switch to use snd_soc_daifmt_parse_format/clock_provider()

This patch switch to use snd_soc_daifmt_parse_format/clock_provider() from
snd_soc_of_parse_daifmt().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/874ke1w9dc.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: atmel: switch to use snd_soc_daifmt_parse_format/clock_provider()
Kuninori Morimoto [Mon, 14 Jun 2021 00:57:19 +0000 (09:57 +0900)]
ASoC: atmel: switch to use snd_soc_daifmt_parse_format/clock_provider()

This patch switch to use snd_soc_daifmt_parse_format/clock_provider() from
snd_soc_of_parse_daifmt().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Link: https://lore.kernel.org/r/875yyhw9e8.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-core: add snd_soc_daifmt_parse_format/clock_provider()
Kuninori Morimoto [Mon, 14 Jun 2021 00:57:08 +0000 (09:57 +0900)]
ASoC: soc-core: add snd_soc_daifmt_parse_format/clock_provider()

snd_soc_of_parse_daifmt() parses daifmt, but bitclock/frame provider
parsing part is one of headacke, because we are assuming below both cases.

A) node {
bitclock-master;
frame-master;
...
};

B) link {
bitclock-master = <&xxx>;
frame-master = <&xxx>;
...
};

The original was style A), and style B) was added later
by commit b3ca11ff59bc ("ASoC: simple-card: Move dai-link level
properties away from dai subnodes").

snd_soc_of_parse_daifmt() parses it as style A),
and user need to update it to style B) if needed.

To handle it more flexibile, this patch adds new functions
which separates snd_soc_of_parse_daifmt() helper function.

 snd_soc_daifmt_parse_format()  :for DAI format
 snd_soc_daifmt_parse_clock_provider_as_flag()  :for style A)
 snd_soc_daifmt_parse_clock_provider_as_phandl() :for style B)
 snd_soc_daifmt_parse_clock_provider_as_bitmap() :use with _from_bitmap

This means

 snd_soc_of_parse_daifmt() ==
snd_soc_daifmt_parse_format() |
snd_soc_daifmt_parse_clock_provider_as_flag()

This patch also indicate relatesionship comment for
snd_soc_daifmt_clock_provider_from_bitmap().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/877dixw9ej.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-core: add snd_soc_daifmt_clock_provider_fliped()
Kuninori Morimoto [Mon, 14 Jun 2021 00:56:54 +0000 (09:56 +0900)]
ASoC: soc-core: add snd_soc_daifmt_clock_provider_fliped()

Sometimes we want to get CLOCK_PROVIDER fliped dai_fmt.
This patch adds new snd_soc_daifmt_clock_provider_fliped() for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/878s3dw9ex.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-core: add snd_soc_daifmt_clock_provider_from_bitmap()
Kuninori Morimoto [Mon, 14 Jun 2021 00:56:46 +0000 (09:56 +0900)]
ASoC: soc-core: add snd_soc_daifmt_clock_provider_from_bitmap()

This patch adds snd_soc_daifmt_clock_provider_from_bitmap() function
to judge clock/frame master from its bitmap.
This is prepare for snd_soc_of_parse_daifmt() cleanup.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87a6ntw9f5.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: sunxi: sun4i-spdif: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Thu, 17 Jun 2021 04:50:12 +0000 (12:50 +0800)]
ASoC: sunxi: sun4i-spdif: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210617045012.1119650-4-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: sun4i-i2s: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Thu, 17 Jun 2021 04:50:11 +0000 (12:50 +0800)]
ASoC: sun4i-i2s: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210617045012.1119650-3-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: sunxi: sun4i-codec: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Thu, 17 Jun 2021 04:50:10 +0000 (12:50 +0800)]
ASoC: sunxi: sun4i-codec: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210617045012.1119650-2-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl_xcvr: check return value after calling platform_get_resource_byname()
Yang Yingliang [Tue, 15 Jun 2021 01:39:22 +0000 (09:39 +0800)]
ASoC: fsl_xcvr: check return value after calling platform_get_resource_byname()

It will cause null-ptr-deref if platform_get_resource_byname() returns NULL,
we need check the return value.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615013922.784296-10-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl_ssi: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Tue, 15 Jun 2021 01:39:21 +0000 (09:39 +0800)]
ASoC: fsl_ssi: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615013922.784296-9-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl_spdif: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Tue, 15 Jun 2021 01:39:20 +0000 (09:39 +0800)]
ASoC: fsl_spdif: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615013922.784296-8-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl_sai: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Tue, 15 Jun 2021 01:39:19 +0000 (09:39 +0800)]
ASoC: fsl_sai: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615013922.784296-7-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl_micfil: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Tue, 15 Jun 2021 01:39:18 +0000 (09:39 +0800)]
ASoC: fsl_micfil: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615013922.784296-6-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl_esai: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Tue, 15 Jun 2021 01:39:17 +0000 (09:39 +0800)]
ASoC: fsl_esai: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615013922.784296-5-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl_easrc: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Tue, 15 Jun 2021 01:39:16 +0000 (09:39 +0800)]
ASoC: fsl_easrc: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615013922.784296-4-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl_aud2htx: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Tue, 15 Jun 2021 01:39:15 +0000 (09:39 +0800)]
ASoC: fsl_aud2htx: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615013922.784296-3-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl_asrc: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Tue, 15 Jun 2021 01:39:14 +0000 (09:39 +0800)]
ASoC: fsl_asrc: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615013922.784296-2-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: rk817: Constify static struct snd_soc_dai_ops
Wei Yongjun [Wed, 2 Jun 2021 11:36:43 +0000 (11:36 +0000)]
ASoC: rk817: Constify static struct snd_soc_dai_ops

The snd_soc_dai_ops structures is only stored in the ops field of a
snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure
const to allow the compiler to put it in read-only memory.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20210602113643.3037374-1-weiyongjun1@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsi: fix spelling mistake
Flavio Suligoi [Fri, 18 Jun 2021 08:53:24 +0000 (10:53 +0200)]
ASoC: fsi: fix spelling mistake

Fix "thse" --> "these" in struct fsi_stream declaration.

Signed-off-by: Flavio Suligoi <f.suligoi@asem.it>
Link: https://lore.kernel.org/r/20210618085324.1038524-1-f.suligoi@asem.it
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: bdw-rt5677: remove unnecessary oom message
Zhen Lei [Thu, 17 Jun 2021 10:35:38 +0000 (18:35 +0800)]
ASoC: Intel: bdw-rt5677: remove unnecessary oom message

Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message

Remove it can help us save a bit of memory.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210617103538.1818-1-thunder.leizhen@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge series "ASoC: stm32: Use devm_platform_get_and_ioremap_resource()" from Yang...
Mark Brown [Thu, 17 Jun 2021 14:27:24 +0000 (15:27 +0100)]
Merge series "ASoC: stm32: Use devm_platform_get_and_ioremap_resource()" from Yang Yingliang <yangyingliang@huawei.com>:

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Yang Yingliang (3):
  ASoC: stm32: i2s: Use devm_platform_get_and_ioremap_resource()
  ASoC: stm32: sai: Use devm_platform_get_and_ioremap_resource()
  ASoC: stm32: spdifrx: Use devm_platform_get_and_ioremap_resource()

 sound/soc/stm/stm32_i2s.c     | 3 +--
 sound/soc/stm/stm32_sai_sub.c | 3 +--
 sound/soc/stm/stm32_spdifrx.c | 3 +--
 3 files changed, 3 insertions(+), 6 deletions(-)

--
2.25.1

3 years agoASoC: spear: spdif_out: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Thu, 17 Jun 2021 03:29:00 +0000 (11:29 +0800)]
ASoC: spear: spdif_out: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210617032900.600124-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: sprd: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Thu, 17 Jun 2021 03:32:37 +0000 (11:32 +0800)]
ASoC: sprd: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210617033237.605808-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-core: Fix the error return code in snd_soc_of_parse_audio_routing()
Zhen Lei [Thu, 17 Jun 2021 10:37:29 +0000 (18:37 +0800)]
ASoC: soc-core: Fix the error return code in snd_soc_of_parse_audio_routing()

When devm_kcalloc() fails, the error code -ENOMEM should be returned
instead of -EINVAL.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Link: https://lore.kernel.org/r/20210617103729.1918-1-thunder.leizhen@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: sti: sti_uniperif: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Thu, 17 Jun 2021 03:39:03 +0000 (11:39 +0800)]
ASoC: sti: sti_uniperif: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210617033903.613727-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: stm32: spdifrx: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Thu, 17 Jun 2021 04:38:47 +0000 (12:38 +0800)]
ASoC: stm32: spdifrx: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210617043847.1113092-4-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: stm32: sai: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Thu, 17 Jun 2021 04:38:46 +0000 (12:38 +0800)]
ASoC: stm32: sai: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210617043847.1113092-3-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: stm32: i2s: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Thu, 17 Jun 2021 04:38:45 +0000 (12:38 +0800)]
ASoC: stm32: i2s: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210617043847.1113092-2-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: hdmi-codec: make hdmi_codec_controls static
Jiapeng Chong [Wed, 16 Jun 2021 05:55:41 +0000 (13:55 +0800)]
ASoC: hdmi-codec: make hdmi_codec_controls static

This symbol is not used outside of hdmi-codec.c, so marks it static.

Fix the following sparse warning:

sound/soc/codecs/hdmi-codec.c:750:25: warning: symbol
'hdmi_codec_controls' was not declared. Should it be static?

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Link: https://lore.kernel.org/r/1623822941-3077-1-git-send-email-jiapeng.chong@linux.alibaba.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: codecs: wcd938x: fix boolreturn.cocci warning
Yang Li [Wed, 16 Jun 2021 02:45:35 +0000 (10:45 +0800)]
ASoC: codecs: wcd938x: fix boolreturn.cocci warning

Return statements in functions returning bool should use true/false
instead of 1/0.

Fix the following coccicheck warning:
./sound/soc/codecs/wcd938x.c:1190:9-10: WARNING: return of 0/1 in
function 'wcd938x_volatile_register' with return type bool.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Link: https://lore.kernel.org/r/1623811535-15841-1-git-send-email-yang.lee@linux.alibaba.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: rockchip: spdif: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Tue, 15 Jun 2021 14:15:02 +0000 (22:15 +0800)]
ASoC: rockchip: spdif: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615141502.1683686-3-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: rockchip: pdm: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Tue, 15 Jun 2021 14:15:01 +0000 (22:15 +0800)]
ASoC: rockchip: pdm: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615141502.1683686-2-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: rockchip: i2s: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Tue, 15 Jun 2021 14:15:00 +0000 (22:15 +0800)]
ASoC: rockchip: i2s: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615141502.1683686-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: codecs: Fix duplicate included sound/soc.h
Jiapeng Chong [Wed, 16 Jun 2021 05:51:07 +0000 (13:51 +0800)]
ASoC: codecs: Fix duplicate included sound/soc.h

Clean up the following includecheck warnings:

./sound/soc/codecs/wcd938x.c: sound/soc.h is included more than once.
./sound/soc/codecs/wcd938x-sdw.c: sound/soc.h is included more than
once.

No functional change.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Link: https://lore.kernel.org/r/1623822667-130511-1-git-send-email-jiapeng.chong@linux.alibaba.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge series "ASoC: qdsp6: Add Quinary MI2S ports support" from Gabriel David <ultrac...
Mark Brown [Tue, 15 Jun 2021 17:16:31 +0000 (18:16 +0100)]
Merge series "ASoC: qdsp6: Add Quinary MI2S ports support" from Gabriel David <ultracoolguy@disroot.org>:

Various devices(such as the Motorola Moto G7 Power, codename ocean) use
the Quinary MI2S ports for reproducing audio. Add support to them in
kernel.

Signed-off-by: Gabriel David <ultracoolguy@disroot.org>
Gabriel David (4):
  ASoC: q6afe: dt-bindings: Add QUIN_MI2S_RX/TX
  ASoC: qdsp6: q6afe: Add Quinary MI2S ports
  ASoC: qdsp6: q6afe-dai: Add Quinary MI2S ports
  ASoC: qdsp6: q6routing: Add Quinary MI2S ports

 include/dt-bindings/sound/qcom,q6afe.h |  2 ++
 sound/soc/qcom/qdsp6/q6afe-dai.c       | 41 ++++++++++++++++++++++++++
 sound/soc/qcom/qdsp6/q6afe.c           |  8 +++++
 sound/soc/qcom/qdsp6/q6afe.h           |  2 +-
 sound/soc/qcom/qdsp6/q6routing.c       | 11 +++++++
 5 files changed, 63 insertions(+), 1 deletion(-)
---
As a warning, I'm currently the only tester of these patches. If that's
gonna be a problem then I understand.

--
2.31.1

3 years agoASoC: hisilicon: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Tue, 15 Jun 2021 13:35:15 +0000 (21:35 +0800)]
ASoC: hisilicon: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615133515.1376290-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: jz4740-i2s: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Tue, 15 Jun 2021 13:56:27 +0000 (21:56 +0800)]
ASoC: jz4740-i2s: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615135627.1665168-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: img-spdif-out: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Tue, 15 Jun 2021 13:52:00 +0000 (21:52 +0800)]
ASoC: img-spdif-out: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615135200.1661695-5-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: img-spdif-in: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Tue, 15 Jun 2021 13:51:59 +0000 (21:51 +0800)]
ASoC: img-spdif-in: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615135200.1661695-4-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: img-parallel-out: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Tue, 15 Jun 2021 13:51:58 +0000 (21:51 +0800)]
ASoC: img-parallel-out: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615135200.1661695-3-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: img-i2s-out: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Tue, 15 Jun 2021 13:51:57 +0000 (21:51 +0800)]
ASoC: img-i2s-out: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615135200.1661695-2-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: img-i2s-in: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Tue, 15 Jun 2021 13:51:56 +0000 (21:51 +0800)]
ASoC: img-i2s-in: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615135200.1661695-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: dwc: dwc-i2s: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Tue, 15 Jun 2021 13:29:33 +0000 (21:29 +0800)]
ASoC: dwc: dwc-i2s: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615132933.1372463-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: codecs: wcd938x: remove incorrect module interdependency
Srinivas Kandagatla [Tue, 15 Jun 2021 13:28:29 +0000 (14:28 +0100)]
ASoC: codecs: wcd938x: remove incorrect module interdependency

For some reason we ended up with cyclic dependency between snd_soc_wcd938x
and snd_soc_wcd938x_sdw modules.

Remove this cyclic dependency by handling them in respective modules.
Without this below error is reported during make modules_install

depmod: ERROR: Cycle detected: snd_soc_wcd938x -> snd_soc_wcd938x_sdw -> snd_soc_wcd938x
depmod: ERROR: Found 2 modules in dependency cycles!

Fixes: 045442228868 ("ASoC: codecs: wcd938x: add audio routing and Kconfig")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210615132829.23067-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: qdsp6: q6routing: Add Quinary MI2S ports
Gabriel David [Sat, 5 Jun 2021 02:22:06 +0000 (22:22 -0400)]
ASoC: qdsp6: q6routing: Add Quinary MI2S ports

This patch adds MI2S mixers to Quinary ports

Signed-off-by: Gabriel David <ultracoolguy@disroot.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210605022206.13226-5-ultracoolguy@disroot.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: qdsp6: q6afe-dai: Add Quinary MI2S ports
Gabriel David [Sat, 5 Jun 2021 02:22:05 +0000 (22:22 -0400)]
ASoC: qdsp6: q6afe-dai: Add Quinary MI2S ports

This patch adds support to Quinary MI2S ports supported in AFE.

Signed-off-by: Gabriel David <ultracoolguy@disroot.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210605022206.13226-4-ultracoolguy@disroot.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: qdsp6: q6afe: Add Quinary MI2S ports
Gabriel David [Sat, 5 Jun 2021 02:22:04 +0000 (22:22 -0400)]
ASoC: qdsp6: q6afe: Add Quinary MI2S ports

This patch adds support for the Quinary MI2S ports on LPASS.

Signed-off-by: Gabriel David <ultracoolguy@disroot.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210605022206.13226-3-ultracoolguy@disroot.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: q6afe: dt-bindings: Add QUIN_MI2S_RX/TX
Gabriel David [Sat, 5 Jun 2021 02:22:03 +0000 (22:22 -0400)]
ASoC: q6afe: dt-bindings: Add QUIN_MI2S_RX/TX

This patch adds bindings required for Quinary MI2S ports on AFE.

Signed-off-by: Gabriel David <ultracoolguy@disroot.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210605022206.13226-2-ultracoolguy@disroot.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: codecs: wcd938x: constify static struct snd_soc_dai_ops
Pu Lehui [Tue, 15 Jun 2021 11:33:24 +0000 (19:33 +0800)]
ASoC: codecs: wcd938x: constify static struct snd_soc_dai_ops

The snd_soc_dai_ops structures is only stored in the ops field of a
snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure
const to allow the compiler to put it in read-only memory.

Signed-off-by: Pu Lehui <pulehui@huawei.com>
Link: https://lore.kernel.org/r/20210615113324.238837-1-pulehui@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge series "Unify NVIDIA Tegra ASoC machine drivers" from Dmitry Osipenko <digetx...
Mark Brown [Tue, 15 Jun 2021 11:51:46 +0000 (12:51 +0100)]
Merge series "Unify NVIDIA Tegra ASoC machine drivers" from Dmitry Osipenko <digetx@gmail.com>:

This series squashes all the ASoC machine drivers into a single one,
this change was suggested by Jon Hunter. It also sets driver_name and
components string of each card, allowing userspace alsa-lib to find
UCMs at predictable path.

Changelog:

v6: - Fixed missed configuration of AC97 clock rate for the WM9712 codec
      in the unified driver.

    - Added new patch that removes now obsolete "utils" helpers and moves
      code into the unified driver.

        ASoC: tegra: Squash utils into common machine driver

v5: - The v4 removed the customization of components string for Nexus 7,
      but I missed to remove the "components" hook which is unused now,
      it's removed in v5 for consistency.

    - Slightly improved naming of the common 12MHz MCLK rate function
      to make it more consistent with the rest of the driver functions.

v4: - Moved out mclk_rate callback that is currently used only by WM8903
      machine driver from the common driver. This was suggested by Jon Hunter.

    - Dropped patch which was setting custom components string for Nexus 7.
      Jaroslav Kysela wants it to be specified in a device-tree, but the
      components string doesn't have a firm specification for today. It's
      better to drop this change for now since it's optional anyways.

    - Fixed compilation error that was reported by kernel robot for v3.

    - Jaroslav Kysela merged alsa-ucm-conf PR [1] which added UCMs for
      Nexus 7 and Acer A500. The UCMs are fully working using a combination
      of updated kernel + alsa-ucm-conf master + alsa-lib master, meaning
      that they will work with the next releases of kernel and ALSA userspace
      upstream packages.

    - Added ack from Jaroslav Kysela to the "Specify components string for
      each card" patch that he gave to v3.

v3: - Added components string as was suggested by Jaroslav Kysela to v2.

    - Renamed MCLK rate function that is used by max98090 and other codecs
      to make it look more generic. Added option for specifying CLK ID per
      device. This all was suggested by Jon Hunter to v2.

v2: - Dropped use of of_device_compatible_match(), like it was suggested
      by Rob Herring in a review comment to v1.

    - Added patch that sets card's driver_name of as Tegra ASoC drivers.
      In a comment to v1 Jaroslav Kysela suggested that the Tegra drivers
      don't set the card name properly and he was right.

      I opened pull request with the new Tegra UCMs and updated lookup paths
      for older UCMs [1].

      [1] https://github.com/alsa-project/alsa-ucm-conf/pull/92

Dmitry Osipenko (4):
  ASoC: tegra: Set driver_name=tegra for all machine drivers
  ASoC: tegra: Unify ASoC machine drivers
  ASoC: tegra: Specify components string for each card
  ASoC: tegra: Squash utils into common machine driver

 sound/soc/tegra/Kconfig              |  12 +
 sound/soc/tegra/Makefile             |  19 +-
 sound/soc/tegra/tegra_alc5632.c      | 259 --------
 sound/soc/tegra/tegra_asoc_machine.c | 854 +++++++++++++++++++++++++++
 sound/soc/tegra/tegra_asoc_machine.h |  49 ++
 sound/soc/tegra/tegra_asoc_utils.c   | 225 -------
 sound/soc/tegra/tegra_asoc_utils.h   |  38 --
 sound/soc/tegra/tegra_max98090.c     | 276 ---------
 sound/soc/tegra/tegra_rt5640.c       | 222 -------
 sound/soc/tegra/tegra_rt5677.c       | 324 ----------
 sound/soc/tegra/tegra_sgtl5000.c     | 211 -------
 sound/soc/tegra/tegra_wm8753.c       | 185 ------
 sound/soc/tegra/tegra_wm8903.c       | 351 +++--------
 sound/soc/tegra/tegra_wm9712.c       | 166 ------
 sound/soc/tegra/trimslice.c          | 172 ------
 15 files changed, 996 insertions(+), 2367 deletions(-)
 delete mode 100644 sound/soc/tegra/tegra_alc5632.c
 create mode 100644 sound/soc/tegra/tegra_asoc_machine.c
 create mode 100644 sound/soc/tegra/tegra_asoc_machine.h
 delete mode 100644 sound/soc/tegra/tegra_asoc_utils.c
 delete mode 100644 sound/soc/tegra/tegra_asoc_utils.h
 delete mode 100644 sound/soc/tegra/tegra_max98090.c
 delete mode 100644 sound/soc/tegra/tegra_rt5640.c
 delete mode 100644 sound/soc/tegra/tegra_rt5677.c
 delete mode 100644 sound/soc/tegra/tegra_sgtl5000.c
 delete mode 100644 sound/soc/tegra/tegra_wm8753.c
 delete mode 100644 sound/soc/tegra/tegra_wm9712.c
 delete mode 100644 sound/soc/tegra/trimslice.c

--
2.30.2

3 years agoASoC: dt-bindings: fsl-sai: Add compatible string for imx8mm/8mn/8mp/8ulp
Shengjiu Wang [Wed, 2 Jun 2021 06:02:50 +0000 (14:02 +0800)]
ASoC: dt-bindings: fsl-sai: Add compatible string for imx8mm/8mn/8mp/8ulp

Add compatible string for imx8mm/8mn/8mp/8ulp, these platforms all
support SAI IP.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/1622613770-10220-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: dt-bindings: fsl,spdif: Add compatible string for imx8ulp
Shengjiu Wang [Wed, 2 Jun 2021 06:04:09 +0000 (14:04 +0800)]
ASoC: dt-bindings: fsl,spdif: Add compatible string for imx8ulp

Add compatible string for imx8ulp, which supports spdif module

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/1622613849-10271-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: tegra: Squash utils into common machine driver
Dmitry Osipenko [Sat, 29 May 2021 15:46:49 +0000 (18:46 +0300)]
ASoC: tegra: Squash utils into common machine driver

There no users left of the utils other than the new common machine driver.
Squash the utils into the common machine driver in order to simplify code.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20210529154649.25936-5-digetx@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: tegra: Specify components string for each card
Dmitry Osipenko [Sat, 29 May 2021 15:46:48 +0000 (18:46 +0300)]
ASoC: tegra: Specify components string for each card

Specify components string for each card of each supported device. It's
a free form string that describes audio hardware configuration. This
information is useful for ALSA UCM rules. It allows to generalize UCM
rules, potentially removing a need to add new UCM rule for each device.

Acked-by: Jaroslav Kysela <perex@perex.cz>
Suggested-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20210529154649.25936-4-digetx@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: tegra: Unify ASoC machine drivers
Dmitry Osipenko [Sat, 29 May 2021 15:46:47 +0000 (18:46 +0300)]
ASoC: tegra: Unify ASoC machine drivers

Squash all machine drivers into a single-universal one. This reduces
code duplication, eases addition of a new drivers and upgrades older
code to a modern Linux kernel APIs.

Suggested-by: Jonathan Hunter <jonathanh@nvidia.com>
Co-developed-by: Ion Agorria <ion@agorria.com>
Signed-off-by: Ion Agorria <ion@agorria.com>
Co-developed-by: Svyatoslav Ryhel <clamor95@gmail.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20210529154649.25936-3-digetx@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: tegra: Set driver_name=tegra for all machine drivers
Dmitry Osipenko [Sat, 29 May 2021 15:46:46 +0000 (18:46 +0300)]
ASoC: tegra: Set driver_name=tegra for all machine drivers

The driver_name="tegra" is now required by the newer ALSA UCMs, otherwise
Tegra UCMs don't match by the path/name.

All Tegra machine drivers are specifying the card's name, but it has no
effect if model name is specified in the device-tree since it overrides
the card's name. We need to set the driver_name to "tegra" in order to
get a usable lookup path for the updated ALSA UCMs. The new UCM lookup
path has a form of driver_name/card_name.

The old lookup paths that are based on driver module name continue to
work as before. Note that UCM matching never worked for Tegra ASoC drivers
if they were compiled as built-in, this is fixed by supporting the new
naming scheme.

Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20210529154649.25936-2-digetx@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl_spdif: Remove superfluous error message around platform_get_irq()
Tan Zhongjun [Thu, 10 Jun 2021 04:00:37 +0000 (12:00 +0800)]
ASoC: fsl_spdif: Remove superfluous error message around platform_get_irq()

The platform_get_irq() prints error message telling that interrupt is
missing, hence there is no need to duplicated that message.

Signed-off-by: Tan Zhongjun <tanzhongjun@yulong.com>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://lore.kernel.org/r/20210610040037.1064-1-hbut_tan@163.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: atmel-pdmic: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Fri, 11 Jun 2021 03:53:51 +0000 (11:53 +0800)]
ASoC: atmel-pdmic: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210611035351.3878091-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: bcm: cygnus_ssp: Use devm_platform_ioremap_resource_byname()
Yang Yingliang [Fri, 11 Jun 2021 05:02:35 +0000 (13:02 +0800)]
ASoC: bcm: cygnus_ssp: Use devm_platform_ioremap_resource_byname()

Use the devm_platform_ioremap_resource_byname() helper instead of
calling platform_get_resource_byname() and devm_ioremap_resource()
separately.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210611050235.4182746-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: qcom: Add four speaker support on MI2S secondary
Srinivasa Rao Mandadapu [Wed, 9 Jun 2021 13:30:39 +0000 (19:00 +0530)]
ASoC: qcom: Add four speaker support on MI2S secondary

Add four speaker support on MI2S secondary block
by using I2S SD1 line on gpio52 pin, and add channel map
control support in the lpass-cpu audio driver.

Signed-off-by: Srinivasa Rao Mandadapu <srivasam@codeaurora.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210609133039.4648-1-srivasam@codeaurora.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: rt5640: Make codec selectable
Martin Blumenstingl [Sat, 12 Jun 2021 20:06:50 +0000 (22:06 +0200)]
ASoC: rt5640: Make codec selectable

The Realtek rt5640 codec driver can be used with the generic sound card
drivers, so it should be selectable. For example, with the addition
of #sound-dai-cells = <0> property in DT, it can be used with simple and
graph card drivers.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20210612200650.1301661-1-martin.blumenstingl@googlemail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: atmel-i2s: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Fri, 11 Jun 2021 03:41:22 +0000 (11:41 +0800)]
ASoC: atmel-i2s: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210611034122.3871022-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: axi-i2s: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Thu, 10 Jun 2021 13:27:05 +0000 (21:27 +0800)]
ASoC: axi-i2s: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210610132705.138706-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl_easrc: Remove superfluous error message around platform_get_irq()
Tan Zhongjun [Thu, 10 Jun 2021 12:50:52 +0000 (20:50 +0800)]
ASoC: fsl_easrc: Remove superfluous error message around platform_get_irq()

Clean up the check for irq.dev_err is superfluous as platform_get_irq()
already prints an error.Remove curly braces to confirm to styling
requirements.

Signed-off-by: Tan Zhongjun <tanzhongjun@yulong.com>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://lore.kernel.org/r/20210610125052.1280-1-hbut_tan@163.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-pcm: fix the return value in dpcm_apply_symmetry()
Jaroslav Kysela [Mon, 14 Jun 2021 07:17:46 +0000 (09:17 +0200)]
ASoC: soc-pcm: fix the return value in dpcm_apply_symmetry()

In case, where the loops are not executed for a reason, the uninitialized
variable 'err' is returned to the caller. Make code fully predictible
and assign zero in the declaration.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Cc: Mark Brown <broonie@kernel.org>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/20210614071746.1787072-1-perex@perex.cz
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: axi-spdif: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Thu, 10 Jun 2021 13:31:20 +0000 (21:31 +0800)]
ASoC: axi-spdif: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210610133120.141405-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: atmel-classd: Use devm_platform_get_and_ioremap_resource()
Yang Yingliang [Fri, 11 Jun 2021 02:21:15 +0000 (10:21 +0800)]
ASoC: atmel-classd: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210611022115.3583765-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>