linux-2.6-block.git
11 months agoASoC: Intel: sof_ssp_amp: use sof_hdmi_private to init HDMI
Brent Lu [Thu, 12 Oct 2023 19:08:21 +0000 (15:08 -0400)]
ASoC: Intel: sof_ssp_amp: use sof_hdmi_private to init HDMI

Use sof_hdmi_private structure instead of a link list of sof_hdmi_pcm
structure for HDMI dai link initialization since hdac-hdmi support is
removed.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231012190826.142619-19-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: sof_sdw: use sof_hdmi_private to init HDMI
Brent Lu [Thu, 12 Oct 2023 19:08:20 +0000 (15:08 -0400)]
ASoC: Intel: sof_sdw: use sof_hdmi_private to init HDMI

Use sof_hdmi_private structure instead of a link list of sof_hdmi_pcm
structure for HDMI dai link initialization since hdac-hdmi support is
removed.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231012190826.142619-18-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: sof_rt5682: use sof_hdmi_private to init HDMI
Brent Lu [Thu, 12 Oct 2023 19:08:19 +0000 (15:08 -0400)]
ASoC: Intel: sof_rt5682: use sof_hdmi_private to init HDMI

Use sof_hdmi_private structure instead of a link list of sof_hdmi_pcm
structure for HDMI dai link initialization since hdac-hdmi support is
removed.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231012190826.142619-17-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: sof_nau8825: use sof_hdmi_private to init HDMI
Brent Lu [Thu, 12 Oct 2023 19:08:18 +0000 (15:08 -0400)]
ASoC: Intel: sof_nau8825: use sof_hdmi_private to init HDMI

Use sof_hdmi_private structure instead of a link list of sof_hdmi_pcm
structure for HDMI dai link initialization since hdac-hdmi support is
removed.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231012190826.142619-16-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: sof_da7219: use sof_hdmi_private to init HDMI
Brent Lu [Thu, 12 Oct 2023 19:08:17 +0000 (15:08 -0400)]
ASoC: Intel: sof_da7219: use sof_hdmi_private to init HDMI

Use sof_hdmi_private structure instead of a link list of sof_hdmi_pcm
structure for HDMI dai link initialization since hdac-hdmi support is
removed.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231012190826.142619-15-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: sof_cs42l42: use sof_hdmi_private to init HDMI
Brent Lu [Thu, 12 Oct 2023 19:08:16 +0000 (15:08 -0400)]
ASoC: Intel: sof_cs42l42: use sof_hdmi_private to init HDMI

Use sof_hdmi_private structure instead of a link list of sof_hdmi_pcm
structure for HDMI dai link initialization since hdac-hdmi support is
removed.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231012190826.142619-14-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: sof_hdmi: add common header for HDMI
Brent Lu [Thu, 12 Oct 2023 19:08:15 +0000 (15:08 -0400)]
ASoC: Intel: sof_hdmi: add common header for HDMI

Add a common header for Intel HDMI dai link (idisp) initialization.
Declare the sof_hdmi_private structure in machine driver private data
and use it to initialize dai link.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231012190826.142619-13-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: sof_ssp_amp: remove hdac-hdmi support
Brent Lu [Thu, 12 Oct 2023 19:08:14 +0000 (15:08 -0400)]
ASoC: Intel: sof_ssp_amp: remove hdac-hdmi support

Remove hdac-hdmi support code since we are now using
snd-hda-codec-hdmi codec driver for hdmi.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231012190826.142619-12-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: sof_rt5682: remove hdac-hdmi support
Brent Lu [Thu, 12 Oct 2023 19:08:13 +0000 (15:08 -0400)]
ASoC: Intel: sof_rt5682: remove hdac-hdmi support

Remove hdac-hdmi support code since we are now using
snd-hda-codec-hdmi codec driver for hdmi.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231012190826.142619-11-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: sof_nau8825: remove hdac-hdmi support
Brent Lu [Thu, 12 Oct 2023 19:08:12 +0000 (15:08 -0400)]
ASoC: Intel: sof_nau8825: remove hdac-hdmi support

Remove hdac-hdmi support code since we are now using
snd-hda-codec-hdmi codec driver for hdmi.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231012190826.142619-10-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: sof_da7219: remove hdac-hdmi support
Brent Lu [Thu, 12 Oct 2023 19:08:11 +0000 (15:08 -0400)]
ASoC: Intel: sof_da7219: remove hdac-hdmi support

Remove hdac-hdmi support code since we are now using
snd-hda-codec-hdmi codec driver for hdmi.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231012190826.142619-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: sof_cs42l42: remove hdac-hdmi support
Brent Lu [Thu, 12 Oct 2023 19:08:10 +0000 (15:08 -0400)]
ASoC: Intel: sof_cs42l42: remove hdac-hdmi support

Remove hdac-hdmi support code since we are now using
snd-hda-codec-hdmi codec driver for hdmi.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231012190826.142619-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: sof_sdw_rt712_sdca: construct cards->components by name_prefix
Bard Liao [Thu, 12 Oct 2023 19:08:09 +0000 (15:08 -0400)]
ASoC: Intel: sof_sdw_rt712_sdca: construct cards->components by name_prefix

sof_sdw_rt712_sdca is used by rt712 and rt713. Using different
cards->components string allow UCM distinguish the two codecs.

Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231012190826.142619-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: MTL: Add entry for HDMI-In capture support to non-I2S codec boards.
Balamurugan C [Thu, 12 Oct 2023 19:08:08 +0000 (15:08 -0400)]
ASoC: Intel: MTL: Add entry for HDMI-In capture support to non-I2S codec boards.

Adding HDMI-In capture support for the MTL products which doesn't have
onboard I2S codec. But need to support HDMI-In capture via I2S and
audio playback through HDMI/DP monitor.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Balamurugan C <balamurugan.c@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231012190826.142619-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: sof_sdw_rt_sdca_jack_common: add rt713 support
Bard Liao [Thu, 12 Oct 2023 19:08:07 +0000 (15:08 -0400)]
ASoC: Intel: sof_sdw_rt_sdca_jack_common: add rt713 support

