Commit graph

23009 commits

Author SHA1 Message Date
Mark Brown
ac22cf5252
Merge series "ASoC: soc-pcm: ignore dummy-DAI at soc_pcm_params_symmetry()" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Hi Mark

I noticed if we have...

	1) Sound Card used DPCM
	2) It exchanges rate to 48kHz by using .be_hw_params_fixup()
	3) Codec had symmetric_rate = 1

We will get below error.
I didn't confirm, but maybe same things happen
if it exchanged channels/sample_bits.

	# aplay 44100.wav
	# aplay 44100.wav
=>	[kernel] be.ak4613-hifi: ASoC: unmatched rate symmetry: snd-soc-dummy-dai:44100 - soc_pcm_params_symmetry:48000
	[kernel] be.ak4613-hifi: ASoC: hw_params BE failed -22
	[kernel] fe.rsnd-dai.0: ASoC: hw_params BE failed -22
	aplay: set_params:1407: Unable to install hw params:
	ACCESS:  RW_INTERLEAVED
	FORMAT:  S16_LE
	SUBFORMAT:  STD
	SAMPLE_BITS: 16
	FRAME_BITS: 32
	CHANNELS: 2
	RATE: 44100
	PERIOD_TIME: (23219 23220)
	PERIOD_SIZE: 1024
	PERIOD_BYTES: 4096
	PERIODS: 4
	BUFFER_TIME: (92879 92880)
	BUFFER_SIZE: 4096
	BUFFER_BYTES: 16384
	TICK_TIME: 0

This patch-set solves this issue.
patch 1) - 3) are just cleanup patches.
4) is fot this issue.

Link: https://lore.kernel.org/r/87a6q0z4xt.wl-kuninori.morimoto.gx@renesas.com

Kuninori Morimoto (4):
  ASoC: soc-pcm: don't use "name" on __soc_pcm_params_symmetry() macro
  ASoC: soc-pcm: indicate DAI name if soc_pcm_params_symmetry() failed
  ASoC: soc-utils: add snd_soc_component_is_dummy()
  ASoC: soc-pcm: ignore dummy-DAI at soc_pcm_params_symmetry()

 include/sound/soc-component.h |  1 +
 sound/soc/soc-core.c          |  2 +-
 sound/soc/soc-pcm.c           | 14 ++++++++------
 sound/soc/soc-utils.c         |  6 ++++++
 4 files changed, 16 insertions(+), 7 deletions(-)

--
2.25.1
2021-04-16 16:55:31 +01:00
Thierry Reding
343e55e718
ASoC: simple-card-utils: Increase maximum number of links to 128
On Tegra186 and later, the number of links can go up to 72, so bump the
maximum number of links to the next power of two (128).

Fixes: f2138aed23 ("ASoC: simple-card-utils: enable flexible CPU/Codec/Platform")
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20210416071147.2149109-2-thierry.reding@gmail.com
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-16 16:54:48 +01:00
Thierry Reding
0f687d8267
ASoC: simple-card-utils: Propagate errors on too many links
The DAI counting code doesn't propagate errors when the number of
maximum links is exceeded, which causes subsequent initialization code
to continue to run and that eventually leads to memory corruption with
the code trying to access memory that is out of bounds.

Fix this by propagating errors when the maximum number of links is
reached, which ensures that the driver fails to load and prevents the
memory corruption.

Fixes: f2138aed23 ("ASoC: simple-card-utils: enable flexible CPU/Codec/Platform")
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20210416071147.2149109-1-thierry.reding@gmail.com
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-16 16:54:08 +01:00
Kuninori Morimoto
9c2ae363f3
ASoC: soc-pcm: ignore dummy-DAI at soc_pcm_params_symmetry()
soc_pcm_params_symmetry() checks CPU / Codec symmetry.
Unfortunately there was bug on it (= A) which didn't check Codec.
But is back by (B).

	A: v5.7:  commit c840f7698d ("ASoC: soc-pcm: Merge for_each_rtd_cpu/codec_dais()")
	B: v5.12: commit 3a90672111 ("ASoC: soc-pcm: cleanup soc_pcm_params_symmetry()")

In total,
old - v5.6 (= Generation-1):

	symmetric_rate		: DAI_Link / CPU / Codec
	symmetric_channels	: DAI_Link / CPU / Codec
	symmetric_sample_bits	: DAI_Link / CPU / Codec

v5.7 - v5.11 (= Generation-2): (= because of bug by (A))

	symmetric_rate		: DAI_Link / CPU
	symmetric_channels	: DAI_Link / CPU / Codec
	symmetric_sample_bits	: DAI_Link / CPU / Codec

v5.12 - (= Generation-3): (= back by (B))

	symmetric_rate		: DAI_Link / CPU / Codec
	symmetric_channels	: DAI_Link / CPU / Codec
	symmetric_sample_bits	: DAI_Link / CPU / Codec

OTOH, we can use DPCM which is configured by FE / BE.
Both FE / BE uses dummy-DAI.

	FE: CPU       <-> dummy-DAI
	BE: dummy-DAI <-> Codec

One note is that we can use .be_hw_params_fixup in DPCM case.
This means BE settings might be fixuped/updated by FE.
This feature is used for example on MIXer case.
It can be happen not only for rate, but for channels/sample_bits too.

Because of these reasons, below issue happen on
Generation-1 / Generation-3, if...

	1) Sound Card used DPCM
	2) It exchanges rate to 48kHz by using .be_hw_params_fixup()
	3) Codec had symmetric_rate = 1

I didn't confirm, but maybe same things happen
if it exchanged channels/sample_bits at Generation-1/2/3 too.

	# aplay 44100.wav
	# aplay 44100.wav
=>	[kernel] be.ak4613-hifi: ASoC: unmatched rate symmetry: snd-soc-dummy-dai:44100 - soc_pcm_params_symmetry:48000
	[kernel] be.ak4613-hifi: ASoC: hw_params BE failed -22
	[kernel] fe.rsnd-dai.0: ASoC: hw_params BE failed -22
	aplay: set_params:1407: Unable to install hw params:
	ACCESS:  RW_INTERLEAVED
	FORMAT:  S16_LE
	SUBFORMAT:  STD
	SAMPLE_BITS: 16
	FRAME_BITS: 32
	CHANNELS: 2
	RATE: 44100
	PERIOD_TIME: (23219 23220)
	PERIOD_SIZE: 1024
	PERIOD_BYTES: 4096
	PERIODS: 4
	BUFFER_TIME: (92879 92880)
	BUFFER_SIZE: 4096
	BUFFER_BYTES: 16384
	TICK_TIME: 0

soc_pcm_params_symmetry() checks by below

	if (symmetry)
		for_each_rtd_cpu_dais(rtd, i, cpu_dai)
			if (cpu_dai->xxx && cpu_dai->xxx != d.xxx) {
				dev_err(rtd->dev, "...");
				return -EINVAL;
			}

Because of above reason 3) (= Codec had symmetric_rate = 1)
BE can't ignore "if (symmetric)".

At 1st aplay, soc_pcm_params_symmetry() ignores it,
because dummy-DAI->rate is 0.
After this check, each DAI sets/keep settings.

In above sample case, BE gets 48000 and FE gets 44100,
and it happen BE -> FE order.
Because DPCM is sharing *same* dummy-DAI,
dummy-DAI sets as 48000 by BE, and is overwrote by 44100 by FE.

This settings never be cleaned (= a) after 1st aplay,
because dummy-DAI is used from FE/BE, never be last user (b).

	static int soc_pcm_hw_clean(...)
	{
		...
		for_each_rtd_dais(rtd, i, dai) {
			...
(b)			if (snd_soc_dai_active(dai) == 1)
(a)				soc_pcm_set_dai_params(dai, NULL);
			...
		}
		...
	}

At 2nd aplay, BE gets 48000 but dummy-DAI is keeping 44100,
soc_pcm_params_symmetry() checks will fail.

To solve this issue, this patch ignores dummy-DAI
at soc_pcm_params_symmetry()

Link: https://lore.kernel.org/r/87a6q0z4xt.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87y2djxa2n.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-16 14:34:13 +01:00
Kuninori Morimoto
8f1a16818a
ASoC: soc-utils: add snd_soc_component_is_dummy()
There is snd_soc_dai_is_dummy(), but not for component.
This patch adds it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87zgxzxa2t.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-16 14:34:12 +01:00
Kuninori Morimoto
ee39d77ed9
ASoC: soc-pcm: indicate DAI name if soc_pcm_params_symmetry() failed
It indicates unmatched symmetry value, but not indicates on which DAI.
This patch indicates it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/871rbbyono.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-16 14:34:11 +01:00
Kuninori Morimoto
1cacbac447
ASoC: soc-pcm: don't use "name" on __soc_pcm_params_symmetry() macro
__soc_pcm_params_symmetry() macro is using "name" as parameter
which will be exchanged to rate/channles/sample_bit, like below

	dai->name => dai->rate
	dai->name => dai->channels
	dai->name => dai->sample_bit

