Commit Graph

3997 Commits

Author SHA1 Message Date
Charles Keepax
45cf24da0a
ASoC: Intel: soc-acpi-intel-ptl-match: Remove unnecessary cs42l43 match
For PTL onwards Cirrus are intending to rely on function topologies,
rather than using a match table for each system type. Remove this
unnecessary match table entry. Having the match entries can
mean that systems match when they should use function topologies
instead, resulting in incorrect audio configurations. Although,
admittedly this is not too likely with this 6x amp configuration
as those are quite rare, but best to follow best practice.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260520163631.3300102-3-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-05-21 19:18:01 +01:00
Charles Keepax
e0fb794d67
ASoC: soc-acpi-intel-ptl-match: Make Chrome matches conditional
For PTL onwards Cirrus are intending to rely on function
topologies, rather than using a match table for each system
type. Chrome systems tend to have custom magic in the topology
and thus need to load a specific file. This causes problems as
these system can have the same layout as generic laptops causing
the match to apply to other laptops. Add a DMI quirk that forces
these matches to only apply to specific devices.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260520163631.3300102-2-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-05-21 19:18:00 +01:00
Balamurugan C
2b8305f24a
ASoC: Intel: soc-acpi: Add entry for sof_es8336 in NVL match table.
Adding ES83x6 I2S codec support for NVL platforms and entry in match table.

Signed-off-by: Balamurugan C <balamurugan.c@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/20260520061143.2024963-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-05-21 19:13:25 +01:00
Jairaj Arava
fd9b9204f3
ASoC: Intel: sof_sdw: Add support for nvlrvp in NVL platform
Add an entry in the soundwire quirk table for novalake boards to support
NVL RVP

Signed-off-by: Jairaj Arava <jairaj.arava@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20260520060814.2024852-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-05-21 19:12:11 +01:00
Jang Pyohwan
d714913b61
ASoC: Intel: soc-acpi: add LG Gram 16Z90U RT713 + single RT1320 quirk
Add a SoundWire machine table entry for the LG Gram Pro 2026
(16Z90U-KU7BK), which has an unusual configuration:

  sdw:0:1:025d:1320:01   single stereo RT1320 SmartAmp on link 1
  sdw:0:3:025d:0713:01   RT713 jack/headset codec on link 3

Existing rt713-rt1320 boards have two RT1320 amps on different links
("link_mask = BIT(1) | BIT(2) | BIT(3)"). The LG Gram uses a single
stereo RT1320 chip, so the new entry uses "link_mask = BIT(1) |
BIT(3)" with the existing rt1320_1_group2_adr structure, leaving the
two-channel routing to the topology.

The RT713 on this board does not expose a SMART_MIC function in
ACPI, so the .machine_check callback used by the existing entries
(snd_soc_acpi_intel_sdca_is_device_rt712_vb) would reject this
board. Drop machine_check for the new entry; speaker output and
the headset jack do not depend on the SMART_MIC presence check.

The corresponding topology source has been submitted to the SOF
project at https://github.com/thesofproject/sof/pull/10760 . The
generated sof-ptl-rt713-l3-rt1320-l1-2ch.tplg and
nhlt-sof-ptl-rt713-l3-rt1320-l1.bin will follow in linux-firmware
once that lands.

Tested on Ubuntu 26.04 with kernel 7.0.0-15: speaker (RT1320
stereo), headphone jack with auto-routing, headset mic, and the
internal NHLT DMIC array all work via the UCM HiFi profile.

Signed-off-by: Jang Pyohwan <vhgksl@daum.net>
Link: https://patch.msgid.link/20260509175317.DnhjxHczQay7kkp5z6t4lg@vhgksl.daum.net
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-05-11 10:03:04 +09:00
Gary C Wang
242200c297
ASoC: soc-acpi-intel-arl-match: add rt712_l0_rt1320_l3 support
Add support for using the rt712 multi-function codec on link 0 and the
rt1320 amplifier on link 3 on ARL platforms.

Signed-off-by: Gary C Wang <gary.c.wang@intel.com>
Co-developed-by: Mac Chiang <mac.chiang@intel.com>
Signed-off-by: Mac Chiang <mac.chiang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20260508104239.1247525-3-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-05-11 10:02:28 +09:00
Mac Chiang
ac2f21cedd
ASoC: Intel: soc-acpi-intel-arl-match: Reorder ACPI machine tables
When the SOF device driver enumerates the machine tables,
it selects the entry with the most numbers of matched links in
ascending order.

Align the ordering with commit 08095e2099
("ASoC: Intel: soc-acpi-intel-ptl-match: Sort ACPI link/machine tables").

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20260508104239.1247525-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-05-11 10:02:27 +09:00
Cássio Gabriel
13d30682e8
ASoC: Intel: bytcr_wm5102: Fix MCLK leak on platform_clock_control error
If byt_wm5102_prepare_and_enable_pll1() fails in the
SND_SOC_DAPM_EVENT_ON() path, platform_clock_control() returns after
clk_prepare_enable(priv->mclk) without disabling the clock again.

This leaks an MCLK enable reference on failed power-up attempts. Add the
missing clk_disable_unprepare() on the error path, matching the unwind
used by the other Intel platform_clock_control() implementations.

