linux-block.git
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: 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.

9 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.

9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 months agoASoC: Intel: sof_ssp_amp: rename function parameter
Brent Lu [Mon, 27 Nov 2023 15:26:42 +0000 (17:26 +0200)]
ASoC: Intel: sof_ssp_amp: rename function parameter

Rename the parameter 'ssp_codec' of sof_card_dai_links_create() since
it's the port number of speaker amplifier. No functional change in
this commit.

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-16-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: Intel: sof_ssp_amp: use common module for amp link
Brent Lu [Mon, 27 Nov 2023 15:26:41 +0000 (17:26 +0200)]
ASoC: Intel: sof_ssp_amp: use common module for amp link

Use intel_board module for speaker amplifier DAI link initialization.

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-15-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: Intel: sof_rt5682: use common module for amp link
Brent Lu [Mon, 27 Nov 2023 15:26:40 +0000 (17:26 +0200)]
ASoC: Intel: sof_rt5682: use common module for amp link

Use intel_board module for speaker amplifier DAI link initialization.

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-14-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: Intel: sof_nau8825: use common module for amp link
Brent Lu [Mon, 27 Nov 2023 15:26:39 +0000 (17:26 +0200)]
ASoC: Intel: sof_nau8825: use common module for amp link

Use intel_board module for speaker amplifier DAI link initialization.

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-13-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: Intel: sof_cs42l42: use common module for amp link
Brent Lu [Mon, 27 Nov 2023 15:26:38 +0000 (17:26 +0200)]
ASoC: Intel: sof_cs42l42: use common module for amp link

Use intel_board module for speaker amplifier DAI link initialization.

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-12-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: Intel: board_helpers: support amp link initialization
Brent Lu [Mon, 27 Nov 2023 15:26:37 +0000 (17:26 +0200)]
ASoC: Intel: board_helpers: support amp link initialization

Add a helper function for machine drivers to initialize speaker
amplifier DAI link. The function will initialize common fields and let
caller to initialize codec-specific fields like codec, init, exit, and
ops fields.

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-11-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: Intel: sof_rt5682: use common module for codec link
Brent Lu [Mon, 27 Nov 2023 15:26:36 +0000 (17:26 +0200)]
ASoC: Intel: sof_rt5682: use common module for codec link

Use intel_board module for headphone codec 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-10-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: Intel: sof_nau8825: use common module for codec link
Brent Lu [Mon, 27 Nov 2023 15:26:35 +0000 (17:26 +0200)]
ASoC: Intel: sof_nau8825: use common module for codec link

Use intel_board module for headphone codec 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-9-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: Intel: sof_cs42l42: use common module for codec link
Brent Lu [Mon, 27 Nov 2023 15:26:34 +0000 (17:26 +0200)]
ASoC: Intel: sof_cs42l42: use common module for codec link

Use intel_board module for headphone codec 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-8-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: Intel: board_helpers: support codec link initialization
Brent Lu [Mon, 27 Nov 2023 15:26:33 +0000 (17:26 +0200)]
ASoC: Intel: board_helpers: support codec link initialization

Add a helper function for machine drivers to initialize headphone
codec DAI links. The function will initialize common fields and let
caller to initialize codec-specific fields like codec, init, exit, and
ops fields.

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-7-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: Intel: ssp-common: get codec name function
Brent Lu [Mon, 27 Nov 2023 15:26:32 +0000 (17:26 +0200)]
ASoC: Intel: ssp-common: get codec name function

Add a helper function to get codec name string from codec type enum
value.

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-6-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: Intel: cht_bsw_rt5672: check return value
Chao Song [Mon, 27 Nov 2023 15:26:31 +0000 (17:26 +0200)]
ASoC: Intel: cht_bsw_rt5672: check return value

Set codec sysclk could fail and return error, add
error check for it.

Signed-off-by: Chao Song <chao.song@linux.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-5-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: Intel: sof_maxim_common: check return value
Bard Liao [Mon, 27 Nov 2023 15:26:30 +0000 (17:26 +0200)]
ASoC: Intel: sof_maxim_common: check return value

snd_soc_dai_set_tdm_slot() could return error.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@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/20231127152654.28204-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: Intel: sof_maxim_common: add else between 2 if test
Bard Liao [Mon, 27 Nov 2023 15:26:29 +0000 (17:26 +0200)]
ASoC: Intel: sof_maxim_common: add else between 2 if test

