Commit graph

29857 commits

Author SHA1 Message Date
Takashi Iwai
3e3ab468eb ASoC: One more fix for the merge window
One additional driver fix that came in during the merge window.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmVMwUQACgkQJNaLcl1U
 h9Aizgf/bz/+UOKjILeQ4MJz+gLEgEza5SfzyMw+zVgDjSD7a+LhwI26869s74E8
 F1a0zwdnlfHt2T4Y/ouJBJ/kDPCIj6kgYdYjMTTBzu5ui/Pp7QHbDzUu+zGMo4SH
 c5N8NThgh9lGLf+AFIEh7whXSO1LzNVgZDaK2X1zxHNF5MHkAi/pOFP2wL+zohuW
 eGJ9EylRFzcHAjcOCJbCoJWn+KKJDIiPUN1wNRC166Ps1LPwwy7KT/AyTo2PwyPe
 79apcQro1C8BoovOZyxbLahX+RdF31tcsn9jQL6gYsQx0LqoVl0rY8cZtZtn1auv
 PWF517IyAlEfYUF8dD2Ht6kCZpFxZw==
 =WDw2
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v6.7-merge-window-2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: One more fix for the merge window

One additional driver fix that came in during the merge window.
2023-11-09 12:37:03 +01:00
Takashi Iwai
53b5fdb617 ASoC: Fixes for v6.7
A collection of fixes that have come in during the merge window, the
 majority of this is driver specific with one core fix for handling of
 DAPM clock widgets when a name prefix is specified for the card - the
 name should not be applied to the clock name we request from the clock
 API.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmVLuWYACgkQJNaLcl1U
 h9D0OQf/dauiR5PdVTxXdxxNB3qygA8MVOIqyVv0D0FzjjffuVvVhr1c0gkiIa+R
 isO8esWr7iM+aM0/Z5XleAFckTWLSi9gPQ+NvRQKGCLUh/MRBVIFkJnBvLx6frRE
 h6Ax9duai1RZfs+uqOMfUlQFN13y2ew4dn64vHZNu4f/Lqaskh4hrB4bn9jQhM9I
 bnmaCo9DvecS1TlJrewF1Ie2cvfR1DM87IvvkfaRtP2hW7oerURYm7myWitu/fr+
 Hlpj9BxTLhbJlFR13kGtm+HNXsWyLjO4NdAVUxC6aMHCQ4vfTy61ojfq4CZKYN0J
 ZpRoeG+4mP/WjqqaaN7hJq/USw4BxQ==
 =iZZQ
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v6.7-merge-window' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v6.7

A collection of fixes that have come in during the merge window, the
majority of this is driver specific with one core fix for handling of
DAPM clock widgets when a name prefix is specified for the card - the
name should not be applied to the clock name we request from the clock
API.
2023-11-08 17:44:06 +01:00
David Lin
a60a609b7f
ASoC: nau8540: Add self recovery to improve capture quility
Reading the peak data to detect abnormal data in the ADC channel.
If abnormal data occurs, the driver takes recovery actions to
refresh the ADC channel.

Signed-off-by: David Lin <CTLIN0@nuvoton.com>
Link: https://lore.kernel.org/r/20231108061658.1265065-1-CTLIN0@nuvoton.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-11-08 13:21:05 +00:00
Eugen Hristev
45f2f28bd4
ASoC: SOF: sof-client: trivial: fix comment typo
Fix typo s/depndent/dependent

Fixes: 6e9548cdb3 ("ASoC: SOF: Convert the generic IPC flood test into SOF client")
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20231031112218.79136-1-eugen.hristev@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-11-07 11:10:19 +00:00
Jerome Brunet
4bdcbc31ad
ASoC: dapm: fix clock get name
The name currently used to get the clock includes the dapm prefix.
It should use the name as provided to the widget, without the prefix.

Fixes: 3caac75968 ("ASoC: soc-dapm.c: fixup snd_soc_dapm_new_control_unlocked() error handling")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20231106103712.703962-1-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-11-06 10:57:03 +00:00
Jerome Brunet
15be353d55
ASoC: hdmi-codec: register hpd callback on component probe
The HDMI hotplug callback to the hdmi-codec is currently registered when
jack is set.