But, dai itself has "name". This means

	1) It is very confusable naming
	2) It can't use dai->name

This patch use "xxx" instead of "name"

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/8735vryoob.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-16 14:34:10 +01:00
Daniel Baluta
d971400339
ASoC: core: Don't set platform name when of_node is set
A DAI link has 3 components:
	* CPU
	* platform
	* codec(s)

A component is specified via:
	* name
	* of_node
	* dai_name

In order to avoid confusion when building a sound card we disallow
matching by both name and of_node (1).

soc_check_tplg_fes allows overriding certain BE links by overriding
BE link name. This doesn't work well if BE link was specified via DT,
because we end up with a link with both name and of_node specified
which is conflicting with (1).

In order to fix this we need to:
	* override of_node if component was specified via DT
	* override name, otherwise.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20210414101212.65573-1-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-16 13:43:21 +01:00
Vamshi Krishna Gopal
d25bbe8048
ASoC: Intel: sof_sdw: add quirk for new ADL-P Rvp
Add quirks for jack detection, rt711 DAI and DMIC

Reviewed-by: Bard Liao <bard.liao@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Vamshi Krishna Gopal <vamshi.krishna.gopal@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210415175013.192862-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-16 13:43:19 +01:00
Pierre-Louis Bossart
870dc42fe8
ASoC: Intel: soc-acpi: add ADL jack-less SoundWire configurations
Add one configuration with no RT711.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Libin Yang <libin.yang@intel.com>
Link: https://lore.kernel.org/r/20210415175013.192862-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-16 13:43:18 +01:00
Pierre-Louis Bossart
093b9dcb59
ASoC: Intel: soc-acpi: add ADL SoundWire base configurations
Add configurations ported over from TGL.

The topology names need to include link information given all the
hardware permutations.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Libin Yang <libin.yang@intel.com>
Link: https://lore.kernel.org/r/20210415175013.192862-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-16 13:43:17 +01:00
Ranjani Sridharan
eea1d18e9b
ASoC: SOF: use current DAI config during resume
Recently, the sof_pcm_dai_link_fixup() function was
updated to match SSP config with the PCM hw_params
and set the current_config for the DAI widget.

But the sof_restore_pipelines() function still chooses the
default config for the DAI widget upon resuming. Fix this
to use the last used config when setting up the DAI widget
during resume.

Fixes: c943a586f6 ("ASoC: SOF: match SSP config with pcm hw params")
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210415162107.130963-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-15 18:11:30 +01:00
Lukasz Majczak
a523ef731a
ASoC: Intel: kbl_da7219_max98927: Fix kabylake_ssp_fixup function
kabylake_ssp_fixup function uses snd_soc_dpcm to identify the
codecs DAIs. The HW parameters are changed based on the codec DAI of the
stream. The earlier approach to get snd_soc_dpcm was using container_of()
macro on snd_pcm_hw_params.

The structures have been modified over time and snd_soc_dpcm does not have
snd_pcm_hw_params as a reference but as a copy. This causes the current
driver to crash when used.

This patch changes the way snd_soc_dpcm is extracted. snd_soc_pcm_runtime
holds 2 dpcm instances (one for playback and one for capture). 2 codecs
on the SSP are dmic (capture) and speakers (playback). Based on the
stream direction, snd_soc_dpcm is extracted from snd_soc_pcm_runtime.

Tested for all use cases of the driver.
Based on similar fix in kbl_rt5663_rt5514_max98927.c
from Harsha Priya <harshapriya.n@intel.com> and
Vamshi Krishna Gopal <vamshi.krishna.gopal@intel.com>

Cc: <stable@vger.kernel.org> # 5.4+
Signed-off-by: Lukasz Majczak <lma@semihalf.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210415124347.475432-1-lma@semihalf.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-15 18:01:05 +01:00
Mark Brown
620f7c08d9
Merge series "ASoC: simple-card/audio-graph: adjust to multi CPU/Codec" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Hi Mark

These patches adjusts to multi CPU/Codec on simple-card / audio-graph.
This is part of prepare for new audio-graph-card2.

Kuninori Morimoto (5):
  ASoC: simple-card: remove unused variable from simple_parse_of()
  ASoC: simple-card: use asoc_link_to_xxx() macro
  ASoC: simple-card: use simple_props_to_xxx() macro
  ASoC: audio-graph: use asoc_link_to_xxx() macro
  ASoC: audio-graph: use simple_props_to_xxx() macro

 sound/soc/generic/audio-graph-card.c | 43 +++++++++++++-----------
 sound/soc/generic/simple-card.c      | 50 +++++++++++++---------------
 2 files changed, 47 insertions(+), 46 deletions(-)

--
2.25.1
2021-04-15 18:00:52 +01:00
Guangqing Zhu
22ff9c4230
ASoC: codecs: wcd934x: Fix missing IRQF_ONESHOT as only threaded handler
Coccinelle noticed:
  sound/soc/codecs/wcd934x.c:5041:7-32: ERROR: Threaded IRQ with no primary
handler requested without IRQF_ONESHOT

Signed-off-by: Guangqing Zhu <zhuguangqing83@gmail.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210415073829.22750-1-zhuguangqing83@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-15 16:07:54 +01:00
Kuninori Morimoto
ae0727ab77
ASoC: audio-graph: use simple_props_to_xxx() macro
We shouldn't use dai_props->cpus/codecs directly,
because these are array now to supporting multi CPU/Codec/Platform.
This patch uses simple_props_to_xxx() macro for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87k0p5zs97.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-15 16:07:52 +01:00
Kuninori Morimoto
7ed5920995
ASoC: audio-graph: use asoc_link_to_xxx() macro
We shouldn't use dai_link->cpus/codecs/platforms directly,
because these are array now to supporting multi CPU/Codec/Platform.
This patch uses asoc_link_to_xxx() macro for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87lf9lzs9c.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-15 16:07:51 +01:00
Kuninori Morimoto
2c33e20ffd
ASoC: simple-card: use simple_props_to_xxx() macro
We shouldn't use dai_props->cpus/codecs directly,
because these are array now to supporting multi CPU/Codec/Platform.
This patch uses simple_props_to_xxx() macro for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87mtu1zs9i.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-15 16:07:50 +01:00
Kuninori Morimoto
5bb5ac71e3
ASoC: simple-card: use asoc_link_to_xxx() macro
We shouldn't use dai_link->cpus/codecs/platforms directly,
because these are array now to supporting multi CPU/Codec/Platform.
This patch uses asoc_link_to_xxx() macro for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87o8ehzs9n.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-15 16:07:49 +01:00
Kuninori Morimoto
8cbea89e2f
ASoC: simple-card: remove unused variable from simple_parse_of()
commit d9ffff696c ("ASoC: simple-card: Use snd_soc_of_parse_aux_devs()")
switched to use snd_soc_of_parse_aux_devs() on simple_parse_of().
Thus noone is using *top anymore. Let's cleanup unused variable.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87pmyxzs9w.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-15 16:07:48 +01:00
Mark Brown
1ceb019e78
Merge series "kunit: Fix formatting of KUNIT tests to meet the standard" from Nico Pache <npache@redhat.com>:
There are few instances of KUNIT tests that are not properly defined.
This commit focuses on correcting these issues to match the standard
defined in the Documentation.

Issues Fixed:
 - tests should end in KUNIT_TEST, some fixes have been applied to
   correct issues were KUNIT_TESTS is used or KUNIT is not mentioned.
 - Tests should default to KUNIT_ALL_TESTS
 - Tests configs tristate should have if !KUNIT_ALL_TESTS

No functional changes other than CONFIG name changes

Changes since v2:
 - Split patch 1 by subcomponents
 - fix issues where config was *KUNIT_TEST_TEST
 - properly threaded/chained messages