if (!strcmp(codec_dai->component->name, MAX_98373_DEV0_NAME)) and
if (!strcmp(codec_dai->component->name, MAX_98373_DEV1_NAME)) can't be
true at the same time. Add an else to clarify it.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@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/20231127152654.28204-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: Intel: sof_ssp_amp: remove dead code
Brent Lu [Mon, 27 Nov 2023 15:26:28 +0000 (17:26 +0200)]
ASoC: Intel: sof_ssp_amp: remove dead code

This patch fixes a dead code problem when calculating BE ID for each
HDMI-In link.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Reviewed-by: Balamurugan C <balamurugan.c@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-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: Intel: soc-acpi-intel-mtl-match: Add rt722 support
Chao Song [Mon, 27 Nov 2023 13:34:48 +0000 (15:34 +0200)]
ASoC: Intel: soc-acpi-intel-mtl-match: Add rt722 support

This patch adds match table for rt722 codec on link 0.

RT722 is a multi-function codec, three endpoints are
created for its headset, amp and dmic functions.

Signed-off-by: Chao Song <chao.song@linux.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/20231127133448.18449-8-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: Intel: soc-acpi: add Gen4.1 SDCA board support for LNL RVP
Chao Song [Mon, 27 Nov 2023 13:34:46 +0000 (15:34 +0200)]
ASoC: Intel: soc-acpi: add Gen4.1 SDCA board support for LNL RVP

This patch adds support for LNL RVP with Realtek
Gen4.1 SDCA codec board, the codec layout is:
  SDW0: RT711 Headphone
  SDW1: RT714 DMIC
  SDW2: RT1316 Speaker
  SDW3: RT1316 Speaker

Signed-off-by: Chao Song <chao.song@linux.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/20231127133448.18449-6-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: Intel: soc-acpi: rt713+rt1316, no sdw-dmic config
Mac Chiang [Mon, 27 Nov 2023 13:34:45 +0000 (15:34 +0200)]
ASoC: Intel: soc-acpi: rt713+rt1316, no sdw-dmic config

This is additional HW board: rt713+rt1316 without rt713-dmic configuration:

SDW0: rt713 audio jack
SDW1: rt1316 spk_amp_l
SDW2: rt1316 spk_amp_r

Signed-off-by: Mac Chiang <mac.chiang@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/20231127133448.18449-5-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: Intel: sof_sdw: Add rt722 support
Chao Song [Mon, 27 Nov 2023 13:34:44 +0000 (15:34 +0200)]
ASoC: Intel: sof_sdw: Add rt722 support

RT722 is a multi-function codec which supports headset,
amp, and dmic functions. Each function provides a DAI
which can be used in different dailinks.

The RT711 supports up to 3 SoundWire lanes, but that
should not have any impact in the machine driver:
the lanes are allocated and controlled by the manager
and bandwidth allocation algorithm.

Signed-off-by: Chao Song <chao.song@linux.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/20231127133448.18449-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: Intel: sof_sdw: remove unused function declaration
Chao Song [Mon, 27 Nov 2023 13:34:43 +0000 (15:34 +0200)]
ASoC: Intel: sof_sdw: remove unused function declaration

The functions sof_sdw_rt712_sdca_init() and sof_sdw_rt712_sdca_exit()
declared in header file are never implemented and used, remove them.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
Reviewed-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/20231127133448.18449-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: Intel: sof_sdw: Make use of dev_err_probe()
Peter Ujfalusi [Mon, 27 Nov 2023 13:34:42 +0000 (15:34 +0200)]
ASoC: Intel: sof_sdw: Make use of dev_err_probe()

The devm_snd_soc_register_card() can return with
-EPROBE_DEFER and in that case the driver should not print
an error message.

Closes: https://github.com/thesofproject/linux/issues/4668
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.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: Chao Song <chao.song@linux.intel.com>
Link: https://lore.kernel.org/r/20231127133448.18449-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: SOF: Intel: Use existing helpers to change GPROCEN and PIE bits
Peter Ujfalusi [Mon, 27 Nov 2023 10:43:13 +0000 (12:43 +0200)]
ASoC: SOF: Intel: Use existing helpers to change GPROCEN and PIE bits