Adding rt713 support to sof_sdw_rt_sdca_jack_common.c.

Fixes: fbaaf80d8cf6 ("ASoC: Intel: sof_sdw: add rt713 support")
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231012190826.142619-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: soc-acpi-intel-mtl-match: add rt713 rt1316 config
Bard Liao [Thu, 12 Oct 2023 19:08:06 +0000 (15:08 -0400)]
ASoC: Intel: soc-acpi-intel-mtl-match: add rt713 rt1316 config

Adding rt713 jack + rt1316 amp + rt1713 dmic configuration support.

Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231012190826.142619-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: soc-acpi-intel-rpl-match: add rt711-l0-rt1316-l12 support
Bard Liao [Thu, 12 Oct 2023 19:08:05 +0000 (15:08 -0400)]
ASoC: Intel: soc-acpi-intel-rpl-match: add rt711-l0-rt1316-l12 support

Another configuration that doesn't support DMIC.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231012190826.142619-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: sof_sdw: update HP Omen match
Pierre-Louis Bossart [Thu, 12 Oct 2023 19:08:04 +0000 (15:08 -0400)]
ASoC: Intel: sof_sdw: update HP Omen match

New platforms have a slightly different DMI product name, remove
trailing characters/digits to handle all cases.

Closes: https://github.com/thesofproject/linux/issues/4611
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20231012190826.142619-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoHarden SSP boards and add TDM support
Mark Brown [Thu, 12 Oct 2023 16:51:49 +0000 (17:51 +0100)]
Harden SSP boards and add TDM support

Merge series from Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>:

In quite a few places in code there are checks for number of SSPs
present on system, to reduce maintenance burden introduce helper
functions allowing to get SSP and TDM from machine board configuration.

Current mechanism replaces "%d" present in some routes and widget names
with SSP number. However there are also configurations which make use of
of TDM number, in which case expected behavior would be to have string
in form of SSP:TDM - see implementation of avs_i2s_platform_register()
in sound/soc/intel/avs/pcm.c. Implement custom function, which parses
string and make use of it when parsing topology. While at it make sure
that we generate dynamic names only if there is no multiple SSPs or TDMs
defined.

Migrate all boards to handle TDM if requested.

11 months agoASoC: tegra: Fix -Wuninitialized in tegra210_amx_platform_probe()
Nathan Chancellor [Wed, 11 Oct 2023 20:21:51 +0000 (13:21 -0700)]
ASoC: tegra: Fix -Wuninitialized in tegra210_amx_platform_probe()

Clang warns (or errors with CONFIG_WERROR=y):

  sound/soc/tegra/tegra210_amx.c:553:10: error: variable 'soc_data' is uninitialized when used here [-Werror,-Wuninitialized]
    553 |                                             soc_data->regmap_conf);
        |                                             ^~~~~~~~

A refactoring removed the initialization of this variable but its use
was not updated. Use the soc_data value in the amx variable to resolve
the warning and remove the soc_data variable, as it is now entirely
unused.

Closes: https://github.com/ClangBuiltLinux/linux/issues/1943
Fixes: 9958d85968ed ("ASoC: Use device_get_match_data()")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20231011-asoc-tegra-fix-uninit-soc_data-v1-1-0ef0ab44cf48@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: avs: ssm4567: Validate machine board configuration
Amadeusz Sławiński [Thu, 12 Oct 2023 08:35:14 +0000 (10:35 +0200)]
ASoC: Intel: avs: ssm4567: Validate machine board configuration

Allow for board to be used with TDMs.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231012083514.492626-17-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: avs: rt5663: Validate machine board configuration
Amadeusz Sławiński [Thu, 12 Oct 2023 08:35:13 +0000 (10:35 +0200)]
ASoC: Intel: avs: rt5663: Validate machine board configuration

Allow for board to be used with TDMs.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231012083514.492626-16-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: avs: rt286: Validate machine board configuration
Amadeusz Sławiński [Thu, 12 Oct 2023 08:35:12 +0000 (10:35 +0200)]
ASoC: Intel: avs: rt286: Validate machine board configuration

Allow for board to be used with TDMs.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231012083514.492626-15-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: avs: nau8825: Validate machine board configuration
Amadeusz Sławiński [Thu, 12 Oct 2023 08:35:11 +0000 (10:35 +0200)]
ASoC: Intel: avs: nau8825: Validate machine board configuration

Allow for board to be used with TDMs.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231012083514.492626-14-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: avs: max98927: Validate machine board configuration
Amadeusz Sławiński [Thu, 12 Oct 2023 08:35:10 +0000 (10:35 +0200)]
ASoC: Intel: avs: max98927: Validate machine board configuration

Allow for board to be used with TDMs.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231012083514.492626-13-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: avs: max98373: Validate machine board configuration
Amadeusz Sławiński [Thu, 12 Oct 2023 08:35:09 +0000 (10:35 +0200)]
ASoC: Intel: avs: max98373: Validate machine board configuration

Allow for board to be used with TDMs.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231012083514.492626-12-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: avs: es8336: Validate machine board configuration
Amadeusz Sławiński [Thu, 12 Oct 2023 08:35:08 +0000 (10:35 +0200)]
ASoC: Intel: avs: es8336: Validate machine board configuration

Allow for board to be used with TDMs.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231012083514.492626-11-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: avs: da7219: Validate machine board configuration
Amadeusz Sławiński [Thu, 12 Oct 2023 08:35:07 +0000 (10:35 +0200)]
ASoC: Intel: avs: da7219: Validate machine board configuration

Allow for board to be used with TDMs.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231012083514.492626-10-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: avs: rt298: Validate machine board configuration
Amadeusz Sławiński [Thu, 12 Oct 2023 08:35:06 +0000 (10:35 +0200)]
ASoC: Intel: avs: rt298: Validate machine board configuration

