]> git.ipfire.org Git - thirdparty/linux.git/log
thirdparty/linux.git
10 months agosoundwire: intel: increase maximum number of links
Pierre-Louis Bossart [Mon, 19 Aug 2024 00:55:48 +0000 (08:55 +0800)] 
soundwire: intel: increase maximum number of links

Intel platforms have enabled 4 links since the beginning, newer
platforms now have 5 links. Update the definition accordingly.

This patch will have no effect on older platforms where the number of
links was hard-coded. A follow-up patch will add a dynamic check that
the ACPI-reported information is aligned with hardware capabilities on
newer platforms.

Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Acked-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20240819005548.5867-4-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agosoundwire: intel: add probe-time check on link id
Pierre-Louis Bossart [Mon, 19 Aug 2024 00:55:47 +0000 (08:55 +0800)] 
soundwire: intel: add probe-time check on link id

In older platforms, the number of links was constant and hard-coded to
4. Newer platforms can have varying number of links, so we need to add
a probe-time check to make sure the ACPI-reported information with
_DSD properties is aligned with hardware capabilities reported in the
SoundWire LCAP register.

Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Acked-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20240819005548.5867-3-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoALSA/ASoC/SoundWire: Intel: use single definition for SDW_INTEL_MAX_LINKS
Pierre-Louis Bossart [Mon, 19 Aug 2024 00:55:46 +0000 (08:55 +0800)] 
ALSA/ASoC/SoundWire: Intel: use single definition for SDW_INTEL_MAX_LINKS

The definitions are currently duplicated in intel-sdw-acpi.c and
sof_sdw.c.  Move the definition to the sdw_intel.h header, and change
the prefix to make it Intel-specific.

No functionality change in this patch.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20240819005548.5867-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: dt-bindings: qcom,lpass-wsa-macro: correct clocks on SM8250
Srinivas Kandagatla [Thu, 15 Aug 2024 16:53:20 +0000 (17:53 +0100)] 
ASoC: dt-bindings: qcom,lpass-wsa-macro: correct clocks on SM8250

we seems to have ended up with duplicate clocks for frame-sync on sm8250,
it has both va and fsgen which are exactly same things. Remove the redundant
va clock and make it align with other SoCs.

Codec driver does not even handle va clock, so remove this from the
bindings and examples to avoid any confusion.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20240815165320.18836-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoc: tas2781: Remove unnecessary line feed and space
Shenghao Ding [Thu, 15 Aug 2024 04:21:35 +0000 (12:21 +0800)] 
ASoc: tas2781: Remove unnecessary line feed and space

Remove unnecessary line feed for tasdevice_dsp_create_ctrls,
and remove two unnecessary spaces in tas2563_digital_gain_get
and tas2563_digital_gain_put.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://patch.msgid.link/20240815042138.1997-1-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: loongson: Remove useless variable definitions
tangbin [Sat, 13 Jul 2024 15:34:28 +0000 (11:34 -0400)] 
ASoC: loongson: Remove useless variable definitions

In the function loongson_pcm_trigger and loongson_pcm_open,
the 'ret' is useless, so remove it to simplify code.

Signed-off-by: tangbin <tangbin@cmss.chinamobile.com>
Link: https://patch.msgid.link/20240713153428.44858-1-tangbin@cmss.chinamobile.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: soc-pcm: remove snd_soc_dpcm_stream_{lock/unlock}_irq()
Kuninori Morimoto [Tue, 30 Jul 2024 01:30:51 +0000 (01:30 +0000)] 
ASoC: soc-pcm: remove snd_soc_dpcm_stream_{lock/unlock}_irq()

soc-pcm.c has snd_soc_dpcm_stream_{lock/unlock}_irq() helper function,
but it is almost nothing help. It just makes a code complex.
Let's remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/875xsnll85.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: imx-pcm-rpmsg: Switch to RUNTIME/SYSTEM_SLEEP_PM_OPS()
Fabio Estevam [Thu, 8 Aug 2024 18:49:44 +0000 (15:49 -0300)] 
ASoC: imx-pcm-rpmsg: Switch to RUNTIME/SYSTEM_SLEEP_PM_OPS()

Replace SET_RUNTIME_PM_OPS()/SET SYSTEM_SLEEP_PM_OPS() with their modern
RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() alternatives.

The combined usage of pm_ptr() and RUNTIME_PM_OPS/SYSTEM_SLEEP_PM_OPS()
allows the compiler to evaluate if the runtime suspend/resume() functions
are used at build time or are simply dead code.

This allows removing the CONFIG_PM ifdefery from the runtime
suspend/resume() functions.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Link: https://patch.msgid.link/20240808184944.267686-7-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: imx-audmux: Switch to SYSTEM_SLEEP_PM_OPS
Fabio Estevam [Thu, 8 Aug 2024 18:49:43 +0000 (15:49 -0300)] 
ASoC: imx-audmux: Switch to SYSTEM_SLEEP_PM_OPS

Replace SET_SYSTEM_SLEEP_PM_OPS() with its modern SYSTEM_SLEEP_PM_OPS()
alternative.

The combined usage of pm_sleep_ptr() and SYSTEM_SLEEP_PM_OPS() allows
the compiler to evaluate if the suspend/resume() functions
are used at build time or are simply dead code.

This allows removing the CONFIG_PM_SLEEP ifdefery from the
suspend/resume() functions.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Link: https://patch.msgid.link/20240808184944.267686-6-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: fsl_ssi: Switch to SYSTEM_SLEEP_PM_OPS
Fabio Estevam [Thu, 8 Aug 2024 18:49:42 +0000 (15:49 -0300)] 
ASoC: fsl_ssi: Switch to SYSTEM_SLEEP_PM_OPS

Replace SET_SYSTEM_SLEEP_PM_OPS() with its modern SYSTEM_SLEEP_PM_OPS()
alternative.

The combined usage of pm_sleep_ptr() and SYSTEM_SLEEP_PM_OPS() allows
the compiler to evaluate if the suspend/resume() functions are used at
build time or are simply dead code.

This allows removing the CONFIG_PM_SLEEP ifdefery from the
suspend/resume() functions.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Link: https://patch.msgid.link/20240808184944.267686-5-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: fsl_spdif: Switch to RUNTIME/SYSTEM_SLEEP_PM_OPS()
Fabio Estevam [Thu, 8 Aug 2024 18:49:41 +0000 (15:49 -0300)] 
ASoC: fsl_spdif: Switch to RUNTIME/SYSTEM_SLEEP_PM_OPS()