Instead of directly changing the GPROCEN/PIE bits in PPCTL we should use
the existing helper hda_dsp_ctrl_ppcap_enable() and
hda_dsp_ctrl_ppcap_int_enable() helpers for clarity.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231127104313.16661-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: SOF: Intel: mtl: call dsp dump when boot retry fails
Yong Zhi [Mon, 27 Nov 2023 10:52:35 +0000 (12:52 +0200)]
ASoC: SOF: Intel: mtl: call dsp dump when boot retry fails

Call snd_sof_dsp_dbg_dump() with the same flags/dump_msg
as used in function hda_loader.c/cl_dsp_init().

Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20231127105235.30071-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: sh: convert not to use dma_request_slave_channel()
Christophe JAILLET [Sun, 19 Nov 2023 18:19:14 +0000 (19:19 +0100)]
ASoC: sh: convert not to use dma_request_slave_channel()

dma_request_slave_channel() is deprecated. dma_request_chan() should
be used directly instead.

Switch to the preferred function and update the error handling accordingly.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/1a837f96f056fa3dcb02a77afa5892d40b354cb1.1700417934.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: audio-graph-card2-custom-sample: add CPU/Codec = N:M sample
Kuninori Morimoto [Mon, 13 Nov 2023 01:31:04 +0000 (01:31 +0000)]
ASoC: audio-graph-card2-custom-sample: add CPU/Codec = N:M sample

Now ASoC is supporting CPU/Codec = N:M connection, add its sample
settings.

One note here is that it has many type of samples, it reached to
maximum of sound minor number. Therefore, new sample is disabled so far.
If you want to try it, you need to disable some other one instead.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87o7fy4ey0.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: audio-graph-card2-custom-sample: Add connection image
Kuninori Morimoto [Mon, 13 Nov 2023 01:30:09 +0000 (01:30 +0000)]
ASoC: audio-graph-card2-custom-sample: Add connection image

Audio Graph Card2 is supporting many type of Sound connections, but
thus it is very difficult to understand how these are connected.

To support well understanding, adds each connection images and indicates
each settings are for where.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87pm0e4ezi.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: audio-graph-card2: add CPU:Codec = N:M support
Kuninori Morimoto [Mon, 13 Nov 2023 01:29:23 +0000 (01:29 +0000)]
ASoC: audio-graph-card2: add CPU:Codec = N:M support

Now ASoC is supporting CPU:Codec = N:M support.
This patch enables it on Audio Graph Card2.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87r0ku4f0t.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: audio-graph-card2: use better image for Multi connection
Kuninori Morimoto [Mon, 13 Nov 2023 01:28:58 +0000 (01:28 +0000)]
ASoC: audio-graph-card2: use better image for Multi connection

1st port on Multi ports is for paired CPU/Codec, and the 2nd or later
port are for Multi Elements. This patch indicates its image to easy to
understand.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87sf5a4f1i.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: makes CPU/Codec channel connection map more generic
Kuninori Morimoto [Mon, 13 Nov 2023 01:28:27 +0000 (01:28 +0000)]
ASoC: makes CPU/Codec channel connection map more generic

Current ASoC CPU:Codec = N:M connection is using connection mapping idea,
but it is used for N < M case only. We want to use it for any case.

By this patch, not only N:M connection, but all existing connection
(1:1, 1:N, N:N) will use same connection mapping. Then, because it will
use default mapping, no conversion patch is needed to exising drivers.

More over, CPU:Codec = N:M (N > M) also supported in the same time.

ch_maps array will has CPU/Codec index by this patch.

Image
CPU0 <---> Codec0
CPU1 <-+-> Codec1
CPU2 <-/

ch_map
ch_map[0].cpu = 0 ch_map[0].codec = 0
ch_map[1].cpu = 1 ch_map[1].codec = 1
ch_map[2].cpu = 2 ch_map[2].codec = 1

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
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Tested-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/87ttpq4f2c.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoLinux 6.7-rc3 v6.7-rc3
Linus Torvalds [Mon, 27 Nov 2023 03:59:33 +0000 (19:59 -0800)]
Linux 6.7-rc3

