linux-2.6-block.git
9 months agoASoC: cs42l43: Allow HP amp to cool off after current limit
Charles Keepax [Mon, 11 Dec 2023 16:00:19 +0000 (16:00 +0000)]
ASoC: cs42l43: Allow HP amp to cool off after current limit

Whilst occasional current limiting is fine, constant current limiting
should be avoided. Add a back off system that will disable the
headphone amp, if a lot of current limiting is seen in a short window
of time.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://msgid.link/r/20231211160019.2034442-2-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: codec: wsa884x: make use of new mute_unmute_on_trigger flag
Neil Armstrong [Mon, 11 Dec 2023 11:40:57 +0000 (12:40 +0100)]
ASoC: codec: wsa884x: make use of new mute_unmute_on_trigger flag

This fix is based on commit [1] fixing click and pop sounds during
SoundWire port start because PA is left unmuted.

making use of new mute_unmute_on_trigger flag and removing unmute
at PA setup, removes the Click/Pop issue at SoundWire enable.

[1] 805ce81826c8 ("ASoC: codecs: wsa883x: make use of new mute_unmute_on_trigger flag")

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20231211-topic-sm8x50-upstream-wsa884x-fix-plop-v1-1-0dc630a19172@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: dt-bindings: qcom,lpass-wsa-macro: Add SM8650 LPASS WSA
Krzysztof Kozlowski [Wed, 29 Nov 2023 11:30:14 +0000 (12:30 +0100)]
ASoC: dt-bindings: qcom,lpass-wsa-macro: Add SM8650 LPASS WSA

Add bindings for Qualcomm SM8650 Low Power Audio SubSystem (LPASS) WSA
macro codec, which looks like compatible with earlier SM8550.

Cc: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://msgid.link/r/20231129113014.38837-4-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: dt-bindings: qcom,lpass-va-macro: Add SM8650 LPASS VA
Krzysztof Kozlowski [Wed, 29 Nov 2023 11:30:13 +0000 (12:30 +0100)]
ASoC: dt-bindings: qcom,lpass-va-macro: Add SM8650 LPASS VA

Add bindings for Qualcomm SM8650 Low Power Audio SubSystem (LPASS) VA
macro codec, which looks like compatible with earlier SM8550.

Cc: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20231129113014.38837-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: dt-bindings: qcom,lpass-tx-macro: Add SM8650 LPASS TX
Krzysztof Kozlowski [Wed, 29 Nov 2023 11:30:12 +0000 (12:30 +0100)]
ASoC: dt-bindings: qcom,lpass-tx-macro: Add SM8650 LPASS TX

Add bindings for Qualcomm SM8650 Low Power Audio SubSystem (LPASS) TX
macro codec, which looks like compatible with earlier SM8550.

Cc: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://msgid.link/r/20231129113014.38837-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: dt-bindings: qcom,lpass-rx-macro: Add SM8650 LPASS RX
Krzysztof Kozlowski [Wed, 29 Nov 2023 11:30:11 +0000 (12:30 +0100)]
ASoC: dt-bindings: qcom,lpass-rx-macro: Add SM8650 LPASS RX

Add bindings for Qualcomm SM8650 Low Power Audio SubSystem (LPASS) RX
macro codec, which looks like compatible with earlier SM8550.

Cc: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://msgid.link/r/20231129113014.38837-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: qcom: audioreach: Add 4 channel support
Krzysztof Kozlowski [Thu, 30 Nov 2023 18:07:58 +0000 (19:07 +0100)]
ASoC: qcom: audioreach: Add 4 channel support

Add support four channel streams.  Map channel 3 and 4 to left/right
surround ("quad(side)" from ffmpeg standard channel list) to match what
is in qdsp6/q6dsp-common.c driver.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20231130180758.212172-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: qcom: audioreach: drop duplicate channel defines
Krzysztof Kozlowski [Thu, 30 Nov 2023 18:07:57 +0000 (19:07 +0100)]
ASoC: qcom: audioreach: drop duplicate channel defines

q6apm.h header already defines channel mapping values, so drop
duplicated devices from audioreach.h.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20231130180758.212172-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: qcom: audioreach: Commonize setting channel mappings
Krzysztof Kozlowski [Thu, 30 Nov 2023 18:07:56 +0000 (19:07 +0100)]
ASoC: qcom: audioreach: Commonize setting channel mappings

Move code assigning channel mapping values to a common helper function.
This simplifies three out of four cases, with the last case using
incompatible type (uint16_t array instead of uint8_t array).

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20231130180758.212172-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: wm1250-ev1: Fix uninitialized ret
Linus Walleij [Sat, 9 Dec 2023 22:01:27 +0000 (23:01 +0100)]
ASoC: wm1250-ev1: Fix uninitialized ret

The GPIO descriptor conversion patch left an unitialized ret behind
by mistake, fix it by getting rid of the variable altogether.

Fixes: 10a366f36e2a ("ASoC: wm1250-ev1: Convert to GPIO descriptors")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202312090953.DiUo3mue-lkp@intel.com/
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20231209-descriptors-sound-wlf-v1-1-5b885ce43ae1@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoGPIO descriptor cleanup for some Wolfson codecs
Mark Brown [Sat, 9 Dec 2023 00:16:04 +0000 (00:16 +0000)]
GPIO descriptor cleanup for some Wolfson codecs

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

This converts the remaining Wolfson ASoC codecs to
use GPIO descriptors.

These Wolfson codecs are mostly used with different
Samsung S3C (especially Cragganmore 6410) board files,
so the in-tree users are fixed up in the process.

9 months agoASoC: wm8996: Convert to GPIO descriptors
Linus Walleij [Fri, 8 Dec 2023 10:09:29 +0000 (11:09 +0100)]
ASoC: wm8996: Convert to GPIO descriptors

This converts the WM8996 codec to use GPIO descriptors, an a similar
way to WM5100.

The driver is instantiating a GPIO chip named wm8996, and we get
rid of the base address for the GPIO chip from the platform data and
just use dynamic numbering. Move base and ngpio into the static
gpio_chip template.

Fix up the only in-tree user which is the Cragganmore 6410 module.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231208-descriptors-sound-wlf-v1-5-c4dab6f521ec@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: wm5100: Convert to GPIO descriptors
Linus Walleij [Fri, 8 Dec 2023 10:09:28 +0000 (11:09 +0100)]
ASoC: wm5100: Convert to GPIO descriptors

This converts the WM5100 codec to use GPIO descriptors, a pretty
straight-forward conversion with the following peculiarities:

- The driver is instantiating a GPIO chip named wm5100, and the
  headphone polarity detection GPIO is lifted from there. We add
  this to the GPIO descriptor table as well, and we can then get
  rid of also the base address for the GPIO chip from the
  platform data and just use dynamic numbering.