Replace SET_RUNTIME_PM_OPS()/SET SYSTEM_SLEEP_PM_OPS() with their modern
RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() alternatives.

The combined usage of pm_ptr() and RUNTIME_PM_OPS/SYSTEM_SLEEP_PM_OPS()
allows the compiler to evaluate if the runtime suspend/resume() functions
are used at build time or are simply dead code.

This allows removing the CONFIG_PM ifdefery from the runtime
suspend/resume() functions.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Link: https://patch.msgid.link/20240808184944.267686-4-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: fsl_rpmsg: Switch to RUNTIME_PM_OPS()
Fabio Estevam [Thu, 8 Aug 2024 18:49:40 +0000 (15:49 -0300)] 
ASoC: fsl_rpmsg: Switch to RUNTIME_PM_OPS()

Replace SET_RUNTIME_PM_OPS() with its modern RUNTIME_PM_OPS()
alternative.

The combined usage of pm_ptr() and RUNTIME_PM_OPS() allows the
compiler to evaluate if the runtime suspend/resume() functions
are used at build time or are simply dead code.

This allows removing the CONFIG_PM ifdefery from the runtime
suspend/resume() functions.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Link: https://patch.msgid.link/20240808184944.267686-3-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: fsl_mqs: Switch to RUNTIME/SYSTEM_SLEEP_PM_OPS()
Fabio Estevam [Thu, 8 Aug 2024 18:49:39 +0000 (15:49 -0300)] 
ASoC: fsl_mqs: Switch to RUNTIME/SYSTEM_SLEEP_PM_OPS()

Replace SET_RUNTIME_PM_OPS()/SET SYSTEM_SLEEP_PM_OPS() with their modern
RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() alternatives.

The combined usage of pm_ptr() and RUNTIME_PM_OPS/SYSTEM_SLEEP_PM_OPS()
allows the compiler to evaluate if the runtime suspend/resume() functions
are used at build time or are simply dead code.

This allows removing the CONFIG_PM ifdefery from the runtime
suspend/resume() functions.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Link: https://patch.msgid.link/20240808184944.267686-2-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: fsl_audmix: Switch to RUNTIME/SYSTEM_SLEEP_PM_OPS()
Fabio Estevam [Thu, 8 Aug 2024 18:49:38 +0000 (15:49 -0300)] 
ASoC: fsl_audmix: Switch to RUNTIME/SYSTEM_SLEEP_PM_OPS()

Replace SET_RUNTIME_PM_OPS()/SET SYSTEM_SLEEP_PM_OPS() with their modern
RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() alternatives.

The combined usage of pm_ptr() and RUNTIME_PM_OPS/SYSTEM_SLEEP_PM_OPS()
allows the compiler to evaluate if the runtime suspend/resume() functions
are used at build time or are simply dead code.

This allows removing the CONFIG_PM ifdefery from the runtime
suspend/resume() functions.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Link: https://patch.msgid.link/20240808184944.267686-1-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoc: tas2781: Rename dai_driver name to unify the name between TAS2563 and TAS2781
Shenghao Ding [Sun, 11 Aug 2024 13:51:41 +0000 (21:51 +0800)] 
ASoc: tas2781: Rename dai_driver name to unify the name between TAS2563 and TAS2781

Rename dai_driver name to unify the name between TAS2563 and
TAS2781.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://patch.msgid.link/20240811135144.178-1-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: amd: acp: add legacy driver support for ACP7.1 based platforms
Vijendar Mukunda [Tue, 13 Aug 2024 08:08:50 +0000 (13:38 +0530)] 
ASoC: amd: acp: add legacy driver support for ACP7.1 based platforms

Add acp pci driver and machine driver changes for ACP7.1 based platforms
for legacy stack.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20240813080850.3107409-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: rt1318: Constify struct reg_sequence
Christophe JAILLET [Tue, 6 Aug 2024 13:52:24 +0000 (15:52 +0200)] 
ASoC: rt1318: Constify struct reg_sequence

'struct reg_sequence' is not modified in this driver.

Constifying this structure moves some data to a read-only section, so
increase overall security.

While at it, remove rt1318_INIT_REG_LEN which is ununsed.

On a x86_64, with allmodconfig:
Before:
======
   text    data     bss     dec     hex filename
  22062    4859      32   26953    6949 sound/soc/codecs/rt1318.o

After:
=====
   text    data     bss     dec     hex filename
  24742    2171      32   26945    6941 sound/soc/codecs/rt1318.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://patch.msgid.link/96561dd2962d4312eb0e68ab850027f44350d070.1722952334.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: amd: acp: Convert comma to semicolon
Vijendar Mukunda [Mon, 12 Aug 2024 10:04:22 +0000 (15:34 +0530)] 
ASoC: amd: acp: Convert comma to semicolon

Replace a comma between expression statements by a semicolon.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240812100429.2594745-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: cs43130: Constify struct reg_sequence and reg_sequences
Christophe JAILLET [Tue, 6 Aug 2024 13:43:00 +0000 (15:43 +0200)] 
ASoC: cs43130: Constify struct reg_sequence and reg_sequences

'struct reg_sequence' and 'struct reg_sequences' are not modified in this
drivers.

Constifying these structures moves some data to a read-only section, so
increase overall security.

On a x86_64, with allmodconfig:
Before:
======
   text    data     bss     dec     hex filename
  54409    7881      64   62354    f392 sound/soc/codecs/cs43130.o

After:
=====
   text    data     bss     dec     hex filename
  55562    6729      64   62355    f393 sound/soc/codecs/cs43130.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://patch.msgid.link/5b906a0cc9b7be15d0d6310069f54254a75ea767.1722951770.git.christophe.jaillet@wanadoo.fr
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: tas*: Fix up GPIO usage
Mark Brown [Thu, 8 Aug 2024 20:57:13 +0000 (21:57 +0100)] 
ASoC: tas*: Fix up GPIO usage

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

The TI TAS drivers use some legacy GPIO code and headers,
this series fixes it up.

The TAS2781 is a special case since it adds a handful of
lines of deviating code to reconfigure a GPIO line for
IRQ mode and then never actually use the IRQ obtained in
the code. Is the line used by autonomous hardware? I'm
puzzled by this.

Anyways the patch suggest how to solve this properly by
fixing the parent irqchip and I'm happy to help.

10 months agoASoC: SOF: amd: update conditional check for cache register update
Vijendar Mukunda [Wed, 7 Aug 2024 05:13:17 +0000 (10:43 +0530)] 
ASoC: SOF: amd: update conditional check for cache register update