9 months agoMerge tag 'trace-v6.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
Linus Torvalds [Mon, 27 Nov 2023 03:48:20 +0000 (19:48 -0800)]
Merge tag 'trace-v6.7-rc2' of git://git./linux/kernel/git/trace/linux-trace

Pull tracing fixes from Steven Rostedt::
 "Eventfs fixes:

   - With the usage of simple_recursive_remove() recommended by Al Viro,
     the code should not be calling "d_invalidate()" itself. Doing so is
     causing crashes. The code was calling d_invalidate() on the race of
     trying to look up a file while the parent was being deleted. This
     was detected, and the added dentry was having d_invalidate() called
     on it, but the deletion of the directory was also calling
     d_invalidate() on that same dentry.

   - A fix to not free the eventfs_inode (ei) until the last dput() was
     called on its ei->dentry made the ei->dentry exist even after it
     was marked for free by setting the ei->is_freed. But code elsewhere
     still was checking if ei->dentry was NULL if ei->is_freed is set
     and would trigger WARN_ON if that was the case. That's no longer
     true and there should not be any warnings when it is true.

   - Use GFP_NOFS for allocations done under eventfs_mutex. The
     eventfs_mutex can be taken on file system reclaim, make sure that
     allocations done under that mutex do not trigger file system
     reclaim.

   - Clean up code by moving the taking of inode_lock out of the helper
     functions and into where they are needed, and not use the parameter
     to know to take it or not. It must always be held but some callers
     of the helper function have it taken when they were called.

   - Warn if the inode_lock is not held in the helper functions.

   - Warn if eventfs_start_creating() is called without a parent. As
     eventfs is underneath tracefs, all files created will have a parent
     (the top one will have a tracefs parent).

  Tracing update:

   - Add Mathieu Desnoyers as an official reviewer of the tracing subsystem"

* tag 'trace-v6.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  MAINTAINERS: TRACING: Add Mathieu Desnoyers as Reviewer
  eventfs: Make sure that parent->d_inode is locked in creating files/dirs
  eventfs: Do not allow NULL parent to eventfs_start_creating()
  eventfs: Move taking of inode_lock into dcache_dir_open_wrapper()
  eventfs: Use GFP_NOFS for allocation when eventfs_mutex is held
  eventfs: Do not invalidate dentry in create_file/dir_dentry()
  eventfs: Remove expectation that ei->is_freed means ei->dentry == NULL

9 months agoMerge tag 'parisc-for-6.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/delle...
Linus Torvalds [Sun, 26 Nov 2023 17:59:39 +0000 (09:59 -0800)]
Merge tag 'parisc-for-6.7-rc3' of git://git./linux/kernel/git/deller/parisc-linux

Pull parisc architecture fixes from Helge Deller:
 "This patchset fixes and enforces correct section alignments for the
  ex_table, altinstructions, parisc_unwind, jump_table and bug_table
  which are created by inline assembly.

  Due to not being correctly aligned at link & load time they can
  trigger unnecessarily the kernel unaligned exception handler at
  runtime. While at it, I switched the bug table to use relative
  addresses which reduces the size of the table by half on 64-bit.

  We still had the ENOSYM and EREMOTERELEASE errno symbols as left-overs
  from HP-UX, which now trigger build-issues with glibc. We can simply
  remove them.

  Most of the patches are tagged for stable kernel series.

  Summary:

   - Drop HP-UX ENOSYM and EREMOTERELEASE return codes to avoid glibc
     build issues

   - Fix section alignments for ex_table, altinstructions, parisc unwind
     table, jump_table and bug_table

   - Reduce size of bug_table on 64-bit kernel by using relative
     pointers"

* tag 'parisc-for-6.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: Reduce size of the bug_table on 64-bit kernel by half
  parisc: Drop the HP-UX ENOSYM and EREMOTERELEASE error codes
  parisc: Use natural CPU alignment for bug_table
  parisc: Ensure 32-bit alignment on parisc unwind section
  parisc: Mark lock_aligned variables 16-byte aligned on SMP
  parisc: Mark jump_table naturally aligned
  parisc: Mark altinstructions read-only and 32-bit aligned
  parisc: Mark ex_table entries 32-bit aligned in uaccess.h
  parisc: Mark ex_table entries 32-bit aligned in assembly.h

