Commit Graph

3860 Commits

Author SHA1 Message Date
Cezary Rojewski
64007ad3e2 ASoC: Intel: avs: Use snd_codec format when initializing probe
The data probing is a debug feature. Currently parameters channels and
rate specified by the application are read while the format is ignored.
More robust approach is to read all of them.

Audio format, while not used by the Probe module for PCM streaming,
takes part in the gateway initialization on the DSP side. With full
parametrization we gain better coverage with the data probing feature.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20251023092348.3119313-4-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-10-23 13:42:27 +01:00
Cezary Rojewski
845f716dc5 ASoC: Intel: avs: Disable periods-elapsed work when closing PCM
avs_dai_fe_shutdown() handles the shutdown procedure for HOST HDAudio
stream while period-elapsed work services its IRQs. As the former
frees the DAI's private context, these two operations shall be
synchronized to avoid slab-use-after-free or worse errors.

Fixes: 0dbb186c35 ("ASoC: Intel: avs: Update stream status in a separate thread")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20251023092348.3119313-3-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-10-23 13:42:26 +01:00
Cezary Rojewski
cfca1637bc ASoC: Intel: avs: Unprepare a stream when XRUN occurs
The pcm->prepare() function may be called multiple times in a row by the
userspace, as mentioned in the documentation. The driver shall take that
into account and prevent redundancy. However, the exact same function is
called during XRUNs and in such case, the particular stream shall be
reset and setup anew.

Fixes: 9114700b49 ("ASoC: Intel: avs: Generic PCM FE operations")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20251023092348.3119313-2-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-10-23 13:42:25 +01:00
Simon Trimmer
3bcdbc221d ASoC: Intel: soc-acpi-intel-ptl-match: Remove cs42l43 match from sdw link3
Removing this match entry ensures that a PTL system comprising of a
cs42l43 codec on link3 will use function topologies.

Previously the behaviour would be use the monolithic topology associated
with this codec match table entry in preference to function topologies
and if the system had a number of smart amplifiers then they would not
be instantiated.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Link: https://patch.msgid.link/20251016112601.187020-1-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-10-20 02:39:16 +01:00
Linus Torvalds
b66451723c Merge tag 'platform-drivers-x86-v6.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
Pull x86 platform driver updates from Ilpo Järvinen:

 - amd/pmf:
    - Add support for adjusting PMF PPT and PPT APU thresholds
    - Extend custom BIOS inputs for more policies
    - Update ta_pmf_action structure to the latest PMF TA

 - arm64:
    - thinkpad-t14s-ec: Add EC driver for ThinkPad T14s Gen6 Snapdragon

 - int3472:
    - Increase handshake GPIO delay

 - intel/pmc:
    - SSRAM support for Lunar Lake and Panther Lake
    - Support reading substate requirements data from S0ix blockers
      (for platforms starting from Panther Lake)
    - Wildcat Lake support

 - intel-uncore-freq:
    - Solve duplicate sysfs entry warnings
    - Present unique domain ID per package

 - portwell-ec:
    - Support suspend/resume
    - Add hwmon support for voltage and temperature

 - redmi-wmi:
    - Add WMI driver for Redmibook keyboard

 - think-lmi:
    - Certificate support for ThinkCenter

 - x86-android-tables + others:
    - Convert away from legacy GPIO APIs

 - x86-android-tables:
    - Add support for Acer A1-840 tablet
    - Fix modules list for Lenovo devices
    - Stop using EPROBE_DEFER

 - Miscellaneous cleanups / refactoring / improvements