Instead of desc->rev, use acp pci revision id(pci_rev) for cache register
conditional check.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240807051341.1616925-5-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: SOF: sof-audio: Avoid -Wflex-array-member-not-at-end warnings
Gustavo A. R. Silva [Mon, 5 Aug 2024 15:28:55 +0000 (09:28 -0600)] 
ASoC: SOF: sof-audio: Avoid -Wflex-array-member-not-at-end warnings

-Wflex-array-member-not-at-end was introduced in GCC-14, and we are
getting ready to enable it, globally.

Move the conflicting declaration to the end of the structure. Notice
that `struct snd_sof_pcm` ends in a flexible-array member through
`struct snd_soc_tplg_pcm` -> `struct snd_soc_tplg_private`.

Whith this, fix the following warnings:
sound/soc/sof/sof-audio.h:350:33: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
./include/trace/events/../../../sound/soc/sof/sof-audio.h:350:33: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
sound/soc/amd/../sof/amd/../sof-audio.h:350:33: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
sound/soc/sof/amd/../sof-audio.h:350:33: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
sound/soc/sof/intel/../sof-audio.h:350:33: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
sound/soc/sof/mediatek/mt8186/../../sof-audio.h:350:33: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
sound/soc/sof/mediatek/mt8195/../../sof-audio.h:350:33: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://patch.msgid.link/ZrDvt6eyeFyajq6l@cute
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: amd: acp: add ZSC control register programming sequence
Vijendar Mukunda [Wed, 7 Aug 2024 08:51:48 +0000 (14:21 +0530)] 
ASoC: amd: acp: add ZSC control register programming sequence

Add ZSC Control register programming sequence for ACP D0 and D3 state
transitions for ACP7.0 onwards. This will allow ACP to enter low power
state when ACP enters D3 state. When ACP enters D0 State, ZSC control
should be disabled.

Tested-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20240807085154.1987681-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: amd: acp: remove MODULE_ALIAS for SoundWire machine driver
Vijendar Mukunda [Wed, 7 Aug 2024 05:08:39 +0000 (10:38 +0530)] 
ASoC: amd: acp: remove MODULE_ALIAS for SoundWire machine driver

As module device table added for AMD SoundWire machine driver MODULE_ALIAS
is not required. Remove MODULE_ALIAS for AMD SoundWire machine driver.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20240807050846.1616725-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: ES8326: input issue after init
Zhang Yi [Wed, 7 Aug 2024 02:53:56 +0000 (10:53 +0800)] 
ASoC: codecs: ES8326: input issue after init

We found an input issue after initiation.So we added the default
input source at initiation.

Signed-off-by: Zhang Yi <zhangyi@everest-semi.com>
Link: https://patch.msgid.link/20240807025356.24904-3-zhangyi@everest-semi.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: cs35l56: Use regmap_read_bypassed() to wake the device
Simon Trimmer [Wed, 7 Aug 2024 14:27:15 +0000 (14:27 +0000)] 
ASoC: cs35l56: Use regmap_read_bypassed() to wake the device

Now that regmap_read_bypassed() has been added to the kernel it is
preferable to wake the device with a read rather than a write as the
utility function can be called at a time before the device has been
identified.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Link: https://patch.msgid.link/20240807142715.47077-1-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Merge fixes
Mark Brown [Thu, 8 Aug 2024 08:14:57 +0000 (09:14 +0100)] 
ASoC: Merge fixes

So we can apply AMD patches that rely on them.

10 months agoASoC: tas*: Drop unused GPIO includes
Linus Walleij [Wed, 7 Aug 2024 15:02:34 +0000 (17:02 +0200)] 
ASoC: tas*: Drop unused GPIO includes

These drivers all use <linux/gpio/consumer.h> and has no business
including the legacy headers <linux/gpio.h> or <linux/of_gpio.h>.
Drop the surplus includes.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patch.msgid.link/20240807-asoc-tas-gpios-v2-3-bd0f2705d58b@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: tas2781-i2c: Get the right GPIO line
Linus Walleij [Wed, 7 Aug 2024 15:02:33 +0000 (17:02 +0200)] 
ASoC: tas2781-i2c: Get the right GPIO line

The code is obtaining a GPIO reset using the reset GPIO
name "reset-gpios", but the gpiolib is already adding the
suffix "-gpios" to anything passed to this function and
will be looking for "reset-gpios-gpios" which is most
certainly not what the author desired.

Fix it up.

Fixes: ef3bcde75d06 ("ASoC: tas2781: Add tas2781 driver")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patch.msgid.link/20240807-asoc-tas-gpios-v2-2-bd0f2705d58b@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: tas2781-i2c: Drop weird GPIO code
Linus Walleij [Wed, 7 Aug 2024 15:02:32 +0000 (17:02 +0200)] 
ASoC: tas2781-i2c: Drop weird GPIO code

The tas2781-i2c driver gets an IRQ from either ACPI or device tree,
then proceeds to check if the IRQ has a corresponding GPIO and in
case it does enforce the GPIO as input and set a label on it.

This is abuse of the API:

- First we cannot guarantee that the numberspaces of the GPIOs and
  the IRQs are the same, i.e that an IRQ number corresponds to
  a GPIO number like that.

- Second, GPIO chips and IRQ chips should be treated as orthogonal
  APIs, the irqchip needs to ascertain that the backing GPIO line
  is set to input etc just using the irqchip.

- Third it is using the legacy <linux/gpio.h> API which should not
  be used in new code yet this was added just a year ago.

Delete the offending code.

If this creates problems the GPIO and irqchip maintainers can help
to fix the issues.

It *should* not create any problems, because the irq isn't
used anywhere in the driver, it's just obtained and then
left unused.

Fixes: ef3bcde75d06 ("ASoC: tas2781: Add tas2781 driver")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patch.msgid.link/20240807-asoc-tas-gpios-v2-1-bd0f2705d58b@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: remove bespoke trigger support
Kuninori Morimoto [Tue, 6 Aug 2024 00:00:57 +0000 (00:00 +0000)] 
ASoC: remove bespoke trigger support

Bespoke trigger support was added when Linux v3.5 by this patch.

commit 07bf84aaf736781a283b1bd36eaa911453b14574
("ASoC: dpcm: Add bespoke trigger()")

test-component driver is using it, but this is because it indicates used
function for debug/trace purpose. Except test-component driver, bespoke
trigger has never been used over 10 years in upstream.

We can re-support it if needed in the future, but let's remove it for now,
because it just noise in upstream.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87v80ewmdi.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Extend wm_adsp so cs35l56 can suppress controls
Mark Brown [Tue, 6 Aug 2024 12:42:45 +0000 (13:42 +0100)] 
ASoC: Extend wm_adsp so cs35l56 can suppress controls