Allow for board to be used with TDMs.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231012083514.492626-9-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: avs: max98357a: Validate machine board configuration
Amadeusz Sławiński [Thu, 12 Oct 2023 08:35:05 +0000 (10:35 +0200)]
ASoC: Intel: avs: max98357a: Validate machine board configuration

Allow for board to be used with TDMs.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231012083514.492626-8-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: avs: rt5682: Validate machine board configuration
Amadeusz Sławiński [Thu, 12 Oct 2023 08:35:04 +0000 (10:35 +0200)]
ASoC: Intel: avs: rt5682: Validate machine board configuration

Allow for board to be used with TDMs.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231012083514.492626-7-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: avs: rt274: Validate machine board configuration
Amadeusz Sławiński [Thu, 12 Oct 2023 08:35:03 +0000 (10:35 +0200)]
ASoC: Intel: avs: rt274: Validate machine board configuration

Allow for board to be used with TDMs.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231012083514.492626-6-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: avs: i2s_test: Validate machine board configuration
Amadeusz Sławiński [Thu, 12 Oct 2023 08:35:02 +0000 (10:35 +0200)]
ASoC: Intel: avs: i2s_test: Validate machine board configuration

I2S test board can be used in any SSP and TDM configuration.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231012083514.492626-5-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: avs: Improve topology parsing of dynamic strings
Amadeusz Sławiński [Thu, 12 Oct 2023 08:35:01 +0000 (10:35 +0200)]
ASoC: Intel: avs: Improve topology parsing of dynamic strings

Current mechanism replaces "%d" present in some routes and widget names
with SSP number. However there are also configurations which make use of
TDM number, in which case expected behavior would be to have string in
form of SSP:TDM - see implementation of avs_i2s_platform_register() in
sound/soc/intel/avs/pcm.c.

Implement custom function, which parses string and make use of it when
parsing topology. While at it make sure that we generate dynamic names
only if there is no multiple SSPs or TDMs defined.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231012083514.492626-4-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: avs: Introduce helper functions for SSP and TDM handling
Amadeusz Sławiński [Thu, 12 Oct 2023 08:35:00 +0000 (10:35 +0200)]
ASoC: Intel: avs: Introduce helper functions for SSP and TDM handling

In quite a few places in code there are checks for number of SSPs
present on system, to reduce maintenance burden introduce helper
functions allowing to get SSP and TDM from machine board configuration.

Additionally in boards we use SSP and TDM to generate quite a few
strings, it could be done like:
if (tdms)
dl->name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d:%d-Codec",
ssp_port, tdm_slot);
else
dl->name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d-Codec",
ssp_port);

but quite quickly code ends up with spaghetti of similar if elses.
Instead introduce macro which can be used to generate correct string,
allowing to minimize code to something like:
dl->name = devm_kasprintf(dev, GFP_KERNEL, AVS_STRING_FMT("SSP", "-Codec",
ssp_port, tdm_slot));

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231012083514.492626-3-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Intel: avs: Only create SSP%d snd_soc_dai_driver when requested
Amadeusz Sławiński [Thu, 12 Oct 2023 08:34:59 +0000 (10:34 +0200)]
ASoC: Intel: avs: Only create SSP%d snd_soc_dai_driver when requested

When using TDM configuration some other device may be using SSP%d, so
don't create snd_soc_dai_driver configuration for it unless requested
by TDM configuration.

While at it adjust tdf8532 board to explicitly describe TDM
configuration.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231012083514.492626-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: apple: mca: Annotate struct mca_data with __counted_by
Kees Cook [Fri, 22 Sep 2023 17:50:50 +0000 (10:50 -0700)]
ASoC: apple: mca: Annotate struct mca_data with __counted_by

Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
(for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).

As found with Coccinelle[1], add __counted_by for struct mca_data.