The hotplug not only serves to report the ASoC jack state but also to get
the ELD. It should be registered when the component probes instead, so it
does not depend on the card driver registering a jack for the HDMI to
properly report the ELD.

Fixes: 25ce4f2b35 ("ASoC: hdmi-codec: Get ELD in before reporting plugged event")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20231106104013.704356-1-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-11-06 10:57:03 +00:00
Eugen Hristev
004fc58ede
ASoC: mediatek: mt8186_mt6366_rt1019_rt5682s: trivial: fix error messages
Property 'playback-codecs' is referenced as 'speaker-codec' in the error
message, and this can lead to confusion.
Correct the error message such that the correct property name is
referenced.

Fixes: 0da16e370d ("ASoC: mediatek: mt8186: add machine driver with mt6366, rt1019 and rt5682s")
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20231031103139.77395-1-eugen.hristev@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-11-03 12:52:28 +00:00
Mark Brown
5c81f752c9
ASoC: codecs: Modify some error codes
Merge series from wangweidong.a@awinic.com:

The maximum value that calib can set should be
consistent with the maximum value of re.

An error code should be return when the re is greater
than the maximum value or less than the minimum value

The value of vsense_select should be either 32
or 0 in both cases, so modify the
AW88399_DEV_VDSEL_VSENSE macro to 32.
2023-11-01 17:02:32 +00:00
David Rau
ab5201e20c
ASoC: da7219: Improve system suspend and resume handling
When DA7219 is suspended, prevent the AAD IRQ handler is unexpectedly
executed and cause the I2C driver "Transfer while suspended" failure.

Signed-off-by: David Rau <David.Rau.opensource@dm.renesas.com>
Link: https://lore.kernel.org/r/20231101022507.6226-1-David.Rau.opensource@dm.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-11-01 13:19:46 +00:00
Weidong Wang
b729598c17
ASoC: codecs: Modify macro value error
The value of vsense_select should be either 32
or 0 in both cases, so modify the
AW88399_DEV_VDSEL_VSENSE macro to 32.

Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
Link: https://lore.kernel.org/r/20231101090211.177125-4-wangweidong.a@awinic.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-11-01 13:19:43 +00:00
Weidong Wang
baf46c3c76
ASoC: codecs: Modify the wrong judgment of re value
An error code should be return when the re is greater
than the maximum value or less than the minimum value

Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
Link: https://lore.kernel.org/r/20231101090211.177125-3-wangweidong.a@awinic.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-11-01 13:19:42 +00:00
Weidong Wang
c9e920ffa7
ASoC: codecs: Modify the maximum value of calib
The maximum value that calib can set should be
consistent with the maximum value of re.

Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
Link: https://lore.kernel.org/r/20231101090211.177125-2-wangweidong.a@awinic.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-11-01 13:19:41 +00:00
Syed Saba Kareem
ed2232d491
ASoC: amd: acp: fix for i2s mode register field update
I2S mode register field will be set to 1 when tdm mode is enabled.
Update the I2S mode field based on tdm_mode flag check.

This will fix below smatch checker warning.

sound/soc/amd/acp/acp-i2s.c:59 acp_set_i2s_clk()
	warn: odd binop '0x0 & 0x2'