* tag 'platform-drivers-x86-v6.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (63 commits)
  platform/x86: pcengines-apuv2: Use static device properties
  platform/x86: meraki-mx100: Use static device properties
  platform/x86: barco-p50-gpio: use software nodes for gpio-leds/keys
  platform/x86: x86-android-tablets: Stop using EPROBE_DEFER
  platform/x86: x86-android-tablets: Fix modules lists for Lenovo devices
  platform/x86: x86-android-tablets: Simplify lenovo_yoga_tab2_830_1050_exit()
  platform/x86: x86-android-tablets: Add support for Acer A1-840 tablet
  platform/x86: x86-android-tablets: Move Acer info to its own file
  platform/x86: x86-android-tablets: Update my email address
  platform/x86: x86-android-tablets: Simplify node-group [un]registration
  platform/x86: x86-android-tablets: use swnode_group instead of manual registering
  platform/x86: x86-android-tablets: replace bat_swnode with swnode_group
  platform/x86: x86-android-tablets: convert gpio_keys devices to GPIO references
  platform/x86: x86-android-tablets: remove support for GPIO lookup tables
  platform/x86: x86-android-tablets: convert Yoga Tab2 fast charger to GPIO references
  platform/x86: x86-android-tablets: convert HID-I2C devices to GPIO references
  platform/x86: x86-android-tablets: convert wm1502 devices to GPIO references
  platform/x86: x86-android-tablets: convert int3496 devices to GPIO references
  platform/x86: x86-android-tablets: convert EDT devices to GPIO references
  platform/x86: x86-android-tablets: convert Novatek devices to GPIO references
  ...
2025-10-04 15:28:18 -07:00
Takashi Iwai
eb379c3cab Merge branch 'for-linus' into for-next
Pull the last minute fixes for 6.17.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-09-28 18:45:34 +02:00
Takashi Iwai
6b9c4a05ae Merge tag 'asoc-v6.18-2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v6.18 round 2

Some more updates for v6.18, mostly fixes for the earlier pull request
with some cleanups and more minor fixes for older code.  We do have one
new driver, the TI TAS2783A, and some quirks for new platforms.
2025-09-28 15:41:17 +02:00
Takashi Iwai
329bdcbbd2 Merge branch 'for-linus' into for-next
Pull 6.17-devel branch for applying further changes cleanly.

Signed-off-by: Taksahi Iwai <tiwai@suse.de>
2025-09-28 08:34:58 +02:00
Dmitry Torokhov
0536b03729 platform/x86: x86-android-tablets: convert wm1502 devices to GPIO references
Now that gpiolib supports software nodes to describe GPIOs, switch the
driver away from using GPIO lookup tables for wm1502 devices to using
PROPERTY_ENTRY_GPIO().

Adding a swnode to the yt3 spi device changes the name of the SPI/codec
device and the sound/soc/intel/boards/bytcr_wm5102.c machine driver looks
up the code by name, update the machine driver to use the new name.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Tested-by: Hans de Goede <hansg@kernel.org>
Reviewed-by: Hans de Goede <hansg@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hansg@kernel.org>
Link: https://patch.msgid.link/20250920200713.20193-8-hansg@kernel.org
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-09-26 14:26:22 +03:00
Mark Brown
fd98145543 Support reading Subsystem ID from Device Tree
Merge series from Stefan Binding <sbinding@opensource.cirrus.com>:

In PC systems using ACPI, the driver is able to read back an SSID from
the _SUB property. This SSID uniquely identifies the system, which
enables the driver to read the correct firmware and tuning for that
system from linux-firmware. Currently there is no way of reading this
property from device tree. Add an equivalent property in device tree
to perform the same role.
2025-09-23 10:28:45 +02:00
Niranjan H Y
63b4c34635 tas2783A: Add acpi match changes for Intel MTL
acpi match changes to support tas2783a on mtl
on link 0 for 2 devices

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Niranjan H Y <niranjan.hy@ti.com>
Link: https://patch.msgid.link/20250912083624.804-5-niranjan.hy@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-22 14:00:42 +02:00
Takashi Iwai
b8d8265a0d Merge tag 'asoc-v6.18' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v6.18

A relatively quiet release for ASoC, we've had a lot of maintainance
work going on and several new drivers but really the most remarkable
thing is that we removed a driver, the WL1273 driver used in some old
Nokia systems that have had the underlying system support removed from
the kernel.

 - Morimoto-san continues his work on cleanups of the core APIs and
   enforcement of abstraction layers.
 - Lots of cleanups and conversions of DT bindings.
 - Substantial maintainance work on the Intel AVS drivers.
 - Support for Qualcomm Glymur and PM4125, Realtek RT1321, Shanghai
   FourSemi FS2104/5S, Texas Instruments PCM1754.
 - Remove support for TI WL1273.