Nico Pache (6):
  kunit: ASoC: topology: adhear to KUNIT formatting standard
  kunit: software node: adhear to KUNIT formatting standard
  kunit: ext4: adhear to KUNIT formatting standard
  kunit: lib: adhear to KUNIT formatting standard
  kunit: mptcp: adhear to KUNIT formatting standard
  m68k: update configs to match the proper KUNIT syntax

 arch/m68k/configs/amiga_defconfig    |  6 +++---
 arch/m68k/configs/apollo_defconfig   |  6 +++---
 arch/m68k/configs/atari_defconfig    |  6 +++---
 arch/m68k/configs/bvme6000_defconfig |  6 +++---
 arch/m68k/configs/hp300_defconfig    |  6 +++---
 arch/m68k/configs/mac_defconfig      |  6 +++---
 arch/m68k/configs/multi_defconfig    |  6 +++---
 arch/m68k/configs/mvme147_defconfig  |  6 +++---
 arch/m68k/configs/mvme16x_defconfig  |  6 +++---
 arch/m68k/configs/q40_defconfig      |  6 +++---
 arch/m68k/configs/sun3_defconfig     |  6 +++---
 arch/m68k/configs/sun3x_defconfig    |  6 +++---
 drivers/base/test/Kconfig            |  2 +-
 drivers/base/test/Makefile           |  2 +-
 fs/ext4/.kunitconfig                 |  2 +-
 fs/ext4/Kconfig                      |  2 +-
 fs/ext4/Makefile                     |  2 +-
 lib/Kconfig.debug                    | 21 +++++++++++++--------
 lib/Makefile                         |  6 +++---
 net/mptcp/Kconfig                    |  2 +-
 net/mptcp/Makefile                   |  2 +-
 net/mptcp/crypto.c                   |  2 +-
 net/mptcp/token.c                    |  2 +-
 sound/soc/Kconfig                    |  2 +-
 sound/soc/Makefile                   |  4 ++--
 25 files changed, 64 insertions(+), 59 deletions(-)

--
2.30.2
2021-04-14 16:29:35 +01:00
Mark Brown
8577bf61a6
Merge series "ASoC: rsnd: tidyup Renesas sound" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Hi Mark

These are tidyup patches for Renesas sound drivers.

Kuninori Morimoto (5):
  ASoC: rsnd: call rsnd_ssi_master_clk_start() from rsnd_ssi_init()
  ASoC: rsnd: check all BUSIF status when error
  ASoC: rsnd: add rsnd_ssi_busif_err_status_clear()
  ASoC: rsnd: add rsnd_ssi_busif_err_irq_enable/disable()
  ASoC: rsnd: add usage for SRC

 sound/soc/sh/rcar/src.c |   9 ++
 sound/soc/sh/rcar/ssi.c | 225 ++++++++++++++++++----------------------
 2 files changed, 110 insertions(+), 124 deletions(-)

--
2.25.1
2021-04-14 16:29:34 +01:00
Lee Jones
1658d6242a Immutable branch between MFD, Clock, GPIO, Regulator and RTC due for the v5.13 merge window
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmB2tEoACgkQUa+KL4f8
 d2GqwRAAoslBlgvaQy5UB/dD1sVFzNNeqUhXJIYHMN0AvC5BRiysEBUqWotf0CKp
 ywl34SRiEyZ7RAgyYZpZ3gR7pmx8tPSf8PzKMLyZgzOfj5JjEM35Qu7oxPpi7Cnl
 g6kRvlUyVHeFS0uNkUORg7pG3MA43kx6u2SjjEHIyPdDgjmT9QWHH8/8sQdv++Hs
 AOFvsqe5rIpyDKvY0h/xG018AMq8Gr3kZNCg2rYPoxzzjXWZK5CPInzbLnrkZ0Nh
 HEehgtEYN+QmFp6tU1AdJXDReEckQkyOGJ1jSy5sPAKWJ0NKKzaTjwcP8T0KN7Nw
 03VYhA6iom9U4oQGVxZLKKm20QRvevx2ZzYU8yK9qEamwsGADBwlNxO1v3C4dYUT
 AC1xrmu570Hr7EaZYQkU0s4kjqIyZfm9JOTcsltOGYACvE34tgIMiIR5qu1VXnmX
 OcOBUGiQqFovu+zYgHvMhggjclTYu5xM+DH7coi9iFLc7FftbjXF+T8Q/EV/qAfL
 SaVbCQ1XYMefA92pI4kntHMhTe+eNSEDHodc1Tuw/dN4kEJ82R13WpCojH5L739I
 VXaB7GO11W6iVD1wgmv03pf2Ce+TLifHZE90t8GSh5zztND1qI60c3Mc4KOSkGHU
 i5qbGdyFph2MYnWzydPJgSNXoCzLsT/sHwABprOIa7/05mNfEyc=
 =7O9a
 -----END PGP SIGNATURE-----
mergetag object a908a71669
 type commit
 tag ib-mfd-extcon-v5.13
 tagger Lee Jones <lee.jones@linaro.org> 1616067995 +0000
 
 Immutable branch between MFD and Extcon due for the v5.13 merge window
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmBTPZsACgkQUa+KL4f8
 d2Ew4g/8CZnru5gfuR2uMZIReS8Q4RniTKe3IoQNGE+nyZFp8heJm5sJ/tcHzHuX
 RcBbuY9hLhhZRvQ+WrveYiXYdC3tH/8j/5mHj6CLJDwh8ukEf9H/tcNAx1T0Y8by
 C3Y/lY7avAzfTorJQ2g+LRkbuei3mojTpUuEiwgdJEzydbg/GzYVv2edRvdCkW0Y
 6xCg8ufmWBTjrHHoXm4/wtGSJ2L17coieSRSIiQ4KsGf8xM6QAnUEXbwQV3KjlVS
 SbI0gucfjnYYdsYqrPy+yyA8gzA5utP/0Zis4pfDG1Av1dBm6ZfD5n/z+KYyJUoG
 C1GPkqxukZODBitwO6PdCoHpFTsbwfoqz6HD8o+6oFqScdBtU7C8SectMpis0G4/
 j3VrstGL6T0GgzuVmy5EnpPkqyiiJh3Smv5ZS91Rztiy4CTTvLlkrw5+h0GP9aR7
 uUfNmQU65KCG4WscnwuWeImcQzxRAlsiI0QxXFmHhIxZFG8Bq2z11V5rcpYdJXgx
 GbkOml6iq+G1UQu3sKYgLlE2Lg3IlehjytAbpY0Qoj9VE1FeE8STgYQMEwT5TqIB
 Em6T1fkpXp2kho92rmJ+rjcAJp7rKmlSQHO0xgbJwbzZsA5rKvClAn3PZmoZs7HY
 VHmeWjPihoo7qJTx7LVhWEtYptKG31JqCRPFTbVXjeCvClnjcFU=
 =3CZN
 -----END PGP SIGNATURE-----
mergetag object eac013a0b7
 type commit
 tag ib-mfd-input-v5.13-1
 tagger Lee Jones <lee.jones@linaro.org> 1615374673 +0000
 
 Immutable branch between MFD and Input due for the v5.13 merge window
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmBIqV8ACgkQUa+KL4f8
 d2EmIw//fydErEBA/TsNSSMfAxK+WRY3xDFdTwK9NorfJiyPFMwsfIZ2Y0BdGHpa
 cNz4EMqcfKgHzblbla5EOW64RDIIFQfDTiuCJTGaTB5LUlI56hnKEuiKlrtKlQMC
 3ZSxY5+SY5OFwof4LFPCASyn0N3bH8Mdd1inyFAIphFrgHKez353B9N2RwePlpLq
 7jWaGABQVo28cPpkLl3Slo064xadzS2+Sklwii8gOOvtAGMkLkvLpFEcGCNFRX7l
 OBnw8QP3SCg14b7hrtSys2g7onpH3M5eDt5LwJVqOXEY5SCWJUoultF0msNuGVlq
 XGxJATebx0iU3IByhgTFmzj3ymCWZ7I/EeXD1GI0Fn5EscK1AsrRimlQNcxq9Nm7
 tb/mV3FZlkNi6FjOq/rQ90QgT20t74tGrU9qpXlbwpB2Z9jO3GCDTFLt0XQFEE/4
 83nqIjhYfbpkNXfRTH6/FPtFWqpfw+U8/kNMNWSk9BNta+67++vBQzeFAYWC6hFK
 m7LTzyDNb/EHstAYdXIDblEX4x1VLOilKMaltRqlQC9sUZ4ZpA4YxFJKX21mtGBX
 0jrM2SLeBff+Xv4i/UdoiGBC2uWiBPWW0G94IkDwpCM272q5br8LxTuKIzWCv4w4
 /4J8bXtVfmXl74lXw90ZnMwHApq95+yPDd2g8XTcdo+zctSqS6E=
 =NF6J
 -----END PGP SIGNATURE-----