Fixes: 9a87fc1e06 ("ASoC: Intel: bytcr_wm5102: Add machine driver for BYT/WM5102")
Cc: stable@vger.kernel.org
Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Link: https://patch.msgid.link/20260427-bytcr-wm5102-mclk-leak-v1-1-02b96d08e99c@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-28 17:50:08 +09:00
Linus Torvalds
a8e7ef3cec sound updates for 7.1-rc1
Nothing too thrilling here, but we see lots of driver updates and
 bug fixes, including quirk additions and refactoring works, while
 there have been little changes in the core functionality.
 Here are some highlights:
 
 * Core:
 - Add validation for the control API put callback
 - Fixes in compress-offload API timestamp handling
 - Continued ASoC core API cleanups
 
 * ASoC:
 - Add support for bus keepers (for Apple devices in future)
 - Enhancements to the SDCA support, including retaskable jacks
 - Test improvements for Cirrus Logic drivers
 - Lots of fixes for the NXP, nVidia and Qualcomm
 - Support for AMD RPL DMIC, Cirrus Logic CS42L43 and CS47L47, nVidia
   machines with CPCAP and WM8962
 
 * USB-audio:
 - Quirks for Huawei Headset, Focusrite Novation, MV-Silicon,
   Studio 1824, Arturia AF16Rig, Hotone Audio, Feaulle Rainbow,
   PreSonus AudioBox, Moondrop Ju Jiu, Scarlett 18i20, etc
 - Extended mixer volume quirk handling
 - UAF and other fixes for us144mkii, 6fire and caiaq drivers
 
 * HD-audio:
 - Add quirks or fixes for Acer, Lenovo, HP, ASUS machines
 - Fixes & cleanups of GPIO helper code
 
 * Misc:
 - Add suspend/resume support for multiple legacy ISA and Apple
   drivers
 - Further regression fixes for ctxfi driver
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmnfgwMOHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE8dGg/9E7iWm9T/M0hajUDVeOW5QBHc3dyqglQJdxRN
 xmvluoZeAk1a4k58iVEo20Q/T9jdOYiDJNMOhh/GaxmRenMC4W9yhpUlJ88Nz1Pb
 sUV88SpPsF6GfxU9QDkN478tzCov4BKHiO+Z8Y/KwgzUBdT9RZE/xaIKiHbApoKw
 1ZotD5GUkWSgvHsJiQqlokPci3RKK5GAcJKG1oOKjo6XflTeNY9gSYUgMaXngeYq
 vHwTlgILAdwgWsbCku0EbBLS0DqPU+rf+m+R1h02OD+HMUvPsHIgpRSQ3C+qK36e
 agrMIEKBX9mMnXwNnjFZ2o8FDSOoR6mgO++DNWZrV8CMut6IjODzqofk37oSBiLg
 gJ7Qn1Em+BO/+F7GmiWIxVfTj4v+QcRCJlDVQLDlw7jQG9xrX9wLQe24WZntJGOc
 jp9vi49V6OpQNFEaYg9A1cHh/83x+gvBnfVRua1PNhxA5YwW9f0o6wXIqCK/UpDp
 JybMKEZezcG+xLpqx3YXs123VOe++zo7aGuCK3hVj9B8/CQTCENaLW2rYnG64jit
 jvbur4nvGSuArTMP1+p5Fx3XZaS/zAxrSkIDO8zEtOCDytCHQlp3DvADnMiTL5fC
 eUwC/PypJG2KIGYFy9W1GtLxdOzhjOXDSoBvRFA1KUu3HXNAnmhvQ8PGPBL4lzTi
 P6Dungg=
 =wHBs
 -----END PGP SIGNATURE-----

Merge tag 'sound-7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound updates from Takashi Iwai:
 "Nothing too thrilling here, but we see lots of driver updates and bug
  fixes, including quirk additions and refactoring works, while there
  have been little changes in the core functionality. Here are some
  highlights:

  Core:
   - Add validation for the control API put callback
   - Fixes in compress-offload API timestamp handling
   - Continued ASoC core API cleanups

  ASoC:
   - Add support for bus keepers (for Apple devices in future)
   - Enhancements to the SDCA support, including retaskable jacks
   - Test improvements for Cirrus Logic drivers
   - Lots of fixes for the NXP, nVidia and Qualcomm
   - Support for AMD RPL DMIC, Cirrus Logic CS42L43 and CS47L47, nVidia
     machines with CPCAP and WM8962

  USB-audio:
   - Quirks for Huawei Headset, Focusrite Novation, MV-Silicon, Studio
     1824, Arturia AF16Rig, Hotone Audio, Feaulle Rainbow, PreSonus
     AudioBox, Moondrop Ju Jiu, Scarlett 18i20, etc
   - Extended mixer volume quirk handling
   - UAF and other fixes for us144mkii, 6fire and caiaq drivers

  HD-audio:
   - Add quirks or fixes for Acer, Lenovo, HP, ASUS machines
   - Fixes & cleanups of GPIO helper code

  Misc:
   - Add suspend/resume support for multiple legacy ISA and Apple
     drivers
   - Further regression fixes for ctxfi driver"

* tag 'sound-7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (359 commits)
  ALSA: control: Validate buf_len before strnlen() in snd_ctl_elem_init_enum_names()
  ALSA: usb-audio: Fix missing error handling for get_min_max*()
  ALSA: hda/realtek - fixed speaker no sound update
  ALSA: hda/realtek: Add quirk for Acer PT316-51S headset mic
  ALSA: usb-audio: Exclude Scarlett 18i20 1st Gen from SKIP_IFACE_SETUP
  ALSA: hda/realtek: Add quirk for Legion S7 15IMH
  ALSA: hda/realtek: Add quirk for HP Spectre x360 14-ea
  ALSA: caiaq: take a reference on the USB device in create_card()
  ASoC: dt-bindings: rockchip: convert rk3399-gru-sound to DT Schema
  ALSA: sscape: Add suspend and resume support
  ALSA: sscape: Cache per-card resources for board reinitialization
  ALSA: usb-audio: Do not expose sticky mixers
  ALSA: usb-audio: Move volume control resolution check into a function
  ALSA: usb-audio: Add error checks against get_min_max*()
  ALSA: usb-audio: Add quirk for PreSonus AudioBox USB
  ALSA: interwave: guard PM-only restore helpers with CONFIG_PM
  ALSA: usb-audio: Evaluate packsize caps at the right place
  ALSA: sc6000: Restore board setup across suspend
  ALSA: sc6000: Keep the programmed board state in card-private data
  ALSA: 6fire: fix use-after-free on disconnect
  ...