Merge series from Simon Trimmer <simont@opensource.cirrus.com>:

This pair of patches extend wm_adsp to add a callback that can be used
to control whether ALSA controls are added and then tweak cs35l56 to use
it to suppress controls made from firmware coefficients.

10 months agoASoC: cs35l56: Handle OTP read latency over SoundWire
Richard Fitzgerald [Mon, 5 Aug 2024 14:08:39 +0000 (15:08 +0100)] 
ASoC: cs35l56: Handle OTP read latency over SoundWire

Use the late-read buffer in the CS35L56 SoundWire interface to
read OTP memory.

The OTP memory has a longer access latency than chip registers
and cannot guarantee to return the data value in the SoundWire
control response if the bus clock is >4.8 MHz. The Cirrus
SoundWire peripheral IP exposes the bridge-to-bus read buffer
and status bits. For a read from OTP the bridge status bits are
polled to wait for the OTP data to be loaded into the read buffer
and the data is then read from there.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: e1830f66f6c6 ("ASoC: cs35l56: Add helper functions for amp calibration")
Link: https://patch.msgid.link/20240805140839.26042-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: lpass-macro: fix missing codec version
Johan Hovold [Mon, 29 Jul 2024 13:13:51 +0000 (15:13 +0200)] 
ASoC: codecs: lpass-macro: fix missing codec version

Recent changes that started checking the codec version broke audio on
the Lenovo ThinkPad X13s:

wsa_macro 3240000.codec: Unsupported Codec version (0)
wsa_macro 3240000.codec: probe with driver wsa_macro failed with error -22
rx_macro 3200000.rxmacro: Unsupported Codec version (0)
rx_macro 3200000.rxmacro: probe with driver rx_macro failed with error -22

Add the missing codec version to the lookup table so that the codec
drivers probe successfully.

Note that I'm just assuming that this is a 2.0 codec based on the fact
that this device uses the older register layout.

Fixes: 378918d59181 ("ASoC: codecs: lpass-macro: add helpers to get codec version")
Fixes: dbacef05898d ("ASoC: codec: lpass-rx-macro: prepare driver to accomdate new codec versions")
Fixes: 727de4fbc546 ("ASoC: codecs: lpass-wsa-macro: Correct support for newer v2.5 version")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20240729131351.27886-1-johan+linaro@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: cs-amp-lib: Fix NULL pointer crash if efi.get_variable is NULL
Richard Fitzgerald [Mon, 5 Aug 2024 11:42:22 +0000 (12:42 +0100)] 
ASoC: cs-amp-lib: Fix NULL pointer crash if efi.get_variable is NULL

Call efi_rt_services_supported() to check that efi.get_variable exists
before calling it.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: 1cad8725f2b9 ("ASoC: cs-amp-lib: Add helpers for factory calibration data")
Link: https://patch.msgid.link/20240805114222.15722-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: cs35l56: Stop creating ALSA controls for firmware coefficients
Simon Trimmer [Mon, 5 Aug 2024 10:27:21 +0000 (10:27 +0000)] 
ASoC: cs35l56: Stop creating ALSA controls for firmware coefficients

A number of laptops have gone to market with old firmware versions that
export controls that have since been hidden, but we can't just install a
newer firmware because the firmware for each product is customized and
qualified by the OEM. The issue is that alsactl save and restore has no
idea what controls are good to persist which can lead to
misconfiguration.

There is no reason that the UCM or user should need to interact with any
of the ALSA controls for the firmware coefficients so they can be
removed entirely.

Fixes: e49611252900 ("ASoC: cs35l56: Add driver for Cirrus Logic CS35L56")
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Link: https://patch.msgid.link/20240805102721.30102-3-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: wm_adsp: Add control_add callback and export wm_adsp_control_add()
Simon Trimmer [Mon, 5 Aug 2024 10:27:20 +0000 (10:27 +0000)] 
ASoC: wm_adsp: Add control_add callback and export wm_adsp_control_add()

The callback allows codec drivers to affect how firmware coefficients
are added as controls.

For example a codec driver may selectively add controls by choosing to
call wm_adsp_control_add() based on some filter logic.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Link: https://patch.msgid.link/20240805102721.30102-2-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC/SOF/PCI/Intel: add PantherLake support
Mark Brown [Fri, 2 Aug 2024 21:26:55 +0000 (22:26 +0100)] 
ASoC/SOF/PCI/Intel: add PantherLake support

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

Add initial support for the PantherLake platform, and initial ACPI
configurations.

10 months agoASoC: SOF: reshuffle and optimize structures
Mark Brown [Fri, 2 Aug 2024 21:26:47 +0000 (22:26 +0100)] 
ASoC: SOF: reshuffle and optimize structures

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

pahole reports a number of sub-optimal structure definitions with
holes and cache-line alignment problems, this patchset optimizes a
couple of structure frequently used.

No functionality change, only re-ordering of structure members.

10 months agoASoC: cs43130: Constify snd_soc_component_driver struct
Christophe JAILLET [Mon, 29 Jul 2024 17:36:05 +0000 (19:36 +0200)] 
ASoC: cs43130: Constify snd_soc_component_driver struct

In order to constify `snd_soc_component_driver` struct, duplicate
`soc_component_dev_cs43130` into a `soc_component_dev_cs43130_digital` and
`soc_component_dev_cs43130_analog`.

These 2 new structures share the same .dapm_widgets and .dapm_routes
arrays but differ for .num_dapm_widgets and .num_dapm_routes.

In the digital case, the last entries are not taken into account.

Doing so has several advantages:
  - `snd_soc_component_driver` can be declared as const to move their
    declarations to read-only sections.
  - code in the probe is simpler. There is no need to concatenate some
    arrays to handle the "analog" case
  - this saves some memory because all_hp_widgets and analog_hp_routes can
    be removed.

Before :
======
   text    data     bss     dec     hex filename
  53965    8265    4512   66742   104b6 sound/soc/codecs/cs43130.o

After :
=====
   text    data     bss     dec     hex filename
  54409    7881      64   62354    f392 sound/soc/codecs/cs43130.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://patch.msgid.link/1f04bb0366d9640d7ee361dae114ff79e4b381c1.1722274212.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: fsl: lpc3xxx: Make some symbols static
Yue Haibing [Fri, 2 Aug 2024 10:10:44 +0000 (18:10 +0800)] 
ASoC: fsl: lpc3xxx: Make some symbols static

These symbols are not used outside of the files, make them static to fix
sparse warnings:

sound/soc/fsl/lpc3xxx-i2s.c:261:30: warning: symbol 'lpc3xxx_i2s_dai_ops' was not declared. Should it be static?
sound/soc/fsl/lpc3xxx-i2s.c:271:27: warning: symbol 'lpc3xxx_i2s_dai_driver' was not declared. Should it be static?
sound/soc/fsl/lpc3xxx-pcm.c:55:39: warning: symbol 'lpc3xxx_soc_platform_driver' was not declared. Should it be static?

Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Link: https://patch.msgid.link/20240802101044.3302251-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: sti-sas: Constify snd_soc_component_driver struct
Christophe JAILLET [Thu, 1 Aug 2024 20:30:05 +0000 (22:30 +0200)] 
ASoC: sti-sas: Constify snd_soc_component_driver struct

In order to constify `snd_soc_component_driver` struct, simplify the logic
and the `sti_sas_dev_data` struct.

Since commit 165a57a3df02 ("ASoC: sti-sas: clean legacy in sti-sas") only
only chip is supported and `sti_sas_driver` can be fully defined at
compilation time.

Before:
======
   text    data     bss     dec     hex filename
   8033    1547      16    9596    257c sound/soc/codecs/sti-sas.o

After:
=====
   text    data     bss     dec     hex filename
   8257    1163      16    9436    24dc sound/soc/codecs/sti-sas.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://patch.msgid.link/2c08558813e3bbfae0a5302199cf6ca226e7cde1.1722544073.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: tas2781: Fix a compiling warning reported by robot kernel test due to adding...
Shenghao Ding [Fri, 2 Aug 2024 07:20:52 +0000 (15:20 +0800)] 
ASoC: tas2781: Fix a compiling warning reported by robot kernel test due to adding tas2563_dvc_table

Move tas2563_dvc_table into a separate Header file, as only tas2781
codec driver use this table, and hda side codec driver won't use it.

Fixes: 75ed63a5ab5d ("ASoC: tas2781: Add new Kontrol to set tas2563 digital Volume")
Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://patch.msgid.link/20240802072055.1462-1-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: SOF: sof-audio.h: optimize snd_sof_pcm_stream_pipeline_list
Pierre-Louis Bossart [Fri, 2 Aug 2024 12:46:09 +0000 (14:46 +0200)] 
ASoC: SOF: sof-audio.h: optimize snd_sof_pcm_stream_pipeline_list

Invert members to remove hole.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20240802124609.188954-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: SOF: sof-priv.h: optimize snd_sof_ipc_msg
Pierre-Louis Bossart [Fri, 2 Aug 2024 12:46:08 +0000 (14:46 +0200)] 
ASoC: SOF: sof-priv.h: optimize snd_sof_ipc_msg

Move waitq to make sure it's entirely in the same cache line, and move
ipc_complete to reduce padding.

struct snd_sof_ipc_msg {
void *                     msg_data;             /*     0     8 */
void *                     reply_data;           /*     8     8 */
size_t                     msg_size;             /*    16     8 */
size_t                     reply_size;           /*    24     8 */
int                        reply_error;          /*    32     4 */
bool                       ipc_complete;         /*    36     1 */

/* XXX 3 bytes hole, try to pack */

wait_queue_head_t          waitq;                /*    40    88 */
/* --- cacheline 2 boundary (128 bytes) --- */
void *                     rx_data;              /*   128     8 */

/* size: 136, cachelines: 3, members: 8 */
/* sum members: 133, holes: 1, sum holes: 3 */
/* last cacheline: 8 bytes */
};

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20240802124609.188954-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: SOF: sof-priv.h: optimize snd_sof_mailbox
Pierre-Louis Bossart [Fri, 2 Aug 2024 12:46:07 +0000 (14:46 +0200)] 
ASoC: SOF: sof-priv.h: optimize snd_sof_mailbox

Reverse the two members to remove a hole.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20240802124609.188954-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: SOF: sof-priv.h: optimize snd_sof_platform_stream_params
Pierre-Louis Bossart [Fri, 2 Aug 2024 12:46:06 +0000 (14:46 +0200)] 
ASoC: SOF: sof-priv.h: optimize snd_sof_platform_stream_params

reshuffle members to remove hole.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20240802124609.188954-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: soc-acpi-intel-ptl-match: Add rt722 support
Bard Liao [Fri, 2 Aug 2024 12:40:11 +0000 (14:40 +0200)] 
ASoC: Intel: soc-acpi-intel-ptl-match: Add rt722 support

This patch adds match table for rt722 multiple function codec on link
0 and link3.

The topology does not internally refer to link0 or link3, so we can
simplify and use the same topology file name. We do need different
tables though.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240802124011.173820-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: soc-acpi-intel-ptl-match: add rt711-sdca table
Bard Liao [Fri, 2 Aug 2024 12:40:10 +0000 (14:40 +0200)] 
ASoC: Intel: soc-acpi-intel-ptl-match: add rt711-sdca table

Add rt711-sdca on sdw link0.

Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240802124011.173820-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: SOF: Intel: add initial support for PTL
Pierre-Louis Bossart [Fri, 2 Aug 2024 12:40:09 +0000 (14:40 +0200)] 
ASoC: SOF: Intel: add initial support for PTL

Clone LNL for now.

Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240802124011.173820-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: SOF: Intel: add PTL specific power control register
Fred Oh [Fri, 2 Aug 2024 12:40:08 +0000 (14:40 +0200)] 
ASoC: SOF: Intel: add PTL specific power control register

PTL has some differences from MTL/LNL. Need to use different register
to power up.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240802124011.173820-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: soc-acpi: add PTL match tables
Pierre-Louis Bossart [Fri, 2 Aug 2024 12:40:07 +0000 (14:40 +0200)] 
ASoC: Intel: soc-acpi: add PTL match tables

For now the tables are basic for mockup devices and headset codec support

Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240802124011.173820-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: cs42l43: Cache shutter IRQ control pointers
Charles Keepax [Fri, 2 Aug 2024 10:57:34 +0000 (11:57 +0100)] 
ASoC: cs42l43: Cache shutter IRQ control pointers

The microphone/speaker privacy shutter ALSA control handlers need to
call pm_runtime_resume, since the hardware needs to be powered up to
check the hardware state of the shutter. The IRQ handler for the
shutters also needs to notify the ALSA control to inform user-space
the shutters updated. However this leads to a mutex inversion,
between the sdw_dev_lock and the controls_rwsem.

To avoid this mutex inversion cache the kctl pointers before the IRQ
handler, which avoids the need to lookup the control and take the
controls_rwsem.