mergetag object aa47ad3f85
 type commit
 tag ib-mfd-platform-x86-v5.13
 tagger Lee Jones <lee.jones@linaro.org> 1615373744 +0000
 
 Immutable branch between MFD and Platform/x86 due for the v5.13 merge window
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmBIpbAACgkQUa+KL4f8
 d2H/NA//bVtt5HlRE0LE8QYOrP2+KmAOOOmIH4eU4eTfn82xMWVmsX+1AsC7ANx0
 eq2pPB3BDQU2MkT9YvtZCud5/3TKYPJfzDl5qppkYTxS7BgRPPnFMXLSi5CofiH9
 dDYSE1Iv0XMPBboJoce/RaBck/yWm5DLWHUR2w8Nc3n61uHCFrPBZeI058ZZXYnh
 DZyiItaVIHDs1jIrVjS87SGcIoSXjfWgBFQkTS9jLneZcC0HRebGA78raEHzeBVK
 Zpx5syisRoPkT+Hxb+Qe28ffqf9Qc/RyOpRnhmCDA0xxskembakati/XhnHtbHaT
 kXmSvsC+OeDXZw8jeVTPz8ZGEmd4H2GLXuVAMuQbOlfuPZgFP+9V5C4LFu2oiT9v
 t9USjr3VgqjGocVntP9B1PgqiDlHuzLinvB614WYPFIXiHJa0xKoEzTQlUbUTn22
 v9Tvyfgx5oczktpavCm3YzgWRyFxphaE++vSIBOJlACoqYQT6At0wnn2qr2+mTL0
 dZy6H/vEXLQFGRcwDmHWDRBoU9D1QTQzWIsl8u8+Pq9SGoa12YmpwOjsuK3WP3wS
 iRl1q35AuyEp6zaclowlW4qcTGlwRMN5rUzReMmRbfg3xqwxj6FwxY87fYtDc7Uu
 E3dklJjeZeSGw3rAJSRQzm0JMhlkRWyFdZ6KPxfnWzsPmrza2vY=
 =340a
 -----END PGP SIGNATURE-----
mergetag object ee0975c308
 type commit
 tag ib-mfd-power-v5.13
 tagger Lee Jones <lee.jones@linaro.org> 1616489771 +0000
 
 Immutable branch between MFD and Power due for the v5.13 merge window
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmBZrSsACgkQUa+KL4f8
 d2EyiA/9GRBj8piXoHnlqA4lkExInTddmts2r7aDtmPa1iCUT5XeyIoiSWdnFz++
 fr9ion87/T89zVJWLMGHi5HRlOEQwR0eG8VUF7rAp8qV9ANOOB8sYi0KC4k1ADet
 +SNTqUYIbA3xrlH+DSPBRmyWMJ6EHkrtmzBCO4PUyxEexFFGSGz3BuEkCdhKMsUb
 /t/AqxLEs9v8dHOIWHTlKK9M1divTdBkqN8mwUfGMDqvtCpFXIuSZ3koTnK9wJyd
 Pqw+5XAoL8cMfSkQrwIpZGRdzyCa9f0iOJz8gdYYKxq1575zGxUTM53z3MYb+ujX
 ei3oO99bCNLezcWozBNEJIlk4LK2FdzWFrlimsxE+2IStH9p1TE3voWFUJh+tL3f
 mbYHNJr35pBNRXA07iQccA9V2zCFAeN4GaeRrY59blcfw8fvOGcWwni8YDbWmmGz
 E/xYv7WeNtrzrELNDMpGJ4w909EItfXEsWyzItJBhI5ThsRPOpET7uBolkEfbd5M
 jjGM2pGeLq++Zd1c2kBzc3a2gW60iGNI6dMBpZWCwCCPe1Vz7okiu1hVULMYYXgZ
 B7F8xzM60phdlMUrFu/tFyYPOs8/0w8tk5QjGiD7/FkLsFhD6UdJsD0r02PCtqN+
 4BRGwOmZWED83XVDTkwVR61GWPP7mWl5AUywe2XdPBo6/jhWTBY=
 =+5eM
 -----END PGP SIGNATURE-----
mergetag object edbda8f787
 type commit
 tag ib-mfd-pwm-rtc-v5.13-1
 tagger Lee Jones <lee.jones@linaro.org> 1615374433 +0000
 
 Immutable branch between MFD, PWM and RTC due for the v5.13 merge window
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmBIqH8ACgkQUa+KL4f8
 d2F8EhAAi4vdKdfmlkJYcOS/wwWHR+wF3LOrTdmv80oP19/QY5Ctk/zgjYOmet+K
 WOLFOH0WCwp+NlEpiFDhlhAqApFNw4F24Dp4iiMGfYF+ohpoDNMIV9bYC9PpLeF1
 IsXo/vRsYQN9JtHZEHlICbw+W60jfTx4F1woQVuMM1sTIb65DVlHHEGKBFH4v+ys
 fXZWTIhMCnVrJvM26dU4YZ0uj3RbAZlzK5itOzIwaU6OLitc0XlFGH+zsIiHioNl
 wsfJJc5WzeJwCbanqsdiA+lAQ3oRhzns0bOSeTyf0xWS1HzKSMBhpkvGLa//5kmD
 I5HEtw46OvWtvZ8AaBVeHVlIGZ+00Yxs3ORFK/koGOFcTayh/7QjhS8/wSIW0yp8
 Nxwr8OXpHLicJceIm7/1OpfSbawnY0f93Cu2c6rzDLWz0JTzO6f5EmfFr8I/T+bB
 7gexysH3JoOYutsPD9EsEoaexFx4ZsYSoPQJ5Jf74pmMJUUkDwzSo2DQb34DM8Ja
 uRwka56ayuubhEX8jd5hru/X7Ikl2GYoMG/ZsZ09BfWhGA3F55R6cn0+UiEwj03M
 rn6/FSl8EHgAQ5W7JT85rucbBAT2HmuZWV2OFSM3ldlD1Tws/GucDRELn9q37YpS
 w7bq+hXd6sHEJnx1vtVnJoXx+0DJdZ00koj4h3xdNm936p7K9/w=
 =DySP
 -----END PGP SIGNATURE-----

Merge tags 'ib-mfd-clk-gpio-regulator-rtc-v5.13', 'ib-mfd-extcon-v5.13', 'ib-mfd-input-v5.13-1', 'ib-mfd-platform-x86-v5.13', 'ib-mfd-power-v5.13', 'ib-mfd-pwm-rtc-v5.13-1' and 'ib-regulator-list-ramp-helpers-v5.13' into ibs-for-mfd-merged

Immutable branch between MFD, Clock, GPIO, Regulator and RTC due for the v5.13 merge window

Immutable branch between MFD and Extcon due for the v5.13 merge window

Immutable branch between MFD and Input due for the v5.13 merge window

Immutable branch between MFD and Platform/x86 due for the v5.13 merge window

Immutable branch between MFD and Power due for the v5.13 merge window

Immutable branch between MFD, PWM and RTC due for the v5.13 merge window
2021-04-14 15:59:22 +01:00
Nico Pache
b5fb388da4
ASoC: topology: adhere to KUNIT formatting standard
Drop 'S' from end of SND_SOC_TOPOLOGY_KUNIT_TESTS inorder to adhear to
 the KUNIT *_KUNIT_TEST config name format.

Signed-off-by: Nico Pache <npache@redhat.com>
Link: https://lore.kernel.org/r/dcf79e592f9a7e14483dde32ac561f6af2632e50.1618388989.git.npache@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-14 15:26:24 +01:00
Yang Li
e42b6e813f
ASoC: cs35l35: remove unused including <linux/version.h>
Fix the following versioncheck warning:
./sound/soc/codecs/cs35l35.c: 12 linux/version.h not needed.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Link: https://lore.kernel.org/r/1618380883-114841-1-git-send-email-yang.lee@linux.alibaba.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-14 15:24:18 +01:00
Shengjiu Wang
4d5d75ce2b
ASoC: ak5558: change function name to ak5558_reset
Change function name to ak5558_reset to match devicetree property
"reset-gpios".

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1618382024-31725-2-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-14 15:24:17 +01:00
Shengjiu Wang
0b93bbc977
ASoC: ak5558: correct reset polarity
Reset (aka power off) happens when the reset gpio is made active.
The reset gpio is GPIO_ACTIVE_LOW