9 months agoMerge tag 'x86-urgent-2023-11-26' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 26 Nov 2023 16:42:42 +0000 (08:42 -0800)]
Merge tag 'x86-urgent-2023-11-26' of git://git./linux/kernel/git/tip/tip

Pull x86 microcode fixes from Ingo Molnar:
 "Fix/enhance x86 microcode version reporting: fix the bootup log spam,
  and remove the driver version announcement to avoid version confusion
  when distros backport fixes"

* tag 'x86-urgent-2023-11-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/microcode: Rework early revisions reporting
  x86/microcode: Remove the driver announcement and version

9 months agoMerge tag 'perf-urgent-2023-11-26' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 26 Nov 2023 16:34:12 +0000 (08:34 -0800)]
Merge tag 'perf-urgent-2023-11-26' of git://git./linux/kernel/git/tip/tip

Pull x86 perf event fix from Ingo Molnar:
 "Fix a bug in the Intel hybrid CPUs hardware-capabilities enumeration
  code resulting in non-working events on those platforms"

* tag 'perf-urgent-2023-11-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/x86/intel: Correct incorrect 'or' operation for PMU capabilities

9 months agoMerge tag 'locking-urgent-2023-11-26' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 26 Nov 2023 16:30:11 +0000 (08:30 -0800)]
Merge tag 'locking-urgent-2023-11-26' of git://git./linux/kernel/git/tip/tip

Pull locking fix from Ingo Molnar:
 "Fix lockdep block chain corruption resulting in KASAN warnings"

* tag 'locking-urgent-2023-11-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  lockdep: Fix block chain corruption

9 months agoMerge tag '6.7-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Sun, 26 Nov 2023 16:22:27 +0000 (08:22 -0800)]
Merge tag '6.7-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fixes from Steve French:

 - use after free fix in releasing multichannel interfaces

 - fixes for special file types (report char, block, FIFOs properly when
   created e.g. by NFS to Windows)

 - fixes for reporting various special file types and symlinks properly
   when using SMB1

* tag '6.7-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  smb: client: introduce cifs_sfu_make_node()
  smb: client: set correct file type from NFS reparse points
  smb: client: introduce ->parse_reparse_point()
  smb: client: implement ->query_reparse_point() for SMB1
  cifs: fix use after free for iface while disabling secondary channels

9 months agoMerge tag 'usb-6.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Sun, 26 Nov 2023 02:22:42 +0000 (18:22 -0800)]
Merge tag 'usb-6.7-rc3' of git://git./linux/kernel/git/gregkh/usb

Pull USB / PHY / Thunderbolt fixes from Greg KH:
 "Here are a number of reverts, fixes, and new device ids for 6.7-rc3
  for the USB, PHY, and Thunderbolt driver subsystems. Include in here
  are:

   - reverts of some PHY drivers that went into 6.7-rc1 that shouldn't
     have been merged yet, the author is reworking them based on review
     comments as they were using older apis that shouldn't be used
     anymore for newer drivers

   - small thunderbolt driver fixes for reported issues

   - USB driver fixes for a variety of small issues in dwc3, typec,
     xhci, and other smaller drivers.

   - new device ids for usb-serial and onboard_usb_hub drivers.

  All of these have been in linux-next with no reported issues"

* tag 'usb-6.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (33 commits)
  USB: serial: option: add Luat Air72*U series products
  USB: dwc3: qcom: fix ACPI platform device leak
  USB: dwc3: qcom: fix software node leak on probe errors
  USB: dwc3: qcom: fix resource leaks on probe deferral
  USB: dwc3: qcom: simplify wakeup interrupt setup
  USB: dwc3: qcom: fix wakeup after probe deferral
  dt-bindings: usb: qcom,dwc3: fix example wakeup interrupt types
  usb: misc: onboard-hub: add support for Microchip USB5744
  dt-bindings: usb: microchip,usb5744: Add second supply
  usb: misc: ljca: Fix enumeration error on Dell Latitude 9420
  USB: serial: option: add Fibocom L7xx modules
  USB: xhci-plat: fix legacy PHY double init
  usb: typec: tipd: Supply also I2C driver data
  usb: xhci-mtk: fix in-ep's start-split check failure
  usb: dwc3: set the dma max_seg_size
  usb: config: fix iteration issue in 'usb_get_bos_descriptor()'
  usb: dwc3: add missing of_node_put and platform_device_put
  USB: dwc2: write HCINT with INTMASK applied
  usb: misc: ljca: Drop _ADR support to get ljca children devices
  usb: cdnsp: Fix deadlock issue during using NCM gadget
  ...