- Fix up the only in-tree user which is the Cragganmore 6410
  module.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231208-descriptors-sound-wlf-v1-4-c4dab6f521ec@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: wm2200: Convert to GPIO descriptors
Linus Walleij [Fri, 8 Dec 2023 10:09:27 +0000 (11:09 +0100)]
ASoC: wm2200: Convert to GPIO descriptors

This converts the WM2200 codec to use GPIO descriptors.
This is a pretty straight-forward conversion, and it also
switches over the single in-tree user in the S3C
Cragganmore module for S3C 6410.

This coded does not seem to get selected or be selectable
through Kconfig, I had to hack another soundcard Kconfig
entry to select it for compile tests.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231208-descriptors-sound-wlf-v1-3-c4dab6f521ec@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: wm1250-ev1: Convert to GPIO descriptors
Linus Walleij [Fri, 8 Dec 2023 10:09:26 +0000 (11:09 +0100)]
ASoC: wm1250-ev1: Convert to GPIO descriptors

This converts the WM1250-EV1 codec to use GPIO descriptors.
It turns out that the platform data was only used to pass some
global GPIO numbers from a board file, so we get rid of this
and also switch over the single in-tree user in the S3C
Cragganmore module for S3C 6410.

The driver obtains two GPIO lines named OSR and master and just
pull them low, we leave this behaviour as it was.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231208-descriptors-sound-wlf-v1-2-c4dab6f521ec@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: wm0010: Convert to GPIO descriptors
Linus Walleij [Fri, 8 Dec 2023 10:09:25 +0000 (11:09 +0100)]
ASoC: wm0010: Convert to GPIO descriptors

This converts the WM0010 codec to use GPIO descriptors.
It's a pretty straight-forward conversion also switching over
the single in-tree user in the S3C Cragganmore module
for S3C 6410.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231208-descriptors-sound-wlf-v1-1-c4dab6f521ec@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: audio-graph-card2: fix off by one in graph_parse_node_multi_nm()
Dan Carpenter [Mon, 4 Dec 2023 12:42:07 +0000 (15:42 +0300)]
ASoC: audio-graph-card2: fix off by one in graph_parse_node_multi_nm()

The > comparison should be >= to avoid writing one element beyond the end
of the dai_link->ch_maps[] array.  The dai_link->ch_maps[] array is
allocated in graph_parse_node_multi() and it has "nm_max" elements.

Fixes: e2de6808df4a ("ASoC: audio-graph-card2: add CPU:Codec = N:M support")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/1032216f-902f-48f9-aa49-9d5ece8e87f2@moroto.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: amd: acp: modify config flag read logic
Vijendar Mukunda [Thu, 7 Dec 2023 04:55:01 +0000 (10:25 +0530)]
ASoC: amd: acp: modify config flag read logic

Modify acp config flag read logic from ACP v7.0 onwards.
Instead of reading from DMI table match entry, read the
config flag value from BIOS ACPI table.
This will remove updating DMI table when new platform support
is added.
Use FLAG_AMD_LEGACY_ONLY_DMIC flag as default one.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20231207045505.1519151-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: SOF: Intel: hda-codec: Delay the codec device registration
Peter Ujfalusi [Thu, 7 Dec 2023 09:54:25 +0000 (11:54 +0200)]
ASoC: SOF: Intel: hda-codec: Delay the codec device registration

The current code flow is:
1. snd_hdac_device_register()
2. set parameters needed by the hdac driver
3. request_codec_module()
   the hdac driver is probed at this point

During boot the codec drivers are not loaded when the hdac device is
registered, it is going to be probed later when loading the codec module,
which point the parameters are set.

On module remove/insert
rmmod snd_sof_pci_intel_tgl
modprobe snd_sof_pci_intel_tgl

The codec module remains loaded and the driver will be probed when the
hdac device is created right away, before the parameters for the driver
has been configured:

1. snd_hdac_device_register()
   the hdac driver is probed at this point
2. set parameters needed by the hdac driver
3. request_codec_module()
   will be a NOP as the module is already loaded

Move the snd_hdac_device_register() later, to be done right before
requesting the codec module to make sure that the parameters are all set
before the device is created:

1. set parameters needed by the hdac driver
2. snd_hdac_device_register()
3. request_codec_module()

This way at the hdac driver probe all parameters will be set in all cases.

Link: https://github.com/thesofproject/linux/issues/4731
Fixes: a0575b4add21 ("ASoC: hdac_hda: Conditionally register dais for HDMI and Analog")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231207095425.19597-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: amd: acp: Set bclk as source to set pll for rt5682s codec
Venkata Prasad Potturu [Wed, 6 Dec 2023 11:06:18 +0000 (16:36 +0530)]
ASoC: amd: acp: Set bclk as source to set pll for rt5682s codec

Some platforms doesn't have reference mclk pin to codec,
so set bclk as a clk source for rt5682s codec pll in tdm mode.

Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://lore.kernel.org/r/20231206110620.1695591-7-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: amd: acp: Set bclk as source to set pll for rt5682s codec
Venkata Prasad Potturu [Wed, 6 Dec 2023 11:06:18 +0000 (16:36 +0530)]
ASoC: amd: acp: Set bclk as source to set pll for rt5682s codec

Some platforms doesn't have reference mclk pin to codec,
so set bclk as a clk source for rt5682s codec pll in tdm mode.

Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://lore.kernel.org/r/20231206110620.1695591-7-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: amd: acp: Enable dpcm_capture for MAX98388 codec
Venkata Prasad Potturu [Wed, 6 Dec 2023 11:06:17 +0000 (16:36 +0530)]
ASoC: amd: acp: Enable dpcm_capture for MAX98388 codec

Enable dpcm_capture for amplifier codec MAX98388
for reference stream capture in smart amplifier case.

Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://lore.kernel.org/r/20231206110620.1695591-6-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: amd: acp: Add i2s bt support for nau8821-max card
Venkata Prasad Potturu [Wed, 6 Dec 2023 11:06:16 +0000 (16:36 +0530)]
ASoC: amd: acp: Add i2s bt support for nau8821-max card

Add i2s bt support for sof-nau8821-max sound card.

Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://lore.kernel.org/r/20231206110620.1695591-5-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: amd: acp: Add new cpu dai and dailink creation for I2S BT instance
Venkata Prasad Potturu [Wed, 6 Dec 2023 11:06:15 +0000 (16:36 +0530)]
ASoC: amd: acp: Add new cpu dai and dailink creation for I2S BT instance

Add sof_bt cpu id and create dailink for i2s bt instance in
acp common machine driver.

Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://lore.kernel.org/r/20231206110620.1695591-4-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: amd: Remove extra dmi parameter
Venkata Prasad Potturu [Wed, 6 Dec 2023 11:06:14 +0000 (16:36 +0530)]
ASoC: amd: Remove extra dmi parameter