Suggested-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20240802105734.2309788-5-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: cs35l45: Use new snd_soc_component_get_kcontrol_locked() helper
Charles Keepax [Fri, 2 Aug 2024 10:57:33 +0000 (11:57 +0100)] 
ASoC: cs35l45: Use new snd_soc_component_get_kcontrol_locked() helper

No longer any need to hard code the addition of the name prefix, use the
new helper function.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20240802105734.2309788-4-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: soc-component: Add new snd_soc_component_get_kcontrol() helpers
Charles Keepax [Fri, 2 Aug 2024 10:57:32 +0000 (11:57 +0100)] 
ASoC: soc-component: Add new snd_soc_component_get_kcontrol() helpers

Add new helper functions snd_soc_component_get_kcontrol() and
snd_soc_component_get_kcontrol_locked() that returns a kcontrol
by name, but will factor in the components name_prefix, to handle
situations where multiple components are present with the same
controls.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20240802105734.2309788-3-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: cs42l43: Remove redundant semi-colon at end of function
Charles Keepax [Fri, 2 Aug 2024 10:57:31 +0000 (11:57 +0100)] 
ASoC: cs42l43: Remove redundant semi-colon at end of function

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20240802105734.2309788-2-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoALSA/ASoC: use snd_pcm_direction_name()
Mark Brown [Thu, 1 Aug 2024 19:15:22 +0000 (20:15 +0100)] 
ALSA/ASoC: use snd_pcm_direction_name()

Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

Many drivers are selecting strings "playback" / "capture" by own
handling, but we have snd_pcm_direction_name() function for it.
This patch use it.

One note is that snd_pcm_direction_name() will select
"Playback" and "Capture", instead of "playback" / "capture".
Almost all drivers are using it as dev_dbg() or dev_err()
so no problem. But some other drivers are using it as other
purpose. It might be issue (?). For example ASoC debugfs dir name
will be changed by this patch.

10 months agoAMD SOF based generic SoundWire machine driver
Mark Brown [Thu, 1 Aug 2024 15:50:43 +0000 (16:50 +0100)] 
AMD SOF based generic SoundWire machine driver

Merge series from Vijendar Mukunda <Vijendar.Mukunda@amd.com>:

This patch series majorly consists of below changes.
- Rename structures, macros and codec helper names used in Intel
SoundWire generic driver to make it generic.
- Move Intel SoundWire driver common structures, macros and codec
helper functions to common placeholder so that it can be used by
other platform machine driver.
- Refactor few SoundWire common codec helper functions.
- AMD SOF based generic SoundWire machine driver for ACP 6.3 variant.

This work started a couple of months ago to avoid duplication of code
that wasn't really Intel-specific in the "sof_sdw" machine driver.
The code went through multiple iterations, was tested for multiple weeks
and a couple of build issues reported by the Intel kbuild bots were
corrected.

This is the initial version of SoundWire machine driver for AMD
platforms. Additional code refactoring will be done in the next step on
the AMD side.

Link: https://github.com/thesofproject/linux/pull/5068
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
10 months agoASoC: soc-dapm: use snd_pcm_direction_name()
Kuninori Morimoto [Tue, 30 Jul 2024 02:06:16 +0000 (02:06 +0000)] 
ASoC: soc-dapm: use snd_pcm_direction_name()

We already have snd_pcm_direction_name(). Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87frrrk50n.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: soc-pcm: use snd_pcm_direction_name()
Kuninori Morimoto [Tue, 30 Jul 2024 02:06:10 +0000 (02:06 +0000)] 
ASoC: soc-pcm: use snd_pcm_direction_name()

We already have snd_pcm_direction_name(). Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87h6c7k50t.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: tegra: use snd_pcm_direction_name()
Kuninori Morimoto [Tue, 30 Jul 2024 02:06:03 +0000 (02:06 +0000)] 
ASoC: tegra: use snd_pcm_direction_name()

We already have snd_pcm_direction_name(). Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87ikwnk510.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: fsl: lpc3xxx-i2s: use snd_pcm_direction_name()
Kuninori Morimoto [Tue, 30 Jul 2024 02:05:58 +0000 (02:05 +0000)] 
ASoC: fsl: lpc3xxx-i2s: use snd_pcm_direction_name()

We already have snd_pcm_direction_name(). Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87jzh3k515.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: sof: intel: use snd_pcm_direction_name()
Kuninori Morimoto [Tue, 30 Jul 2024 02:05:53 +0000 (02:05 +0000)] 
ASoC: sof: intel: use snd_pcm_direction_name()

We already have snd_pcm_direction_name(). Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87le1jk51b.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: sof: pcm: use snd_pcm_direction_name()
Kuninori Morimoto [Tue, 30 Jul 2024 02:05:46 +0000 (02:05 +0000)] 
ASoC: sof: pcm: use snd_pcm_direction_name()

We already have snd_pcm_direction_name(). Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87mslzk51h.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: stm: use snd_pcm_direction_name()
Kuninori Morimoto [Tue, 30 Jul 2024 02:05:39 +0000 (02:05 +0000)] 
ASoC: stm: use snd_pcm_direction_name()

We already have snd_pcm_direction_name(). Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87o76fk51p.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Use of_property_read_bool()
Rob Herring (Arm) [Wed, 31 Jul 2024 19:12:58 +0000 (13:12 -0600)] 
ASoC: Use of_property_read_bool()

Use of_property_read_bool() to read boolean properties rather than
of_get_property(). This is part of a larger effort to remove callers
of of_get_property() and similar functions. of_get_property() leaks
the DT property data pointer which is a problem for dynamically
allocated nodes which may be freed.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20240731191312.1710417-20-robh@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Use of_property_present()
Rob Herring (Arm) [Wed, 31 Jul 2024 19:12:57 +0000 (13:12 -0600)] 
ASoC: Use of_property_present()

Use of_property_present() to test for property presence rather than
of_get_property(). This is part of a larger effort to remove callers
of of_get_property() and similar functions. of_get_property() leaks
the DT property data pointer which is a problem for dynamically
allocated nodes which may be freed.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20240731191312.1710417-19-robh@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: amd/sdw_utils: add sof based soundwire generic machine driver
Vijendar Mukunda [Thu, 1 Aug 2024 11:18:17 +0000 (16:48 +0530)] 
ASoC: amd/sdw_utils: add sof based soundwire generic machine driver

Add sof based Soundwire generic driver for amd platforms.
Currently support added for ACP6.3 based platforms.

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801111821.18076-11-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: SOF: amd: update mach params subsystem_rev variable
Vijendar Mukunda [Thu, 1 Aug 2024 11:18:16 +0000 (16:48 +0530)] 
ASoC: SOF: amd: update mach params subsystem_rev variable