Fixes: 40f74d5f09 ("ASoC: amd: acp: refactor acp i2s clock
	generation code")

Reported-By: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20231031135949.1064581-3-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-31 14:26:11 +00:00
Takashi Iwai
2dc15ff73b ASoC: Updates for v6.7
More updates for v6,7 following the early merge request:
 
   - Fixes for handling of component name prefixing when name prefixes
     are used by the machine driver.
   - Fixes for noise when stopping some Sounwire CODECs.
   - Support for AMD ACP 6.3 and 7.0, Awinc AW88399, more Intel
     platforms and more Qualcomm SC7180 platforms.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmU/rAQACgkQJNaLcl1U
 h9AXVwf/SwWrxTus3+O2hS5rwusjqQBn1t2mzlnxsYNVCYGBcjOpMGL4HrJzn++e
 DJXoMyWis5FNKFWyPtKMGE1kZYdUUE/g7LpZOBew4P47nBv6SQWRvUxPfoq8mdOg
 Xb4+kjBzTq1dhwZnZPvNdsknvM7cLfx/lyo2vUJR4peDL0rzgnx72fhRZAjzh2OH
 CSz69aTjpliqikp+V7JVFYf2yma2LjTOCL2saiIF/PcxsqUUa73XTggg610EPY+R
 pOFb2MBRDbZuJrETbaiytLwtcPuvrpiHRHhxuClsjHGVTDbGfE7GzePS+yUu66y9
 LO8oAl7kJebw+WWffIOoL2IjXcG9tA==
 =nn11
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v6.7-2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Updates for v6.7

More updates for v6,7 following the early merge request:

  - Fixes for handling of component name prefixing when name prefixes
    are used by the machine driver.
  - Fixes for noise when stopping some Sounwire CODECs.
  - Support for AMD ACP 6.3 and 7.0, Awinc AW88399, more Intel
    platforms and more Qualcomm SC7180 platforms.
2023-10-31 09:01:25 +01:00
Nathan Chancellor
cba4590036
ASoC: codecs: aw88399: Fix -Wuninitialized in aw_dev_set_vcalb()
Clang warns (or errors with CONFIG_WERROR=y):

  sound/soc/codecs/aw88399.c:441:18: error: variable 'vsense_select' is uninitialized when used here [-Werror,-Wuninitialized]
    441 |         vsense_select = vsense_select & (~AW88399_VDSEL_MASK);
        |                         ^~~~~~~~~~~~~
  sound/soc/codecs/aw88399.c:431:28: note: initialize the variable 'vsense_select' to silence this warning
    431 |         unsigned int vsense_select, vsense_value;
        |                                   ^
        |                                    = 0
  1 error generated.

This clearly should have been using the value received from
regmap_read(). Use the correct variable to resolve the warning.

Closes: https://github.com/ClangBuiltLinux/linux/issues/1952
Fixes: 8ade6cc7e2 ("ASoC: codecs: Add aw88399 amplifier driver")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Weidong Wang <wangweidong.a@awinic.com>
Link: https://lore.kernel.org/r/20231027-asoc-aw88399-fix-wuninitialized-v1-1-b1044493e4cd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-30 17:39:12 +00:00
Shuming Fan
1a3b7eab85
ASoC: rt712-sdca: fix speaker route missing issue
Sometimes the codec probe would be called earlier than the hardware initialization.
Therefore, the speaker route should be added before the the first_hw_init check.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Fixes: f3da2ed110 ("ASoC: rt1712-sdca: enable pm_runtime in probe,  keep status as 'suspended'")?
Link: https://lore.kernel.org/r/20231030103644.1787948-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-30 15:42:35 +00:00
Rob Herring
04f8c76de9
ASoC: rockchip: Fix unused rockchip_i2s_tdm_match warning for !CONFIG_OF
Commit 9958d85968 ("ASoC: Use device_get_match_data()") dropped the
unconditional use of rockchip_i2s_tdm_match resulting in this warning:

sound/soc/rockchip/rockchip_i2s_tdm.c:1315:34: warning: 'rockchip_i2s_tdm_match' defined but not used [-Wunused-const-variable=]

The fix is to drop of_match_ptr() which is not necessary because DT is
always used for this driver.

Fixes: 9958d85968 ("ASoC: Use device_get_match_data()")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202310121802.CDAGVdF2-lkp@intel.com/
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20231030142337.814907-2-robh@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-30 15:42:34 +00:00
Tony Lindgren
fbb74e5637
ASoC: ti: omap-mcbsp: Fix runtime PM underflow warnings
We need to check for an active device as otherwise we get warnings
for some mcbsp instances for "Runtime PM usage count underflow!".

Reported-by: Andreas Kemnade <andreas@kemnade.info>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20231030052340.13415-1-tony@atomide.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-30 13:30:20 +00:00
Mark Brown
bdb7e19220
ASoC: Merge up workaround for CODECs that play noise on stopped stream
This was sent too late to actually make it for v6.6 but was sent against
v6.6 so merge it up here.
2023-10-27 22:33:15 +01:00
Mark Brown
0262a8a079
ASoC: Intel: avs: Add support for rt5514 codec
Merge series from Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>:

There are machines which use codec rt5514 as DMIC, add support for them.
2023-10-27 21:07:18 +01:00
Srinivas Kandagatla
805ce81826
ASoC: codecs: wsa883x: make use of new mute_unmute_on_trigger flag
In the current setup the PA is left unmuted even when the
Soundwire ports are not started streaming. This can lead to click
and pop sounds during start.
There is a same issue in the reverse order where in the PA is
left unmute even after the data stream is stopped, the time
between data stream stopping and port closing is long enough
to accumulate DC on the line resulting in Click/Pop noise
during end of stream.

making use of new mute_unmute_on_trigger flag is helping a
lot with this Click/Pop issues reported on this Codec

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20231027105747.32450-3-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-27 17:44:08 +01:00
Srinivas Kandagatla
f0220575e6
ASoC: soc-dai: add flag to mute and unmute stream during trigger
In some setups like Speaker amps which are very sensitive, ex: keeping them
unmute without actual data stream for very short duration results in a
static charge and results in pop and clicks. To minimize this, provide a way
to mute and unmute such codecs during trigger callbacks.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20231027105747.32450-2-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-27 17:44:04 +01:00
Kuninori Morimoto
bd0f7498bc
ASoC: ams-delta.c: use component after check
static void cx81801_close()
	{
		...
(A)		struct snd_soc_dapm_context *dapm = &component->card->dapm;
		...
(B)		if (!component)
			return;
	}

(A) uses component before NULL check (B). This patch moves it after (B).

Fixes: d0fdfe3408 ("ASoC: cx20442: replace codec to component")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/3e608474-e99a-4866-ae98-3054a4221f09@moroto.mountain
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87ttqdq623.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-27 17:37:34 +01:00
Arnd Bergmann
a65cdffbef
ASoC: amd: acp: select SND_SOC_AMD_ACP_LEGACY_COMMON for ACP63
Without this dependency, acp63 fails to link:

x86_64-linux-ld: sound/soc/amd/acp/acp63.o: in function `acp63_audio_remove':
acp63.c:(.text+0x22): undefined reference to `acp_disable_interrupts'
x86_64-linux-ld: sound/soc/amd/acp/acp63.o: in function `acp63_i2s_master_clock_generate.isra.0':
acp63.c:(.text+0x6f): undefined reference to `smn_read'
x86_64-linux-ld: acp63.c:(.text+0x81): undefined reference to `smn_write'
x86_64-linux-ld: acp63.c:(.text+0x8e): undefined reference to `smn_read'
x86_64-linux-ld: sound/soc/amd/acp/acp63.o: in function `acp63_pcm_resume':
acp63.c:(.text+0x230): undefined reference to `restore_acp_i2s_params'
x86_64-linux-ld: acp63.c:(.text+0x23d): undefined reference to `restore_acp_pdm_params'
x86_64-linux-ld: sound/soc/amd/acp/acp63.o: in function `acp63_audio_probe':
acp63.c:(.text+0x474): undefined reference to `acp_enable_interrupts'

Fixes: d4c2d5391d ("ASoC: amd: acp: add Kconfig options for acp6.3 based platform driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20231027152403.386257-3-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-27 17:37:33 +01:00
Arnd Bergmann
cf046ecbcd
ASoC: codecs: aw88399: fix typo in Kconfig select
The aw88395_lib module is shared by all the aw883* drivers that
need to select the corresponding Kconfig symbol. The newly added
aw88399 incorrectly selects SND_SOC_AW88399_LIB instead, which
is not defined anywhere in the kernel, causing a link failure when
the actual one is missing:

arm-linux-gnueabi-ld: sound/soc/codecs/aw88399.o: in function `aw88399_codec_probe':
aw88399.c:(.text+0xbc6): undefined reference to `aw88395_dev_load_acf_check'
arm-linux-gnueabi-ld: aw88399.c:(.text+0xbea): undefined reference to `aw88395_dev_cfg_load'

Fixes: 8ade6cc7e2 ("ASoC: codecs: Add aw88399 amplifier driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20231027152403.386257-2-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-27 17:37:32 +01:00
Arnd Bergmann
0b38362018
ASoC: amd: acp: add ACPI dependency
A newly added function requires CONFIG_ACPI to avoid a build error:

sound/soc/amd/acp/acp-legacy-common.c: In function 'check_acp_pdm':
sound/soc/amd/acp/acp-legacy-common.c:401:19: error: implicit declaration of function 'acpi_find_child_device'; did you mean 'acpi_match_device'? [-Werror=implicit-function-declaration]
  401 |         pdm_dev = acpi_find_child_device(ACPI_COMPANION(&pci->dev), pdm_addr, 0);
      |                   ^~~~~~~~~~~~~~~~~~~~~~
      |                   acpi_match_device

The acp drivers really only work when ACPI is enabled already, so just
avoid the build failure with hard dependency in everything that
enables the acp-legacy-common portion.

Fixes: 3a94c8ad0a ("ASoC: amd: acp: add code for scanning acp pdm controller")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20231027152403.386257-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-27 17:37:32 +01:00
Amadeusz Sławiński
d933333694
ASoC: Intel: avs: Add rt5514 machine board
In order to support Eve chromebooks add rt5514 configuration to board
lookup table. rt5514 is used for capture in DMIC configuration on SSP 0
and TDM 1.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231027110537.2103712-3-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-27 17:37:30 +01:00
Amadeusz Sławiński
8b78fbf7bf
ASoC: Intel: avs: Add rt5514 machine board
To support AVS-rt5514 configuration add machine board connecting AVS
platform component driver with rt5514 codec one.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231027110537.2103712-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-27 17:37:29 +01:00
Mark Brown
60781d2d58
ASoC: Intel: bytcr_wm5102: add various quirks
Merge series from Hans de Goede <hdegoede@redhat.com>:

Hi Mark,

As requested here is a v2 of my series to add various quirks
to the bytcr_wm5102 Intel board driver to make it more flexible.

Changes in v2:
- Dropped 2 already merged patches
- Rebased on top of broonie/sound/for-6.7

Regards,

Hans

Hans de Goede (4):
  ASoC: Intel: bytcr_wm5102: Add BYT_WM5102_SSP2 quirk
  ASoC: Intel: bytcr_wm5102: Add BYT_WM5102_MCLK_19_2MHZ quirk
  ASoC: Intel: bytcr_wm5102: Add BYT_WM5102_OUT_MAP quirk
  ASoC: Intel: bytcr_wm5102: Add BYT_WM5102_IN_MAP quirk

 sound/soc/intel/boards/bytcr_wm5102.c | 229 +++++++++++++++++++++++---
 1 file changed, 202 insertions(+), 27 deletions(-)

--
2.41.0
2023-10-26 17:03:01 +01:00
Mark Brown
246f388ec1
sc7180: Add qdsp based soundcard
Merge series from Nikita Travkin <nikita@trvn.ru>:

Some devices, such as Acer Aspire 1, can't use lpass dirrectly, but
instead must use adsp core to play sound. Since otherwise the hardware
is, usually, very similar across the devices on the same platform, it
makes sense to reuse the same boardfile.

This series refactors the sc7180.c slightly and adds the functions to
control clocks via adsp instead of controlling the hardware directly.
2023-10-26 17:02:53 +01:00
Mark Brown
11817547b7
ASoC: fix widget name comparisons (consider DAI name
Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>:

Some codec drivers compare widget names with strcmp, ignoring
the component name prefix.  If prefix is used, the comparisons start failing.

Except Qualcomm lpass-rx-macro, none of the patches were tested
on hardware.
2023-10-26 17:02:46 +01:00
Mark Brown
926f192f00
ASoC: codecs: Add aw88399 amplifier driver
Merge series from wangweidong.a@awinic.com:

Add the awinic,aw88399 property to the awinic,aw88395.yaml file.

Add i2c and amplifier registration for
aw88399 and their associated operation functions.
2023-10-26 17:02:39 +01:00
Stefan Binding
76c121821a ASoC: cs35l41: Detect CSPL errors when sending CSPL commands
The existing code checks for the correct state transition after sending
a command. However, it is possible for the message box to return -1,
which indicates an error, if an error has occurred in the firmware.
We can detect if the error has occurred, and return a different error.
In addition, there is no recovering from a CSPL error, so the retry
mechanism is not needed in this case, and we can return immediately.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20231026150558.2105827-9-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26 17:55:29 +02:00
Stefan Binding
2ee06ff5d7 ALSA: hda: cs35l41: Force a software reset after hardware reset
To ensure the chip has correctly reset during probe and system suspend,
we need to force a software reset, in case of systems where the
hardware reset is not available.

The software reset register was labelled as volatile but not readable,
however, it is readable, (just returns 0x0). Adding it to readable
registers means it will be correctly treated as volatile, and thus
will not be cached.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231026150558.2105827-6-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26 17:55:20 +02:00
Cezary Rojewski
168d97844a
ASoC: Intel: Skylake: Fix mem leak when parsing UUIDs fails
Error path in snd_skl_parse_uuids() shall free last allocated module if
its instance_id allocation fails.

Fixes: f8e0665211 ("ASoC: Intel: Skylake: Fix uuid_module memory leak in failure case")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231026082558.1864910-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:25:44 +01:00
Krzysztof Kozlowski
f82eb06a40
ASoC: tegra: machine: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231023095428.166563-18-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:54 +01:00
Krzysztof Kozlowski
317dd0dbad
ASoC: samsung: speyside: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231023095428.166563-17-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:53 +01:00
Krzysztof Kozlowski
86cfaf99e4
ASoC: mediatek: mt8192: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20231023095428.166563-16-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:52 +01:00
Krzysztof Kozlowski
d1ecaabe9f
ASoC: mediatek: mt8188: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Trevor Wu <trevor.wu@mediatek.com>
Link: https://lore.kernel.org/r/20231023095428.166563-15-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:51 +01:00
Krzysztof Kozlowski
0fe153a99f
ASoC: mediatek: mt8186: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20231023095428.166563-14-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:50 +01:00
Krzysztof Kozlowski
e84c7f5db9
ASoC: mediatek: mt8183: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20231023095428.166563-13-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:49 +01:00
Krzysztof Kozlowski
343b62590d
ASoC: codecs: wm8995: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231023095428.166563-12-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:48 +01:00
Krzysztof Kozlowski
e13b63c475
ASoC: codecs: wm8994: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231023095428.166563-11-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:47 +01:00
Krzysztof Kozlowski
e54db8826f
ASoC: codecs: wm8962: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231023095428.166563-10-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:46 +01:00
Krzysztof Kozlowski
7df1e6a3c6
ASoC: codecs: wcd9335: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231023095428.166563-9-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:45 +01:00
Krzysztof Kozlowski
e2d38e1196
ASoC: codecs: rtq9128: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231023095428.166563-8-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:44 +01:00
Krzysztof Kozlowski
b2056ce3cf
ASoC: codecs: rt5682s: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231023095428.166563-7-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:43 +01:00
Krzysztof Kozlowski
a1fa72a780
ASoC: codecs: max9867: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20231023095428.166563-6-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:42 +01:00
Krzysztof Kozlowski
5efc1c903e
ASoC: codecs: lpass-rx-macro: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231023095428.166563-5-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:41 +01:00
Krzysztof Kozlowski
ecea1812b9
ASoC: codecs: adav80x: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20231023095428.166563-4-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:39 +01:00