2026-04-15 09:20:49 -07:00
Linus Torvalds
9f2bb6c7b3 - Complete LASS enabling: deal with vsyscall and EFI
- Clean up CPUID usage in newer Intel audio driver
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEV76QKkVc4xCGURexaDWVMHDJkrAFAmndDsMACgkQaDWVMHDJ
 krAOhRAAi3BsToTbmKayQJKWwVr5aGbLYXe3FiBv5juPprsJDF4otd0ALkdbf5Ls
 n7nND4L9RBfcGZBu25vo60Y1I1b2JReu9Y8YXxsrEx+WIxTPYClOJa7AqakyNxc4
 zbTCTv6TuEyXqG5VWe3AItWrMToc49TvUVoN2fi+V89fLWA8IOkMoIhbAWwQPBFI
 ir0N4UwC/RtRBFf9qc9jesirqGSgh6SEAK6oBYM3C2PV/njoKljTconaCnF7uJlq
 WxxVcb07dIvOdpdE941OZ6jyS6eePr2feXOazNjnPb0py5Ai4WCsEGdK68ltQ5fM
 EhY24Ex6ltudgphB/cajKIKZ8LUCWgnMwTotY8IQMQiQ47JKmyrucdLUwvhl0qTD
 IAWiOMvb5d3X+CoKt3lXlzc29WhbogXzvxjZE29ad8Dm7DVBEOV57bXDwhnHb7LS
 rro7odiohsw7FMhfqxlb6NhYzCbdpBbmY3IFzXVgTZlWIXU1g/yBVz/2O0qsKLaw
 QQ2NKre6lioP2H3pWc0fi53336svzCSuuExCiu47Hx9WcYBX1Poq/AkpAoxPErq+
 DRn8lXVwqMpefevlHK9XlZjSpwwwltULmId3LFxh3Z53b1NABrKpVEEJ/VChpzzA
 xC8dLdu1pbJa2jdccL6mBDYlMvyWLCmKfAlAHdRh8nLmOZxKRHg=
 =kPr7
 -----END PGP SIGNATURE-----

Merge tag 'x86_cpu_for_7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 cpu updates from Dave Hansen:

 - Complete LASS enabling: deal with vsyscall and EFI

   The existing Linear Address Space Separation (LASS) support punted
   on support for common EFI and vsyscall configs. Complete the
   implementation by supporting EFI and vsyscall=xonly.

 - Clean up CPUID usage in newer Intel "avs" audio driver and update the
   x86-cpuid-db file

* tag 'x86_cpu_for_7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  tools/x86/kcpuid: Update bitfields to x86-cpuid-db v3.0
  ASoC: Intel: avs: Include CPUID header at file scope
  ASoC: Intel: avs: Check maximum valid CPUID leaf
  x86/cpu: Remove LASS restriction on vsyscall emulation
  x86/vsyscall: Disable LASS if vsyscall mode is set to EMULATE
  x86/vsyscall: Restore vsyscall=xonly mode under LASS
  x86/traps: Consolidate user fixups in the #GP handler
  x86/vsyscall: Reorganize the page fault emulation code
  x86/cpu: Remove LASS restriction on EFI
  x86/efi: Disable LASS while executing runtime services
  x86/cpu: Defer LASS enabling until userspace comes up
2026-04-14 14:24:45 -07:00
Mark Brown
c822e308c3
ASoC: Yet another round of SDCA fixes
Charles Keepax <ckeepax@opensource.cirrus.com> says:

Another round of SDCA fixes a couple of fix to the IRQ cleanup
from Richard, and a minor tweak to the IRQ handling from me.
2026-04-09 19:39:32 +01:00
Mark Brown
cc201899a9 Linux 7.0-rc7
-----BEGIN PGP SIGNATURE-----
 
 iQFSBAABCgA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAmnS4Y8eHHRvcnZhbGRz
 QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGe6AIAI4rjLLPlxUKQbx4
 JP9lsKH7vqeIVvuMqzFau7+B8ngJ+80OESnBF7n43oNEqdJ0NYiL+rPtcGgBjZDP
 yUu5DlzVSxpAIQBZe2Nc0dz/5NbT9QxKyC5Yl/whpNIR7UHx1RFvDJYxwN9xKxTw
 ggLQevKAnHrKjIOKjq70Yqz2T1JMXc9Wp/xpur0oGioiFW/lH24CgHDXjE2Ka9oD
 wqhotzThuSaaVDmqZ8WNFKxx2onR4r8/NpljaVT2mWRJ2+IMF4pMOBJZRQiNZtRa
 1CsoJ3aV6pslAsuC1dLboCMul48VUgyu7l3xQwXVuA5bRO1jqt5ILWC10g09OItU
 7CxGTno=
 =1TRg
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmnVGCoACgkQJNaLcl1U
 h9BfJQf/ctAn5UMEDfk3cJm+UxfNF41T12Li35s+naJZIUf5r1raVa7znzGbOpYa
 OYoXRnJZWLz8Cy6n1pVKL/WDUtcdl16dZ0zAs4rilS1eFQA1hmHeABm3zA2qJx8s
 x78iFZ6ahfvoY3tJn6c7n6tlq1neMfHPWOxV4i5CLowZv4JLoZqfE0v5DbPyVBpW
 zIAce7vZcr5s8/c8+vaq6z5leNJKD0KNBwpqPYZu1/GtFaLCVjgrLCBjXvQohHOp
 Ezf85+ZVAWk9Naz7OtCa8Cmb606n1rfWMAEX7F2z2pqCIoff0RE88U+yg1R/JZzD
 TkuJUY8jt3eST+f5d7iwI9GU6OKHoA==
 =aMaC
 -----END PGP SIGNATURE-----