2025-09-20 08:38:17 +02:00
Richard Fitzgerald
87cab86925 ASoC: Intel: sof_sdw: Prevent jump to NULL add_sidecar callback
In create_sdw_dailink() check that sof_end->codec_info->add_sidecar
is not NULL before calling it.

The original code assumed that if include_sidecar is true, the codec
on that link has an add_sidecar callback. But there could be other
codecs on the same link that do not have an add_sidecar callback.

Fixes: da52441802 ("ASoC: Intel: sof_sdw: Add callbacks to register sidecar devices")
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20250919140235.1071941-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-19 15:11:47 +01:00
Kuninori Morimoto
889dd56f8c ASoC: soc-dapm: tidyup idle_bias handling - step1
Current soc-dapm is using  "idle_bias_off", and its default settings
came from snd_soc_component "idle_bias_on". It is complicated/confusable.

Let's handling it as "idle_bias".

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/874itix06a.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-18 22:24:15 +01:00
Balamurugan C
cc648f4dde ASoC: Intel: PTL: Add entry for HDMI-In capture support to non-I2S codec boards.
Adding HDMI-In capture support for the PTL products which doesn't have
onboard I2S codec. But need to support HDMI-In capture via I2S and
audio playback through HDMI/DP monitor.

Signed-off-by: Balamurugan C <balamurugan.c@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20250915025655.1154279-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-15 12:49:12 +01:00
Mac Chiang
73caf2bcf3 ASoC: Intel: sof_sdw: use PRODUCT_FAMILY for Fatcat series
PRODUCT_NAME is machine-specific. Use PRODUCT_FAMILY to ensure
the machine quirk is applied with consistent audio configurations
across Fatcat series products.

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20250915025456.1154200-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-15 12:49:10 +01:00
Amadeusz Sławiński
690aa09b18 ASoC: Intel: catpt: Expose correct bit depth to userspace
Currently wrong bit depth is exposed in hw params, causing clipped
volume during playback. Expose correct parameters.

Fixes: a126750fc8 ("ASoC: Intel: catpt: PCM operations")
Reported-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Tested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250909092829.375953-1-amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-09 12:41:59 +01:00
Takashi Iwai
4336efb59e ASoC: Intel: bytcr_rt5651: Fix invalid quirk input mapping
When an invalid value is passed via quirk option, currently
bytcr_rt5640 driver just ignores and leaves as is, which may lead to
unepxected results like OOB access.

This patch adds the sanity check and corrects the input mapping to the
certain default value if an invalid value is passed.

Fixes: 64484ccee7 ("ASoC: Intel: bytcr_rt5651: Set card long_name based on quirks")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Message-ID: <20250902171826.27329-4-tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-08 18:39:12 +01:00
Takashi Iwai
fba404e4b4 ASoC: Intel: bytcr_rt5640: Fix invalid quirk input mapping
When an invalid value is passed via quirk option, currently
bytcr_rt5640 driver only shows an error message but leaves as is.
This may lead to unepxected results like OOB access.

This patch corrects the input mapping to the certain default value if
an invalid value is passed.

Fixes: 063422ca2a ("ASoC: Intel: bytcr_rt5640: Set card long_name based on quirks")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Message-ID: <20250902171826.27329-3-tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-08 18:39:11 +01:00
Takashi Iwai
b20eb0e8de ASoC: Intel: bytcht_es8316: Fix invalid quirk input mapping
When an invalid value is passed via quirk option, currently
bytcht_es8316 driver just ignores and leaves as is, which may lead to
unepxected results like OOB access.

This patch adds the sanity check and corrects the input mapping to the
certain default value if an invalid value is passed.

