Commit Graph

3808 Commits

Author SHA1 Message Date
Philipp Stanner
58fa9c629e
ASoC: intel: avs: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.

Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().

Remove the goto jump to pci_release_regions(), since pcim_ functions
clean up automatically.

Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://patch.msgid.link/20250425081742.61623-4-phasta@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-05 19:32:12 +09:00
Thorsten Blum
d20df86b05
ASoC: Intel: avs: Fix kcalloc() sizes
rlist, clist, and slist are allocated using sizeof(pointer) instead of
sizeof(*pointer). Fix the allocations by using sizeof(*pointer) and
avoid overallocating memory on 64-bit systems.

Fixes: f2f847461f ("ASoC: Intel: avs: Constrain path based on BE capabilities")
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://patch.msgid.link/20250426141342.94134-2-thorsten.blum@linux.dev
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-01 09:26:06 +09:00
Arnd Bergmann
95b2536137
ASoC: Intel: catpt: avoid type mismatch in dev_dbg() format
Depending on the architecture __ffs() returns either an 'unsigned long'
or 'unsigned int' result. Compile-testing this driver on targets that
use the latter produces a warning:

sound/soc/intel/catpt/dsp.c: In function 'catpt_dsp_set_srampge':
sound/soc/intel/catpt/dsp.c:181:44: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'u32' {aka 'unsigned int'} [-Werror=format=]
  181 |                         dev_dbg(cdev->dev, "sanitize block %ld: off 0x%08x\n",
      |                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Change the type of the local variable to match the format string and
avoid the warning on any architecture.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250429073545.3558494-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-30 09:38:11 +09:00
Takashi Iwai
a549b927ea
ASoC: Intel: bytcr_rt5640: Add DMI quirk for Acer Aspire SW3-013
Acer Aspire SW3-013 requires the very same quirk as other Acer Aspire
model for making it working.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=220011
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250420085716.12095-1-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-25 13:35:08 +01:00
Amadeusz Sławiński
3b41574eea
ASoC: Intel: avs: Fix NULL pointer dereference
Due to unfortunate interaction between two recent patchsets, avs driver
ends up dereferencing NULL pointer when registering i2s boards.

Commit [1] does a call to avs_mach_ssp_tdm() which requires mach->pdata,
however due to another change in [2], mach->pdata is initialized after
the call. Reshuffle code to initialise mach->pdata before calling
avs_mach_ssp_tdm().

[1]

Link: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/commit/sound/soc/intel/avs?id=79138dbff53ab0e9891ebdfce8d7b298c3783cd1
[2]
Link: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/commit/sound/soc/intel/avs?id=7d859189de13f06fdc511761c745f3b302bed7b6
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250424094600.1678051-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-24 12:56:16 +01:00
Mark Brown
402dda23a3
ASoC: Merge up fixes
They have build/application dependencies for some new changes coming in.
2025-04-24 12:55:06 +01:00
Bard Liao
da6d7db8b1
ASoC: soc-acpi-intel-ptl-match: add empty item to ptl_cs42l43_l3[]
An empty item is required to terminate the look up loop.

Fixes: ac5b4a24f1 ("ASoC: Intel: soc-acpi-intel-ptl-match: Add cs42l43 support")

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Naveen Manohar <naveen.m@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20250423055722.6920-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-23 16:54:44 +01:00
Mark Brown
c84c801db3
ASoC: skip the endpoint that doesn't present and
Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>:

A codec endpoint may not be used. We could check the present SDCA
functions to know if the endpoint is used or not. Skip the endpoint
which is not used. And load the topology dynamically for each endpoint.
With this feature, we don't need to use the quirk to determine the
existence of the optional codec DAIs.
2025-04-15 21:23:56 +01:00
Bard Liao
cf8a4ca84c
ASoC: Intel: soc-acpi-intel-mtl-match: add get_function_tplg_files ops
The audio configs with multi-function SDCA codecs can use the
sof_sdw_get_tplg_files ops to get function topologies dynamically.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20250414063239.85200-10-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-14 11:22:24 +01:00
Bard Liao
5a0c4a0925
ASoC: Intel: soc-acpi-intel-ptl-match: add get_function_tplg_files ops
The audio configs with multi-function SDCA codecs can use the
sof_sdw_get_tplg_files ops to get function topologies dynamically.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20250414063239.85200-9-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-14 11:22:23 +01:00
Bard Liao
d348b4181c
ASoC: Intel: soc-acpi-intel-arl-match: set get_function_tplg_files ops
The audio configs with multi-function SDCA codecs can use the
sof_sdw_get_tplg_files ops to get function topologies dynamically.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20250414063239.85200-8-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-14 11:22:22 +01:00
Bard Liao
143b7a87aa
ASoC: Intel: soc-acpi-intel-lnl-match: set get_function_tplg_files ops
The audio configs with multi-function SDCA codecs can use the
sof_sdw_get_tplg_files ops to get function topologies dynamically.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20250414063239.85200-7-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-14 11:22:21 +01:00
Bard Liao
2fbeff3338
ASoC: Intel: add sof_sdw_get_tplg_files ops
Add sof_sdw_get_tplg_files ops to get sub-topology file names for the
sof_sdw card.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20250414063239.85200-6-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-14 11:22:20 +01:00
Mark Brown
1f4db3cb1a
ASoC: Intel: avs: 16 channels support
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>:

Relatively small delta-wise patchset which raises max channels supported
from 8 to 16.  The existing limitation is software-based, not hardware
based.  The hardware, as per HDAudio specification, section 1.2.2,
(relevant register at SDnFMT, section 3.3.41) supports the
configurations for years.  The avs-driver becomes the first consumer of
that configuration on the Linux kernel side.

Set starts off with update to string_helpers so that functionality added
with parse_int_array_user() can be utilized in kernel-kernel
interactions.

Follow up is rasing the cap on HDAudio-library side.  The format
selection procedure found in the library is good-to-go as is.

Everything that follows these two patches is avs-driver specific:
- raise channels_max for every DAI-driver template
- provide i2s_test module parameter for testing purposes.  When combined
  with I2S loopback card, allows to test 16ch on most Intel hardware post
  Broadwell era
- adjust TDM masks to reflect the 8 -> 16 channels change
2025-04-08 10:25:08 +01:00
Mark Brown
aa446b5d9a
ASoC: Intel: avs: Add support for FCL platform
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>:

The patchset is fairly straightforward - add support for Automotive
platforms based on new DSP architecture, Frisco Lake (FCL), a
PantherLake (PTL)-based platform is an example of.  The cAVS
architecture which all Intel AudioDSP followed for years ends with
RaptorLake familty.  Like all the major updates, this one received new
name too - Audio Context Engine (ACE).

While the range of improvements and changes on the firmware/hardware
side is large, software survives this evolution without need of any
major refactoring.  Additional hardware changes brought with LunarLake
(LNL, ACE 2.0) call for update in PCM-area.  The GPDMAs previously
utilized for non-HDAudio transfer types are no longer there, everything
is running through HDAudio LINK on the Back-End side now.

In terms of code, the mtl.c file, provided with patch 05 'ASoC: Intel:
avs: PTL-based platforms support' hosts largest number of new handlers -
new IRQ and INT control and DSP-cores management.  Combined with lnl.c
and ptl.c which layer the architecture changes done over ACE
generations, provide support for PTL-based platforms e.g.: FCL.
The inheritance in summary:

	mtl.c <- lnl.c <- ptl.c

The functional update to HDAudio library is there to help avs-driver
read certain capabilities directly from the hardware.  Once the pointer
to LINK is obtained, there is no need to call AudioDSP firmware to get
the caps.
2025-04-08 10:25:04 +01:00
Mark Brown
25293be4a7
ASoC: Intel: avs: Update machine board card names
Merge series from Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>:

As discussed in user bug report [1] & [2], it was identified that HDA
card provides wrong FE device numbers to be used with UCM, at the same
time it was requested that we change card names to better names.

This patchset does that, by adding option for going back to old
behaviour in first patch. Using existing way of enumerating FEs from
topology in second patch. Then setting new names in all cards while
providing fallback to old name. Only exception is probe card, which is
used for debug purposes only, where we just directly rename card.

Do note that patch 2, will require updated topologies if topology
exposes more than 1 FE on card. Old topologies didn't assign id field
and it defaulted to 0, however when we use this field by setting
snd_soc_component_driver::use_dai_pcm_id field, we need topologies with
distinct values in FEs. Necessary changes are provided in avsdk and
avs-topology-xml repositories ([4] & [5]). linux-firmware update will
follow as soon as this changeset is merged.

[1]
Link: https://bugzilla.kernel.org/show_bug.cgi?id=219654
[2]
Link: https://github.com/alsa-project/alsa-ucm-conf/pull/499
[3]
Link: https://lore.kernel.org/linux-sound/20250127144445.2739017-1-amadeuszx.slawinski@linux.intel.com/
[4]
a879c8ae4b
[5]
9b94d52cbc
bdbc8d6ba9
2025-04-08 10:25:00 +01:00
Amadeusz Sławiński
f2f847461f
ASoC: Intel: avs: Constrain path based on BE capabilities
For i2s and DMIC copiers constraint stream capabilities based on
available NHLT configuration. This allows topology to provide generic
configuration that handles more hardware, while filtering unavailable
ones at runtime.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://patch.msgid.link/20250407130851.1726800-1-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-08 00:53:49 +01:00
Amadeusz Sławiński
8d18e67abb
ASoC: Intel: avs: Support 16 TDMs in dynamic assignment
When assigning new widget name there needs to be enough place in buffer
to assign name.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250404090337.3564117-9-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 15:08:03 +01:00
Amadeusz Sławiński
6a68cbe09e
ASoC: Intel: avs: Iterate over correct number of TDMs
When handling TDMs, don't iterate over number of SSP ports, but over
possible number of TDMs.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250404090337.3564117-8-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 15:08:02 +01:00
Amadeusz Sławiński
79138dbff5
ASoC: Intel: avs: Assign unique ID to platform devices
When creating machine boards there are two types, per endpoint or
compound board. For compound board we can just use I2S mask as its ID,
however, per endpoint can also be separated per TDM, which causes
problem because two boards would have same I2S mask. Shift it and add
the value of TDM to generate a unique ID.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250404090337.3564117-7-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 15:08:01 +01:00
Amadeusz Sławiński
7d859189de
ASoC: Intel: avs: Allow to specify custom configurations with i2s_test
Change 'i2s_test' module option from enable-flag to string allowing to
specify which SSP port and in what TDM configuration should be enabled.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250404090337.3564117-6-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 15:08:00 +01:00
Cezary Rojewski
d360b71372
ASoC: Intel: avs: Allow for 16 channels configuration
Add define representing maximum number of channels that are allowed by
HDAudio standard and as such supported by HW - 16 channels. With that
done, reflect the max in BE DAIs capabilities.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250404090337.3564117-5-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 15:07:59 +01:00
Amadeusz Sławiński
87bcb08710
ASoC: Intel: avs: Rename AVS_CHANNELS_MAX define
It is used for coefficient table in updown mixer module, which supports
maximum of 8 channels. However it does not represent HW capability.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250404090337.3564117-4-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 15:07:58 +01:00
Amadeusz Sławiński
93fa44f847
ASoC: Intel: avs: boards: Change ssm4567 card name
Rename FE from "avs_ssm4567" to "AVS I2S SSM4567".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-21-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 15:04:20 +01:00
Amadeusz Sławiński
3c71156779
ASoC: Intel: avs: boards: Change rt5682 card name
Rename FE from "avs_rt5682" to "AVS I2S ALC5682".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-20-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 15:04:20 +01:00
Amadeusz Sławiński
f1e282c333
ASoC: Intel: avs: boards: Change rt5663 card name
Rename FE from "avs_rt5663" to "AVS I2S ALC5663".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-19-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 15:04:19 +01:00
Amadeusz Sławiński
e0e3b14080
ASoC: Intel: avs: boards: Change rt5514 card name
Rename FE from "avs_rt5514" to "AVS I2S ALC5514".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-18-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 15:04:18 +01:00
Amadeusz Sławiński
61881b29d6
ASoC: Intel: avs: boards: Change rt298 card name
Rename FE from "avs_rt298" to "AVS I2S ALC298".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-17-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 15:04:17 +01:00
Amadeusz Sławiński
ffe6a23ece
ASoC: Intel: avs: boards: Change rt286 card name
Rename FE from "avs_rt286" to "AVS I2S ALC286".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-16-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 15:04:16 +01:00
Amadeusz Sławiński
e7722ac9a8
ASoC: Intel: avs: boards: Change rt274 card name
Rename FE from "avs_rt274" to "AVS I2S ALC274".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-15-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 15:04:15 +01:00
Amadeusz Sławiński
c9763d849a
ASoC: Intel: avs: boards: Change probe card name
Rename FE from "avs_probe_mb" to "AVS PROBE".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-14-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 15:04:14 +01:00
Amadeusz Sławiński
091614d1c5
ASoC: Intel: avs: boards: Change pcm3168a card name
Rename FE from "avs_pcm3168a" to "AVS I2S PCM3168A".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-13-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 15:04:13 +01:00
Amadeusz Sławiński
c0019bb4ee
ASoC: Intel: avs: boards: Change nau8825 card name
Rename FE from "avs_nau8825" to "AVS I2S NAU8825".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-12-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 15:04:12 +01:00
Amadeusz Sławiński
3051c1b91c
ASoC: Intel: avs: boards: Change max98927 card name
Rename FE from "avs_max98927" to "AVS I2S MAX98927".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-11-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 15:04:11 +01:00
Amadeusz Sławiński
e91f9a93c3
ASoC: Intel: avs: boards: Change max98373 card name
Rename FE from "avs_max98373" to "AVS I2S MAX98373".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-10-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 15:04:11 +01:00
Amadeusz Sławiński
20d5ff6d7e
ASoC: Intel: avs: boards: Change max98357a card name
Rename FE from "avs_max98357a" to "AVS I2S MAX98357A".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-9-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 15:04:09 +01:00
Amadeusz Sławiński
71439093a0
ASoC: Intel: avs: boards: Change sspX-loopback card name
Rename FE from "sspX-loopback" to "AVS I2S TEST-X".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-8-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 15:04:08 +01:00
Amadeusz Sławiński
65327c926e
ASoC: Intel: avs: boards: Change hdaudio card name
Rename FE from "hdaudioB0D0"/"hdaudioB0D2" to "AVS HD-Audio"/"AVS HDMI".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-7-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 15:04:07 +01:00
Amadeusz Sławiński
102d3f95e6
ASoC: Intel: avs: boards: Change es8336 card name
Rename FE from "avs_es8336" to "AVS I2S ES8336".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-6-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 15:04:06 +01:00
Amadeusz Sławiński
1cfb242fc1
ASoC: Intel: avs: boards: Change DMIC card name
Rename FE from "avs_dmic" to "AVS DMIC".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-5-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 15:04:05 +01:00
Amadeusz Sławiński
958fd3ff10
ASoC: Intel: avs: boards: Change da7219 card name
Rename FE from "avs_da7219" to "AVS I2S DA7219".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-4-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 15:04:04 +01:00
Amadeusz Sławiński
e3dc0351d7
ASoC: Intel: avs: Use topology information for endpoint numbers
Use DAI PCM ID from topology as Front End device endpoint number. This
allows devices to be more naturally enumerated starting from 0, like
most cards, instead of values like 1 or 2.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-3-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 15:04:04 +01:00
Amadeusz Sławiński
1581d5c682
ASoC: Intel: avs: boards: Add Kconfig option for obsolete card names
Add backward compatibility Kconfig option to allow for enabling obsolete
card names.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-2-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 15:04:03 +01:00
Amadeusz Sławiński
2b2e091271
ASoC: Intel: avs: Add boards definitions for FCL platform
Reuse TGL definitions to define boards configurations for the
supported ACE platforms.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Link: https://patch.msgid.link/20250407112352.3720779-10-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 14:40:03 +01:00
Cezary Rojewski
796b6ab634
ASoC: Intel: avs: Conditionally add DMA config when creating Copier
Starting from LunarLake (LNL) platform, non-HDAudio transfers e.g.:
I2S/DMIC utilize HDAudio LINK DMA instead of GPDMA for the data
transfer. Implement avs_append_dma_cfg() to account for the changes made
in LNL timeframe.

The handler checks the platform and transfer type before appending the
DMA configuration to the module's payload so it can safely be called
within the common initialization flow for Copier/WHM modules.

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Link: https://patch.msgid.link/20250407112352.3720779-9-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 14:40:02 +01:00
Cezary Rojewski
86b59ac80d
ASoC: Intel: avs: Dynamically assign ops for non-HDAudio DAIs
Provide dynamic selection mechanism of DAI operations for the
non-HDAudio DAIs so that both LunarLake+ platforms and their
predecessors are supported.

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Link: https://patch.msgid.link/20250407112352.3720779-8-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 14:40:01 +01:00
Cezary Rojewski
716643786f
ASoC: Intel: avs: PCM operations for LNL-based platforms
Starting from LNL platform the so-called non-HDAudio transfer types,
e.g.: I2S/DMIC, utilize HDAudio LINK DMA rather than GPDMA for the data
streaming. In essence, all transfer types now utilize HDAudio Link. Most
of the existing code can be reused with the major difference being
HDAudio Link query method:

- fetch the Link by codec.addr in standard HDAudio transfer case
- fetch the Link by LEPTR.ID in non-HDAudio transfer case

To make the unification happen, store pointer to the Link in dma_data
and utilize it in the common code. And to avoid confusion in
transfer-type naming between cAVS-ACE 1.x (SkyLake till MeteorLake) and
ACE 2.0+ architecture (LunarLake onward), use:

- 'hda' for typical HDAudio transfer case
- 'nonhda' for non-HDAudio transfer case, cAVS-ACE 1.x
- 'althda' for non-HDAudio transfer case, ACE 2.0+

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Link: https://patch.msgid.link/20250407112352.3720779-7-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 14:40:00 +01:00
Cezary Rojewski
af1c968d25
ASoC: Intel: avs: PTL-based platforms support
Define handlers specific to ACE platforms, that Frisco Lake (FCL), a
PantherLake (PTL)-based platform, is founded upon. Most operations are
still inherited from their predecessors with the major difference being
AudioDSP cores management - replaced by DSP-domain power management.

Software has to ensure the DSP domain is both powered on and its
power-gating disabled before it can be utilized for streaming.

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Link: https://patch.msgid.link/20250407112352.3720779-6-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 14:39:59 +01:00
Cezary Rojewski
75f3c607b1
ASoC: Intel: avs: Relocate DSP status registers
The firmware status and error registers are not part of SRAM on ACE
platforms. As these registers take part in IPC on ACE and cAVS platforms
both, relocate the field denoting their offset to Host-IPC descriptor.

In consequence, code remains cohesive with the ACE specs while still
maintaining high readability for the cAVS platforms.

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Link: https://patch.msgid.link/20250407112352.3720779-5-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 14:39:58 +01:00
Cezary Rojewski
b9a3ec6049
ASoC: Intel: avs: Read HW capabilities when possible
Starting with LunarLake (LNL) and onward, some hardware capabilities are
visible to the sound driver directly. At the same time, these may no
longer be visible to the AudioDSP firmware. Update resource allocation
function to rely on the registers when possible.

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Link: https://patch.msgid.link/20250407112352.3720779-4-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 14:39:57 +01:00
Cezary Rojewski
acd2563f30
ASoC: Intel: avs: Ignore Vendor-space manipulation for ACE
A number of Vendor Specific registers utilized on cAVS architecture
(SkyLake till RaptorLake) are not present on ACE hardware (MeteorLake
onward). Similarly, certain recommended procedures do not apply. Adjust
existing code to be ACE-friendly.

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Link: https://patch.msgid.link/20250407112352.3720779-3-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-07 14:39:56 +01:00
Helen Koike
e0cd450a2d
ASoC: Intel: Remove unused SND_SOC_INTEL_DA7219_MAX98357A_GENERIC
This config was used by bxt_da7219_max98357a and kbl_da7219_max98357a,
both were removed.

Now it is not used anymore, so remove it.

Signed-off-by: Helen Koike <koike@igalia.com>
Link: https://patch.msgid.link/20250403130242.1227770-1-koike@igalia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-06 23:25:17 +01:00
Cezary Rojewski
d0e1a832ce
ASoC: Intel: avs: Permit deferred card registration
Utilize card->deferrable flag to support delayed card enumeration -
scenario where snd_soc_register_card() occurs before all the required
card components are registered into the framework.

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250404101622.3673850-2-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-06 23:25:12 +01:00
Henry Martin
95f723cf14
ASoC: Intel: avs: Fix null-ptr-deref in avs_component_probe()
devm_kasprintf() returns NULL when memory allocation fails. Currently,
avs_component_probe() does not check for this case, which results in a
NULL pointer dereference.

Fixes: 739c031110 ("ASoC: Intel: avs: Provide support for fallback topology")
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Ethan Carter Edwards <ethan@ethancedwards.com>
Signed-off-by: Henry Martin <bsdhenrymartin@gmail.com>
Link: https://patch.msgid.link/20250402141411.44972-1-bsdhenrymartin@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-06 23:18:19 +01:00
Peter Ujfalusi
dfcf3dde45
ASoC: Intel: sof_sdw: Add quirk for Asus Zenbook S16
Asus laptops with sound PCI subsystem ID 1043:1f43 have the DMICs
connected to the host instead of the CS42L43 so need the
SOC_SDW_CODEC_MIC quirk.

Link: https://github.com/thesofproject/sof/issues/9930
Fixes: 0843449708 ("ASoC: Intel: sof_sdw: Add quirk for Asus Zenbook S14")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Simon Trimmer <simont@opensource.cirrus.com>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20250404133213.4658-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-06 23:18:14 +01:00
Mark Brown
b7a253db0a
ASoC: Intel: avs: Replace devm_kzalloc() with
Merge series from Ethan Carter Edwards <ethan@ethancedwards.com>:

Open coded arithmetic in allocator arguments is discouraged. Helper
functions like kcalloc or, in this case, devm_kcalloc are preferred. Not
only for readability purposes but safety purposes.

The changes move `devm_kzalloc(dev, sizeof(var) * n, GFP_KERNEL)` to
the helper function `devm_kcalloc(dev, n, sizeof(var), GFP_KERNEL)`.

Here is a series of four patches within the Intel/avs drivers that make
these changes. They are all compile tested only but should have no
effect on runtime behaviour.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments
Link: https://github.com/KSPP/linux/issues/162
2025-03-18 15:34:29 +00:00
Ethan Carter Edwards
3602571baf
ASoC: Intel: avs: max98927: Replace devm_kzalloc() with devm_kcalloc()
Open coded arithmetic in allocator arguments is discouraged [1]. Helper
functions like kcalloc or, in this case, devm_kcalloc are preferred.

[1]: https://www.kernel.org/doc/html/latest/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments

Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250317-sound-avs-kcalloc-v2-4-20e2a132b18f@ethancedwards.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-17 12:33:02 +00:00
Ethan Carter Edwards
bde479694a
ASoC: Intel: avs: max98373: Replace devm_kzalloc() with devm_kcalloc()
Open coded arithmetic in allocator arguments is discouraged [1]. Helper
functions like kcalloc or, in this case, devm_kcalloc are preferred.

[1]: https://www.kernel.org/doc/html/latest/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments

Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250317-sound-avs-kcalloc-v2-3-20e2a132b18f@ethancedwards.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-17 12:33:01 +00:00
Ethan Carter Edwards
61b1a1bddf
ASoC: Intel: avs: ssm4567: Replace devm_kzalloc() with devm_kcalloc()
Open coded arithmetic in allocator arguments is discouraged [1]. Helper
functions like kcalloc or, in this case, devm_kcalloc are preferred.

[1]: https://www.kernel.org/doc/html/latest/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments

Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250317-sound-avs-kcalloc-v2-2-20e2a132b18f@ethancedwards.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-17 12:33:00 +00:00
Ethan Carter Edwards
6d9d66626c
ASoC: Intel: avs: Replace devm_kzalloc() with devm_kcalloc()
Open coded arithmetic in allocator arguments is discouraged [1]. Helper
functions like kcalloc or, in this case, devm_kcalloc are preferred.

[1]: https://www.kernel.org/doc/html/latest/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments

Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250317-sound-avs-kcalloc-v2-1-20e2a132b18f@ethancedwards.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-17 12:32:59 +00:00
Takashi Iwai
2c498d9a3a
ASoC: intel: catpt: Convert to RUNTIME_PM_OPS() & co
Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros
instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together
with pm_ptr(), which allows us dropping ugly __maybe_unused
attributes.

This optimizes slightly when CONFIG_PM is disabled, too.

Cc: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20250317095603.20073-63-tiwai@suse.de
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-17 10:14:42 +00:00
Takashi Iwai
7295486335
ASoC: intel: avs: Convert to RUNTIME_PM_OPS()
Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS()
together with pm_ptr(), which allows us dropping ugly __maybe_unused
attributes.

This optimizes slightly when CONFIG_PM is disabled, too.

Cc: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20250317095603.20073-62-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-17 10:14:41 +00:00
Naveen Manohar
ac5b4a24f1
ASoC: Intel: soc-acpi-intel-ptl-match: Add cs42l43 support
Patch adds driver data & match table for cs42l43
multi-function codec on PTL-RVP at sdw link3.

Signed-off-by: Naveen Manohar <naveen.m@intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20250311003101.80967-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-11 13:17:21 +00:00
Mark Brown
c6141ba011
ASoC: Merge up fixes
Merge branch 'for-6.14' of
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into
asoc-6.15 to avoid a bunch of add/add conflicts.
2025-03-05 19:10:50 +00:00
Bard Liao
7172d9ae29
ASoC: Intel: soc-acpi-intel-ptl-match: add cs42l43 6x cs35l56 support
This add a match for cs42l43 on sdw link 2, 3 cs35l56 on sdw link 1 and
3. All speakers are aggregated.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Link: https://patch.msgid.link/20250305135443.201884-10-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-05 14:05:43 +00:00
Bard Liao
1ff0752269
ASoC: Intel: soc-acpi-intel-lnl-match: add cs42l43 6x cs35l56 support
This add a match for cs42l43 on sdw link 2, 3 cs35l56 on sdw link 1 and
3. All speakers are aggregated.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Link: https://patch.msgid.link/20250305135443.201884-9-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-05 14:05:42 +00:00
Bard Liao
c7a6a74f84
ASoC: Intel: soc-acpi-intel-ptl-match: add sdw multi function mockup codec
Add a SoundWire multi function mockup codec support.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20250305135443.201884-8-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-05 14:05:41 +00:00
Bard Liao
438405704e
ASoC: Intel: soc-acpi-intel-lnl-match: add sdw multi function mockup codec
Add a SoundWire multi function mockup codec support.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20250305135443.201884-7-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-05 14:05:40 +00:00
Bard Liao
e1a0657c6d
ASoC: Intel: add multi-function SDW mockup codec match
SoundWire multi function codecs are common used in recent platforms.
Add a multi function mockup codec to test without real codec.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20250305135443.201884-6-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-05 14:05:39 +00:00
Peter Ujfalusi
ffe450cb6b
ASoC: Intel: soc-acpi-intel-ptl-match: add rt713_vb_l3_rt1320_l12 support
Add rt713_vb on SDW link 3 and 2 rt1320 on SDW link 1 and 2 configuration
support.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20250305135443.201884-4-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-05 14:05:37 +00:00
Peter Ujfalusi
02467341e3
ASoC: Intel: soc-acpi-intel-ptl-match: add rt712_vb_l3_rt1320_l2 support
Add rt712_vb on SDW link 3 and 1 rt1320 on SDW link 2 configuration
support.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20250305135443.201884-3-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-05 14:05:37 +00:00
Bard Liao
8b36447c9a
ASoC: Intel: adl: add 2xrt1316 audio configuration
That is a speaker only configuration and 2 rt1316 are on link 0 and 2.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20250305135443.201884-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-05 14:05:36 +00:00
Peter Ujfalusi
4363f02a39
ASoC: Intel: sof_sdw: Fix unlikely uninitialized variable use in create_sdw_dailinks()
Initialize current_be_id to 0 to handle the unlikely case when there are
no devices connected to a DAI.
In this case create_sdw_dailink() would return without touching the passed
pointer to current_be_id.

Found by gcc -fanalyzer

Fixes: 59bf457d80 ("ASoC: intel: sof_sdw: Factor out SoundWire DAI creation")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Cc: stable@vger.kernel.org
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20250303065552.78328-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03 13:03:08 +00:00
Kuninori Morimoto
d2f277bf8a
ASoC: intel: max98357a: use inclusive language for SND_SOC_DAIFMT_CBx_CFx
In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87ikoxa3km.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03 12:59:05 +00:00
Kuninori Morimoto
bcb896a698
ASoC: intel: max98927: use inclusive language for SND_SOC_DAIFMT_CBx_CFx
In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87jz9da3kq.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03 12:59:04 +00:00
Kuninori Morimoto
4994da5c7f
ASoC: intel: nau8825: use inclusive language for SND_SOC_DAIFMT_CBx_CFx
In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87ldtta3kt.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03 12:59:03 +00:00
Kuninori Morimoto
0808c1ab8d
ASoC: intel: ssm4567: use inclusive language for SND_SOC_DAIFMT_CBx_CFx
In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87mse9a3kx.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03 12:59:02 +00:00
Kuninori Morimoto
e15abfa601
ASoC: intel: da7219: use inclusive language for SND_SOC_DAIFMT_CBx_CFx
In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87o6ypa3l1.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03 12:59:01 +00:00
Kuninori Morimoto
6d41096d7d
ASoC: intel: rt5514: use inclusive language for SND_SOC_DAIFMT_CBx_CFx
In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87plj5a3l4.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03 12:59:00 +00:00
Kuninori Morimoto
f5617b647c
ASoC: intel: rt298: use inclusive language for SND_SOC_DAIFMT_CBx_CFx
In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87r03la3lb.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03 12:58:59 +00:00
Kuninori Morimoto
ccf2a77a5d
ASoC: intel: rt286: use inclusive language for SND_SOC_DAIFMT_CBx_CFx
In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87seo1a3lf.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03 12:58:58 +00:00
Kuninori Morimoto
836d2924c0
ASoC: intel: rt274: use inclusive language for SND_SOC_DAIFMT_CBx_CFx
In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87tt8ha3li.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03 12:58:57 +00:00
Mark Brown
579a20181c
Convert sound drivers to use devm_kmemdup_array()
Merge series from Raag Jadav <raag.jadav@intel.com>:

This series converts sound drivers to use the newly introduced[1]
devm_kmemdup_array() helper.

[1] https://lore.kernel.org/r/20250212062513.2254767-1-raag.jadav@intel.com
2025-02-28 16:33:23 +00:00
Raag Jadav
0bd862846e
ASoC: Intel: avs: use devm_kmemdup_array()
Convert to use devm_kmemdup_array() and while at it, use source size
instead of destination.

Signed-off-by: Raag Jadav <raag.jadav@intel.com>
Acked-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patch.msgid.link/20250228062812.150004-2-raag.jadav@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-28 14:00:57 +00:00
Bard Liao
4bcef04ca6
ASoC: Intel: sof_sdw: warn both sdw and pch dmic are used
Typically, SoundWire MIC and PCH DMIC will not coexist. However, we may
want to use both of them in some special cases. Add a warning to let
users know that SoundWire MIC and PCH DMIC are both present and they
could overwrite it with kernel params.

Signed-off-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>
Link: https://patch.msgid.link/20250225093716.67240-3-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-25 12:39:09 +00:00
Cezary Rojewski
a9409fcb97
ASoC: Intel: avs: Support multi-channel PEAKVOL instantiation
The PEAKVOL module initialization procedure allows for specifying
default configuration for all individual channels. To reflect that in
the code, first update avs_get_module_control() to allow for selecting
Volume or Mute control based on needs and then apply the settings with
newly added avs_peakvol_set_volume() and avs_peakvol_set_mute().

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250217102115.3539427-11-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-24 16:01:59 +00:00
Cezary Rojewski
76e0131528
ASoC: Intel: avs: Honor the invert flag for mixer controls
Values for the mute flag represented on the AudioDSP side are inverted.
Check mixer control description and initialize default values
accordingly.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250217102115.3539427-10-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-24 16:01:58 +00:00
Amadeusz Sławiński
a4217a0368
ASoC: Intel: avs: Add support for mute for PEAKVOL and GAIN
With recent updates to AudioDSP firmware, mute functionality has been
added to PEAKVOL and GAIN modules. The operation occurs over IPC
similarly to how volume is configured. Wire it up to kcontrol
infrastructure present in the avs-driver.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250217102115.3539427-9-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-24 16:01:57 +00:00
Cezary Rojewski
4c32ebcc86
ASoC: Intel: avs: Move to the new control operations
Allow for multi-channel volume controls to be utilized by an application
by moving over to the new implementation. Drop all unused code in the
process.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250217102115.3539427-8-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-24 16:01:56 +00:00
Cezary Rojewski
c321a4d705
ASoC: Intel: avs: New volume control operations
To provide multi-channel - more than 2 - capability to volume controls
implement operations that honor the num_channels of a mixer control. As
mc->num_channels can be 0 and is in fact the default behavior, the new
functions decide between ALL_CHANNELS_MASK and individual channels based
on the field value.

To avoid hard-to-review delta when refactoring the code, first implement
the new behavior with follow up changes cleaning things up.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250217102115.3539427-7-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-24 16:01:55 +00:00
Cezary Rojewski
10188a25c9
ASoC: Intel: avs: Update VOLUME and add MUTE IPCs
For mute kcontrols to have an effect add IPCs for triggering the mute
operation on the DSP side. On top of basic get/set, an aggregated
variant of the latter is provided for both MUTE and, to already present
VOLUME IPC. It allows for efficient transmission of multiple parameters
at once.

While at it, sort the functions - getters come before setters in the
AudioDSP firmware interface as well as in the kcontrol one.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250217102115.3539427-6-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-24 16:01:55 +00:00
Amadeusz Sławiński
4c43a930e3
ASoC: Intel: avs: Add volume control for GAIN module
The AudioDSP firmware's GAIN module has same initialization payload as
PEAKVOL and user volume setting can be applied up-front. Update existing
code to account for PEAKVOL and GAIN both.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250217102115.3539427-5-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-24 16:01:54 +00:00
Cezary Rojewski
28feec15fa
ASoC: Intel: avs: Make PEAKVOL configurable from topology
The driver exposes volume kcontrols if PEAKVOL/GAIN module is present
in the streaming path. Currently there is no control over their default
values including the effect that may accompany the volume change event.

Add template for PEAKVOL/GAIN module which holds all the information
needed to address the limitation.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250217102115.3539427-4-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-24 16:01:53 +00:00
Thorsten Blum
994719ed6d
ASoC: Intel: avs: Use str_on_off() in avs_dsp_core_power()
Remove hard-coded strings by using the str_on_off() helper function.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250212091227.1217-3-thorsten.blum@linux.dev
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-13 14:49:48 +00:00
Peter Ujfalusi
cb78b8dc78
ASoC: Intel: soc-acpi-intel-ptl-match: revise typo of rt713_vb_l2_rt1320_l13
s/lnl/ptl

Fixes: a7ebb02551 ("ASoC: Intel: soc-acpi-intel-ptl-match: add rt713_vb_l2_rt1320_l13 support")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20250210031954.6287-3-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-10 13:41:39 +00:00
Peter Ujfalusi
78ccf6a6ba
ASoC: Intel: soc-acpi-intel-ptl-match: revise typo of rt712_vb + rt1320 support
s/lnl/ptl

Fixes: bd40d91272 ("ASoC: Intel: soc-acpi-intel-ptl-match: add rt712_vb + rt1320 support")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20250210031954.6287-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-10 13:41:38 +00:00
Peter Ujfalusi
852c0b7204
ASoC: Intel: soc-acpi-intel-ptl-match: add rt713_vb_l2_rt1320_l13
s/lnl/ptl

Fixes: a7ebb02551 ("ASoC: Intel: soc-acpi-intel-ptl-match: add rt713_vb_l2_rt1320_l13 support")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20250207123637.215320-3-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-07 13:34:13 +00:00
Peter Ujfalusi
91f505dc3a
ASoC: Intel: soc-acpi-intel-ptl-match: add rt712_vb + rt1320 support
s/lnl/ptl

Fixes: bd40d91272 ("ASoC: Intel: soc-acpi-intel-ptl-match: add rt712_vb + rt1320 support")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20250207123637.215320-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-07 13:34:12 +00:00
Mark Brown
f2d161e580
ASoC: and adn use snd_soc_ret()
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

Each ASoC framwark is using own snd_xxx_ret() function, but we can share
these. This patch-set adds new snd_soc_ret() and use it.

checkpatch indicates that ENOTSUPP is not a SUSV4 error code, prefer to
use EOPNOTSUPP. So this patch-set adds it, but not remove existing ENOTSUPP.

Link: https://lore.kernel.org/r/8734gvsg5i.wl-kuninori.morimoto.gx@renesas.com
2025-02-06 20:44:54 +00:00
Mark Brown
7858defd60
ASoC: Intel: sof_sdw: Add support for new devices
Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>:

This patch series adds support for Asus Zenbook S14 and Fatcat board.
2025-02-06 16:16:42 +00:00