Add pci_rev variable in acp sof driver private data structure and assign
this value to mach_params structure subsystem_rev variable.

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801111821.18076-10-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: SOF: amd: add alternate machines for acp6.3 based platform
Vijendar Mukunda [Thu, 1 Aug 2024 11:18:15 +0000 (16:48 +0530)] 
ASoC: SOF: amd: add alternate machines for acp6.3 based platform

Add SoundWire machines as alternate machines for acp6.3 based platform.

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801111821.18076-9-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: amd: acp: add soundwire machines for acp6.3 based platform
Vijendar Mukunda [Thu, 1 Aug 2024 11:18:14 +0000 (16:48 +0530)] 
ASoC: amd: acp: add soundwire machines for acp6.3 based platform

Add Soundwire machines for acp6.3 based platform.

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801111821.18076-8-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: soc-acpi: add pci revision id field in mach params structure
Vijendar Mukunda [Thu, 1 Aug 2024 11:18:13 +0000 (16:48 +0530)] 
ASoC: soc-acpi: add pci revision id field in mach params structure

Few IP's may have same PCI vendor id and device id and
different revision id. Add revision id field to the
'snd_soc_acpi_mach_params' so that using this field platform
specific implementation can be added in machine driver.

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801111821.18076-7-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: intel/sdw_utils: refactor init_dai_link() and init_simple_dai_link()
Vijendar Mukunda [Thu, 1 Aug 2024 11:18:12 +0000 (16:48 +0530)] 
ASoC: intel/sdw_utils: refactor init_dai_link() and init_simple_dai_link()

To make it generic, refactor existing implementation for
init_dai_link() and init_simple_dai_link() as mentioned below.
- Move init_dai_link() and init_simple_dai_link() to common place holder
- Rename the functions with "asoc_sdw" as prefix.
- Pass the platform specific 'platform_component' structure and its size as
arguments for init_simple_dai_link() function and allocate one more
extra dlc for platform component.
- Pass the 'platform_component' and 'num_platforms' as arguments for
init_dai_link().

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801111821.18076-6-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: sdw_utils: refactor sof_sdw_card_late_probe function
Vijendar Mukunda [Thu, 1 Aug 2024 11:18:11 +0000 (16:48 +0530)] 
ASoC: sdw_utils: refactor sof_sdw_card_late_probe function

Refactor sof_sdw_card_late_probe() function and derive a generic
function soc_sdw_card_late_probe() function which can be used by
SoundWire generic machine driver.

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801111821.18076-5-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: intel/sdw_utils: move machine driver dai link helper functions
Vijendar Mukunda [Thu, 1 Aug 2024 11:18:10 +0000 (16:48 +0530)] 
ASoC: intel/sdw_utils: move machine driver dai link helper functions

Move machine driver dai link helper functions to common place holder,
So that it can be used by other platform machine driver.
Rename these functions with "asoc_sdw" tag as a prefix.

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801111821.18076-4-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: intel/sdw_utils: move soundwire codec_info_list structure
Vijendar Mukunda [Thu, 1 Aug 2024 11:18:09 +0000 (16:48 +0530)] 
ASoC: intel/sdw_utils: move soundwire codec_info_list structure

SoundWire 'codec_info_list' structure is not a platform specific one.
Move codec_info_list structure to common file soc_sdw_utils.c.
Move codec helper functions which uses codec_info_list structure to common
place holder and rename the function by adding _sdw tag. This will allow
to use 'codec_info_list' structure and it's helper functions in other
platform machine driver.

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801111821.18076-3-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: intel/sdw_utils: move soundwire dai type macros
Vijendar Mukunda [Thu, 1 Aug 2024 11:18:08 +0000 (16:48 +0530)] 
ASoC: intel/sdw_utils: move soundwire dai type macros

Move SoundWire dai type macros to common header file(soc_sdw_util.h).
So that these macros will be used by other platform machine driver.

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801111821.18076-2-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: intel/sdw_utils: move dai id common macros
Vijendar Mukunda [Thu, 1 Aug 2024 11:18:07 +0000 (16:48 +0530)] 
ASoC: intel/sdw_utils: move dai id common macros

Move dai id common macros from intel SoundWire generic driver to
soc_sdw_utils.h file so that it can be used by other platform machine
driver.

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801111821.18076-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: intel/sdw_utils: move maxim codec helper functions
Vijendar Mukunda [Thu, 1 Aug 2024 09:14:35 +0000 (14:44 +0530)] 
ASoC: intel/sdw_utils: move maxim codec helper functions

Move maxim codec helper functions to common place holder so that
it can be used by other platform machine driver.

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801091446.10457-21-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: intel/sdw_utils: move cirrus soundwire codec helper functions
Vijendar Mukunda [Thu, 1 Aug 2024 09:14:34 +0000 (14:44 +0530)] 
ASoC: intel/sdw_utils: move cirrus soundwire codec helper functions

To make it generic, move Cirrus Soundwire codec helper functions to
common place holder so that it can be used by other platform machine
driver.

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801091446.10457-20-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: intel/sdw_utils: move rtk amp codec helper functions
Vijendar Mukunda [Thu, 1 Aug 2024 09:14:33 +0000 (14:44 +0530)] 
ASoC: intel/sdw_utils: move rtk amp codec helper functions

Move RTK amp codec helper functions related implementation to common
place holder to make it generic so that these helper functions will be
used by other platform machine driver modules.

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801091446.10457-19-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: intel/sdw_utils: move rt700 and rt711 codec helper functions
Vijendar Mukunda [Thu, 1 Aug 2024 09:14:32 +0000 (14:44 +0530)] 
ASoC: intel/sdw_utils: move rt700 and rt711 codec helper functions

Move RT700 and RT711 Soundwire codec helper functions to common
place holder so that it can be used by other platform machine driver.

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801091446.10457-18-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: intel/sdw_utils: move rtk jack common helper functions
Vijendar Mukunda [Thu, 1 Aug 2024 09:14:31 +0000 (14:44 +0530)] 
ASoC: intel/sdw_utils: move rtk jack common helper functions

Move RTK codec jack common helper functions to common place holder
(sdw_utils folder) to make it generic so that it will be used by
other platform machine driver code.

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801091446.10457-17-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: intel/sdw_utils: move rt5682 codec helper function
Vijendar Mukunda [Thu, 1 Aug 2024 09:14:30 +0000 (14:44 +0530)] 
ASoC: intel/sdw_utils: move rt5682 codec helper function