Fixes: 249d2fc9e5 ("ASoC: Intel: bytcht_es8316: Set card long_name based on quirks")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Message-ID: <20250902171826.27329-2-tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-08 18:39:10 +01:00
Joris Verhaegen
2c92e2fbe9 ALSA: compress_offload: Add 64-bit safe timestamp infrastructure
The copied_total field in struct snd_compr_tstamp is a 32-bit
value that can overflow on long-running high-bitrate streams,
leading to incorrect calculations for buffer availablility.

This patch adds a 64-bit safe timestamping mechanism.
A new UAPI struct, snd_compr_tstamp64, is added which uses 64-bit
types for byte counters. The relevant ops structures across the
ASoC and core compress code are updated to use this new struct.
ASoC drivers are updated to use u64 counters.

Internal timestamps being u64 now, a compatibility function is added
to convert the 64-bit timestamp back to the 32-bit format for legacy
ioctl callers.

Reviewed-by: Miller Liang <millerliang@google.com>
Tested-by: Joris Verhaegen <verhaegen@google.com>
Signed-off-by: Joris Verhaegen <verhaegen@google.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250905091301.2711705-2-verhaegen@google.com
2025-09-08 09:33:24 +02:00
Mark Brown
09be5b1c92 ASoC: Intel: avs: Adjust platform names
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>:

This series is a direct follow up to the recent
machine-board-registration changes [1]. Initially, a number of smaller
patchsets were part of a bigger block of changes. My attempt to split
them up to make the review easier was unfortunately not successful [2].

The goal of this series is the same one as with [1] - allow for multiple
cards of the same type without workarounds or code duplications.
With the machine-board names being unique - thanks to
PLATFORM_DEVID_AUTO - platform component names shall be adjusted too so
that no misbindings happen.

In essence, majority of the changes can be summarized as: simplifying
card and dai_link initialization. Actions:

- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage
- for the probe-board mach-context is dropped entirely. The panic [2] is
  gone

[1]: https://lore.kernel.org/linux-sound/20250827142229.869139-1-cezary.rojewski@intel.com/
[2]: https://lore.kernel.org/linux-sound/20250829225532.GA400117@ax162/
2025-09-03 18:58:55 +01:00
Cezary Rojewski
ce57b71800 ASoC: Intel: avs: ssm4567: Adjust platform name
The name of the platform component matches the name of the card's
platform_device.

This allows for simplifying card and dai_link initialization:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-18-cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-03 12:34:13 +01:00
Cezary Rojewski
6c402acec6 ASoC: Intel: avs: rt5682: Adjust platform name
The name of the platform component matches the name of the card's
platform_device.

This allows for simplifying card and dai_link initialization:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-17-cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-03 12:34:12 +01:00
Cezary Rojewski
b0e52296aa ASoC: Intel: avs: rt5663: Adjust platform name
The name of the platform component matches the name of the card's
platform_device.

This allows for simplifying card and dai_link initialization:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-16-cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-03 12:34:11 +01:00
Cezary Rojewski
69fe78271d ASoC: Intel: avs: rt5514: Adjust platform name
The name of the platform component matches the name of the card's
platform_device.

This allows for simplifying card and dai_link initialization:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-15-cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-03 12:34:10 +01:00
Cezary Rojewski
fffac55850 ASoC: Intel: avs: rt298: Adjust platform name
The name of the platform component matches the name of the card's
platform_device.

This allows for simplifying card and dai_link initialization:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-14-cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-03 12:34:09 +01:00
Cezary Rojewski
210233c24d ASoC: Intel: avs: rt286: Adjust platform name
The name of the platform component matches the name of the card's
platform_device.

This allows for simplifying card and dai_link initialization:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-13-cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-03 12:34:09 +01:00
Cezary Rojewski
1a78108293 ASoC: Intel: avs: rt274: Adjust platform name
The name of the platform component matches the name of the card's
platform_device.

This allows for simplifying card and dai_link initialization:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-12-cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-03 12:34:08 +01:00
Cezary Rojewski
a46b3da24c ASoC: Intel: avs: probe: Refactor dai_link creation
To allow for multiple instances of the card, move away from static
dai_link declaration.