ASoC: Merge up v7.0-rc7

Merge tag 'v7.0-rc7' to get fixes that make my CI happier.
2026-04-07 15:43:29 +01:00
Cezary Rojewski
c5408d8183
ASoC: Intel: avs: Fix memory leak in avs_register_i2s_test_boards()
Caller is responsible for freeing array allocated with
parse_int_array().

Found out by Coverity.

Fixes: 7d859189de ("ASoC: Intel: avs: Allow to specify custom configurations with i2s_test")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20260407085459.400628-1-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-07 13:00:40 +01:00
songxiebing
fd495be8aa
ASoC: intel: avs: Fix type mismatch in variable assignment
The input parameter requirement for snd_pcm_format_physical_with is
snd_pcm_format_t,but params->codec.format is __u32, resulting in a
mismatch error:

sparse warnings: (new ones prefixed by >>)
>> sound/soc/intel/avs/probes.c:147:58: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted snd_pcm_format_t [usertype] format @@     got unsigned int [usertype] format @@
   sound/soc/intel/avs/probes.c:147:58: sparse:     expected restricted snd_pcm_format_t [usertype] format
   sound/soc/intel/avs/probes.c:147:58: sparse:     got unsigned int [usertype] format

So here, the format is cast to snd_pcm_format_t.

Signed-off-by: songxiebing <songxiebing@kylinos.cn>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202512190032.hnwn9mCV-lkp@intel.com/
Link: https://patch.msgid.link/20260325021752.238203-1-songxiebing@kylinos.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-07 12:33:19 +01:00
Mark Brown
cba9ce8c1a
ASoC: Intel: Fix MCLK leaks and clean up error
aravindanilraj0702@gmail.com <aravindanilraj0702@gmail.com> says:

From: Aravind Anilraj <aravindanilraj0702@gmail.com>

This series fixes MCLK resource leaks in the platform_clock_control()
implementations for bytcr_rt5640, bytcr_rt5651, and cht_bsw_rt5672.

In the SND_SOC_DAPM_EVENT_ON() path, clk_prepare_enable() is called to
enable MCLK, but subsequent failures in codec clock configuration (eg:
*_prepare_and_enable_pll1() or snd_soc_dai_set_sysclk()) return without
disabling the clock, leaking a reference.

Patches 1-3 fix this by adding the missing clk_disable_unprepare() calls
in the relevant error paths, ensuring proper symmetry between enable and
disable operations within the EVENT_ON scope.

Patch 4 moves unrelated logging changes into a separate patch and
standardizes error messages.
2026-04-03 15:15:04 +01:00
Aravind Anilraj
85c38c2fa1
ASoC: Intel: Standardize MCLK error logs across RT boards
Standardize the error logging in platform_clock_control() by adding
missing newline characters to dev_err() strings. Additionally, include
the return code in the error messages to assist with debugging.

Signed-off-by: Aravind Anilraj <aravindanilraj0702@gmail.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20260401220507.23557-5-aravindanilraj0702@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-03 15:15:02 +01:00
Aravind Anilraj
dced5a373a
ASoC: Intel: cht_bsw_rt5672: Fix MCLK leak on platform_clock_control error
If snd_soc_dai_set_pll() or snd_soc_dai_set_sysclk() fail inside the
EVENT_ON path, the function returns without calling
clk_disable_unprepare() on ctx->mclk, which was already enabled earlier
in the same code path. Add the missing clk_disable_unprepare() calls
before returning the error.

Signed-off-by: Aravind Anilraj <aravindanilraj0702@gmail.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20260401220507.23557-4-aravindanilraj0702@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-03 15:15:01 +01:00
Aravind Anilraj
b022e5c142
ASoC: Intel: bytcr_rt5651: Fix MCLK leak on platform_clock_control error
If byt_rt5651_prepare_and_enable_pll1() fails, the function returns
without calling clk_disable_unprepare() on priv->mclk, which was
already enabled earlier in the same code path. Add the missing
cleanup call to prevent the clock from leaking.

Signed-off-by: Aravind Anilraj <aravindanilraj0702@gmail.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20260401220507.23557-3-aravindanilraj0702@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-03 15:15:00 +01:00
Aravind Anilraj
a02496a294
ASoC: Intel: bytcr_rt5640: Fix MCLK leak on platform_clock_control error
If byt_rt5640_prepare_and_enable_pll1() fails, the function returns
without calling clk_disable_unprepare() on priv->mclk, which was
already enabled earlier in the same code path. Add the missing
cleanup call to prevent the clock from leaking.

Signed-off-by: Aravind Anilraj <aravindanilraj0702@gmail.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20260401220507.23557-2-aravindanilraj0702@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-03 15:14:59 +01:00
Julian Braha
e920c36f20
ASoC: Intel: boards: fix unmet dependency on PINCTRL
This reverts commit c073f07576 ("ASoC: Intel: sof_sdw: select PINCTRL_CS42L43 and SPI_CS42L43")

Currently, SND_SOC_INTEL_SOUNDWIRE_SOF_MACH selects PINCTRL_CS42L43
without also selecting or depending on PINCTRL, despite PINCTRL_CS42L43
depending on PINCTRL.

See the following Kbuild warning:

WARNING: unmet direct dependencies detected for PINCTRL_CS42L43
  Depends on [n]: PINCTRL [=n] && MFD_CS42L43 [=m]
  Selected by [m]:
  - SND_SOC_INTEL_SOUNDWIRE_SOF_MACH [=m] && SOUND [=y] && SND [=m] && SND_SOC [=m] && SND_SOC_INTEL_MACH [=y] && (SND_SOC_SOF_INTEL_COMMON [=m] || !SND_SOC_SOF_INTEL_COMMON [=m]) && SND_SOC_SOF_INTEL_SOUNDWIRE [=m] && I2C [=y] && SPI_MASTER [=y] && ACPI [=y] && (MFD_INTEL_LPSS [=n] || COMPILE_TEST [=y]) && (SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES [=n] || COMPILE_TEST [=y]) && SOUNDWIRE [=m]

In response to v1 of this patch [1], Arnd pointed out that there is
no compile-time dependency sof_sdw and the PINCTRL_CS42L43 driver.
After testing, I can confirm that the kernel compiled with
SND_SOC_INTEL_SOUNDWIRE_SOF_MACH enabled and PINCTRL_CS42L43 disabled.

This unmet dependency was detected by kconfirm, a static analysis
tool for Kconfig.

Link: https://lore.kernel.org/all/b8aecc71-1fed-4f52-9f6c-263fbe56d493@app.fastmail.com/ [1]
Fixes: c073f07576 ("ASoC: Intel: sof_sdw: select PINCTRL_CS42L43 and SPI_CS42L43")
Signed-off-by: Julian Braha <julianbraha@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20260325001522.1727678-1-julianbraha@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-31 14:05:17 +01:00
Sachin Mokashi
51e3eb3d07
ASoC: Intel: ehl_rt5660: Use the correct rtd->dev device in hw_params
In rt5660_hw_params(), the error path for snd_soc_dai_set_sysclk()
correctly uses rtd->dev as the logging device, but the error path for
snd_soc_dai_set_pll() uses codec_dai->dev instead.

These two devices are distinct:
- rtd->dev is the platform device of the PCM runtime (the Intel HDA/SSP
  controller, e.g. 0000:00:1f.3), which owns the machine driver callback.
- codec_dai->dev is the I2C device of the rt5660 codec itself
  (i2c-10EC5660:00).

Since hw_params is a machine driver operation and both calls are made
within the same function from the machine driver's context, all error
messages should be attributed to rtd->dev. Using codec_dai->dev for one
of them would suggest the error originates inside the codec driver,
which is misleading.

Align the PLL error log with the sysclk one to use rtd->dev, matching
the convention used by all other Intel board drivers in this directory.

Signed-off-by: Sachin Mokashi <sachin.mokashi@intel.com>
Link: https://patch.msgid.link/20260327131439.1330373-1-sachin.mokashi@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-31 12:37:13 +01:00
Ahmed S. Darwish
7f78e0b46e ASoC: Intel: avs: Include CPUID header at file scope
Commit

    cbe37a4d2b ("ASoC: Intel: avs: Configure basefw on TGL-based platforms")

includes the main CPUID header from within a C function.  This works by
luck and forbids valid refactoring inside that header.

Include the CPUID header at file scope instead.

Remove the COMPILE_TEST build flag so that the CONFIG_X86 conditionals can
be removed.  The driver gets enough compilation testing already on x86.

For clarity, refactor the CPUID(0x15) code into its own function without
changing any of the driver's logic.

Fixes: cbe37a4d2b ("ASoC: Intel: avs: Configure basefw on TGL-based platforms")
Suggested-by: Borislav Petkov <bp@alien8.de>		# CONFIG_X86 removal
Signed-off-by: Ahmed S. Darwish <darwi@linutronix.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/all/20250612234010.572636-3-darwi@linutronix.de
2026-03-28 00:29:30 +01:00
Ahmed S. Darwish
93a1f0e613 ASoC: Intel: avs: Check maximum valid CPUID leaf
The Intel AVS driver queries CPUID(0x15) before checking if the CPUID leaf
is available.  Check the maximum-valid CPU standard leaf beforehand.

Use the CPUID_LEAF_TSC macro instead of the custom local one for the
CPUID(0x15) leaf number.

Fixes: cbe37a4d2b ("ASoC: Intel: avs: Configure basefw on TGL-based platforms")
Signed-off-by: Ahmed S. Darwish <darwi@linutronix.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20260327021645.555257-2-darwi@linutronix.de
2026-03-28 00:27:11 +01:00
Sachin Mokashi
ebbe5d957e
ASoC: Intel: ehl_rt5660: remove unused macro definitions
DUAL_CHANNEL and NAME_SIZE macros are not being used (anymore) but the
macros are still defined. Remove them to clean up dead code.

Signed-off-by: Sachin Mokashi <sachin.mokashi@intel.com>
Link: https://patch.msgid.link/20260324163400.1276247-1-sachin.mokashi@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-27 19:13:56 +00:00
Mac Chiang
9033f7b7f2
ASoC: Intel: soc-acpi-intel-ptl-match: drop rt722 monolithic match tables
Use functional topologies to support RT722 topologies with/without
amplifiers,
e.g. sof-ptl-rt722.tplg, sof-ptl-rt722-rt1320.tplg...

If these entries are not removed, they will find the first same link of
sof-ptl-rt722.tplg.

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
Co-developed-by: Derek Fang <derek.fang@realtek.com>
Signed-off-by: Derek Fang <derek.fang@realtek.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20260326075303.1083567-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-26 16:22:41 +00:00
Mark Brown
5a306bef59
ASoC: Merge up fixes
Merge branch 'for-7.0' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-7.1