Remove extra dmi_product_family entry in amd config entry table.

Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://lore.kernel.org/r/20231206110620.1695591-3-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: amd: vangogh: Add condition check for acp config flag
Venkata Prasad Potturu [Wed, 6 Dec 2023 11:06:13 +0000 (16:36 +0530)]
ASoC: amd: vangogh: Add condition check for acp config flag

Add condition check for acp config flag to load legacy driver only.

Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://lore.kernel.org/r/20231206110620.1695591-2-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: amd: Add new dmi entries for acp5x platform
Venkata Prasad Potturu [Wed, 6 Dec 2023 11:06:12 +0000 (16:36 +0530)]
ASoC: amd: Add new dmi entries for acp5x platform

Add sys_vendor and product_name dmi entries for acp5x platform.

Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://lore.kernel.org/r/20231206110620.1695591-1-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: dt-bindings: fsl,xcvr: Adjust the number of interrupts
Fabio Estevam [Wed, 6 Dec 2023 11:30:47 +0000 (08:30 -0300)]
ASoC: dt-bindings: fsl,xcvr: Adjust the number of interrupts

Unlike i.MX8MP, i.MX93 has two XCVR interrupts.

Describe the two interrupts for the i.MX93 to fix the following
dt-schema warning:

imx93-11x11-evk.dtb: xcvr@42680000: interrupts: [[0, 203, 4], [0, 204, 4]] is too long
from schema $id: http://devicetree.org/schemas/sound/fsl,xcvr.yaml#

Signed-off-by: Fabio Estevam <festevam@denx.de>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20231206113047.2240055-1-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: SOF: topology cleanups
Mark Brown [Wed, 6 Dec 2023 13:16:21 +0000 (13:16 +0000)]
ASoC: SOF: topology cleanups

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

Header alignment with firmware, addition of new token and partial
match filters.

9 months agoASoC: Intel: machine driver updates
Mark Brown [Wed, 6 Dec 2023 13:16:10 +0000 (13:16 +0000)]
ASoC: Intel: machine driver updates

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

Minor cleanups for machine drivers.

9 months agoASoC: Intel: sof_sdw_cs_amp: Connect outputs to a speaker widget
Richard Fitzgerald [Tue, 5 Dec 2023 13:50:01 +0000 (13:50 +0000)]
ASoC: Intel: sof_sdw_cs_amp: Connect outputs to a speaker widget

Hookup the CS35L56 DAPM_OUTPUT widgets to a DAPM_SPK widget so
that there is a complete logical path to a speaker.

There is no particular reason to use multiple speaker widgets.
The CS35L56 are designed to work together as a set so they have
all been connected to a single speaker widget.

Instead of a hardcoded list of codec widget names, the code walks
through all the codecs on the dailink and for every cs35l56 it uses
its name prefix to construct the source end of the route. This adds
a small amount of overhead during probe but has the benefit that it
isn't dependent on every system using the same prefixes.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231205135001.2506070-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: SOF: Intel: lnl: add core get and set support for dsp core
Rander Wang [Mon, 4 Dec 2023 21:44:07 +0000 (15:44 -0600)]
ASoC: SOF: Intel: lnl: add core get and set support for dsp core

Driver uses get and set ops to change the power state of dsp core.

Closes: https://github.com/thesofproject/sof/issues/8478
Signed-off-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231204214407.208528-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: cs4271: Fix spelling mistake "retrieveing" -> "retrieving"
Colin Ian King [Tue, 5 Dec 2023 10:17:40 +0000 (10:17 +0000)]
ASoC: cs4271: Fix spelling mistake "retrieveing" -> "retrieving"

There is a spelling mistake in a dev_err_probe error message. Fix it.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231205101740.2820813-1-colin.i.king@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: rt722-sdca: Set lane_control_support for multilane
Chao Song [Mon, 4 Dec 2023 21:37:21 +0000 (15:37 -0600)]
ASoC: rt722-sdca: Set lane_control_support for multilane

The RT722 SDCA codec supports 3 data lanes,
lane_control_support property has to be
set to use additional two lanes.

Reviewed-by: Jack Yu <jack580304@gmail.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Chao Song <chao.song@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://lore.kernel.org/r/20231204213721.197785-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: SOF: Wire up buffer flags
Curtis Malainey [Mon, 4 Dec 2023 21:47:13 +0000 (15:47 -0600)]
ASoC: SOF: Wire up buffer flags

Buffer flags have been in firmware for ages but were never fully
implemented in the topology/kernel system. This commit finishes off the
implementation.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231204214713.208951-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: SOF: add alignment for topology header file struct definition
Baofeng Tian [Mon, 4 Dec 2023 21:47:12 +0000 (15:47 -0600)]
ASoC: SOF: add alignment for topology header file struct definition

sof header file requires these struct with 4 byte aligned, so
add same alignment in sof driver definition.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231204214713.208951-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: SOF: align topology header file with sof topology header
Baofeng Tian [Mon, 4 Dec 2023 21:47:11 +0000 (15:47 -0600)]
ASoC: SOF: align topology header file with sof topology header

Add missed definition and align variable names with sof topology
header file.

Signed-off-by: Baofeng Tian <baofeng.tian@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://lore.kernel.org/r/20231204214713.208951-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: SOF: topology: Use partial match for disconnecting DAI link and DAI widget
Bard Liao [Mon, 4 Dec 2023 21:47:10 +0000 (15:47 -0600)]
ASoC: SOF: topology: Use partial match for disconnecting DAI link and DAI widget

We use partial match for connecting DAI link and DAI widget. We need to
use partial match for disconnecting, too.

Fixes: fe88788779fc ("ASoC: SOF: topology: Use partial match for connecting DAI link and DAI widget")
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://lore.kernel.org/r/20231204214713.208951-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: Intel: sof_sdw_rt_sdca_jack_common: check ctx->headset_codec_dev instead of...
Bard Liao [Mon, 4 Dec 2023 21:42:00 +0000 (15:42 -0600)]
ASoC: Intel: sof_sdw_rt_sdca_jack_common: check ctx->headset_codec_dev instead of playback

'if (!playback)' will not work if the dai is only on capture dai link
or is on more than one playback dai links. Check 'if
(ctx->headset_codec_dev)' instead.

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://lore.kernel.org/r/20231204214200.203100-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: Intel: sof_sdw_rt_sdca_jack_common: ctx->headset_codec_dev = NULL
Bard Liao [Mon, 4 Dec 2023 21:41:59 +0000 (15:41 -0600)]
ASoC: Intel: sof_sdw_rt_sdca_jack_common: ctx->headset_codec_dev = NULL