While at it, simplify the code as the name of the platform component
matches the name of the card's platform_device:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-11-cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-03 12:34:07 +01:00
Cezary Rojewski
ba36843282 ASoC: Intel: avs: nau8825: Adjust platform name
The name of the platform component matches the name of the card's
platform_device.

This allows for simplifying card and dai_link initialization:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-10-cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-03 12:34:06 +01:00
Cezary Rojewski
31fc544ad8 ASoC: Intel: avs: max98927: Adjust platform name
The name of the platform component matches the name of the card's
platform_device.

This allows for simplifying card and dai_link initialization:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-9-cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-03 12:34:05 +01:00
Cezary Rojewski
ed23ac9b30 ASoC: Intel: avs: max98373: Adjust platform name
The name of the platform component matches the name of the card's
platform_device.

This allows for simplifying card and dai_link initialization:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-8-cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-03 12:34:04 +01:00
Cezary Rojewski
314d8f574a ASoC: Intel: avs: max98357a: Adjust platform name
The name of the platform component matches the name of the card's
platform_device.

This allows for simplifying card and dai_link initialization:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-7-cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-03 12:34:03 +01:00
Cezary Rojewski
d4b60caaef ASoC: Intel: avs: i2stest: Adjust platform name
The name of the platform component matches the name of the card's
platform_device.

This allows for simplifying card and dai_link initialization:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-6-cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-03 12:34:02 +01:00
Cezary Rojewski
cd405e6a94 ASoC: Intel: avs: es8336: Adjust platform name
The name of the platform component matches the name of the card's
platform_device.

This allows for simplifying card and dai_link initialization:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-5-cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-03 12:34:01 +01:00
Cezary Rojewski
765ee69f5e ASoC: Intel: avs: dmic: Refactor dai_link creation
To allow for multiple instances of the card, move away from static
dai_link declaration.

While at it, simplify the code as the name of the platform component
matches the name of the card's platform_device:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-4-cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-03 12:34:00 +01:00
Cezary Rojewski
7fa2ebe9b7 ASoC: Intel: avs: da7219: Adjust platform name
The name of the platform component matches the name of the card's
platform_device.

This allows for simplifying card and dai_link initialization:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-3-cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-03 12:33:59 +01:00
Cezary Rojewski
0e3448f069 ASoC: Intel: avs: hda: Adjust platform name
The name of the platform component matches the name of the card's
platform_device.

This allows for simplifying card and dai_link initialization:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-2-cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-03 12:33:58 +01:00
Cezary Rojewski
a37280daa4 ASoC: Intel: avs: Allow i2s test and non-test boards to coexist
The i2s_test card serves debug purpose and is not probed by default.
Currently i2s_test and non-i2s_test sound cards exclude each other. To
increase the test coverage, allow both board types to be probed
simultaneously and share the available SSP port pool.

As 'i2s_test' module parameter is empty by default and requires manual
input from user to activate, there is no impact for standard production
scenarios.

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Message-ID: <20250827142229.869139-6-cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-08-28 12:29:11 +02:00
Cezary Rojewski
db41fe9baa ASoC: Intel: avs: Simplify avs_get_i2s_boards()
No functional changes, just code simplification and readability
improvements as there is no need to operate on 'struct avs_acpi_boards'
if 'struct snd_soc_acpi_mach' is what interests us.

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Message-ID: <20250827142229.869139-5-cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-08-28 12:29:10 +02:00
Cezary Rojewski
a44281b8b5 ASoC: Intel: avs: Simplify dmi_match_quirk()
No functional changes, just code lines reduction.

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Message-ID: <20250827142229.869139-4-cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-08-28 12:29:09 +02:00
Cezary Rojewski
6acfaee44c ASoC: Intel: avs: Cleanup duplicate members
Switch to the new board registration functions and remove the
then-unused code.