9 months agoMerge tag 'xfs-6.7-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Linus Torvalds [Sat, 25 Nov 2023 16:57:09 +0000 (08:57 -0800)]
Merge tag 'xfs-6.7-fixes-3' of git://git./fs/xfs/xfs-linux

Pull xfs fix from Chandan Babu:

 - Validate quota records recovered from the log before writing them to
   the disk.

* tag 'xfs-6.7-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
  xfs: dquot recovery does not validate the recovered dquot
  xfs: clean up dqblk extraction

9 months agoMerge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Linus Torvalds [Sat, 25 Nov 2023 16:43:46 +0000 (08:43 -0800)]
Merge tag 'arm64-fixes' of git://git./linux/kernel/git/arm64/linux

Pull arm64 fixes from Catalin Marinas:

 - Fix "rodata=on" not disabling "rodata=full" on arm64

 - Add arm64 make dependency between vmlinuz.efi and Image, leading to
   occasional build failures previously (with parallel building)

 - Add newline to the output formatting of the za-fork kselftest

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: add dependency between vmlinuz.efi and Image
  kselftest/arm64: Fix output formatting for za-fork
  arm64: mm: Fix "rodata=on" when CONFIG_RODATA_FULL_DEFAULT_ENABLED=y

9 months agoMerge tag 'for-linus-6.7a-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 25 Nov 2023 16:32:44 +0000 (08:32 -0800)]
Merge tag 'for-linus-6.7a-rc3-tag' of git://git./linux/kernel/git/xen/tip

Pull xen fixes from Juergen Gross:

 - A small cleanup patch for the Xen privcmd driver

 - A fix for the swiotlb-xen driver which was missing the advertising of
   the maximum mapping length

 - A fix for Xen on Arm for a longstanding bug, which happened to occur
   only recently: a structure in percpu memory crossed a page boundary,
   which was rejected by the hypervisor

* tag 'for-linus-6.7a-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
  arm/xen: fix xen_vcpu_info allocation alignment
  xen: privcmd: Replace zero-length array with flex-array member and use __counted_by
  swiotlb-xen: provide the "max_mapping_size" method

9 months agoASoC: SOF: ipc4: Add support for control change
Mark Brown [Sat, 25 Nov 2023 10:37:48 +0000 (10:37 +0000)]
ASoC: SOF: ipc4: Add support for control change

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

This series adds support for handling control (switch/enum) change notifications
sent by the firmware.
The use case is similar to what is already used by IPC3 version: the firmware
can update the value of an enum or switch and sends notification to the kernel,
which in turn will notify the user space of a change.

9 months agoparisc: Reduce size of the bug_table on 64-bit kernel by half
Helge Deller [Thu, 23 Nov 2023 20:57:19 +0000 (21:57 +0100)]
parisc: Reduce size of the bug_table on 64-bit kernel by half

Enable GENERIC_BUG_RELATIVE_POINTERS which will store 32-bit relative
offsets to the bug address and the source file name instead of 64-bit
absolute addresses. This effectively reduces the size of the
bug_table[] array by half on 64-bit kernels.

Signed-off-by: Helge Deller <deller@gmx.de>
9 months agoparisc: Drop the HP-UX ENOSYM and EREMOTERELEASE error codes
Helge Deller [Thu, 23 Nov 2023 19:28:27 +0000 (20:28 +0100)]
parisc: Drop the HP-UX ENOSYM and EREMOTERELEASE error codes

Those return codes are only defined for the parisc architecture and
are leftovers from when we wanted to be HP-UX compatible.

They are not returned by any Linux kernel syscall but do trigger
problems with the glibc strerrorname_np() and strerror() functions as
reported in glibc issue #31080.

There is no need to keep them, so simply remove them.

Signed-off-by: Helge Deller <deller@gmx.de>
Reported-by: Bruno Haible <bruno@clisp.org>
Closes: https://sourceware.org/bugzilla/show_bug.cgi?id=31080
Cc: stable@vger.kernel.org