sof_sdw_rt_sdca_jack_exit() are used by different codecs, and some of
them use the same dai name.
For example, rt712 and rt713 both use "rt712-sdca-aif1" and
sof_sdw_rt_sdca_jack_exit().
As a result, sof_sdw_rt_sdca_jack_exit() will be called twice by
mc_dailink_exit_loop(). Set ctx->headset_codec_dev = NULL; after
put_device(ctx->headset_codec_dev); to avoid ctx->headset_codec_dev
being put twice.

Fixes: 5360c6704638 ("ASoC: Intel: sof_sdw: add rt712 support")
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://lore.kernel.org/r/20231204214200.203100-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: Intel: glk_rt5682_max98357a: fix board id mismatch
Brent Lu [Mon, 4 Dec 2023 21:41:58 +0000 (15:41 -0600)]
ASoC: Intel: glk_rt5682_max98357a: fix board id mismatch

The drv_name in enumeration table for ALC5682I-VS codec does not match
the board id string in machine driver. Modify the entry of "10EC5682"
to enumerate "RTL5682" as well and remove invalid entry.

Fixes: 88b4d77d6035 ("ASoC: Intel: glk_rt5682_max98357a: support ALC5682I-VS codec")
Reported-by: Curtis Malainey <cujomalainey@chromium.org>
Reviewed-by: Curtis Malainey <cujomalainey@chromium.org>
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/20231204214200.203100-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: Intel: sof_nau8825: board id cleanup for rpl boards
Brent Lu [Mon, 4 Dec 2023 21:41:57 +0000 (15:41 -0600)]
ASoC: Intel: sof_nau8825: board id cleanup for rpl boards

Many board configs are duplicated since codec and amplifier type are
removed from board quirk. Introduce "rpl_nau8825_def" board to reduce
the number of rpl board configs.

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/20231204214200.203100-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: Intel: sof_nau8825: board id cleanup for adl boards
Brent Lu [Mon, 4 Dec 2023 21:41:56 +0000 (15:41 -0600)]
ASoC: Intel: sof_nau8825: board id cleanup for adl boards

Many board configs are duplicated since codec and amplifier type are
removed from board quirk. Introduce "adl_nau8825_def" board to reduce
the number of adl board configs.

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/20231204214200.203100-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: Intel: soc-acpi-intel-tgl-match: add cs42l43 and cs35l56 support
Bard Liao [Mon, 4 Dec 2023 13:56:14 +0000 (13:56 +0000)]
ASoC: Intel: soc-acpi-intel-tgl-match: add cs42l43 and cs35l56 support

This is a test configuration for UpExtreme with Cirrus Logic
CS35L56-EIGHT-C board.

The codec layout is configured as:
    - Link3: CS42L43 Jack
    - Link0: 2x CS35L56 Speaker (amps 1 and 2)
    - Link1: 2x CS35L56 Speaker (amps 7 and 8)

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231204135614.2169624-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: Intel: bytcht_es8316: Determine
Mark Brown [Mon, 4 Dec 2023 19:31:56 +0000 (19:31 +0000)]
ASoC: Intel: bytcht_es8316: Determine

Merge series from Hans de Goede <hdegoede@redhat.com>:

This takes some of the work done to auto-configure quirks/routing
for ESS83xx codecs by getting the info from ACPI from:
https://github.com/thesofproject/linux/pull/4112

And then builds on top of this to add auto-configuration to
the bytcht_es8316 board driver.

Note compared to the pull-request, which deals with the ES8336, this
series deals with the ES8316 (for which I have several devices to test
on) and this moves handling of the _DSM from the codec driver to
the board driver since with the ES8316 the board driver takes
care of setting up various routes for things like the mic and
speakers.

After this series audio now works properly on a CHT Chuwi Hi12
tablet without needing to add an extra quirk for that model.

This has also been tested on the following devices, where things
are unchanged from before (the ACPI autoconfiguration gives the
same results as the old defaults) :

Onda V80 plus (CHT)
GP-electronic T701 (BYT)

I also tested this on a Nanote UMPC-01, here the _DSM result
for PLATFORM_SPK_TYPE_ARG wrongly returns 1 (mono) while
the device actually has 2 speakers, so this model needs to keep
its DMI quirk.

I don't have an IRBIS NB41 nor a TECLAST X98 Plus II,
so the DMI quirks for those are left in place too on
a better safe then sorry basis.

9 months agoASoC: Intel: bytcht_es8316: Determine quirks/routing with codec-dev ACPI DSM
Hans de Goede [Sat, 2 Dec 2023 12:39:46 +0000 (13:39 +0100)]
ASoC: Intel: bytcht_es8316: Determine quirks/routing with codec-dev ACPI DSM

Add support for querying the same ACPI Device-Specific-Method (DSM) as
Windows uses to determine things like speaker and mic routing.

This avoids the need to add DMI quirks for each new ESS8316 tablet model.

This has been tested on the following devices:

1. Chuwi Hi12 CHT with stereo speakers and IN2-mic-map,
   this avoids the need to add a DMI quirk for this model.

2. Nanote UMPC-01 CHT with stereo speakers and IN1-mic-map,
   the existing DMI quirk is still necessary because of a bug
   in the DSM return values for the speakers (it returns mono).

3. Onda V80 plus CHT with mono speaker and IN1-mic-map,
   DSM set quirks match the previously used defaults.

4. GP-electronic T701 BYT with mono speaker and IN2-mic-map,
   DSM set quirks match the previously used defaults.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231202123946.54347-5-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: Intel: bytcht_es8316: Add is_bytcr helper variable
Hans de Goede [Sat, 2 Dec 2023 12:39:45 +0000 (13:39 +0100)]
ASoC: Intel: bytcht_es8316: Add is_bytcr helper variable

Add a is_bytcr helper variable to probe().

This is a preparation patch for determining the quirks through querying
the ACPI Device-Specific-Method (DSM) on the codec-device.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231202123946.54347-4-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: Intel: bytcht_es8316: Dump basic _DSM information
Pierre-Louis Bossart [Sat, 2 Dec 2023 12:39:44 +0000 (13:39 +0100)]
ASoC: Intel: bytcht_es8316: Dump basic _DSM information

Instead of adding DMI quirks for each new tablet model which uses
the ESS8316 codec, the plan is to switch to querying the same ACPI
Device-Specific-Method (DSM) as Windows uses to determine things
like speaker and mic routing.

Call the new es83xx_dsm_dump() helper which logs various basic settings
which can be queried through the ACPI DSM method on the codec ACPI device,
this is intended to help with developing a DSM based solution to replace
most DMI quirks.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
[hdegoede@redhat.com: improve commit message]
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231202123946.54347-3-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: es83xx: add ACPI DSM helper module
Pierre-Louis Bossart [Sat, 2 Dec 2023 12:39:43 +0000 (13:39 +0100)]
ASoC: es83xx: add ACPI DSM helper module