The SSP-number-check is still important and cannot be just dropped. Move
it from avs_register_i2s_board(), which is being removed with this
patch, to avs_register_i2s_boards() to maintain sanity when registering
a board.

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Message-ID: <20250827142229.869139-3-cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-08-28 12:29:08 +02:00
Cezary Rojewski
3351e814cb ASoC: Intel: avs: New board registration routines
To support multiple instances of the same card utilize
PLATFORM_DEVID_AUTO when registering new platform devices. This
adaptation is also an opportunity to streamline the devices
registration - avs_register_board().

All the new functions are equivalents of the existing ones apart from
adjusting platform_device_register_data() call with PLATFORM_DEVID_AUTO
and code size reduction given the presence of unified register function.
Follow up changes will complete the transition and cleanup the duplicate
members.

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Message-ID: <20250827142229.869139-2-cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-08-28 12:29:08 +02:00
Mark Brown
9963b1fde2 ASoC: Intel: avs: Code cleanups and separation
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>:

Set of patches that brings no new functionality but makes it easier to
maintain and read the avs-driver code. There is one 'fix' among them -
the third patch, described below.

First, debug-related code - mainly the data-probing feature - is mixed
with non-debug PCM code. Separate it into debug.h and update the pcm.c
file.

Next, as the probing-board is not tied to any topology file, it shall
not using struct avs_soc_component descriptor but the basic struct
snd_soc_component one. While on the first sight this is just bump in
LOCs, runtime is simplified as no topology checks and related code will
be engaged.

With probing-board addressed and debug code relocated:
- address the component-teardown issues when the
componet->name points to a string which is shared by multiple components
and/or machine boards. devm_kstrdup() makes this go away.

- streamline the naming scheme for the functions engaged in the
components registration. This is purely a readability improvement.
2025-08-19 16:54:00 +01:00
Cezary Rojewski
2a55135201 ASoC: Intel: avs: Streamline register-component function names
Word 'component' is commonly used in ASoC when referring to any
component, regardless if it is a platform-type or codec-type component.
Reword all avs_xxx_platform_register() to match the scheme present in
ASoC's core. In case of avs_soc_component_register(), the name is
simplified.

Summary:
- avs_xxx_platform_register() -> avs_register_xxx_component()
- avs_soc_component_register() -> avs_register_component()

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/20250818104126.526442-5-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-08-18 13:10:08 +01:00
Cezary Rojewski
4dee5c1cc4 ASoC: Intel: avs: Do not share the name pointer between components
By sharing 'name' directly, tearing down components may lead to
use-after-free errors. Duplicate the name to avoid that.

At the same time, update the order of operations - since commit
cee28113db ("ASoC: dmaengine_pcm: Allow passing component name via
config") the framework does not override component->name if set before
invoking the initializer.

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/20250818104126.526442-4-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-08-18 13:10:07 +01:00
Cezary Rojewski
df36e5c197 ASoC: Intel: avs: Drop pcm.h dependency for probes
The 'probe' machine board is not a typical one, it serves debug purpose
only and does not expect any kind of topology. The topology descriptor
pointer (acomp->tplg) is the only reason an avs-driver component would
utilize the pcm.c helpers and be described by a 'struct
avs_soc_component' instance rather than 'struct snd_soc_component' one.

Cut the line linking probes.c with pcm.h to avoid confusing readers.
And with that link gone, constify the component-driver again.

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/20250818104126.526442-3-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-08-18 13:10:06 +01:00
Cezary Rojewski
62dc545be1 ASoC: Intel: avs: Separate debug symbols
Make it clear what is part of debug functionality and what is not by
separating debug symbols away from the common header file.

Apart from changing avs_probe_platform_register() to return -ENOTSUPP
when CONFIG_DEBUG_FS is disabled, status quo is achieved.

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/20250818104126.526442-2-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-08-18 13:10:05 +01:00
Liao Yuanhong
0e62438e47 ASoC: Intel: sst: Remove redundant semicolons
Remove unnecessary semicolons.

Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
Link: https://patch.msgid.link/20250813093903.551388-1-liaoyuanhong@vivo.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-08-13 20:22:50 +01:00