[1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci

Cc: Martin Povišer <povik+lin@cutebit.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: asahi@lists.linux.dev
Cc: alsa-devel@alsa-project.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20230922175050.work.819-kees@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: SOF: Convert to platform remove callback returning void
Uwe Kleine-König [Mon, 9 Oct 2023 15:59:45 +0000 (17:59 +0200)]
ASoC: SOF: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.

To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new(), which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

The SOF platform drivers all use either sof_of_remove() or
sof_acpi_remove() which both return zero unconditionally. Change these
functions to return void and the drivers to use .remove_new(). There is
no semantical change.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20231009155945.285537-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: mediatek: mt8188-mt6359: add rt5682s support
Mark Brown [Tue, 10 Oct 2023 16:23:26 +0000 (17:23 +0100)]
ASoC: mediatek: mt8188-mt6359: add rt5682s support

Merge series from xiazhengqiao <xiazhengqiao@huaqin.corp-partner.google.com>:

To use RT5682S as the codec and MAX98390 as the amp, add a new
sound card named mt8188_rt5682s.

11 months agoASoC: Merge fixes for consistent cs42l43 schema
Mark Brown [Tue, 10 Oct 2023 16:07:17 +0000 (17:07 +0100)]
ASoC: Merge fixes for consistent cs42l43 schema

We have adjacent changes for the cs42l43 DT schema, merge the fixes
branch up so that there's a single thing for people to base future
changes on.

11 months agoASoC: cs42l43: Update values for bias sense
Charles Keepax [Tue, 10 Oct 2023 10:24:25 +0000 (11:24 +0100)]
ASoC: cs42l43: Update values for bias sense

Due to an error in the datasheet the bias sense values currently don't
match the hardware. Whilst this is a change to the binding no devices
have yet shipped so updating the binding will not cause any issues.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231010102425.3662364-2-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: dt-bindings: cirrus,cs42l43: Update values for bias sense
Charles Keepax [Tue, 10 Oct 2023 10:24:24 +0000 (11:24 +0100)]
ASoC: dt-bindings: cirrus,cs42l43: Update values for bias sense

Due to an error in the datasheet the bias sense values currently don't
match the hardware. Whilst this is a change to the binding no devices
have yet shipped so updating the binding will not cause any issues.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231010102425.3662364-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: fsl: mpc5200_dma.c: Fix warning of Function parameter or member not described
Kuninori Morimoto [Mon, 9 Oct 2023 23:39:43 +0000 (23:39 +0000)]
ASoC: fsl: mpc5200_dma.c: Fix warning of Function parameter or member not described

This patch fixes the warnings of "Function parameter or member 'xxx'
not described".

>> sound/soc/fsl/mpc5200_dma.c:116: warning: Function parameter or member 'component' not described in 'psc_dma_trigger'
   sound/soc/fsl/mpc5200_dma.c:116: warning: Function parameter or member 'substream' not described in 'psc_dma_trigger'
   sound/soc/fsl/mpc5200_dma.c:116: warning: Function parameter or member 'cmd' not described in 'psc_dma_trigger'

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202310061914.jJuekdHs-lkp@intel.com/
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Fixes: 6d1048bc1152 ("ASoC: fsl: mpc5200_dma: remove snd_pcm_ops")
Link: https://lore.kernel.org/r/87il7fcqm8.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: mediatek: mt8188-mt6359: add rt5682s support
xiazhengqiao [Tue, 10 Oct 2023 02:37:38 +0000 (10:37 +0800)]
ASoC: mediatek: mt8188-mt6359: add rt5682s support

To use RT5682S as the codec and MAX98390 as the amp, add a new
sound card named mt8188_rt5682s.

Signed-off-by: xiazhengqiao <xiazhengqiao@huaqin.corp-partner.google.com>
Reviewed-by: Trevor Wu <trevor.wu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20231010023738.8241-3-xiazhengqiao@huaqin.corp-partner.google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: dt-bindings: mediatek,mt8188-mt6359: add RT5682S support
xiazhengqiao [Tue, 10 Oct 2023 02:37:37 +0000 (10:37 +0800)]
ASoC: dt-bindings: mediatek,mt8188-mt6359: add RT5682S support

Add compatible string "mediatek,mt8188-rt5682s" to support new board
with rt5682s codec.

Signed-off-by: xiazhengqiao <xiazhengqiao@huaqin.corp-partner.google.com>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20231010023738.8241-2-xiazhengqiao@huaqin.corp-partner.google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: DT matching and header cleanups
Mark Brown [Mon, 9 Oct 2023 19:49:16 +0000 (20:49 +0100)]
ASoC: DT matching and header cleanups

Merge series from Rob Herring <robh@kernel.org>:

This is a series is part of ongoing clean-ups related to device
matching and DT related implicit includes. Essentially of_device.h has
a bunch of implicit includes and generally isn't needed any nore except
for of_match_device(). As we also generally want to get rid of
of_match_device() as well, I've done that so we're not updating the
includes twice.

11 months agoConvert Mediatek ASoC codecs to use GPIO descriptors
Mark Brown [Mon, 9 Oct 2023 18:51:57 +0000 (19:51 +0100)]
Convert Mediatek ASoC codecs to use GPIO descriptors

Merge series from Linus Walleij <linus.walleij@linaro.org>:

Convert over the Mediatek codecs to use GPIO descriptors.

One few-liner affects gpiolib-of.h, I don't think there
will be conflicts so I suggest that all of this can be
merged through ASoC after review.

11 months agoASoC: cs35l56: ASP1 DOUT must default to Hi-Z when not transmitting
Richard Fitzgerald [Mon, 9 Oct 2023 15:34:12 +0000 (16:34 +0100)]
ASoC: cs35l56: ASP1 DOUT must default to Hi-Z when not transmitting

The ASP1 DOUT line must be defaulted to be high-impedance when
it is not actually transmitting data for an active channel.

In non-SoundWire modes ASP1 will usually be shared by multiple
amps so each amp must only drive the line during the slot for
an enabled TX channel.

In SoundWire mode a custom firmware can use ASP1 as a secondary
chip-to-chip audio link or as GPIO. It should be defaulted to
high-impedance since by default the purpose of this pin is not
known.

Backport note:
On kernel versions before 6.6 the cs35l56->base.regmap argument
to regmap_set_bits() must be changed to cs35l56->regmap.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: e49611252900 ("ASoC: cs35l56: Add driver for Cirrus Logic CS35L56")
Link: https://lore.kernel.org/r/20231009153412.30380-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoConvert Rockchip ASoC drivers to GPIO descriptors
Mark Brown [Mon, 9 Oct 2023 17:40:19 +0000 (18:40 +0100)]
Convert Rockchip ASoC drivers to GPIO descriptors

Merge series from Linus Walleij <linus.walleij@linaro.org>:

The Rockchip drivers are pretty straight-forward to convert
over to using GPIO descriptors.

11 months agoASoC: codecs: fix widget name comparisons
Mark Brown [Mon, 9 Oct 2023 17:40:09 +0000 (18:40 +0100)]
ASoC: codecs: fix widget name comparisons

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.
Add a helper to fix the issue.

11 months agoASoC: codecs: wcd938x: fix probe and bind error
Mark Brown [Mon, 9 Oct 2023 17:40:01 +0000 (18:40 +0100)]
ASoC: codecs: wcd938x: fix probe and bind error

Merge series from Johan Hovold <johan+linaro@kernel.org>:

The wcd938x codec driver happily ignores error handling, something which
has bitten us in the past when we hit a probe deferral:

https://lore.kernel.org/lkml/20230705123018.30903-1-johan+linaro@kernel.org/

Fix up the remaining probe and component bind paths that left resources
allocated and registered after errors to avoid similar future issues.

11 months agoASoC: mt8192-afe-gpio: Drop unused include
Linus Walleij [Fri, 6 Oct 2023 13:46:31 +0000 (15:46 +0200)]
ASoC: mt8192-afe-gpio: Drop unused include

This driver includes the legacy GPIO header <linux/gpio.h> but
is not using any symbols from it. AFE has a custom GPIO
implementation that is not using the kernel GPIO framework.

Signed-off-by: Linus Walleij <linus.walleij@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/20231006-descriptors-asoc-mediatek-v1-8-07fe79f337f5@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: mt8186-mt6366-rt1019-rt5682s: Drop unused include
Linus Walleij [Fri, 6 Oct 2023 13:46:30 +0000 (15:46 +0200)]
ASoC: mt8186-mt6366-rt1019-rt5682s: Drop unused include

This driver includes the legacy GPIO header <linux/gpio.h> but
is not using any symbols from it. AFE has a custom GPIO
implementation that is not using the kernel GPIO framework,
so it need not include it either.

Signed-off-by: Linus Walleij <linus.walleij@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/20231006-descriptors-asoc-mediatek-v1-7-07fe79f337f5@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: mt8173-rt5650: Drop unused includes
Linus Walleij [Fri, 6 Oct 2023 13:46:29 +0000 (15:46 +0200)]
ASoC: mt8173-rt5650: Drop unused includes

This driver includes the legacy GPIO header <linux/gpio.h> and
<linux/of_gpio.h> but does not use any symbols from either of
them so drop the includes.

Signed-off-by: Linus Walleij <linus.walleij@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/20231006-descriptors-asoc-mediatek-v1-6-07fe79f337f5@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: mt8173-rt5650-rt5676: Drop unused includes
Linus Walleij [Fri, 6 Oct 2023 13:46:28 +0000 (15:46 +0200)]
ASoC: mt8173-rt5650-rt5676: Drop unused includes

This driver includes the legacy GPIO header <linux/gpio.h> and
<linux/of_gpio.h> but does not use any symbols from either of
them so drop the includes.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20231006-descriptors-asoc-mediatek-v1-5-07fe79f337f5@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: mt8173-rt5650-rt5514: Drop unused includes
Linus Walleij [Fri, 6 Oct 2023 13:46:27 +0000 (15:46 +0200)]
ASoC: mt8173-rt5650-rt5514: Drop unused includes

This driver includes the legacy GPIO header <linux/gpio.h> and
<linux/of_gpio.h> but does not use any symbols from either of
them so drop the includes.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20231006-descriptors-asoc-mediatek-v1-4-07fe79f337f5@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: mt8173-max98090: Drop unused include
Linus Walleij [Fri, 6 Oct 2023 13:46:26 +0000 (15:46 +0200)]
ASoC: mt8173-max98090: Drop unused include

This driver includes the legacy GPIO header <linux/gpio.h> but
is not using any symbols from it. Drop the include.

Signed-off-by: Linus Walleij <linus.walleij@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/20231006-descriptors-asoc-mediatek-v1-3-07fe79f337f5@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: mediatek: mt2701-cs42448: Convert to GPIO descriptors
Linus Walleij [Fri, 6 Oct 2023 13:46:25 +0000 (15:46 +0200)]
ASoC: mediatek: mt2701-cs42448: Convert to GPIO descriptors

The driver is pretty straight-forward to convert to use GPIO
descriptors, however a separate patch is needed to accept
the DT GPIO resources ending with "-gpio1" and "-gpio2"
instead of the standard "-gpio" or "-gpios" name convention.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20231006-descriptors-asoc-mediatek-v1-2-07fe79f337f5@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agogpiolib: of: Add quirk for mt2701-cs42448 ASoC sound
Linus Walleij [Fri, 6 Oct 2023 13:46:24 +0000 (15:46 +0200)]
gpiolib: of: Add quirk for mt2701-cs42448 ASoC sound

These gpio names are due to old DT bindings not following the
"-gpio"/"-gpios" conventions. Handle it using a quirk so the
driver can just look up the GPIOs.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20231006-descriptors-asoc-mediatek-v1-1-07fe79f337f5@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: codecs: wsa-macro: fix uninitialized stack variables with name prefix
Krzysztof Kozlowski [Tue, 3 Oct 2023 15:54:22 +0000 (17:54 +0200)]
ASoC: codecs: wsa-macro: fix uninitialized stack variables with name prefix

Driver compares widget name in wsa_macro_spk_boost_event() widget event
callback, however it does not handle component's name prefix.  This
leads to using uninitialized stack variables as registers and register
values.  Handle gracefully such case.

Fixes: 2c4066e5d428 ("ASoC: codecs: lpass-wsa-macro: add dapm widgets and route")
Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231003155422.801160-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: qcom: reduce number of binding headers includes
Krzysztof Kozlowski [Thu, 5 Oct 2023 07:52:50 +0000 (09:52 +0200)]
ASoC: qcom: reduce number of binding headers includes

Move the includes of binding headers from Qualcomm SoC sound drivers
headers to unit files actually using these bindings.  This reduces the
amount of work for C preprocessor and makes usage of bindings easier to
follow.  No impact expected on the final binaries.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231005075250.88159-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: qcom: explicitly include binding headers when used
Krzysztof Kozlowski [Thu, 5 Oct 2023 07:52:49 +0000 (09:52 +0200)]
ASoC: qcom: explicitly include binding headers when used

Few units use qcom,lpass.h binding headers but they rely on them being
included through a different header.  Make the usage explicit which
allows easier to find the users of a header.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231005075250.88159-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: SOF: sof-client: fix build when only IPC4 is selected
Pierre-Louis Bossart [Fri, 6 Oct 2023 08:40:41 +0000 (11:40 +0300)]
ASoC: SOF: sof-client: fix build when only IPC4 is selected

When IPC3 is not selected, sof-client.c still makes a hard-coded
reference to an IPC3-specific function:

ERROR: modpost: "sof_ipc3_do_rx_work" [sound/soc/sof/snd-sof.ko]
undefined!

Fix by making the code conditional.

Closes: https://github.com/thesofproject/linux/issues/4581
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Curtis Malainey <cujomalainey@chromium.org>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20231006084041.18100-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: rockchip: Drop includes from Rockchip RT5645
Linus Walleij [Thu, 28 Sep 2023 22:12:57 +0000 (00:12 +0200)]
ASoC: rockchip: Drop includes from Rockchip RT5645

The Rockchip RT5645 ASoC driver includes two legacy GPIO
headers but doesn't use symbols from any of them. Delete
the includes.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230929-descriptors-asoc-rockchip-v2-4-2d2c0e043aab@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: rockchip: Drop includes from Rockchip MAX98090
Linus Walleij [Thu, 28 Sep 2023 22:12:56 +0000 (00:12 +0200)]
ASoC: rockchip: Drop includes from Rockchip MAX98090

The Rockchip MAX98090 ASoC driver includes two legacy GPIO
headers but doesn't use symbols from any of them. Delete
the includes.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230929-descriptors-asoc-rockchip-v2-3-2d2c0e043aab@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: rockchip: Drop includes from RK3399
Linus Walleij [Thu, 28 Sep 2023 22:12:55 +0000 (00:12 +0200)]
ASoC: rockchip: Drop includes from RK3399

The RK3399 ASoC driver includes two legacy GPIO headers but
doesn't use symbols from any of them. Delete the includes.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230929-descriptors-asoc-rockchip-v2-2-2d2c0e043aab@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: rockchip: Convert RK3288 HDMI to GPIO descriptors
Linus Walleij [Thu, 28 Sep 2023 22:12:54 +0000 (00:12 +0200)]
ASoC: rockchip: Convert RK3288 HDMI to GPIO descriptors

This converts the Rockchip RK3288 HDMI driver to use GPIO
descriptors:

- Look up the HP EN GPIO as an optional descriptor and handle
  it directly, the gpiod API is NULL-tolerant so no special
  guards are needed.

- Let the Jack detection core obtain and handle the HP detection
  GPIO, just pass the right name and gpiod_dev and it will
  do the job. Make sure to check that the GPIO property
  is there first, so it becomes optional.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230929-descriptors-asoc-rockchip-v2-1-2d2c0e043aab@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Use device_get_match_data()
Rob Herring [Fri, 6 Oct 2023 20:09:14 +0000 (15:09 -0500)]
ASoC: Use device_get_match_data()

Use preferred device_get_match_data() instead of of_match_device() to
get the driver match data. With this, adjust the includes to explicitly
include the correct headers.

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20231006-dt-asoc-header-cleanups-v3-5-13a4f0f7fee6@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: qcom/lpass: Constify struct lpass_variant
Rob Herring [Fri, 6 Oct 2023 20:09:13 +0000 (15:09 -0500)]
ASoC: qcom/lpass: Constify struct lpass_variant

'struct lpass_variant' is used for driver match data which is supposed to
be constant. It's not modified anywhere, so it's just a matter of adding
'const' everywhere.

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20231006-dt-asoc-header-cleanups-v3-4-13a4f0f7fee6@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: da7218: Use i2c_get_match_data()
Rob Herring [Fri, 6 Oct 2023 20:09:12 +0000 (15:09 -0500)]
ASoC: da7218: Use i2c_get_match_data()

Use preferred i2c_get_match_data() instead of of_match_device() and
i2c_match_id() to get the driver match data. With this, adjust the
includes to explicitly include the correct headers.

Avoid using 0 for enum da7218_dev_id so that no match data can be
distinguished.

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20231006-dt-asoc-header-cleanups-v3-3-13a4f0f7fee6@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Drop unnecessary of_match_device() calls
Rob Herring [Fri, 6 Oct 2023 20:09:11 +0000 (15:09 -0500)]
ASoC: Drop unnecessary of_match_device() calls

If probe is reached, we've already matched the device and in the case of
DT matching, the struct device_node pointer will be set. Therefore, there
is no need to call of_match_device() in probe.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20231006-dt-asoc-header-cleanups-v3-2-13a4f0f7fee6@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: Explicitly include correct DT includes
Rob Herring [Fri, 6 Oct 2023 20:09:10 +0000 (15:09 -0500)]
ASoC: Explicitly include correct DT includes

The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it was merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> # for at91
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20231006-dt-asoc-header-cleanups-v3-1-13a4f0f7fee6@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: pxa: fix a memory leak in probe()
Dan Carpenter [Thu, 5 Oct 2023 14:00:24 +0000 (17:00 +0300)]
ASoC: pxa: fix a memory leak in probe()

Free the "priv" pointer before returning the error code.

Fixes: 90eb6b59d311 ("ASoC: pxa-ssp: add support for an external clock in devicetree")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/84ac2313-1420-471a-b2cb-3269a2e12a7c@moroto.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: cs35l56: Fix illegal use of init_completion()
Richard Fitzgerald [Fri, 6 Oct 2023 16:44:05 +0000 (17:44 +0100)]
ASoC: cs35l56: Fix illegal use of init_completion()

Fix cs35l56_patch() to call reinit_completion() to reinitialize
the completion object.

It was incorrectly using init_completion().

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: e49611252900 ("ASoC: cs35l56: Add driver for Cirrus Logic CS35L56")
Link: https://lore.kernel.org/r/20231006164405.253796-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: codecs: wcd938x-sdw: fix runtime PM imbalance on probe errors
Johan Hovold [Tue, 3 Oct 2023 15:55:58 +0000 (17:55 +0200)]
ASoC: codecs: wcd938x-sdw: fix runtime PM imbalance on probe errors

Make sure to balance the runtime PM operations, including the disable
count, on probe errors and on driver unbind.

Fixes: 16572522aece ("ASoC: codecs: wcd938x-sdw: add SoundWire driver")
Cc: stable@vger.kernel.org # 5.14
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20231003155558.27079-8-johan+linaro@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: codecs: wcd938x-sdw: fix use after free on driver unbind
Johan Hovold [Tue, 3 Oct 2023 15:55:57 +0000 (17:55 +0200)]
ASoC: codecs: wcd938x-sdw: fix use after free on driver unbind

Make sure to deregister the component when the driver is being unbound
and before the underlying device-managed resources are freed.

Fixes: 16572522aece ("ASoC: codecs: wcd938x-sdw: add SoundWire driver")
Cc: stable@vger.kernel.org # 5.14
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20231003155558.27079-7-johan+linaro@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: codecs: wcd938x: fix runtime PM imbalance on remove
Johan Hovold [Tue, 3 Oct 2023 15:55:56 +0000 (17:55 +0200)]
ASoC: codecs: wcd938x: fix runtime PM imbalance on remove

Make sure to balance the runtime PM operations, including the disable
count, on driver unbind.

Fixes: 16572522aece ("ASoC: codecs: wcd938x-sdw: add SoundWire driver")
Cc: stable@vger.kernel.org # 5.14
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20231003155558.27079-6-johan+linaro@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: codecs: wcd938x: fix regulator leaks on probe errors
Johan Hovold [Tue, 3 Oct 2023 15:55:55 +0000 (17:55 +0200)]
ASoC: codecs: wcd938x: fix regulator leaks on probe errors

Make sure to disable and free the regulators on probe errors and on
driver unbind.

Fixes: 16572522aece ("ASoC: codecs: wcd938x-sdw: add SoundWire driver")
Cc: stable@vger.kernel.org # 5.14
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20231003155558.27079-5-johan+linaro@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: codecs: wcd938x: fix resource leaks on bind errors
Johan Hovold [Tue, 3 Oct 2023 15:55:54 +0000 (17:55 +0200)]
ASoC: codecs: wcd938x: fix resource leaks on bind errors

Add the missing code to release resources on bind errors, including the
references taken by wcd938x_sdw_device_get() which also need to be
dropped on unbind().

Fixes: 16572522aece ("ASoC: codecs: wcd938x-sdw: add SoundWire driver")
Cc: stable@vger.kernel.org # 5.14
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20231003155558.27079-4-johan+linaro@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: codecs: wcd938x: fix unbind tear down order
Johan Hovold [Tue, 3 Oct 2023 15:55:53 +0000 (17:55 +0200)]
ASoC: codecs: wcd938x: fix unbind tear down order

Make sure to deregister the component before tearing down the resources
it depends on during unbind().

Fixes: 16572522aece ("ASoC: codecs: wcd938x-sdw: add SoundWire driver")
Cc: stable@vger.kernel.org # 5.14
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20231003155558.27079-3-johan+linaro@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: codecs: wcd938x: drop bogus bind error handling
Johan Hovold [Tue, 3 Oct 2023 15:55:52 +0000 (17:55 +0200)]
ASoC: codecs: wcd938x: drop bogus bind error handling

Drop the bogus error handling for a soundwire device backcast during
bind() that cannot fail.

Fixes: 16572522aece ("ASoC: codecs: wcd938x-sdw: add SoundWire driver")
Cc: stable@vger.kernel.org # 5.14
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20231003155558.27079-2-johan+linaro@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: codecs: wsa-macro: handle component name prefix
Krzysztof Kozlowski [Tue, 3 Oct 2023 15:57:10 +0000 (17:57 +0200)]
ASoC: codecs: wsa-macro: handle component name prefix

When comparing widget names in wsa_macro_spk_boost_event(), consider
also the component's name prefix.  Otherwise the WSA codec won't have
proper mixer setup resulting in no sound playback through speakers.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231003155710.821315-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: soc-dapm: Add helper for comparing widget name
Krzysztof Kozlowski [Tue, 3 Oct 2023 15:57:09 +0000 (17:57 +0200)]
ASoC: soc-dapm: Add helper for comparing widget name

Some drivers use one event callback for multiple widgets but still need
to perform a bit different actions based on actual widget.  This is done
by comparing widget name, however drivers tend to miss possible name
prefix.  Add a helper to solve common mistakes.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231003155710.821315-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: SOF: ipc4: Take priority into cosideration when
Mark Brown [Fri, 6 Oct 2023 14:39:19 +0000 (15:39 +0100)]
ASoC: SOF: ipc4: Take priority into cosideration when

Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

Add pipeline priority support for IPC4: Add support for parsing pipeline
priorities from the topology. This will be used to break the tie between
pipelines to set the trigger order when multiple pipelines are triggered
simultaneously.

11 months agoASoC: cs35l56: Update hibernate/wake sequences and
Mark Brown [Fri, 6 Oct 2023 14:32:31 +0000 (15:32 +0100)]
ASoC: cs35l56: Update hibernate/wake sequences and

Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>:

Update the hibernate and wake command sequences to meet the latest
datasheet specification and enable hibernation for I2C and SPI control
interfaces.

Richard Fitzgerald (1):
  ASoC: cs35l56: Enable low-power hibernation mode on SPI

Simon Trimmer (3):
  ASoC: cs35l56: Change hibernate sequence to use allow auto hibernate
  ASoC: cs35l56: Wake transactions need to be issued twice
  ASoC: cs35l56: Enable low-power hibernation mode on i2c

 include/sound/cs35l56.h           |  1 +
 sound/soc/codecs/cs35l56-i2c.c    |  1 +
 sound/soc/codecs/cs35l56-shared.c | 66 +++++++++++++++++++------------
 sound/soc/codecs/cs35l56-spi.c    |  1 +
 4 files changed, 43 insertions(+), 26 deletions(-)

--
2.30.2

11 months agoMAINTAINERS: Include sof headers under ASoC
Kees Cook [Thu, 5 Oct 2023 02:56:21 +0000 (19:56 -0700)]
MAINTAINERS: Include sof headers under ASoC

Add missing sof header files for ASoC.

Suggested-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/lkml/f258a7e6-0728-4f55-a71a-6e99113ce7e5@sirena.org.uk
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20231005025618.work.355-kees@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: cs35l56: Enable low-power hibernation mode on SPI
Richard Fitzgerald [Fri, 6 Oct 2023 11:10:39 +0000 (12:10 +0100)]
ASoC: cs35l56: Enable low-power hibernation mode on SPI

Hibernation can be enabled on SPI-connected devices now that
the hibernate and wake sequences have been updated to work
with wake-on-MOSI.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231006111039.101914-5-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: cs35l56: Enable low-power hibernation mode on i2c
Simon Trimmer [Fri, 6 Oct 2023 11:10:38 +0000 (12:10 +0100)]
ASoC: cs35l56: Enable low-power hibernation mode on i2c

This can now be re-enabled as the sequence to reliably wake the device
has been implemented in the shared code.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231006111039.101914-4-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: cs35l56: Wake transactions need to be issued twice
Simon Trimmer [Fri, 6 Oct 2023 11:10:37 +0000 (12:10 +0100)]
ASoC: cs35l56: Wake transactions need to be issued twice

As the dummy wake is a toggling signal (either I2C or SPI activity) it
is not guaranteed to meet the minimum asserted hold time for a wake
signal. In this case the wake must guarantee rising edges separated by
at least the minimum hold time.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231006111039.101914-3-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: cs35l56: Change hibernate sequence to use allow auto hibernate
Simon Trimmer [Fri, 6 Oct 2023 11:10:36 +0000 (12:10 +0100)]
ASoC: cs35l56: Change hibernate sequence to use allow auto hibernate

If the hardware uses SPI_MOSI, I2C_SCL or I2C_SDA as the wake source
the bus activity of sending HIBERNATE_NOW will wake up the amps that
were already put into hibernate.

ALLOW_AUTO_HIBERNATE tells the firmware to hibernate itself after a
timeout of a few seconds, giving the driver instances time to send this
before any amps have gone into hibernate.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231006111039.101914-2-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: SOF: IPC4: sort pipeline based on priority
Rander Wang [Fri, 6 Oct 2023 08:44:54 +0000 (11:44 +0300)]
ASoC: SOF: IPC4: sort pipeline based on priority

The pipeline priority is set in topology and driver should sort pipeline
based on priority for trigger order.

Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20231006084454.19170-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: SOF: IPC4: get pipeline priority from topology
Rander Wang [Fri, 6 Oct 2023 08:44:53 +0000 (11:44 +0300)]
ASoC: SOF: IPC4: get pipeline priority from topology

Driver set pipeline priority according to priority setting in topology.

Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20231006084454.19170-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoMAINTAINERS: Include additional ASoC paths
Kees Cook [Wed, 4 Oct 2023 19:34:45 +0000 (12:34 -0700)]
MAINTAINERS: Include additional ASoC paths

Make sure a few other paths are correctly sent to the ASoC maintainers.

Link: https://lore.kernel.org/lkml/63dd3676.170a0220.1f1b2.3244@mx.google.com/
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20231004193441.work.109-kees@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: cs35l56: Initialise a variable to silence possible static analysis error
Simon Trimmer [Wed, 4 Oct 2023 14:42:03 +0000 (15:42 +0100)]
ASoC: cs35l56: Initialise a variable to silence possible static analysis error

read_poll_timeout() is a macro and val will be populated before use,
however some static analysis tools treat it as a function and warn of
uninitialised variable usage.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231004144203.151775-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: dt-bindings: fsl,micfil: Document #sound-dai-cells
Fabio Estevam [Wed, 4 Oct 2023 12:29:35 +0000 (09:29 -0300)]
ASoC: dt-bindings: fsl,micfil: Document #sound-dai-cells

imx8mp.dtsi passes #sound-dai-cells = <0> in the micfil node.

Document #sound-dai-cells to fix the following schema warning:

audio-controller@30ca0000: '#sound-dai-cells' does not match any of the regexes: 'pinctrl-[0-9]+'
from schema $id: http://devicetree.org/schemas/sound/fsl,micfil.yaml#

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Adam Ford <aford173@gmail.com>
Link: https://lore.kernel.org/r/20231004122935.2250889-1-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: soc-dapm: Annotate struct snd_soc_dapm_widget_list with __counted_by
Kees Cook [Tue, 3 Oct 2023 23:28:53 +0000 (16:28 -0700)]
ASoC: soc-dapm: Annotate struct snd_soc_dapm_widget_list with __counted_by

Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time via CONFIG_UBSAN_BOUNDS (for
array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).

As found with Coccinelle[1], add __counted_by for struct snd_soc_dapm_widget_list.
Additionally, since the element count member must be set before accessing
the annotated flexible array member, move its initialization earlier.

Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: alsa-devel@alsa-project.org
Cc: linux-hardening@vger.kernel.org
Link: https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20231003232852.work.257-kees@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: dt-bindings: rt5616: Convert to dtschema
Bragatheswaran Manickavel [Sat, 30 Sep 2023 16:50:50 +0000 (22:20 +0530)]
ASoC: dt-bindings: rt5616: Convert to dtschema

Convert the rt5616 audio CODEC bindings to DT schema

Signed-off-by: Bragatheswaran Manickavel <bragathemanick0908@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230930165050.7793-1-bragathemanick0908@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoASoC: cs35l56: Remove unused hibernate wake constants
Simon Trimmer [Tue, 3 Oct 2023 09:34:18 +0000 (10:34 +0100)]
ASoC: cs35l56: Remove unused hibernate wake constants

The two CS35L56_HIBERNATE_WAKE_* constants in cs35l56.h aren't used by
any of the driver code.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231003093418.21600-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 months agoRemove reset GPIO for AW88261
Mark Brown [Tue, 3 Oct 2023 13:21:12 +0000 (14:21 +0100)]
Remove reset GPIO for AW88261

Merge series from Luca Weiss <luca.weiss@fairphone.com>:

The AW88261 chip doesn't have a reset gpio, so remove it from the
bindings and from the driver.

11 months agoASoC: pcm512x: Adds bindings for TAS575x devices
Joerg Schambacher [Fri, 29 Sep 2023 15:05:55 +0000 (17:05 +0200)]
ASoC: pcm512x: Adds bindings for TAS575x devices

The TAS5754/6 power amplifiers use the same pcm512x driver with
only minor restictions described in the bindings document.

Signed-off-by: Joerg Schambacher <joerg.hifiberry@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230929150555.405388-1-joerg.hifiberry@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>