Most of the ES83xx codec configuration is exposed in the DSDT table
and accessible via a _DSM method. Start adding basic definitions and
helpers to dump the information.

Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Co-developed-by: David Yang <yangxiaohua@everest-semi.com>
Signed-off-by: David Yang <yangxiaohua@everest-semi.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231202123946.54347-2-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: SOF: Move sof_of_machine_select() to core.c from sof-of-dev.c
Chen-Yu Tsai [Mon, 4 Dec 2023 03:35:47 +0000 (11:35 +0800)]
ASoC: SOF: Move sof_of_machine_select() to core.c from sof-of-dev.c

Commit 014fdeb0d747 ("ASoC: SOF: Move sof_of_machine_select() to
sof-of-dev.c from sof-audio.c") caused a circular dependency between
the snd_sof and snd_sof_of modules:

depmod: ERROR: Cycle detected: snd_sof -> snd_sof_of -> snd_sof
depmod: ERROR: Found 2 modules in dependency cycles!

Move the function back with sof_machine_select().

Fixes: 014fdeb0d747 ("ASoC: SOF: Move sof_of_machine_select() to sof-of-dev.c from sof-audio.c")
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20231204033549.2020289-1-wenst@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: Convert Cirrus codecs to GPIO descriptors
Mark Brown [Fri, 1 Dec 2023 22:16:41 +0000 (22:16 +0000)]
ASoC: Convert Cirrus codecs to GPIO descriptors

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

This series walks over the Cirrus Logic ASoC drivers and
clean out the use of legacy GPIO numbers and legacy
GPIO APIs.

The CS4271 affects an ASoC driver for EP93xx which Nikita is
actively working on moving over to device tree, so I don't
know about that patch specifically, but I think the collision
would be max "the file was deleted".

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
Changes in v2:
- Add explicit <linux/irq.h> include in the cs35l36 driver, apparently
  the driver useeed this implicitly through the <linux/gpio.h> include.
- Fix commit messages "gpios" -> "reset" on two patches.
- Test builds OK
- Link to v1: https://lore.kernel.org/r/20231129-descriptors-sound-cirrus-v1-0-31aa74425ff8@linaro.org

---
Linus Walleij (10):
      ASoC: cs35l32: Drop legacy include
      ASoC: cs35l33: Fix GPIO name and drop legacy include
      ASoC: cs35l34: Fix GPIO name and drop legacy include
      ASoC: cs35l35: Drop legacy includes
      ASoC: cs35l36: Drop legacy includes
      ASoC: cs4271: Convert to GPIO descriptors
      ASoC: cirrus: edb93xx: Drop legacy include
      ASoC: cs42l42: Drop legacy include
      ASoC: cs43130: Drop legacy includes
      ASoC: cs4349: Drop legacy include

 arch/arm/mach-ep93xx/edb93xx.c       | 32 +++++++++++++++++++++++++----
 arch/arm/mach-ep93xx/vision_ep9307.c | 12 ++++++++++-
 include/sound/cs4271.h               |  1 -
 sound/soc/cirrus/edb93xx.c           |  1 -
 sound/soc/codecs/cs35l32.c           |  1 -
 sound/soc/codecs/cs35l33.c           |  4 +---
 sound/soc/codecs/cs35l34.c           |  4 +---
 sound/soc/codecs/cs35l35.c           |  2 --
 sound/soc/codecs/cs35l36.c           |  3 +--
 sound/soc/codecs/cs4271.c            | 39 ++++++++++++------------------------
 sound/soc/codecs/cs42l42.c           |  1 -
 sound/soc/codecs/cs42l42.h           |  2 +-
 sound/soc/codecs/cs43130.c           |  2 --
 sound/soc/codecs/cs4349.c            |  1 -
 14 files changed, 56 insertions(+), 49 deletions(-)
---
base-commit: 267aea213ae042f779a8054401a8a5f301518605
change-id: 20231129-descriptors-sound-cirrus-522d9061808e

Best regards,
--
Linus Walleij <linus.walleij@linaro.org>

9 months agoASoC: qcom: sc8280xp: Add support for SM8450 and SM8550
Krzysztof Kozlowski [Fri, 1 Dec 2023 13:53:32 +0000 (14:53 +0100)]
ASoC: qcom: sc8280xp: Add support for SM8450 and SM8550

Add compatibles for sound card on Qualcomm SM8450 and SM8550 boards.
The compatibles were already documented.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231201135332.154017-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: qcom: sc8280xp: set card driver name from match data
Krzysztof Kozlowski [Fri, 1 Dec 2023 13:53:31 +0000 (14:53 +0100)]
ASoC: qcom: sc8280xp: set card driver name from match data

Sound machine drivers for all newer Qualcomm SoC platforms are the
exactly same, therefore it makes sense to use same machine driver for
newer platforms as well.  Choice of sound topology and user-space Alsa
UCM files depends however on card driver name, which must be customized
per each board.  Allow such customization by using driver match data as
sound card driver name.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231201135332.154017-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: cs4349: Drop legacy include
Linus Walleij [Fri, 1 Dec 2023 13:20:39 +0000 (14:20 +0100)]
ASoC: cs4349: Drop legacy include

This driver includes the legacy GPIO API <linux/gpio.h> but
does not use any symbols from it.

Drop the include.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20231201-descriptors-sound-cirrus-v2-10-ee9f9d4655eb@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: cs43130: Drop legacy includes
Linus Walleij [Fri, 1 Dec 2023 13:20:38 +0000 (14:20 +0100)]
ASoC: cs43130: Drop legacy includes

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

Drop the includes.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20231201-descriptors-sound-cirrus-v2-9-ee9f9d4655eb@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: cs42l42: Drop legacy include
Linus Walleij [Fri, 1 Dec 2023 13:20:37 +0000 (14:20 +0100)]
ASoC: cs42l42: Drop legacy include

This driver includes the legacy GPIO API <linux/gpio.h> but
does not use any symbols from it.

Drop the include.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20231201-descriptors-sound-cirrus-v2-8-ee9f9d4655eb@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: cirrus: edb93xx: Drop legacy include
Linus Walleij [Fri, 1 Dec 2023 13:20:36 +0000 (14:20 +0100)]
ASoC: cirrus: edb93xx: Drop legacy include

This driver includes the legacy GPIO API <linux/gpio.h> but
does not use any symbols from it.

Drop the include.

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Link: https://patchwork.kernel.org/project/alsa-devel/patch/20231122-ep93xx-v5-38-d59a76d5df29@maquefel.me/
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20231201-descriptors-sound-cirrus-v2-7-ee9f9d4655eb@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: cs4271: Convert to GPIO descriptors
Linus Walleij [Fri, 1 Dec 2023 13:20:35 +0000 (14:20 +0100)]
ASoC: cs4271: Convert to GPIO descriptors

This converts the Cirrus CS4271 ASoC codec driver to use
GPIO descriptors.

It turns out that there are two in-kernel users of the platform
data passing mechanism so these are switched over as well.

One locally defined GPIO "gpio_disabled" is declared in the
state struct but completely unused in the driver, so we delete
it.

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20231201-descriptors-sound-cirrus-v2-6-ee9f9d4655eb@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: cs35l36: Drop legacy includes
Linus Walleij [Fri, 1 Dec 2023 13:20:34 +0000 (14:20 +0100)]
ASoC: cs35l36: Drop legacy includes

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

Drop the includes.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20231201-descriptors-sound-cirrus-v2-5-ee9f9d4655eb@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: cs35l35: Drop legacy includes
Linus Walleij [Fri, 1 Dec 2023 13:20:33 +0000 (14:20 +0100)]
ASoC: cs35l35: Drop legacy includes

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

Drop the includes.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20231201-descriptors-sound-cirrus-v2-4-ee9f9d4655eb@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: cs35l34: Fix GPIO name and drop legacy include
Linus Walleij [Fri, 1 Dec 2023 13:20:32 +0000 (14:20 +0100)]
ASoC: cs35l34: Fix GPIO name and drop legacy include

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

Drop the includes.

Further the driver is requesting "reset-gpios" rather than
just "reset" from the GPIO framework. This is wrong because
the gpiolib core will add "-gpios" before processing the
request from e.g. device tree. Drop the suffix.

The last problem means that the optional RESET GPIO has
never been properly retrieved and used even if it existed,
but nobody noticed.

Fixes: c1124c09e103 ("ASoC: cs35l34: Initial commit of the cs35l34 CODEC driver.")
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20231201-descriptors-sound-cirrus-v2-3-ee9f9d4655eb@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: cs35l33: Fix GPIO name and drop legacy include
Linus Walleij [Fri, 1 Dec 2023 13:20:31 +0000 (14:20 +0100)]
ASoC: cs35l33: Fix GPIO name and drop legacy include

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

Drop the includes.

Further the driver is requesting "reset-gpios" rather than
just "reset" from the GPIO framework. This is wrong because
the gpiolib core will add "-gpios" before processing the
request from e.g. device tree. Drop the suffix.

The last problem means that the optional RESET GPIO has
never been properly retrieved and used even if it existed,
but nobody noticed.

Fixes: 3333cb7187b9 ("ASoC: cs35l33: Initial commit of the cs35l33 CODEC driver.")
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20231201-descriptors-sound-cirrus-v2-2-ee9f9d4655eb@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: cs35l32: Drop legacy include
Linus Walleij [Fri, 1 Dec 2023 13:20:30 +0000 (14:20 +0100)]
ASoC: cs35l32: Drop legacy include

This driver includes the legacy GPIO API <linux/gpio.h> but
does not use any symbols from it.

Drop the include.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20231201-descriptors-sound-cirrus-v2-1-ee9f9d4655eb@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: SOF: IPC path handling and fallback support
Mark Brown [Thu, 30 Nov 2023 11:23:17 +0000 (11:23 +0000)]
ASoC: SOF: IPC path handling and fallback support

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

The main aim of the series is to provide a mechanism to fallback to 'older' IPC
versions in case the desired one is missing either a firmware or topology file.
It is going to make the life of users and distributions if we are going to
start transition existing IPC3 platforms to IPC4 (CAVS2.5) and we might have
missed some topology file to convert for example.
In that case the kernel will fallback to IPC3 without audio regression.

To be able to support this we needed to change the probe sequence to know the
topology filename earlier and check if it is present in the filesystem.

No functional changes for now, the default IPC versions have not been changed.

9 months agoASoC: qcom: Move Soundwire runtime stream alloc to soundcards
Krzysztof Kozlowski [Tue, 28 Nov 2023 16:56:38 +0000 (17:56 +0100)]
ASoC: qcom: Move Soundwire runtime stream alloc to soundcards

Currently the Qualcomm Soundwire controller in its DAI startup op
allocates the Soundwire stream runtime.  This works fine for existing
designs, but has limitations for stream runtimes with multiple
controllers, like upcoming Qualcomm X1E80100 SoC with four WSA8840
speakers on two Soundwire controllers.

When two Soundwire controllers are added to sound card codecs, Soundwire
startup() is called twice, one for each Soundwire controller, and second
execution overwrites what was set before.  During shutdown() this causes
double free.

It is expected to have only one Soundwire stream runtime, thus it should
be allocated from SoC soundcard context startup(), not from each
Soundwire startup().  Such way will properly handle both cases: one and
two Soundwire controllers in the stream runtime.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231128165638.757665-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: qcom: Add helper for allocating Soundwire stream runtime
Krzysztof Kozlowski [Tue, 28 Nov 2023 16:56:37 +0000 (17:56 +0100)]
ASoC: qcom: Add helper for allocating Soundwire stream runtime

Newer Qualcomm SoC soundcards will need to allocate Soundwire stream
runtime in their startup op.  The code will be exactly the same for all
soundcards, so add a helper for that.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231128165638.757665-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: fsl_rpmsg: update Kconfig dependencies
Arnd Bergmann [Wed, 29 Nov 2023 11:31:17 +0000 (12:31 +0100)]
ASoC: fsl_rpmsg: update Kconfig dependencies

SND_SOC_IMX_RPMSG gained a new dependency and gets selected by SND_SOC_FSL_RPMSG,
which as a result needs to have the same dependency, or produce a build failure
based on that:

WARNING: unmet direct dependencies detected for SND_SOC_IMX_RPMSG
  Depends on [n]: SOUND [=y] && SND [=y] && SND_SOC [=y] && SND_IMX_SOC [=y] && RPMSG [=y] && OF [=y] && I2C [=n]
  Selected by [y]:
  - SND_SOC_FSL_RPMSG [=y] && SOUND [=y] && SND [=y] && SND_SOC [=y] && COMMON_CLK [=y] && RPMSG [=y] && (SND_IMX_SOC [=y] || SND_IMX_SOC [=y]=n) && SND_IMX_SOC [=y]!=n
x86_64-linux-ld: sound/soc/fsl/imx-rpmsg.o: in function `imx_rpmsg_late_probe':
imx-rpmsg.c:(.text+0x11e): undefined reference to `i2c_find_device_by_fwnode'

Fixes: f83d38def6b1 ("ASoC: imx-rpmsg: SND_SOC_IMX_RPMSG should depend on OF and I2C")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20231129113204.2869356-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: SOF: ipc4-topology: Add module ID print during module set up
Baofeng Tian [Wed, 29 Nov 2023 12:22:34 +0000 (14:22 +0200)]
ASoC: SOF: ipc4-topology: Add module ID print during module set up

This module ID will be used for module performance automatic analysis
for different modules, module name, module ID and module instance ID
will be combined as a new generated ID for current module, this ID
will be further used by analysis tools to identify current module.

Take below case as example:
0x030006 gain.11.1
3 is module instance ID, 6 is module ID and gain.11.1 is module name.

For pipeline widget print, keep as it is.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20231129122234.14515-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: core: Fix a handful of spelling mistakes.
Colin Ian King [Wed, 29 Nov 2023 09:09:58 +0000 (09:09 +0000)]
ASoC: core: Fix a handful of spelling mistakes.

There is a spelling mistake in a dev_err message and several
spelling mistakes in comments. Fix them.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20231129090958.815775-1-colin.i.king@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: SOF: ipc4: Move window offset configuration earlier
Peter Ujfalusi [Wed, 29 Nov 2023 12:28:05 +0000 (14:28 +0200)]
ASoC: SOF: ipc4: Move window offset configuration earlier

With the added exception handling support if the firmware fails to boot
up we are trying to do a panic dump from the telemetry slot. The slot
offsets would have been configured only after receiving the FW_READY
message which makes this panic dump unusable for early boot failures.

With IPC4 the DSP window offsets are at standard places unlike IPC3 where
the offsets needs to be queried from the FW_READY message.

Move the offset configuration to sof_ipc4_init from the fw_ready handler.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231129122805.10635-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: SOF: ipc4: check return value of snd_sof_ipc_msg_data
Bard Liao [Wed, 29 Nov 2023 12:20:21 +0000 (14:20 +0200)]
ASoC: SOF: ipc4: check return value of snd_sof_ipc_msg_data

snd_sof_ipc_msg_data could return error.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-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/20231129122021.679-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: SOF: core: Implement IPC version fallback if firmware files are missing
Peter Ujfalusi [Wed, 29 Nov 2023 12:53:27 +0000 (14:53 +0200)]
ASoC: SOF: core: Implement IPC version fallback if firmware files are missing

If a firmware file is missing for the selected IPC type then try to switch
to other supported IPC type and check if that one can be used instead.

If for example a platform is changed to IPC4 as default version but the
given machine does not yet have the needed topology file created then we
will fall back to IPC3 which should have all the needed files.

Relocate the sof_init_environment() to be done at a later phase, in
sof_probe_continue().

This will only have changes in behavior if
CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE is enabled (Intel HDA platforms) by
not failing the module probe, but it is not going to be different case
compared to for example failed firmware booting or topology loading error.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20231129125327.23708-14-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: SOF: Intel: Do not use resource managed allocation for ipc4_data
Peter Ujfalusi [Wed, 29 Nov 2023 12:53:26 +0000 (14:53 +0200)]
ASoC: SOF: Intel: Do not use resource managed allocation for ipc4_data

Manage the ipc4_data allocation in code instead of devm since the ops_init
might be called more than once due to IPC type fallback.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20231129125327.23708-13-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: SOF: core: Add helper for initialization of paths, ops
Peter Ujfalusi [Wed, 29 Nov 2023 12:53:25 +0000 (14:53 +0200)]
ASoC: SOF: core: Add helper for initialization of paths, ops

Add sof_init_environment() as a helper function to contain path and ops
initialization.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20231129125327.23708-12-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: SOF: sof-pci-dev: Rely on core to create the file paths
Peter Ujfalusi [Wed, 29 Nov 2023 12:53:24 +0000 (14:53 +0200)]
ASoC: SOF: sof-pci-dev: Rely on core to create the file paths

The core is now using the information from ipc_file_profile_base to create
the paths for the loadable files, no need to set it in here anymore.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20231129125327.23708-11-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: SOF: sof-of-dev: Rely on core to create the file paths
Peter Ujfalusi [Wed, 29 Nov 2023 12:53:23 +0000 (14:53 +0200)]
ASoC: SOF: sof-of-dev: Rely on core to create the file paths

The core is now using the information from ipc_file_profile_base to create
the paths for the loadable files, no need to set it in here anymore.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20231129125327.23708-10-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: SOF: sof-acpi-dev: Rely on core to create the file paths
Peter Ujfalusi [Wed, 29 Nov 2023 12:53:22 +0000 (14:53 +0200)]
ASoC: SOF: sof-acpi-dev: Rely on core to create the file paths

The core is now using the information from ipc_file_profile_base to create
the paths for the loadable files, no need to set it in here anymore.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20231129125327.23708-9-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: SOF: core: Implement firmware, topology path setup in core
Peter Ujfalusi [Wed, 29 Nov 2023 12:53:21 +0000 (14:53 +0200)]
ASoC: SOF: core: Implement firmware, topology path setup in core

Use the information stored in ipc_file_profile_base by platforms to
construct the paths, filenames that are going to be used to load the
firmware and topology files.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20231129125327.23708-8-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: SOF: sof-pci-dev: Save the default IPC type and path overrides
Peter Ujfalusi [Wed, 29 Nov 2023 12:53:20 +0000 (14:53 +0200)]
ASoC: SOF: sof-pci-dev: Save the default IPC type and path overrides

Store the default IPC type and the overrides to ipc_file_profile_base

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20231129125327.23708-7-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: SOF: sof-of-dev: Save the default IPC type and path overrides
Peter Ujfalusi [Wed, 29 Nov 2023 12:53:19 +0000 (14:53 +0200)]
ASoC: SOF: sof-of-dev: Save the default IPC type and path overrides

Store the default IPC type and the firmware and topology path overrides to
ipc_file_profile_base

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20231129125327.23708-6-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: SOF: sof-acpi-dev: Save the default IPC type and path overrides
Peter Ujfalusi [Wed, 29 Nov 2023 12:53:18 +0000 (14:53 +0200)]
ASoC: SOF: sof-acpi-dev: Save the default IPC type and path overrides

Store the default IPC type and the firmware and topology path overrides to
ipc_file_profile_base

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20231129125327.23708-5-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: SOF: Add placeholder for platform IPC type and path overrides
Peter Ujfalusi [Wed, 29 Nov 2023 12:53:17 +0000 (14:53 +0200)]
ASoC: SOF: Add placeholder for platform IPC type and path overrides

Add a struct sof_loadable_file_profile which can be filled by platforms
(sof-acpi-dev.c, sof-of-dev.c and sof-acpi-dev.c) to be able to use common,
generic code to handle path customization.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20231129125327.23708-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: SOF: Move sof_machine_* functions from sof-audio.c to core.c
Peter Ujfalusi [Wed, 29 Nov 2023 12:53:16 +0000 (14:53 +0200)]
ASoC: SOF: Move sof_machine_* functions from sof-audio.c to core.c

Relocate the machine handling functions from sof-audio.c to core.c to
maintain code separation.

While doing the move, drop the redundant
IS_ERR_OR_NULL(plat_data->pdev_mach) check from
sof_machine_unregister()

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20231129125327.23708-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: SOF: Move sof_of_machine_select() to sof-of-dev.c from sof-audio.c
Peter Ujfalusi [Wed, 29 Nov 2023 12:53:15 +0000 (14:53 +0200)]
ASoC: SOF: Move sof_of_machine_select() to sof-of-dev.c from sof-audio.c

Move the sof_of_machine_select() function to sof-of-dev.c file and provide
an inline stub in case of non OF builds.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20231129125327.23708-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: SOF: icp3-dtrace: Fix wrong kfree() usage
Kamil Duljas [Thu, 16 Nov 2023 22:01:03 +0000 (23:01 +0100)]
ASoC: SOF: icp3-dtrace: Fix wrong kfree() usage

trace_filter_parse() allocs memory for *out and when
-ENOMEM is returned, caller function, dfsentry_trace_filter_write()
trying to freed this memory.

After this patch, the memory is freed in trace_filter_parse()
before -EINVAL returned. In caller function removed kfree(elms)
from error label

Signed-off-by: Kamil Duljas <kamil.duljas@gmail.com>
Link: https://lore.kernel.org/r/20231116220102.2097-2-kamil.duljas@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: Intel: Soundwire related board and match updates
Mark Brown [Tue, 28 Nov 2023 12:24:50 +0000 (12:24 +0000)]
ASoC: Intel: Soundwire related board and match updates

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

A small update for SDW machine support:
Small fixes for sof_sdw machine driver
Support for rt722
New TGL/MTL and LNL match for new configurations

9 months agoASoC: Intel: Link handling rework and fixes
Mark Brown [Tue, 28 Nov 2023 12:24:41 +0000 (12:24 +0000)]
ASoC: Intel: Link handling rework and fixes

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

SOF board updates for 6.8 including few small fix and the majority is to add
generic helpers for codec, amp, BT offload, HDMI-In and DAI link generation
among various machine drivers.

10 months agoASoC: makes CPU/Codec channel connection map more
Mark Brown [Mon, 27 Nov 2023 17:33:11 +0000 (17:33 +0000)]
ASoC: makes CPU/Codec channel connection map more

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

Current ASoC is supporting CPU/Codec = N:M (N < M) connection by using
ch_map idea. This patch-set expands it that all connection uses this idea,
and no longer N < M limit [1][2].

Link: https://lore.kernel.org/r/87fs6wuszr.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/878r7yqeo4.wl-kuninori.morimoto.gx@renesas.com
ASoC core code ([PATCH 1/5]) is same as v6 and it was tested by Pierre-Louis,
and Jerome. Big change on v7 is basically for Audio-Graph-Card2.

10 months agoASoC: Intel: sof_rt5682: use common module for DAI link generation
Brent Lu [Mon, 27 Nov 2023 15:26:54 +0000 (17:26 +0200)]
ASoC: Intel: sof_rt5682: use common module for DAI link generation

Use intel_board module to generate DAI link array and update
num_links field in snd_soc_card structure.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-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/20231127152654.28204-28-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: sof_nau8825: use common module for DAI link generation
Brent Lu [Mon, 27 Nov 2023 15:26:53 +0000 (17:26 +0200)]
ASoC: Intel: sof_nau8825: use common module for DAI link generation

Use intel_board module to generate DAI link array and update num_links
field in snd_soc_card structure.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-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/20231127152654.28204-27-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: board_helpers: support DAI link array generation
Brent Lu [Mon, 27 Nov 2023 15:26:52 +0000 (17:26 +0200)]
ASoC: Intel: board_helpers: support DAI link array generation

Add a helper function for machine drivers to initialize dai_link and
num_links of a snd_soc_card structure. Machine driver needs to
initialize sof_card_private structure in driver probe function then
board_helpers module will create entire DAI link array for this board.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-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/20231127152654.28204-26-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: sof_ssp_amp: use common module for HDMI-In link
Brent Lu [Mon, 27 Nov 2023 15:26:51 +0000 (17:26 +0200)]
ASoC: Intel: sof_ssp_amp: use common module for HDMI-In link

Use intel_board module for HDMI-In DAI link initialization.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Balamurugan C <balamurugan.c@intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20231127152654.28204-25-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: sof_rt5682: use common module for HDMI-In link
Brent Lu [Mon, 27 Nov 2023 15:26:50 +0000 (17:26 +0200)]
ASoC: Intel: sof_rt5682: use common module for HDMI-In link

Use intel_board module for HDMI-In DAI link initialization.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Balamurugan C <balamurugan.c@intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20231127152654.28204-24-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: board_helpers: support HDMI-In link initialization
Brent Lu [Mon, 27 Nov 2023 15:26:49 +0000 (17:26 +0200)]
ASoC: Intel: board_helpers: support HDMI-In link initialization

Add a helper function for machine drivers to initialize HDMI-In DAI
link.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Balamurugan C <balamurugan.c@intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20231127152654.28204-23-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: sof_ssp_amp: simplify HDMI-In quirks
Brent Lu [Mon, 27 Nov 2023 15:26:48 +0000 (17:26 +0200)]
ASoC: Intel: sof_ssp_amp: simplify HDMI-In quirks

Use bit mask to handle SSP port number of HDMI-In devices to simplify
the code. No functional change in this patch.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Balamurugan C <balamurugan.c@intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20231127152654.28204-22-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: sof_ssp_amp: use common module for BT offload link
Brent Lu [Mon, 27 Nov 2023 15:26:47 +0000 (17:26 +0200)]
ASoC: Intel: sof_ssp_amp: use common module for BT offload link

Use intel_board module for BT offload DAI link initialization.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20231127152654.28204-21-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: sof_rt5682: use common module for BT offload link
Brent Lu [Mon, 27 Nov 2023 15:26:46 +0000 (17:26 +0200)]
ASoC: Intel: sof_rt5682: use common module for BT offload link

Use intel_board module for BT offload DAI link initialization.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20231127152654.28204-20-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: sof_nau8825: use common module for BT offload link
Brent Lu [Mon, 27 Nov 2023 15:26:45 +0000 (17:26 +0200)]
ASoC: Intel: sof_nau8825: use common module for BT offload link

Use intel_board module for BT offload DAI link initialization.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20231127152654.28204-19-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: sof_cs42l42: use common module for BT offload link
Brent Lu [Mon, 27 Nov 2023 15:26:44 +0000 (17:26 +0200)]
ASoC: Intel: sof_cs42l42: use common module for BT offload link

Use intel_board module for BT offload DAI link initialization.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20231127152654.28204-18-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: board_helpers: support BT offload link initialization
Brent Lu [Mon, 27 Nov 2023 15:26:43 +0000 (17:26 +0200)]
ASoC: Intel: board_helpers: support BT offload link initialization

Add a helper function for machine drivers to initialize BT offload
DAI link.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20231127152654.28204-17-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>