to get fixes into our development branch and resolve interactions with
the match tables.
2026-03-24 17:29:47 +00:00
Cezary Rojewski
5a184f1cb4
ASoC: Intel: catpt: Fix the device initialization
The DMA mask shall be coerced before any buffer allocations for the
device are done.  At the same time explain why DMA mask of 31 bits is
used in the first place.

Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Fixes: 7a10b66a5d ("ASoC: Intel: catpt: Device driver lifecycle")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260320101217.1243688-1-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-23 17:32:27 +00:00
Kuninori Morimoto
6f2b7bd598
ASoC: intel: name back to pcm_new()/pcm_free()
We have been used pcm_new()/pcm_free(), but switched to
pcm_construct()/pcm_destruct() to use extra parameters [1].

pcm_new()/free() had been removed [2], but each drivers are still
using such function naming. Let's name back to pcm_new()/pcm_free()
again.

[1] commit c64bfc9066 ("ASoC: soc-core: add new pcm_construct/pcmdestruct")
[2] commit e9067bb502 ("ASoC: soc-component: remove snd_pcm_ops from component driver")

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87sea0jyr1.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-16 13:37:53 +00:00
Mark Brown
94ef278e74
Merge patch series "ASoC: Intel: catpt: Overhaul volume and mute control operations"
Cezary Rojewski <cezary.rojewski@intel.com> says:

ASoC: Intel: catpt: Overhaul volume and mute control operations

Short summary first, longer description later:

- fix the return code for kctl->put() - currently the driver returns
  '0' even if changes were done
- lower power consumption for kctl operations by waking the DSP only
  when some streaming is done.  No streaming? Cache the values and
  inform the AudioDSP firmware later.
- drop the existing code duplication between individual and master
  volume controls

The very first patch addresses synchronization problem that exists when
an individual control and its paired stream are manipulated by a user
simultaneously.  As the refactor integrates the fix in its new code,
most of it gets shuffled but in case of a "refactor problem" I've
decided to have it separated and leading the series.  This way the
problem is fixed even if refactor, for whatever reason, would be
reverted.

--
More of in-depth explanation for the refactor, taken from commit 2:

The catpt-driver's volume and mute control operations always return '0'
regardless if a change occurred or not.  To conform to ALSA's interface,
value '1' shall be returned when a change occurred.

The second major point is power consumption.  Existing control
operations always wake the DSP even if no streams are running.  In such
case waking the DSP just for the sake of updating the volume (or mute)
settings on the firmware side is a waste of power.  The provided
implementation caches the values and updates the settings only when
streams are being opened for streaming or are already running.

As changing existing code is non-trivial, provide new operations
instead.  The put() operation, which interests us the most, takes the
following shape:

	// two values provided to put():
	// @pin_id - which stream given control relates to
	// @value_to_apply - the value from user

	if (control->existing_val == value_to_apply)
		return 0;

	runtime_stream = get_running_stream(pin_id);
	if (runtime_stream != NULL) {
		ret = send_ipc();
		if (ret)
			return ret;
	}

	control->existing_val = value_to_apply;
	return 1;

Adheres to ALSA's expectation and avoids sending IPCs if there is no
change to be made.
2026-03-11 13:34:14 +00:00
Cezary Rojewski
8a99ccb032
ASoC: Intel: catpt: Migrate to the new control operations
Switch to the new implementation and remove all unused code. The change
effectively causes the control put() operations to return '1' if a
change occurred, '0' if no change was made or error otherwise.

The second effect of the update is reducing the power consumption. With
the new control-operations in place, the controls no longer wake the DSP
just for the sake of updating volume (or mute) settings on the firmware
side. The values are cached and actual update occurs only when streams
are being opened for streaming or are already running.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20260309091605.896307-6-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-11 13:34:13 +00:00
Cezary Rojewski
150badf73e
ASoC: Intel: catpt: Do not wake DSP just for volume setup
With the new control-operations in place, the controls no longer wake
the DSP just for the sake of updating volume (or mute) settings on the
firmware side. The values are cached and actual update occurs only when
streams are being opened for streaming or are already running. In those
cases the DSP must already be woken up and we avoid unnecessary power
consumption.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20260309091605.896307-5-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-11 13:34:12 +00:00
Cezary Rojewski
2464febd81
ASoC: Intel: catpt: Simplify procedure of applying user settings
Existing catpt_dai_apply_usettings() applies all the individual control
settings but why-what is covered behind if-statements. Refactor the
operation into:

catpt_apply_controls()
|__ catpt_apply_volume()
|__ catpt_apply_mute()

to make it easy to understand why and what is going on. The update also
enlists snd_ctl_find_id_mixer() for the query purpose, removing code
duplication.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20260309091605.896307-4-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-11 13:34:11 +00:00
Cezary Rojewski
d16b942aa7
ASoC: Intel: catpt: New volume and mute control operations
The catpt-driver's volume and mute control operations always return '0'
regardless if a change occurred or not. To conform to ALSA's interface,
value '1' shall be returned when a change occurred.

The second major point is power consumption. Existing control operations
always wake the DSP even if no streams are running. In such case waking
the DSP just for the sake of updating the volume (or mute) settings on
the firmware side is a waste of power. The provided implementation
caches the values and updates the settings only when streams are being
opened for streaming or are already running.

As changing existing code is non-trivial, provide new operations
instead. The put() operation, which interests us the most, takes the
following shape:

	// two values provided to put():
	// pin_id - which stream given control relates to
	// value_to_apply - the value from user

	if (control->existing_val == value_to_apply)
		return 0;

	runtime_stream = get_running_stream(pin_id);
	if (runtime_stream != NULL) {
		ret = send_ipc();
		if (ret)
			return ret;
	}

	control->existing_val = value_to_apply;
	return 1;

Adheres to ALSA's expectation and avoids sending IPCs if there is no
change to be made.

Two helpers which are part of the patch, catpt_stream_hw_id() and
catpt_stream_volume_regs(), help differentiate between individual
streams and the general MIXER stream. Translates to one pair of
get()/put() instead of two pairs as done currently.