Fixes: 9208847774 ("ASoC: ak5558: Add support for AK5558 ADC driver")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1618382024-31725-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-14 15:24:16 +01:00
Kuninori Morimoto
63346d3d2f
ASoC: rsnd: add usage for SRC
This patch add missing usage comment for SRC.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87zgy9z9es.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-14 15:24:14 +01:00
Kuninori Morimoto
15c57ce07c
ASoC: rsnd: add rsnd_ssi_busif_err_irq_enable/disable()
Current ssi.c has duplicated code to control BUSIF
over/under run interrupt.
This patch adds new rsnd_ssi_busif_err_irq_enable/disable()
and share the code.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Yongbo Zhang <giraffesnn123@gmail.com>
Cc: Chen Li <licheng0822@thundersoft.com>
Link: https://lore.kernel.org/r/871rbl1jsb.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-14 15:24:13 +01:00
Kuninori Morimoto
691b379cbe
ASoC: rsnd: add rsnd_ssi_busif_err_status_clear()
Current ssi.c clears BUSIF error status at __rsnd_ssi_interrupt(),
but its code is verbose.
This patch off-load it to rsnd_ssi_busif_err_status_clear().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/8735w11jso.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-14 15:24:12 +01:00
Kuninori Morimoto
a4856e15e5
ASoC: rsnd: check all BUSIF status when error
commit 66c705d07d ("SoC: rsnd: add interrupt support for SSI BUSIF
buffer") adds __rsnd_ssi_interrupt() checks for BUSIF status,
but is using "break" at for loop.
This means it is not checking all status. Let's check all BUSIF status.

Fixes: commit 66c705d07d ("SoC: rsnd: add interrupt support for SSI BUSIF buffer")
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/874kgh1jsw.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-14 15:24:10 +01:00
Kuninori Morimoto
a122a116fc
ASoC: rsnd: call rsnd_ssi_master_clk_start() from rsnd_ssi_init()
Current rsnd needs to call .prepare (P) for clock settings,
.trigger for playback start (S) and stop (E).
It should be called as below from SSI point of view.

	P -> S -> E -> P -> S -> E -> ...

But, if you used MIXer, below case might happen

	              (2)
	1: P -> S ---> E -> ...
	2:         P ----> S -> ...
	          (1)     (3)

P(1) setups clock, but E(2) resets it. and starts playback (3).
In such case, it will reports "SSI parent/child should use same rate".

rsnd_ssi_master_clk_start() which is the main function at (P)
was called from rsnd_ssi_init() (= S) before,
but was moved by below patch to rsnd_soc_dai_prepare() (= P) to avoid
using clk_get_rate() which shouldn't be used under atomic context.

	commit 4d230d1271 ("ASoC: rsnd: fixup not to call clk_get/set
				under non-atomic")

Because of above patch, rsnd_ssi_master_clk_start() is now called at (P)
which is for non atomic context. But (P) is assuming that spin lock is
*not* used.
One issue now is rsnd_ssi_master_clk_start() is checking ssi->xxx
which should be protected by spin lock.

After above patch, adg.c had below patch for other reasons.

	commit 06e8f5c842 ("ASoC: rsnd: don't call clk_get_rate()
				under atomic context")

clk_get_rate() is used at probe() timing by this patch.
In other words, rsnd_ssi_master_clk_start() is no longer using
clk_get_rate() any more.

This means we can call it from rsnd_ssi_init() (= S) again which is
protected by spin lock.
This patch re-move it to under spin lock, and solves
1. checking ssi->xxx without spin lock issue.
2. clk setting / device start / device stop race condition.

Reported-by: Linh Phung T. Y. <linh.phung.jy@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/875z0x1jt5.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-14 15:24:09 +01:00
Christophe JAILLET
cdf20c3ef0
ASoC: cs35l36: Fix an error handling path in 'cs35l36_i2c_probe()'
If 'devm_regmap_init_i2c()' fails, there is no need to goto err. We should
return directly as already done by the surrounding error handling paths.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/9fec48e75bc1d3c92626e6f6aca2344bda223379.1618145790.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-13 14:12:55 +01:00
Christophe JAILLET
38c694e98f
ASoC: cs35l35: Fix an error handling path in 'cs35l35_i2c_probe()'
If 'devm_regmap_init_i2c()' fails, there is no need to goto err. We should
return directly as already done by the surrounding error handling paths.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/15720439769ba94ffb65c90217392b0758b08f61.1618145369.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-13 14:12:54 +01:00
Mark Brown
637251bcfe
Merge series "ASoC: simple-card-utils: prepare for multi support" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Hi Mark

This patch-set is for v2 of Multi-CPU/Codec support,
and some cleanups.
v1 had patch-conflict on simple-card / audio-graph with below.
v2 was solved it.

	fa74c223b6
	("ASoC: simple-card: fix possible uninitialized single_cpu local variable")

I want to add new audio-graph-card2 driver which can support
not only DPCM, but also Multi-CPU/Codec, and Codec2Codec.
And it is also supporting audio-graph-card2 base custom driver.

But before supporting such driver, we need to cleanup existing
simple-card / audio-graph, because these and new driver are
sharing code.

Link: https://lore.kernel.org/r/87wntmod33.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/20210408141639.GA39604@sirena.org.uk

Kuninori Morimoto (12):
  ASoC: simple-card-utils: setup dai_props cpu_dai/codec_dai at initial timing
  ASoC: simple-card-utils: remove li->dais/li->conf
  ASoC: simple-card-utils: use for_each_prop_xxx()
  ASoC: simple-card-utils: remove asoc_simple_parse_xxx()
  ASoC: simple-card-utils: care multi DAI at asoc_simple_clean_reference()
  ASoC: simple-card-utils: indicate dai_fmt if exist
  ASoC: simple-card-utils: indicate missing CPU/Codec numbers for debug
  ASoC: simple-card-utils: add simple_props_to_xxx() macro
  ASoC: simple-card-utils: multi support at asoc_simple_canonicalize_cpu/platform()
  ASoC: simple-card-utils: tidyup debug info for clock
  ASoC: simple-card-utils: tidyup dev_dbg() to use 1 line
  ASoC: simple-card-utils: tidyup asoc_simple_parse_convert()

 include/sound/simple_card_utils.h     | 107 ++++++++++------
 sound/soc/generic/audio-graph-card.c  |  64 ++++------
 sound/soc/generic/simple-card-utils.c | 174 ++++++++++++++++----------
 sound/soc/generic/simple-card.c       |  70 ++++-------
 4 files changed, 226 insertions(+), 189 deletions(-)

--
2.25.1
2021-04-13 14:11:53 +01:00
Chen Lifu
462c47c2fc
ASoC: sti: sti_uniperif: add missing MODULE_DEVICE_TABLE
This patch adds missing MODULE_DEVICE_TABLE definition which generates
correct modalias for automatic loading of this driver when it is built
as an external module.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Chen Lifu <chenlifu@huawei.com>
Reviewed-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Link: https://lore.kernel.org/r/20210409015953.259688-1-chenlifu@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-13 12:33:45 +01:00
Kuninori Morimoto
fcfd763bef
ASoC: simple-card-utils: tidyup asoc_simple_parse_convert()
dev is not used. This patch removes it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87eefgwf8j.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-13 12:32:56 +01:00
Kuninori Morimoto
c826ec0391
ASoC: simple-card-utils: multi support at asoc_simple_canonicalize_cpu/platform()
Current asoc_simple_canonicalize_cpu/platform() is assuming single CPU,
single Platform, but we want to support Multi support.
This patch is prepare for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87im4swf8y.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-13 12:32:53 +01:00
Kuninori Morimoto
1cf6805700
ASoC: simple-card-utils: care multi DAI at asoc_simple_clean_reference()
ASoC is now supporting multi DAI, but, current
simple-card / audio-graph are assuming fixed single DAI.

This patch cares multi DAI at asoc_simple_clean_reference()
for of_node_put().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87o8ekwf9p.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-13 12:32:49 +01:00
Kuninori Morimoto
e25704f84c
ASoC: simple-card-utils: remove asoc_simple_parse_xxx()
ASoC is now supporting multi DAI, but, current
simple-card / audio-graph are assuming fixed single DAI.

Now, asoc_simple_parse_xxx() macro is assuming single DAI.
To support multi-CPU/Codec, this patch unpack asoc_simple_parse_xxx()
macro, and uses "&dai_link->cpus[i]" instead of "dai_link->cpus".

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87pmz0wf9u.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-13 12:32:48 +01:00
Kuninori Morimoto
fafc05aadd
ASoC: simple-card-utils: use for_each_prop_xxx()
ASoC is now supporting multi DAI, but, current
simple-card / audio-graph are assuming fixed single DAI.

This patch uses for_each_prop_xxx() to support multi DAI.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87r1jgwf9y.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-13 12:32:47 +01:00
Kuninori Morimoto
f899006d55
ASoC: simple-card-utils: remove li->dais/li->conf
li->dais is same as number of CPU + Codec,
li->conf is same as number of Codec when dummy-Codec.

li->dais/li->conf are no longer needed.
This patch removes these.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87sg3wwfa3.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-13 12:32:46 +01:00
Kuninori Morimoto
59f5cd96e9
ASoC: simple-card-utils: setup dai_props cpu_dai/codec_dai at initial timing
We couldn't setup dai_props cpu_dai/codec_dai at the initial timing,
because "counting DAIs loop" and "detecting DAIs loop" were different.
But we can do it now, because these are using same loops.

This patch setups dai_props cpu_dai/codec_dai at the initial timing.
It can removes triky code from simple-card / audio-graph.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87tuocwfa8.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-13 12:32:45 +01:00
Jerome Brunet
858066864a
ASoC: meson: axg-frddr: fix fifo depth on g12 and sm1
Previous fifo depth patch was only tested on axg, not g12 or sm1.
Of course, while adding hw_params dai callback for the axg, I forgot to do
the same for g12 and sm1, leaving the depth unset and breaking playback on
these SoCs.

Add hw_params callback to the g12 dai_ops to fix the problem.

Fixes: 6f68accaa8 ("ASoC: meson: axg-frddr: set fifo depth according to the period")
Reported-by: Christian Hewitt <christianshewitt@gmail.com>
Tested-by: Christian Hewitt <christianshewitt@gmail.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20210412132256.89920-1-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-13 12:31:51 +01:00
Mark Brown
13a9e21b80
Merge series "ASoC: SOF: Intel: descriptor corrections for TGL and ADL" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
One missed property for TigerLake and need for separate descriptors
between ADL-S and the other flavors.

Libin Yang (1):
  ASoC: SOF: Intel: add missing use_acpi_target_states for TGL platforms

Sathya Prakash M R (1):
  ASoC: SOF: Intel: Update ADL P to use its own descriptor

 sound/soc/sof/intel/pci-tgl.c | 20 +++++++++++++++++++-
 sound/soc/sof/intel/tgl.c     |  2 +-
 2 files changed, 20 insertions(+), 2 deletions(-)

--
2.25.1
2021-04-12 19:56:23 +01:00
Mark Brown
2976eef29e
Merge series "ASoC: SOF: simplify probe and report errors" from Ranjani Sridharan <ranjani.sridharan@linux.intel.com>:
These patches simplify the sof_probe_complete handling and
address reporting of errors during probe.

Peter Ujfalusi (2):
  ASoC: SOF: core: Add missing error prints to device probe operation
  ASoC: SOF: Simplify sof_probe_complete handling for acpi/pci/of

 sound/soc/sof/core.c         |  9 +++++++--
 sound/soc/sof/sof-acpi-dev.c | 18 +++---------------
 sound/soc/sof/sof-of-dev.c   | 18 +++---------------
 sound/soc/sof/sof-pci-dev.c  | 20 ++++----------------
 4 files changed, 17 insertions(+), 48 deletions(-)

--
2.25.1
2021-04-12 19:56:22 +01:00
Mark Brown
6fede18b0c
Merge series "ASoC: SOF: simplify nocodec mode" from Ranjani Sridharan <ranjani.sridharan@linux.intel.com>:
This set of patches simplify the implementation
of nocodec mode in SOF.

Pierre-Louis Bossart (6):
  ASoC: SOF: add Kconfig option for probe workqueues
  ASoC: soc-acpi: add new fields for mach_params
  ASoC: SOF: change signature of set_mach_params() callback
  ASoC: SOF: Intel: update set_mach_params()
  ASoC: SOF: pcm: export snd_pcm_dai_link_fixup
  ASOC: SOF: simplify nocodec mode

 include/sound/soc-acpi.h  |  4 ++++
 include/sound/sof.h       |  3 ---
 sound/soc/sof/Kconfig     | 11 +++++++++++
 sound/soc/sof/intel/bdw.c |  8 ++++++--
 sound/soc/sof/intel/byt.c | 22 +++++++++++++---------
 sound/soc/sof/intel/hda.c |  8 ++++++--
 sound/soc/sof/intel/hda.h |  2 +-
 sound/soc/sof/nocodec.c   | 39 +++++++++++++++++++++------------------
 sound/soc/sof/ops.h       |  6 ++----
 sound/soc/sof/pcm.c       |  1 +
 sound/soc/sof/sof-audio.c | 34 +++++++++++++++-------------------
 sound/soc/sof/sof-priv.h  |  2 +-
 12 files changed, 81 insertions(+), 59 deletions(-)

--
2.25.1
2021-04-12 19:56:21 +01:00
Sathya Prakash M R
4ad03f894b
ASoC: SOF: Intel: Update ADL P to use its own descriptor
ADL P has specific machines and hence having its own
table will help separate the machines and FW

Reviewed-by: Bard Liao <bard.liao@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Sathya Prakash M R <sathya.prakash.m.r@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210412161519.13508-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-12 18:03:22 +01:00
Libin Yang
1b9889974c
ASoC: SOF: Intel: add missing use_acpi_target_states for TGL platforms
All Intel TigerLake platforms should support the feature of getting
the system state from acpi to deal with S0ix support.

This was missed in previous commits, likely due to copy/paste from
older code.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210412161519.13508-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-12 18:03:21 +01:00
Ranjani Sridharan
7459f8b703
ASoC: SOF: topology: remove useless code
The patch "ASoC: SOF: Intel: hda: assign link DMA channel at run-time"
fixed the sof_link_hda_unload() to remove the call to the BE
hw_free op but left the rest of code that become redundant.

So, remove sof_link_hda_unload() along with the link_unload() op
entirely as it is not longer needed.

Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210409220522.1542865-1-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-12 17:06:45 +01:00
Libin Yang
b2fe85790d
ASoC: SOF: Kconfig: fix typo of SND_SOC_SOF_PCI
It should be 'endif ## SND_SOC_SOF_PCI' instead of
'endif ## SND_SOC_SOF_INTEL_PCI'

Signed-off-by: Libin Yang <libin.yang@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210409221308.1544000-1-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-12 17:06:44 +01:00
Pierre-Louis Bossart
4c1cc83fcc
ASOC: SOF: simplify nocodec mode
Replace ugly #if (!IS_ENABLED) by if (!IS_ENABLED), remove
cross-module dependencies and use classic mechanism to pass
information to the machine driver.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210409220121.1542362-7-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-12 17:05:55 +01:00
Pierre-Louis Bossart
f3f3af1743
ASoC: SOF: pcm: export snd_pcm_dai_link_fixup
In preparation of the nocodec refactoring, export the dai-link
fixup. This will also be required when we have more clients and
platform drivers.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210409220121.1542362-6-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-12 17:05:54 +01:00
Pierre-Louis Bossart
974cccf490
ASoC: SOF: Intel: update set_mach_params()
Add information for num_dai_drivers and dai_drivers[], which will be
used in the refactored nocodec implementation

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210409220121.1542362-5-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-12 17:05:53 +01:00
Pierre-Louis Bossart
17e9d6b0a3
ASoC: SOF: change signature of set_mach_params() callback
To set additional parameters, we need to have access to sdev, not the
plain vanilla struct device pointer.

No functionality change.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210409220121.1542362-4-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-12 17:05:52 +01:00
Pierre-Louis Bossart
e4330cae2a
ASoC: SOF: add Kconfig option for probe workqueues
The probe workqueue is currently used in the HDaudio case, following
the example of the snd-hda-intel driver.

For development and validation, it's useful to enable the probe
workqueue even with ACPI devices or NOCODEC mode.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210409220121.1542362-2-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-12 17:05:50 +01:00
Peter Ujfalusi
4d1284cd79
ASoC: SOF: Simplify sof_probe_complete handling for acpi/pci/of
Set the sof_data->sof_probe_complete callback unconditionally of
CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE.

The sof_probe_complete will be called when the sof_probe_continue()
function is successfully executed, called either directly from
snd_sof_device_probe() or from the scheduled work.

Since all error cases within the call chain of snd_sof_device_probe() have
error prints, there is no need to print again in the acpi/pci/of level.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210409220959.1543456-3-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-12 17:05:01 +01:00
Peter Ujfalusi
3bcae98e10
ASoC: SOF: core: Add missing error prints to device probe operation
Two error cases in snd_sof_device_probe() and sof_probe_continue() are
missing error prints.
If either of them happens it is not possible to identify the reason for the
failure.

Add dev_err() prints for the cases to aim debugging.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210409220959.1543456-2-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-12 17:05:00 +01:00
Vijendar Mukunda
26e33ed9f1
ASoC: amd: Add support for ALC1015P codec in acp3x machine driver
Add ALC1015p codec support for acp3x machine driver.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/1617886984-9500-1-git-send-email-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-09 20:03:10 +01:00
Ye Bin
33e12dea13
ASoC: wcd9335: 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: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408062644.802988-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-09 13:39:55 +01:00
Ye Bin
81df40a080
ASoC: codecs: lpass-tx-macro: 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: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408062657.803668-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-09 13:39:54 +01:00
Ye Bin
4150cc7306
ASoC: amd: renoir: acp3x-pdm-dma: 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: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408062658.803724-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-09 13:39:53 +01:00
Ye Bin
a893a666b5
ASoC: codecs: lpass-wsa-macro: 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: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408062642.802846-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-09 13:39:52 +01:00
Jack Yu
4f3b0f8e36
ASoC: rt1019: remove registers to sync with rt1019 datasheet
Remove some registers to synchronize with the latest rt1019 datasheet.

Signed-off-by: Jack Yu <jack.yu@realtek.com>
Link: https://lore.kernel.org/r/01e6409f0db0451aa1e45ca7d82cca9c@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-09 13:39:51 +01:00
Ye Bin
3cab801e8b
ASoC: rt711-sdca: 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: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408062647.803141-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-09 13:39:50 +01:00
Ye Bin
e994cf8268
ASoC: wcd934x: 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: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408062648.803227-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-09 13:39:49 +01:00
Ye Bin
1f34084cc8
ASoC: rt715-sdca: 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: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408062654.803538-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-09 13:39:48 +01:00
Ye Bin
a457dd92d1
ASoC: Intel: KMB: 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: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408062653.803478-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-09 13:39:47 +01:00
Ye Bin
857b602a34
ASoC: codecs: lpass-rx-macro: 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: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408062650.803309-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-09 13:39:45 +01:00
Gyeongtaek Lee
45475bf60c
ASoC: soc-compress: lock pcm_mutex to resolve lockdep error
If panic_on_warn=1 is added in bootargs and compress offload playback with
DPCM is started, kernel panic would be occurred because rtd->card->pcm_mutex
isn't held in soc_compr_open_fe() and soc_compr_free_fe() and it generates
lockdep warning in the following code.

void snd_soc_runtime_action(struct snd_soc_pcm_runtime *rtd,
			    int stream, int action)
{
	struct snd_soc_dai *dai;
	int i;

	lockdep_assert_held(&rtd->card->pcm_mutex);

To prevent lockdep warning but minimize side effect by adding mutex,
pcm_mutex is held just before snd_soc_runtime_activate() and
snd_soc_runtime_deactivate() and is released right after them.

Signed-off-by: Gyeongtaek Lee <gt82.lee@samsung.com>
Link: https://lore.kernel.org/r/1891546521.01617772502282.JavaMail.epsvc@epcpadp3
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-09 13:39:44 +01:00
Ye Bin
3e075e8428
ASoC: amd: raven: acp3x-i2s: 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: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408062651.803413-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-09 13:39:43 +01:00
Mark Brown
703fe25d11
Merge series "ASoC: simple-card-utils: prepare for multi support" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Hi Mark

I want to add new audio-graph-card2 driver which can support
not only DPCM, but also Multi-CPU/Codec, and Codec2Codec.
And it is also supporting audio-graph-card2 base custom driver.

But before supporting such driver, we need to cleanup existing
simple-card / audio-graph, because these and new driver are
sharing code.

This patch-set are for Multi-CPU/Codec support,
and some cleanups.

Kuninori Morimoto (14):
  ASoC: simple-card-utils: enable flexible CPU/Codec/Platform
  ASoC: simple-card-utils: share dummy DAI and reduce memory
  ASoC: simple-card-utils: setup dai_props cpu_dai/codec_dai at initial timing
  ASoC: simple-card-utils: remove li->dais/li->conf
  ASoC: simple-card-utils: use for_each_prop_xxx()
  ASoC: simple-card-utils: remove asoc_simple_parse_xxx()
  ASoC: simple-card-utils: care multi DAI at asoc_simple_clean_reference()
  ASoC: simple-card-utils: indicate dai_fmt if exist
  ASoC: simple-card-utils: indicate missing CPU/Codec numbers for debug
  ASoC: simple-card-utils: add simple_props_to_xxx() macro
  ASoC: simple-card-utils: multi support at asoc_simple_canonicalize_cpu/platform()
  ASoC: simple-card-utils: tidyup debug info for clock
  ASoC: simple-card-utils: tidyup dev_dbg() to use 1 line
  ASoC: simple-card-utils: tidyup asoc_simple_parse_convert()

 include/sound/simple_card_utils.h     | 116 +++++++----
 sound/soc/generic/audio-graph-card.c  |  90 ++++-----
 sound/soc/generic/simple-card-utils.c | 272 +++++++++++++++++---------
 sound/soc/generic/simple-card.c       | 104 +++++-----
 4 files changed, 352 insertions(+), 230 deletions(-)

--
2.25.1
2021-04-08 17:39:58 +01:00
Ye Bin
f2ec1ebb25
ASoC: tas2770: 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: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408062646.803053-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-08 15:21:55 +01:00
Ye Bin
e9a216d8f1
ASoC: cx2072x: 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: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408062656.803606-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-08 15:21:54 +01:00
Ye Bin
5e71e9c14d
ASoC: rt1019: 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: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408062701.803865-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-08 15:21:53 +01:00
Muhammad Usama Anjum
a93799d55f
ASoC: fsl: sunxi: remove redundant dev_err call
devm_ioremap_resource() prints error message in itself. Remove the
dev_err call to avoid redundant error message.

Signed-off-by: Muhammad Usama Anjum <musamaanjum@gmail.com>
Link: https://lore.kernel.org/r/20210407095634.GA1379642@LEGION
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-08 15:21:52 +01:00
Ye Bin
b186e7c17d
ASoC: tas2764: 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: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408062643.802908-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-08 15:21:50 +01:00
Jiri Prchal
a0bc855ffd
ASoC: codecs: tlv320aic3x: add AIC3106
In DT binding is mentioned that this driver is compatible with 3106.
So added compatibility string and model number.

Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
Link: https://lore.kernel.org/r/20210408135908.125667-1-jiri.prchal@aksignal.cz
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-08 15:21:49 +01:00
Ye Bin
f985838003
ASoC: codecs: wsa881x: 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: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408062700.803792-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-08 15:21:49 +01:00
Kuninori Morimoto
205eb17edd
ASoC: simple-card-utils: share dummy DAI and reduce memory
Current simple-card / audio-graph creates 1xCPU + 1xCodec + 1xPlatform
for all dai_link, but some of them is not needed.
For example Platform is not needed for DPCM BE case.
Moreover, we can share snd-soc-dummy DAI for CPU-dummy / dummy-Codec
in DPCM.

This patch adds dummy DAI and share it when DPCM case,
I beliave it can contribute to reduce memory.

By this patch, CPU-dummy / dummy-CPU are set at asoc_simple_init_priv(),
thus, its settings are no longer needed at DPCM detecting timing
on simple-card / audio-graph.
Moreover, we can remove triky Platform settings code for DPCM BE,
because un-needed Platform is not created.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87tuoqod22.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-08 15:18:03 +01:00
Kuninori Morimoto
f2138aed23
ASoC: simple-card-utils: enable flexible CPU/Codec/Platform
Current simple-card / audio-graph are assuming fixed
single-CPU/Codec/Platform.
This patch prepares multi-CPU/Codec/Platform support.

Note is that it is not yet full-multi-support.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87v996od2c.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-08 15:18:02 +01:00
Dinghao Liu
7b3f5b207d
ASoC: codecs: Fix runtime PM imbalance in tas2552_probe
There is a rumtime PM imbalance between the error handling path
after devm_snd_soc_register_component() and all other error
handling paths. Add a PM runtime increment to balance refcount.

Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Link: https://lore.kernel.org/r/20210408064036.6691-1-dinghao.liu@zju.edu.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-08 15:08:50 +01:00
Jack Yu
44de8d80db
ASoC: rt1011: remove pack_id check in rt1011
For latest design, different package could use the same setting,
therefore the check of pack_id will no longer be used.

Signed-off-by: Jack Yu <jack.yu@realtek.com>
Link: https://lore.kernel.org/r/4cbe1cd3b8664140889132464c7dee7b@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-08 15:08:49 +01:00
Mark Brown
8361c6da77
Merge series "Adds SPI support" from Jiri Prchal <jiri.prchal@aksignal.cz>:
Moved I2C stuff to separated file, shered thingk to header file.
Added SPI in separeted file.

Jiri Prchal (4):
  ASoC: codecs: tlv320aic3x: move model definitions
  ASoC: codecs: tlv320aic3x: rename probe function
  ASoC: codecs: tlv320aic3x: move I2C to separated file
  ASoC: codecs: tlv320aic3x: add SPI support

 sound/soc/codecs/Kconfig           |  16 ++++-
 sound/soc/codecs/Makefile          |   4 ++
 sound/soc/codecs/tlv320aic3x-i2c.c |  70 +++++++++++++++++++
 sound/soc/codecs/tlv320aic3x-spi.c |  76 ++++++++++++++++++++
 sound/soc/codecs/tlv320aic3x.c     | 108 ++++++++---------------------
 sound/soc/codecs/tlv320aic3x.h     |  12 ++++
 6 files changed, 204 insertions(+), 82 deletions(-)
 create mode 100644 sound/soc/codecs/tlv320aic3x-i2c.c
 create mode 100644 sound/soc/codecs/tlv320aic3x-spi.c

--
2.25.1
2021-04-07 21:07:29 +01:00
Jerome Brunet
9be701ec34
ASoC: meson: axg-fifo: add NO_PERIOD_WAKEUP support
On the AXG family, the fifo irq is not necessary for the HW to operate.
It is just used to notify that a period has elapsed. If userpace does not
care for these wakeups (such as pipewire), we are just wasting CPU cycles.

Add support for NO_PERIOD_WAKEUP and disable irq when they are no needed.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20210407145914.311479-1-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-07 16:58:31 +01:00
Krzysztof Kozlowski
fa74c223b6
ASoC: simple-card: fix possible uninitialized single_cpu local variable
The 'single_cpu' local variable is assigned by asoc_simple_parse_dai()
and later used in a asoc_simple_canonicalize_cpu() call, assuming the
entire function did not exit on errors.

However the first function returns 0 if passed device_node is NULL,
thus leaving the variable uninitialized and reporting success.

Addresses-Coverity: Uninitialized scalar variable
Fixes: 8f7f298a33 ("ASoC: simple-card-utils: separate asoc_simple_card_parse_dai()")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Acked-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/20210407092027.60769-1-krzysztof.kozlowski@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-07 16:58:30 +01:00
Ye Bin
af4b54127b
ASoC: codecs: lpass-va-macro: 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: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210407074218.3051979-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-07 16:58:29 +01:00
Jiri Prchal
fd4daab3b1
ASoC: codecs: tlv320aic3x: add SPI support
Added SPI support.

Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
Link: https://lore.kernel.org/r/20210406142439.102396-5-jiri.prchal@aksignal.cz
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-07 16:58:27 +01:00
Jiri Prchal
a96d2ba2d8
ASoC: codecs: tlv320aic3x: move I2C to separated file
Moved I2C related staff to separated source file.

Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
Link: https://lore.kernel.org/r/20210406142439.102396-4-jiri.prchal@aksignal.cz
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-07 16:58:26 +01:00
Jiri Prchal
b015df6ac0
ASoC: codecs: tlv320aic3x: rename probe function
Renamed function to have it free for generic probe.

Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
Link: https://lore.kernel.org/r/20210406142439.102396-3-jiri.prchal@aksignal.cz
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-07 16:58:25 +01:00
Jiri Prchal
73a4808892
ASoC: codecs: tlv320aic3x: move model definitions
Model definitions moved to header file.
Preparation for SPI and I2C separated files.

Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
Link: https://lore.kernel.org/r/20210406142439.102396-2-jiri.prchal@aksignal.cz
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-07 16:58:24 +01:00
Jerome Brunet
6f68accaa8
ASoC: meson: axg-frddr: set fifo depth according to the period
When the period is small, using all the FRDDR fifo depth increases the
latency of the playback because the following device won't start pulling
data until the fifo reaches the depth set. We can adjust this depth so trim
it down for small periods.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20210407145714.311138-1-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-07 16:57:31 +01:00
Mark Brown
34c79fe9e2
Merge series "kbl_da7219_max9357a machine changes for wov and MST" from vamshi.krishna.gopal@intel.com
Vamshi Krishna Gopal <vamshi.krishna.gopal@intel.corp-partner.google.com>:

From: Vamshi Krishna Gopal <vamshi.krishna.gopal@intel.corp-partner.google.com>

Hi all,

This patch series about creating dailink for Wake on voice functionality
and also adding MST route changes.

changes in v3:

-Remove DP from widgets
-Add MST support in other routing table for kbl_rt5663_max98927.c

v2 is here:

https://patchwork.kernel.org/project/alsa-devel/cover/20210325174325.31802-1-vamshi.krishna.gopal@intel.com/

v1 is here:

https://patchwork.kernel.org/project/alsa-devel/cover/20210324175200.44922-1-vamshi.krishna.gopal@intel.com/

Mac Chiang (1):
  ASoc: Intel: board: add BE DAI link for WoV

Vamshi Krishna Gopal (1):
  ASoC: Intel: kbl: Add MST route change to kbl machine drivers

 sound/soc/intel/boards/kbl_da7219_max98357a.c | 58 +++++++++++++++++--
 sound/soc/intel/boards/kbl_da7219_max98927.c  | 10 ++--
 sound/soc/intel/boards/kbl_rt5663_max98927.c  | 14 +++--
 3 files changed, 70 insertions(+), 12 deletions(-)

--
2.17.1
2021-04-06 18:33:13 +01:00
Steve Lee
e5870bd0e4
ASoC: max98390: Add support for tx slot configuration.
Update voltage/current tx slot configuration support.

Signed-off-by: Steve Lee <steves.lee@maximintegrated.com>
Link: https://lore.kernel.org/r/20210405143801.29770-1-steves.lee@maximintegrated.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-06 17:13:28 +01:00
Shengjiu Wang
a43508995a
ASoC: ak5558: Fix s/show/slow/ typo
s/show/slow/

Fixes: 9208847774 ("ASoC: ak5558: Add support for AK5558 ADC driver")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1617458365-23393-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-06 17:13:27 +01:00
Mac Chiang
74ed9e9bfb
ASoc: Intel: board: add BE DAI link for WoV
create dai link in kbl_da7219_max98357a driver for wake on voice
functionality.

changes picked from broonie's tree
commit 0c7941a63a
("ASoC: Intel: Skylake: Use refcap device for mono recording")
commit 2154be362c
("ASoc: Intel: boards: Add WOV as sink for nau88l25_ssm4567 machine")

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
Signed-off-by: Vamshi Krishna Gopal <vamshi.krishna.gopal@intel.com>
Tested-by: Kaiyen Chang <kaiyen.chang@intel.corp-partner.google.com>
Tested-by: luke yang <luke_yang@compal.corp-partner.google.com>
Tested-by: Grace Kao <grace.kao@intel.com>
Tested-by: Kaiyen Chang <kaiyen.chang@intel.com>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210405124835.71247-3-vamshi.krishna.gopal@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-06 17:13:26 +01:00
Vamshi Krishna Gopal
c7c19ec098
ASoC: Intel: kbl: Add MST route change to kbl machine drivers
To support MST hdmi audio, modify the current routes to be
based on port in kbl_da7219_max98357a, kbl_da7219_max98927 &
kbl_rt5663_max98927.

Signed-off-by: Vamshi Krishna Gopal <vamshi.krishna.gopal@intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210405124835.71247-2-vamshi.krishna.gopal@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-06 17:13:25 +01:00
Annaliese McDermond
1ca1156cfd
ASoC: tlv320aic32x4: Register clocks before registering component
Clock registration must be performed before the component is
registered.  aic32x4_component_probe attempts to get all the
clocks right off the bat.  If the component is registered before
the clocks there is a race condition where the clocks may not
be registered by the time aic32x4_componet_probe actually runs.

Fixes: d1c859d314 ("ASoC: codec: tlv3204: Increased maximum supported channels")
Cc: stable@vger.kernel.org
Signed-off-by: Annaliese McDermond <nh6z@nh6z.net>
Link: https://lore.kernel.org/r/0101017889850206-dcac4cce-8cc8-4a21-80e9-4e4bef44b981-000000@us-west-2.amazonses.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-06 17:12:34 +01:00
Annaliese McDermond
29654ed838
ASoC: tlv320aic32x4: Increase maximum register in regmap
AIC32X4_REFPOWERUP was added as a register, but the maximum register value
in the regmap and regmap range was not correspondingly increased.  This
caused an error when this register was attempted to be written.

Fixes: ec96690de8 ("ASoC: tlv320aic32x4: Enable fast charge")
Cc: stable@vger.kernel.org
Signed-off-by: Annaliese McDermond <nh6z@nh6z.net>
Link: https://lore.kernel.org/r/0101017889851cab-ce60cfdb-d88c-43d8-bbd2-7fbf34a0c912-000000@us-west-2.amazonses.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-06 17:12:33 +01:00
Greg Kroah-Hartman
9594408763 Merge 5.12-rc6 into tty-next
We need the serial/tty fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-05 08:59:21 +02:00