Move rt5682 sdw codec helper function to common place holder to make it
generic.

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801091446.10457-16-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: intel: split soundwire machine driver private data
Vijendar Mukunda [Thu, 1 Aug 2024 09:14:29 +0000 (14:44 +0530)] 
ASoC: intel: split soundwire machine driver private data

Split intel generic SoundWire machine driver private data into two
structures. One structure is generic one which can be used by other
platform machine driver and the other one is intel specific one.
Move generic machine driver private data to soc_sdw_utils.h.
Define a void pointer in generic machine driver private data structure
and assign the vendor specific structure in mc_probe() call.

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801091446.10457-15-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: intel/sdw_utils: move rt722 sdca helper functions
Vijendar Mukunda [Thu, 1 Aug 2024 09:14:28 +0000 (14:44 +0530)] 
ASoC: intel/sdw_utils: move rt722 sdca helper functions

Move RT722 SDCA codec helper file to sdw_utils folder to make it generic.

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801091446.10457-14-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: intel/sdw_utils: move rt712 sdca helper functions
Vijendar Mukunda [Thu, 1 Aug 2024 09:14:27 +0000 (14:44 +0530)] 
ASoC: intel/sdw_utils: move rt712 sdca helper functions

Move RT712 SDCA codec helper file to sdw_utils folder so that these
helper functions can be used by other platform machine drivers.

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801091446.10457-13-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: intel/sdw_utils: move rtk dmic helper functions
Vijendar Mukunda [Thu, 1 Aug 2024 09:14:26 +0000 (14:44 +0530)] 
ASoC: intel/sdw_utils: move rtk dmic helper functions

Move rtk SoundWire dmic helper functions implementation to sdw_utils
folder to make it generic.

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801091446.10457-12-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: intel/sdw_utils: move dmic codec helper function
Vijendar Mukunda [Thu, 1 Aug 2024 09:14:25 +0000 (14:44 +0530)] 
ASoC: intel/sdw_utils: move dmic codec helper function

Move generic dmic codec helper function implementation to
sdw_utils folder so that this function can be used by other platform
machine drivers.

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801091446.10457-11-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: intel/sdw_utils: move soundwire machine driver helper functions
Vijendar Mukunda [Thu, 1 Aug 2024 09:14:24 +0000 (14:44 +0530)] 
ASoC: intel/sdw_utils: move soundwire machine driver helper functions

Move below Intel SoundWire machine driver helper functions to
soc_sdw_utils.c file so that it can be used by other platform machine
driver.
- asoc_sdw_is_unique_device()
- asoc_sdw_get_codec_name()

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801091446.10457-10-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: intel: move soundwire machine driver common structures
Vijendar Mukunda [Thu, 1 Aug 2024 09:14:23 +0000 (14:44 +0530)] 
ASoC: intel: move soundwire machine driver common structures

Move intel generic SoundWire machine driver common structures to
soc_sdw_utils.h file. These structures will be used in other platform
SoundWire machine driver code.

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801091446.10457-9-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: intel/sdw-utils: move soundwire machine driver soc ops
Vijendar Mukunda [Thu, 1 Aug 2024 09:14:22 +0000 (14:44 +0530)] 
ASoC: intel/sdw-utils: move soundwire machine driver soc ops

Move Intel SoundWire generic machine driver soc ops to common place
so that it can be used by other platform machine driver.

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801091446.10457-8-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: intel: rename ignore_pch_dmic variable name
Vijendar Mukunda [Thu, 1 Aug 2024 09:14:21 +0000 (14:44 +0530)] 
ASoC: intel: rename ignore_pch_dmic variable name

Rename 'ignore_pch_dmic' variable name as 'ignore_internal_dmic'.
This variable will be moved to common header file and will be used by other
platform machine driver code.

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801091446.10457-7-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: intel: rename maxim codec macros
Vijendar Mukunda [Thu, 1 Aug 2024 09:14:20 +0000 (14:44 +0530)] 
ASoC: intel: rename maxim codec macros

Rename maxim codec part id macros.

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801091446.10457-6-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: intel: rename soundwire codec helper functions
Vijendar Mukunda [Thu, 1 Aug 2024 09:14:19 +0000 (14:44 +0530)] 
ASoC: intel: rename soundwire codec helper functions

Rename SoundWire codec helper functions with "asoc_sdw" tag.

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801091446.10457-5-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: intel: rename soundwire machine driver soc ops
Vijendar Mukunda [Thu, 1 Aug 2024 09:14:18 +0000 (14:44 +0530)] 
ASoC: intel: rename soundwire machine driver soc ops

Rename Soundwire generic machine driver soc ops with tag "asoc".

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801091446.10457-4-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: intel: rename soundwire common header macros
Vijendar Mukunda [Thu, 1 Aug 2024 09:14:17 +0000 (14:44 +0530)] 
ASoC: intel: rename soundwire common header macros

Rename sof quirk macros, dai type and dai link macros with "SOC_SDW" tag.

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801091446.10457-3-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: intel: rename codec_info and dai_info structures names
Vijendar Mukunda [Thu, 1 Aug 2024 09:14:16 +0000 (14:44 +0530)] 
ASoC: intel: rename codec_info and dai_info structures names

To make it generic, rename structure 'sof_sdw_codec_info' as
'asoc_sdw_codec_info' and 'sof_sdw_dai_info' as 'asoc_sdw_dai_info'.
These structures will be moved to common header file so that it can
be used by other platform machine driver.

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801091446.10457-2-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: SOF: Remove libraries from topology lookups
Curtis Malainey [Wed, 31 Jul 2024 21:21:44 +0000 (14:21 -0700)] 
ASoC: SOF: Remove libraries from topology lookups

Default firmware shipped in open source are not licensed for 3P
libraries, therefore topologies should not reference them.

If a OS wants to use 3P (that they have licensed) then they should use
the appropriate topology override mechanisms.

Fixes: 8a7d5d85ed2161 ("ASoC: SOF: mediatek: mt8195: Add devicetree support to select topologies")
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Cc: Wojciech Macek <wmacek@google.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patch.msgid.link/20240731212153.921327-1-cujomalainey@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: nau8822: Lower debug print priority
Francesco Dolcini [Wed, 31 Jul 2024 11:48:28 +0000 (13:48 +0200)] 
ASoC: nau8822: Lower debug print priority

NAU8822 codec PLL parameters are not an information that the general
user should care about, this print is supposed to be used for debugging,
adjust the debug print priority accordingly.

Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Link: https://patch.msgid.link/20240731114828.61238-1-francesco@dolcini.it
Signed-off-by: Mark Brown <broonie@kernel.org>