PIN_ID_INVALID is returned if given stream is not currently running -
the constant is part of the firmware's API but remained unused by the
driver.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20260309091605.896307-3-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-11 13:34:10 +00:00
Cezary Rojewski
b0b49c77bd
ASoC: Intel: catpt: Synchronize stream access
Streams may have individual controls assigned to them e.g.: volume
control in case of offload streams.

If such a stream is running and simultaneously its controls are being
manipulated, both processes are touching the exact same descriptors -
access to these must be synchronized. Replace spinlock with mutex as
IPCs are non-atomic operations and add proper locking for all
->stream_list users.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20260309091605.896307-2-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-11 13:34:09 +00:00
Mark Brown
49c002275a
ASoC: ti: davinci-mcasp: McASP code cleanup and clk
Merge series from Sen Wang <sen@ti.com>:

Just two minor patches that aim to tidy up the code a little bit,
as well as fix the aux_div selection in davinci_mcasp_calc_clk_div()
for mid-range dividers (33 <= div <= 4096).

Sen Wang (2):
  ASoC: ti: davinci-mcasp: extract mcasp_is_auxclk_enabled() helper
  ASoC: ti: davinci-mcasp: improve aux_div selection for mid-range dividers

 sound/soc/ti/davinci-mcasp.c | 45 +++++++++++++++++++++++++-----------
 1 file changed, 31 insertions(+), 14 deletions(-)

--
2.43.0
2026-03-10 12:09:17 +00:00
Oliver Freyermuth
70eddf6a0a
ASoC: Intel: sof_sdw: Add quirk for Alienware Area 51 (2025) 0CCD SKU
This adds the necessary quirk for the Alienware 18 Area 51 (2025).
Complements commit 1b03391d07 ("ASoC: Intel: sof_sdw: Add quirk
for Alienware Area 51 (2025) 0CCC SKU").

Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com>
Tested-by: Oliver Freyermuth <o.freyermuth@googlemail.com>
Link: https://patch.msgid.link/20260224190224.30630-1-o.freyermuth@googlemail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-01 23:48:09 +00:00
Tim Bird
0fa3df83d5
ASoC: Add SPDX ids to many soc files
Add appropriate SPDX-License-Identifier lines to the
the remaining files that are missing such lines in the
sound/soc directory, and in a few other miscelaneous files.
Remove boilerplate license text.

Signed-off-by: Tim Bird <tim.bird@sony.com>
Link: https://patch.msgid.link/20260217190837.165504-1-tim.bird@sony.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-22 23:52:20 +00:00
Linus Torvalds
bf4afc53b7 Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
This was done entirely with mindless brute force, using

    git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
        xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'

to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.

Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.

For the same reason the 'flex' versions will be done as a separate
conversion.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-02-21 17:09:51 -08:00
Kees Cook
69050f8d6d treewide: Replace kmalloc with kmalloc_obj for non-scalar types
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:

Single allocations:	kmalloc(sizeof(TYPE), ...)
are replaced with:	kmalloc_obj(TYPE, ...)

Array allocations:	kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with:	kmalloc_objs(TYPE, COUNT, ...)

Flex array allocations:	kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with:	kmalloc_flex(*PTR, FAM, COUNT, ...)

(where TYPE may also be *VAR)

The resulting allocations no longer return "void *", instead returning
"TYPE *".

Signed-off-by: Kees Cook <kees@kernel.org>
2026-02-21 01:02:28 -08:00
Takashi Iwai
dd03dd60e8 ASoC: Updates for v7.0
This release is almost all abut driers, there's very little core work
 here, although some of that driver work is in more generic areas like
 SDCA and SOF:
 
  - Generic SDCA support for reporting jack events.
  - Continuing platform support, cleanup and feature improements for the
    AMD, Intel, Qualcomm and SOF code.
  - Platform description improvements for the Cirrus drivers.
  - Support for NXP i.MX952, Realtek RT1320 and RT5575, and Sophogo
    CV1800B.
 
 We also pulled in one small SPI API update and some more substantial
 regmap work (cache description improvements) for use in drivers.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmmKCo0ACgkQJNaLcl1U
 h9AU7Af/Tu4SmEmMFW58Rn6DYPzX6P/eRvRW1wiazt+b3pyO8qPjRxhvpsBtSbVz
 /TyhaO90QnBM7+31p6Hes4nHyC5HcOXXRNb/drt26kQmRpJPMH6NErm7Js6LXDyY
 Yk/hzfyqG+DOFFlVoh9vnVE4jr1c4Oasqp8+FCzWbx8l1Y4ZgMEj2T7eQdfiowME
 ILjislHqjoPPK4ZPCsGtbmVVYhT4+FMJLZaUDsaCLNRyWxVt1vutrWyvI6w6sA7d
 9MUIECfE7MtLy1TaZRT2x0we+eWIjV1ji/7LalKmGvLPCSwTSbRh7A25RqZgL1lf
 4/g08iQxIG37yEAmImxxqJnjsfS0yg==
 =iwVH
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v6.20' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Updates for v7.0

This release is almost all abut driers, there's very little core work
here, although some of that driver work is in more generic areas like
SDCA and SOF:

 - Generic SDCA support for reporting jack events.
 - Continuing platform support, cleanup and feature improements for the
   AMD, Intel, Qualcomm and SOF code.
 - Platform description improvements for the Cirrus drivers.
 - Support for NXP i.MX952, Realtek RT1320 and RT5575, and Sophogo
   CV1800B.

We also pulled in one small SPI API update and some more substantial
regmap work (cache description improvements) for use in drivers.
2026-02-09 17:39:11 +01:00
Ranjani Sridharan
e614fce9fe
ASoC: Intel: sof_sdw: Add a DAI link for loopback capture
Add a DAI link for loopback capture as the last link to make sure
the other DAI link ID's remain unaffected. It serves as a dummy DAI link
to enable echo reference capture in the SDW topologies which do not have
an actual backend capture DAI.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20260204081833.16630-5-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-04 13:26:04 +00:00
Mac Chiang
754b3dade5
ASoC: Intel: soc-acpi-intel-ptl-match: drop rt721 related match tables
Use functional topologies to support all RT721-related topology and
amplifier combinations,
e.g. sof-ptl-rt721.tplg, sof-ptl-rt721-l3-rt1320-l3.tplg.

If these entries are not removed, they will all use the sof-ptl-rt721.tplg.

Signed-off-by: Mac Chiang <mac.chiang@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/20260203100027.3741754-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-03 13:47:37 +00:00
Mark Brown
c1b835eefb
Anbernic RG-DS AW87391 Speaker Amps
Merge series from Chris Morgan <macroalpha82@gmail.com>:

Add support for the Anbernic RG-DS Speaker Amplifiers. The Anbernic
RG-DS uses two AW87391 ICs at 0x58 and 0x5B on i2c2. However, the
manufacturer did not provide a firmware file, only a sequence of
register writes to each device to enable and disable them.

Add support for this *specific* configuration in the AW87390 driver.
Since we are relying on a device specific sequence I am using a
device specific compatible string. This driver does not currently
support the aw87391 for any other device as I have none to test
with valid firmware. Attempts to create firmware with the AwinicSCPv4
have not been successful.
2026-02-02 23:31:39 +00:00
Tagir Garaev
6b641122d3
ASoC: Intel: sof_es8336: Add DMI quirk for Huawei BOD-WXX9
Add DMI entry for Huawei Matebook D (BOD-WXX9) with HEADPHONE_GPIO
and DMIC quirks.

This device has ES8336 codec with:
- GPIO 16 (headphone-enable) for headphone amplifier control
- GPIO 17 (speakers-enable) for speaker amplifier control
- GPIO 269 for jack detection IRQ
- 2-channel DMIC

Hardware investigation shows that both GPIO 16 and 17 are required
for proper audio routing, as headphones and speakers share the same
physical output (HPOL/HPOR) and are separated only via amplifier
enable signals.

RFC: Seeking advice on GPIO control issue:

GPIO values change in driver (gpiod_get_value() shows logical value
changes) but not physically (debugfs gpio shows no change). The same
gpiod_set_value_cansleep() calls work correctly in probe context with
msleep(), but fail when called from DAPM event callbacks.

Context information from diagnostics:
- in_atomic=0, in_interrupt=0, irqs_disabled=0
- Process context: pipewire
- GPIO 17 (speakers): changes in driver, no physical change
- GPIO 16 (headphone): changes in driver, no physical change

In Windows, audio switching works without visible GPIO changes,
suggesting possible ACPI/firmware involvement.

Any suggestions on how to properly control these GPIOs from DAPM
events would be appreciated.

Signed-off-by: Tagir Garaev <tgaraev653@gmail.com>
Link: https://patch.msgid.link/20260201121728.16597-1-tgaraev653@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-02 12:09:25 +00:00
Maciej Strozek
1425900231
ASoC: sof_sdw: Add a quirk for Lenovo laptop using sidecar amps with cs42l43
Add a quirk for a Lenovo laptop (SSID: 0x17aa3821) to allow using sidecar
CS35L57 amps with CS42L43 codec.

Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20260128092410.1540583-1-mstrozek@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-02 11:09:35 +00:00
Maciej Strozek
94e5baff3e
ASoC: sof_sdw: Add a quirk for Lenovo laptop using sidecar amps with cs42l43
Add a quirk for a Lenovo laptop (SSID: 0x17aa3821) to allow using sidecar
CS35L57 amps with CS42L43 codec.

Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20260128092410.1540583-1-mstrozek@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-29 11:41:54 +00:00
Tagir Garaev
213c4e5126
ASoC: Intel: sof_es8336: fix headphone GPIO logic inversion
The headphone GPIO should be set to the inverse of speaker_en.
When speakers are enabled, headphones should be disabled and vice versa.

Currently both GPIOs are set to the same value (speaker_en), causing
audio to play through both speakers and headphones simultaneously
when headphones are plugged in.

Tested on Huawei Matebook (BOD-WXX9) with ES8336 codec.

Fixes: 6e1ff1459e ("ASoC: Intel: sof_es8336: support a separate gpio to control headphone")
Signed-off-by: Tagir Garaev <tgaraev653@gmail.com>
Link: https://patch.msgid.link/20260121152435.101698-1-tgaraev653@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-27 12:45:47 +00:00
Bard Liao
403a0591be
ASoC: soc-acpi-intel-ptl-match: fix name_prefix of rt1320-2
rt1320_2_group2_adr works with rt1320_1_group2_adr and the name_prefix
should be rt1320-2.

Fixes: ffe450cb6b ("ASoC: Intel: soc-acpi-intel-ptl-match: add rt713_vb_l3_rt1320_l12 support")
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20260123113809.2238766-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-26 11:26:35 +00:00
Mark Brown
9ef552fcf0
ASoC: renesas: rz-ssi: Cleanups
Merge series from Claudiu <claudiu.beznea@tuxon.dev>:

This series adds cleanups for the Renesas RZ SSI driver.
2026-01-20 18:17:02 +00:00
Bard Liao
4fbd3b2ec0
ASoC: soc-acpi-intel-ptl-match: use aggregated endpoint in ptl_rt722_l0_rt1320_l23
The rt722 amp and rt1320 amps are aggregated in this case.

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>
Link: https://patch.msgid.link/20260119091749.1752088-3-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-19 14:42:08 +00:00