Commit Graph

1021 Commits

Author SHA1 Message Date
Vijendar Mukunda
d57616f8be
ASoC: amd: acp: fix card name length warning in SOF SoundWire machine driver
The ALSA snd_card driver[] field is 16 bytes (including the NUL
terminator), leaving 15 usable characters. The SOF framework
prepends a "sof-" prefix when registering the card, so
card->name = "amd-soundwire" becomes driver name "sof-amd-soundwire"
which is 17 characters and overflows the driver[16] buffer, triggering
a kernel warning.

Fix by shortening the card name to "amd-sdw"; the resulting driver
name "sof-amd-sdw" fits within the 15-character limit.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Link: https://patch.msgid.link/20260910161728.1452808-5-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-09-16 20:08:19 +01:00
Vijendar Mukunda
27098aaf28
ASoC: amd: acp: fix ffs() operator precedence for SoundWire link ID
ffs(link_mask - 1) computes ffs on (link_mask - 1) instead of
subtracting 1 from the result of ffs(link_mask). For a typical
power-of-2 link_mask this returns the wrong link ID, causing cpu_pin_id
lookup to select the incorrect SoundWire manager.

Fix the operator precedence to ffs(link_mask) - 1 in both
acp-sdw-sof-mach.c and acp-sdw-legacy-mach.c.

Fixes: 6d8348ddc5 ("ASoC: amd: acp: refactor SoundWire machine driver code")
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Link: https://patch.msgid.link/20260910161728.1452808-4-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-09-16 20:08:18 +01:00
Vijendar Mukunda
0b7d55d3a9
ASoC: amd: acp: refactor codec config count in SOF SoundWire machine driver
num_devs was used both as the endpoint count and as the output for
asoc_sdw_parse_sdw_endpoints(), which overwrites it with the codec
configuration count. Introduce a separate num_confs variable to hold
the codec conf count so the two values remain distinct across
codec_conf allocation and card->num_configs assignment.

Fixes: 6d8348ddc5 ("ASoC: amd: acp: refactor SoundWire machine driver code")
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Link: https://patch.msgid.link/20260910161728.1452808-3-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-09-16 20:08:17 +01:00
Vijendar Mukunda
29218a4d11
ASoC: amd: acp: bounds-check SoundWire link ID in machine drivers
Add a bounds check in create_sdw_dailink() to validate that the
SoundWire link ID derived from link_mask does not exceed the maximum
supported by the platform. If the link ID is out of range or link_mask
is zero, log an error and return -EINVAL to prevent accessing invalid
CPU pin ID tables.

Applied to both acp-sdw-sof-mach.c and acp-sdw-legacy-mach.c.

Fixes: 6d8348ddc5 ("ASoC: amd: acp: refactor SoundWire machine driver code")
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Link: https://patch.msgid.link/20260910161728.1452808-2-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-09-16 20:08:16 +01:00
Yorick Rommers
7e125889f1
ASoC: amd: acp-da7219-max98357a: don't bind on Raven/Picasso boards
The "AMDI5682" ACPI HID is matched by two AMD ASoC machine drivers:
cz-da7219-max98357a (this driver, Carrizo/Stoney) and
acp3x-alc5682-max98357 (Raven/Picasso). cz-da7219-max98357a is linked
first and probes the platform device first; its DAI links reference the
Stoney ACP, which is absent on Raven/Picasso, so its card can never be
instantiated there.

This was harmless until commit 42d99857d6 ("ASoC: core: Move all users
to deferrable card binding"): devm_snd_soc_register_card() now returns 0
for a card left pending instead of propagating -EPROBE_DEFER, so
cz_probe() succeeds and permanently binds AMDI5682. acp3x-alc5682-max98357
never binds and the internal speakers and headphone jack get no card.

Detect Raven/Picasso (and later) by the ACP3.x audio coprocessor's
dedicated PCI function (1022:15e2); Carrizo/Stoney reach the ACP through
the GPU driver and have no such device. Return -ENODEV so the driver core
continues probing AMDI5682 with acp3x-alc5682-max98357.

Fixes: 42d99857d6 ("ASoC: core: Move all users to deferrable card binding")
Cc: stable@vger.kernel.org
Signed-off-by: Yorick Rommers <yorick-rommers@hotmail.com>
Tested-by: Yorick Rommers <yorick-rommers@hotmail.com>
Link: https://patch.msgid.link/20260907121228.13754-1-yorick-rommers@hotmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-09-08 15:59:06 +01:00
Aaron Welwood
22728415a9
ASoC: amd: yc: add quirk for Acer Nitro AN17-41 internal mic
The Acer Nitro AN17-41 uses "RB" as its board vendor and has no entry
in yc_acp_quirk_table, so acp6x_probe() finds no DMI match, registers
no card, and the internal digital microphone records only silence.

Add a quirk entry for it so the DMIC is enabled.

Signed-off-by: Aaron Welwood <abwelwood@gmail.com>
Link: https://patch.msgid.link/20260907031738.17257-1-abwelwood@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-09-07 22:00:25 +01:00
Syed Saba Kareem
00aef6b609
ASoC: amd: yc: Add DMI entry for HP 255R G10 laptop
The HP 255R G10 laptop has an internal DMIC connected
to the AMD ACP6x audio coprocessor.
Add a DMI quirk entry so the internal microphone is
properly detected on this model.

Reported-by: eraleexxx@gmail.com
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://patch.msgid.link/20260901102338.26403-1-syed.sabakareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-09-01 18:04:10 +01:00
wangdicheng
1b67e0d3b9
ASoC: amd: yc: fix memory leak in acp6x_pdm_dma_close()
acp6x_pdm_dma_close() does not free the runtime->private_data buffer
allocated in acp6x_pdm_dma_open(). Add the missing kfree.

Fixes: 7610174a5b ("ASoC: amd: add acp6x pdm platform driver")
Signed-off-by: wangdicheng <wangdicheng@kylinos.cn>
Link: https://patch.msgid.link/20260824063507.483784-2-wangdich9700@163.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-09-01 14:34:51 +01:00
wangdicheng
0c06c4ce02
ASoC: amd: renoir: fix disable_pdm_interrupts() to clear mask bits
disable_pdm_interrupts() uses |= ~PDM_DMA_INTR_MASK which sets all
bits except the PDM DMA interrupt bit instead of clearing only the
PDM DMA interrupt bit. Use &= ~PDM_DMA_INTR_MASK to clear only the
target bit.

Fixes: f621a3676d ("ASoC: amd: add ACP3x PDM platform driver")
Signed-off-by: wangdicheng <wangdicheng@kylinos.cn>
Link: https://patch.msgid.link/20260824063507.483784-1-wangdich9700@163.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-09-01 14:34:50 +01:00
Takashi Iwai
c4a0927f53 ASoC: Fixes for v7.3
A fairly big batch of fixes that came in during the merge window.
 There's a lot of quirks for x86 systems and a bunch of driver specific
 fixes, the most critical being the fixes for Tegra's register
 definitions.  It turned out that they had been relying on the regmap
 default handling bugs that were fixed in v7.2 and so audio was fairly
 badly broken, unfortunately the issue wasn't noticed in time for
 release.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmqQONIACgkQJNaLcl1U
 h9Dzbgf+OYlkheBcs0+Go3wKN+5JEQBCQl3vjbAbR9bq2XXEUTR5SNIIjAgG7YfS
 XRFc91Nfx9mwqW8y128ITZ09Ao1xQKjSrzaa0WxSIjR2gx2WJMMhwGdFNvH/fehf
 JKoIRXJ4qYXalfrrqXiTMFJHfSaZxDoDbMg+2Wipqi/xOuWWO+1eDNW0dnmkF422
 stpXIShNh7ljlcBgpH6ts3ZpkPkwRcVOpFrBsqtbFcTAlw1XbMwjHAPYVSHm03wt
 5dpIZd4b2XA51zqH3z8RTlX+0U2xDilAMU3K74qyzxKPAi9I8FahoKPu5H7kMa77
 6ly9hBSmcOWnRb9mXfhY8GxXaxXDIA==
 =T5wt
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v7.3-merge-window' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v7.3

A fairly big batch of fixes that came in during the merge window.
There's a lot of quirks for x86 systems and a bunch of driver specific
fixes, the most critical being the fixes for Tegra's register
definitions.  It turned out that they had been relying on the regmap
default handling bugs that were fixed in v7.2 and so audio was fairly
badly broken, unfortunately the issue wasn't noticed in time for
release.
2026-08-27 16:15:47 +02:00
Shengyu Qu
15596a87fc
ASoC: amd: acp-config: change quirks to cover all ASUS FA401EA variants
Existing quirk doesn't cover all known existing FA401EA devices, so use
"FA401EA" to cover all of them.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=221310#c49
Fixes: 27d090f3cc ("ASoC: amd: acp: add ACP70 DMI override for new ASUS TUF platforms")
Signed-off-by: Shengyu Qu <wiagn@4d2.org>
Link: https://patch.msgid.link/20260826172050.15686-1-wiagn@4d2.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-27 00:15:37 +01:00
Sehat Mahde
4d6642d64c
ASoC: amd: acp-config: force SoundWire probe on HP OmniBook X Flip 16
The BIOS on the HP OmniBook X Flip 16-cc0xxx (board 8EA2) reports
acp-audio-config-flag = FLAG_AMD_LEGACY_ONLY_DMIC. This binds the
legacy ACP driver and registers a PDM-only card, so the SoundWire
links are never scanned and the two TAS2783 speaker amplifiers and
RT712-VB codec do not enumerate.

Add a DMI entry for board 8EA2 to the ACP70 ACPI flag override table
so the firmware-provided flag is overridden and snd_pci_ps probes
instead.

On the affected system, an otherwise identical upstream kernel
without this entry binds snd_acp_pci, enumerates no SoundWire slave
devices and exposes no internal speaker PCM. With the entry added,
snd_pci_ps binds, both TAS2783 amplifiers and the RT712-VB enumerate
over SoundWire, and the amd-soundwire card exposes the internal
speaker playback PCM.

Developed with AI assistance. ChatGPT helped analyze the ACP and
SoundWire behavior, structure the controlled A/B testing, and draft
the patch changelog. All hardware measurements, kernel builds,
reboots and playback tests were performed by the submitter. The
submitter has reviewed the change, understands it and takes
responsibility for it.

Assisted-by: ChatGPT:GPT-5.6 Sol
Signed-off-by: Sehat Mahde <hskmahde@gmail.com>
Link: https://patch.msgid.link/20260825224640.13662-1-hskmahde@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-26 15:41:33 +01:00
Mehmet Aysel
c1a39c228a
ASoC: amd: acp3x-es83xx: Add HVY-WXX9/M1060 DMI quirk
Add matching DMI table entry for the ES83xx machine driver, so the
HUAWEI HVY-WXX9 / M1060 board (MateBook D16 2021, Ryzen 5 4600H) can
successfully probe its ES8316 codec via the acp3x-es83xx machine
driver, consistent with the existing M1010/M1020/M1040 entries for
the same board name.

Signed-off-by: Mehmet Aysel <mehmet4ysel@gmail.com>
Link: https://patch.msgid.link/20260825092432.56292-2-mehmet4ysel@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-26 15:01:55 +01:00
Mehmet Aysel
032bb633e0
ASoC: amd: acp-config: Add HVY-WXX9/M1060 DMI quirk
Add DMI match table entry for HUAWEI HVY-WXX9 board, product version
M1060, a MateBook D16 2021 (Ryzen 5 4600H) revision not covered by the
existing M1010/M1020/M1040 entries. This board uses the same
FLAG_AMD_LEGACY / ACP_PCI_DEV_ID configuration as the other HVY-WXX9
variants.

Signed-off-by: Mehmet Aysel <mehmet4ysel@gmail.com>
Link: https://patch.msgid.link/20260825092432.56292-1-mehmet4ysel@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-26 15:01:54 +01:00
Zhang Heng
fd8ed52ece
ASoC: amd: yc: Add DMI entry for Alienware m18 R1 AMD
Add DMI entry so the YC machine driver probes on this model and
the internal DMIC works.

Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221485
Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>
Link: https://patch.msgid.link/20260824130302.553419-1-zhangheng@kylinos.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-25 14:41:58 +01:00
Christopher Tolang
e2aa5ad3be
ASoC: amd: yc: Add DMI entry for MSI Thin A15 B7UC
This model requires an additional detection quirk to enable the internal
microphone.

Fixes: fa991481b8 ("ASoC: amd: add YC machine driver using dmic")
Cc: stable@vger.kernel.org
Assisted-by: OpenAI Codex
Signed-off-by: Christopher Tolang <christophertolang@gmail.com>
Link: https://patch.msgid.link/20260823113221.19744-1-christophertolang@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-25 13:38:14 +01:00
Takashi Iwai
b2b82ce147 ASoC: Updates for v7.3
A very busy release, a combination of a lot of new device work and more
 people than usual doing various subsystem wide improvements in the code.
 The main subsystem level change is the work Morimoto-san has been doing
 to get automatic DAI format selection more widely deployed, and even
 that is largely changes in the drivers to enable use of the feature
 rather than framework work.
 
  - Conversions of a lot of drivers to use the automatic DAI format
    selection code from Morimoto-san.
  - Many fixes and code improvements from bui duc phuc and Morimoto-san.
  - Fixes for ordering problems in register default tables from Peter
    Ujfalusi.
  - Changes to use auto-cleanup for firmware to improve robustness from
    Takashi Iwai.
  - Support for firmware on more Awinc devices.
  - Many changes in the Qualcomm driver stack, mostly around new platform
    support.
  - Support for AMD ACP7.B/F, Cirrus Logic CS35L62, Loongson 2K0300,
    Meson GX formatter and interface, Qualcomm LPI MI2S, SM8475 and
    WSA855 and Realtek RT1321 VA1/2 and RT766/7.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmqDIPkACgkQJNaLcl1U
 h9BOVgf/SMQ3h9+jUQhtPSODZrUn3ke8e70gAchWM0vZeqjV78eLVXNvOYDoKHnS
 nM3LAc4uMclXBXT8nV9JPBdCg3Pw1S26Dvuuqttcta7bwcZ/2cDzB3N3IA7dD8Rj
 vICECoTNep/hhdchsiO7swU3If6HnRgjX2B6C9XwkoZSrCQZ5KidjtZUGXYgIvQK
 pB5qTvtGVvTGINmb6QsqXRBfXsgvOPcNHECSkOHkhLPCQb+YbGzOMDrSMcELl9db
 xGL3I+n/n6mjANxxjZfzNLWqV1xdHlJeODXC8Z1bQofOFGzSBR+1FGEzbvC/cDh4
 VsrG4+gBd3mvE1xxodTaYKQH4RxaKw==
 =RMbR
 -----END PGP SIGNATURE-----

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

ASoC: Updates for v7.3

A very busy release, a combination of a lot of new device work and more
people than usual doing various subsystem wide improvements in the code.
The main subsystem level change is the work Morimoto-san has been doing
to get automatic DAI format selection more widely deployed, and even
that is largely changes in the drivers to enable use of the feature
rather than framework work.

 - Conversions of a lot of drivers to use the automatic DAI format
   selection code from Morimoto-san.
 - Many fixes and code improvements from bui duc phuc and Morimoto-san.
 - Fixes for ordering problems in register default tables from Peter
   Ujfalusi.
 - Changes to use auto-cleanup for firmware to improve robustness from
   Takashi Iwai.
 - Support for firmware on more Awinc devices.
 - Many changes in the Qualcomm driver stack, mostly around new platform
   support.
 - Support for AMD ACP7.B/F, Cirrus Logic CS35L62, Loongson 2K0300,
   Meson GX formatter and interface, Qualcomm LPI MI2S, SM8475 and
   WSA855 and Realtek RT1321 VA1/2 and RT766/7.
2026-08-18 08:35:39 +02:00
Rosen Penev
0196c4b4f8
ASoC: amd: acp: pass audio_drv_data to dma_irq_handler
The IRQ handler only needs the audio_drv_data, so pass it directly
as the request_irq argument instead of the device pointer and a
dev_get_drvdata() lookup.

Assisted-by: opencode:deepseek-v4-flash-free
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://patch.msgid.link/20260811041925.25016-1-rosenp@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-13 15:50:22 +01:00
Mark Brown
071497d284
ASoC: amd: enable audio on HP OmniBook X Flip 14
Ville Saarinen <wiza@saarinenkoti.fi> says:

The HP OmniBook X Flip 14-kc0xxx (board 8EA1, Strix Point, ACP 7.2) has no
usable audio on mainline at all. Its BIOS reports an ACP configuration flag
of FLAG_AMD_LEGACY_ONLY_DMIC, which binds the legacy ACP driver and
registers a PDM-only card, so the SoundWire links are never scanned. The
two TAS2783 speaker amplifiers on link 0 and the RT712-VB jack codec on
link 1 never enumerate, and the machine has no playback path whatsoever.

Patch 1 adds a DMI quirk overriding the flag so snd_pci_ps probes. Patch 2
adds the machine entry describing the link topology.

With both applied the card comes up and every path on the machine works:
internal speakers, headphone jack with detection, headset microphone and
the internal DMIC array. Two further patches are needed for the speakers
to render stereo rather than mono, and to survive a system resume; those
are in the TAS2783 codec driver and are being sent separately to the TI
maintainers, since they have no build dependency on this pair.

Related reports for the same root cause on other machines:

  - kernel bugzilla #221226 (ASUS Zenbook S16)
  - CachyOS linux-cachyos#820 (HP OmniBook X Flip 16, board 8EA2 -- the
    sibling board, which would need its own entry; I have no access to
    one and have not added it)

Tested on the affected machine only. I do not have any other ACP 7.2
board, so the gating on patch 2 is written to be conservative rather than
broad.

Testing
=======

The hardware testing was done on v7.1.6, where an equivalent version of
this pair is what makes audio work on the machine. Against the master
commit named below, both patches have been compile-tested only (gcc, W=1,
no new warnings, no new external symbol references).

Patch 2 has been reworked slightly relative to the tested build: the
RT712-VB entry now reuses the existing jack_dmic_endpoints array, which
already describes exactly the AIF1 jack + AIF3 DMIC pairing this board
needs, instead of adding a second identical copy of it. That was a
mechanical substitution, but it has not been through hardware.

Tool disclosure, per Documentation/process/generated-content.rst
================================================================

This work was done in extended interactive sessions with Claude (Anthropic,
model claude-opus-5) acting as a coding and debugging assistant, and a
substantial amount of the analysis and of the patch text originated with
it. Both patches carry an Assisted-by tag as described in
Documentation/process/coding-assistants.rst.

The division of work:

  - The assistant read the DMI data and ACP configuration flag off the
    running machine, identified the flag override as the fix, derived the
    SoundWire topology from the enumerated peripherals, and drafted both
    patches and both changelogs.
  - I ran everything that needed root or physical access, rebooted into
    each build, and did the listening tests. The left/right ordering in
    patch 2 is set by the order of the two amplifier entries; the first
    version had the sides reversed and that was caught by ear, not by the
    assistant.
  - No single prompt generated these patches. The session was iterative
    over roughly a day: inspect state, form a hypothesis, build, reboot,
    measure, discard the hypothesis if the measurement disagreed. Several
    confident intermediate conclusions were wrong and were only caught by
    measurement.

I have reviewed both patches, I understand what they do, and I take
responsibility for them.

Link: https://patch.msgid.link/20260809101439.4798-1-wiza@saarinenkoti.fi
2026-08-11 22:12:13 +01:00
Ville Saarinen
b48466e4be
ASoC: amd: acp70: add HP OmniBook X Flip 14 SoundWire machine
Describe the SoundWire topology of the HP OmniBook X Flip 14-kc0xxx
(board 8EA1): two TAS2783 smart amplifiers aggregated on link 0 (unique
IDs 0xC and 0x9, group_position 0 and 1, name prefixes tas2783-1 and
tas2783-2) driving the left and right internal speakers, and an RT712-VB
on link 1 providing the headset jack on AIF1 and the internal DMIC array
on AIF3. The RT712 amplifier path (AIF2) is left unused because the
speakers are driven by the external TAS2783 pair, so the existing
jack_dmic_endpoints array describes it exactly.

The entry is gated on snd_soc_acpi_amd_sdca_is_device_rt712_vb() so it
does not capture a board carrying a different link 1 codec.

Developed with AI assistance. The assistant derived the link topology
from the enumerated peripherals and drafted the table entry. The order
of the two amplifier entries, which is what assigns the physical sides,
was corrected after a listening test by the submitter.

All hardware measurements quoted above were run by the submitter on the
affected machine. The submitter has reviewed the change, understands it
and takes responsibility for it.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Ville Saarinen <wiza@saarinenkoti.fi>
Link: https://patch.msgid.link/20260809101439.4798-3-wiza@saarinenkoti.fi
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-11 22:12:12 +01:00
Ville Saarinen
8393e0bf59
ASoC: amd: acp-config: force SoundWire probe on HP OmniBook X Flip 14
The BIOS on the HP OmniBook X Flip 14-kc0xxx (board 8EA1, Strix Point,
ACP 7.2) reports acp-audio-config-flag = FLAG_AMD_LEGACY_ONLY_DMIC. That
binds the legacy ACP driver and registers a PDM-only card, so the
SoundWire links are never scanned: the two TAS2783 speaker amplifiers on
link 0 and the RT712-VB jack codec on link 1 do not enumerate and the
machine ends up with no usable playback path at all.

Add a DMI entry for the board so the flag is overridden to 0 and
snd_pci_ps probes instead.

Developed with AI assistance. The assistant read the board's ACP
configuration flag out of the running system, identified the flag
override as the fix and drafted the DMI entry.

All hardware measurements quoted above were run by the submitter on the
affected machine. The submitter has reviewed the change, understands it
and takes responsibility for it.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Ville Saarinen <wiza@saarinenkoti.fi>
Link: https://patch.msgid.link/20260809101439.4798-2-wiza@saarinenkoti.fi
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-11 22:12:11 +01:00
Lin Xianglin
fe21db8c5e
ASoC: amd: yc: Add DMI quirk for HyperX OMEN Gaming Laptop 16-ap1xxx
The HyperX OMEN Gaming Laptop 16-ap1xxx (HP board 8F06) has an
internal digital microphone array attached to the AMD ACP PDM
controller, but the acp6x machine driver does not register the DMIC
sound card because this board is missing from the DMI quirk table,
leaving the internal microphone unusable.

Add a DMI quirk entry for the HP board "8F06" so the acp6x DMIC
capture card gets registered.

Signed-off-by: Lin Xianglin <1021538027@qq.com>
Link: https://patch.msgid.link/tencent_428392223C2AD3BF23E7ABAA7521FE5C0C07@qq.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10 13:32:42 +01:00
Rosen Penev
e04cf4dd5f
ASoC: amd: acp: return irq error directly
platform_get_irq() returns multiple error codes. Return the irq directly
instead of just -ENODEV.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20260807012408.55272-1-rosenp@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-07 17:11:33 +01:00
Zhang Heng
1b0e5c7a4d
ASoC: amd: yc: Add DMI quirk for MSI Raider A18 HX A7VHG
Add a DMI quirk for the MSI Raider A18 HX A7VHG fixing the
issue where the internal microphone was not detected.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=221574
Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>
Link: https://patch.msgid.link/20260805091600.318018-2-zhangheng@kylinos.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-05 12:52:55 +01:00
Zhang Heng
bc734d167a
ASoC: amd: yc: Add DMI quirk for Xiaomi RedmiBook 16 2025
Add a DMI quirk for the Xiaomi RedmiBook 16 2025 (AMD) fixing the
issue where the internal microphone was not detected.

Link: https://github.com/thesofproject/linux/issues/5860
Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>
Link: https://patch.msgid.link/20260805091600.318018-1-zhangheng@kylinos.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-05 12:52:54 +01:00
Mark Brown
d58fe9eabc
Merge remote-tracking branch 'asoc/for-7.3' into asoc-next 2026-08-03 13:18:29 +01:00
Zhang Heng
38417f5fc8
ASoC: amd: yc: Add DMI quirk for HP Victus Laptop 16-e1xxx
Add DMI quirk to enable ACP6x sound card for HP Victus by HP Laptop
16-e1xxx, which fixes microphone not working issue.

Without this quirk, the DMIC on acp6x device is not properly enabled,
causing the microphone to not work.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=218926
Link: b29ba27a0e
Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>
Reported-by: CuerdOS Dev Team <cuerdoslinux@proton.me>
Signed-off-by: CuerdOS Dev Team <cuerdoslinux@proton.me>
Link: https://patch.msgid.link/20260730123920.104525-1-zhangheng@kylinos.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-31 15:55:58 +01:00
Rosen Penev
596f78db19
ASoC: amd: acp: Use pcim_iomap_region() in acp-pci
Convert acp-pci to the pcim-managed PCI life-cycle. Replace
pci_enable_device() with pcim_enable_device() and fold the
open-coded pci_request_regions() + devm_ioremap() pair into a single
pcim_iomap_region() call for BAR0, which reserves and iomaps the
register window.

This lets the driver drop the manual pci_release_regions() and
pci_disable_device() calls from the probe error path; pcim releases
the device and region automatically on detach or probe failure. The
error check moves from a NULL test to IS_ERR(), since pcim_iomap_region()
returns an IOMEM_ERR_PTR on failure.

The child platform devices only use devm_ioremap() on their sub-range
of BAR0 (no request_mem_region), so reserving the full BAR0 here does
not conflict with them.

Assisted-by: opencode:hy3-free
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://patch.msgid.link/20260720001054.1439409-1-rosenp@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-30 14:00:30 +01:00
Jackie Dong
9ad4c2331d
ASoC: amd: acp: Add DMI quirk for Lenovo Legion 7 15ASH11
Lenovo Legion 7 15ASH11 with AMD RYZEN AI MAX+ 392 (Strix Halo, ACP
7.0) uses Realtek ALC287 series codec and no any DMIC connected by ACP.
All DMICs directly connet with ALC codec.

Without this quirk, Input Device of Gnome Sound settings shows Internal
Stereo Microphone and Digital Microphone by default. In fact, Digital
Microphone of ACP doesn't work due to no connecting with ALC287 codec,
the Internal Stereo Microphone as analog device based on snd_hda_intel
driver can work well.

Add a DMI quirk to override the flag to 0, consistent with the existing
entry for the Lenovo Yoga Pro 7 15ASH11.

Signed-off-by: Jackie Dong <xy-jackie@139.com>
Link: https://patch.msgid.link/20260727041452.16701-1-xy-jackie@139.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-28 00:14:01 +01:00
Mark Brown
82736e0972
ASoC: Use named initializers for platform_device_id arrays
Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> says:

the objective of this series is still to prepare making struct
platform_device_id::driver_data an anonymous union. See
https://lore.kernel.org/all/cover.1780048925.git.u.kleine-koenig@baylibre.com/
for the details about that.

Link: https://patch.msgid.link/cover.1784528081.git.u.kleine-koenig@baylibre.com
2026-07-27 15:10:35 +01:00
Uwe Kleine-König (The Capable Hub)
4bed1074db
ASoC: amd: acp: Unify code style for platform_device_id array
- Add a trailing comma for initializers unless the closing brace is on
   the same line and for the list terminator;
 - Use a single space in the list terminator;

Acked-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/08137cf5b3cdd0cc2e00da32256664f3cb9b1e4e.1784528081.git.u.kleine-koenig@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-27 15:10:28 +01:00
Uwe Kleine-König (The Capable Hub)
2b26d06fd3
ASoC: amd: acp: Use named initializers for platform_device_id arrays
Named initializers are better readable and more robust to changes of the
struct definition. This robustness is relevant for a planned change to
struct platform_device_id replacing .driver_data by an anonymous union.

While touching these arrays unify spacing and usage of commas.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/a23fa9f649eaab706c704b671527c238f211ee26.1784528081.git.u.kleine-koenig@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-27 15:10:22 +01:00
Sang-Heon Jeon
ca9b51f41c
ASoC: remove conditional return with no effect
Both branches of the check return the same value, so the check has
no effect. Remove it and return the value directly.

This is the result of running the Coccinelle script from
scripts/coccinelle/misc/cond_return_no_effect.cocci.

Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
Link: https://patch.msgid.link/20260723184538.3888637-15-ekffu200098@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-27 13:23:49 +01:00
Jorn Baayen
a9df7939a2
ASoC: amd: yc: Add DMI quirk for Acer Aspire AG14-22P
The Acer Aspire AG14-22P has its internal microphone connected to the
ACP as a digital microphone, but the BIOS does not advertise it via the
AcpDmicConnected ACPI property, so the internal microphone does not work
out of the box. Add a DMI quirk to enable it.

Tested on an Aspire AG14-22P (board Dove2_MDU, BIOS V1.03): the acp6x
DMIC card is created and the internal microphone captures audio.

Assisted-by: Claude-Code:claude-fable-5
Signed-off-by: Jorn Baayen <jhbaayen@fastmail.com>
Link: https://patch.msgid.link/20260721151924.30316-1-jhbaayen@fastmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-23 12:50:36 +01:00
Kuninori Morimoto
a429f382c0
ASoC: amd: acp-sdw-sof-mach: use &pdev->dev instead of card->dev
acp-sdw-sof-mach.c will be updated when Card capsuling.
To makes its review easy, use &pdev->dev instead of card->dev in mc_probe().
There is no diff, because

	static int mc_probe(...)
	{
		...
		card->dev = &pdev->dev;
		...
	}

No functional change, but is preparation for cleanup driver.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/878q75i04q.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-21 18:53:38 +01:00
Kuninori Morimoto
2462bdc608
ASoC: amd: acp-sdw-legacy-mach: use &pdev->dev instead of card->dev
acp-sdw-legacy-mach.c will be updated when Card capsuling.
To makes its review easy, use &pdev->dev instead of card->dev in mc_probe().
There is no diff, because

	static int mc_probe(...)
	{
		...
		card->dev = &pdev->dev;
		...
	}

No functional change, but is preparation for cleanup driver.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/87a4rli04u.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-21 18:53:37 +01:00
郑鸿源
f7074624ba
ASoC: amd: yc: Add MSI Crosshair A16 HX D7WFKG to quirk table
The MSI Crosshair A16 HX D7WFKG has an internal digital microphone
connected through AMD ACP6x, but the system does not expose the
AcpDmicConnected ACPI property. As a result, acp_yc_mach does not bind
and no DMIC capture device is created.

Add a DMI quirk for this model. This was tested on a system with board
MS-15PL, BIOS E15PLAMS.10B, and AMD ACP6x rev 0x62. After applying the
quirk, the internal microphone appears as an acp6x DMIC capture device
and records correctly.

Signed-off-by: 郑鸿源 <spark_psc@outlook.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20260721-master-v1-1-6f56d5a54d96@outlook.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-21 15:47:47 +01:00
Zhang Heng
8e29ed5717
ASoC: amd: yc: Add DMI quirk for ASUS EXPERTBOOK PM1403CDA
Add a DMI quirk for the Asus Vivobook Pro 15 M6500RE fixing the
issue where the internal microphone was not detected.

https://bugzilla.kernel.org/show_bug.cgi?id=220806

Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>
Link: https://patch.msgid.link/20260718080949.157230-1-zhangheng@kylinos.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-19 22:06:48 +01:00
Mark Brown
4fe01a156e
ASoC: tegra: Simplify error handling
bui duc phuc <phucduc.bui@gmail.com> says:

This series contains a few small cleanups for the Tegra ASoC drivers.
 - Use dev_err_probe() for regmap initialization failures.
 - Return the original error from snd_soc_add_component_controls().
 - Use devm_clk_get_optional() for the optional sync_input clock.

Overall, this simplifies the error paths and makes the code more
consistent.

Link: https://patch.msgid.link/20260715051115.17385-1-phucduc.bui@gmail.com
2026-07-15 13:48:26 +01:00
Antonio Ignacio Campos Ruiz
d39e4e2796
ASoC: amd: yc: Add DMI quirk for MSI Vector A16 HX A8WIG
The internal digital microphone on the MSI Vector A16 HX A8WIG is not
detected: the ACP platform devices are created, but snd_soc_acp6x_mach
never binds because the machine is missing from the DMI quirk table, so
no capture device shows up at all.

This is the same board as the already supported "Vector A16 HX A8WHG",
differing only in the trailing model code. Add the corresponding entry.

Signed-off-by: Antonio Ignacio Campos Ruiz <acamposruiz@gmail.com>
Link: https://patch.msgid.link/20260713165709.19489-1-acamposruiz@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-14 22:27:07 +01:00
Syed Saba Kareem
27d090f3cc
ASoC: amd: acp: add ACP70 DMI override for new ASUS TUF platforms
Some ASUS TUF ACP70-based systems expose ACP ACPI configuration flags
that select a non-working fallback audio path, similar to previously
affected ASUS platforms.

Add DMI-based overrides in snd_amd_acp_find_config() for the following
systems to skip ACP ACPI flag-based selection:

  - ASUS TUF Gaming Vivobook 18
  - ASUS TUF Gaming A14 FA401EA

This ensures the intended SoundWire-based machine driver is selected on
these platforms.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://patch.msgid.link/20260710102926.1633385-1-syed.sabakareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-13 20:22:38 +01:00
Mark Brown
512f614646
ASoC: use .auto_selectable_formats
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> says:

This is v2 to add .auto_selectable_formats to each drivers.
I have posted it for all drivers in v1, but is separated into few parts in v2.

[x]: already applied
[o]: this patch-set
[ ]: will post later

	[x]: convert existing .auto_selectable_formats
	[o]: add .auto_selectable_formats on driver (already got Reviewed-by)
	[ ]: add .auto_selectable_formats on driver

Link: https://patch.msgid.link/87mrwmhvjd.wl-kuninori.morimoto.gx@renesas.com
2026-07-09 18:00:14 +01:00
Kuninori Morimoto
5f195b1ae6
ASoC: amd: use .auto_selectable_formats
We can use .auto_selectable_formats. Let's adds it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/87ldc6hvil.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 18:00:09 +01:00
Kuninori Morimoto
cb63976eac
ASoC: amd: acp6x-mach: tidyup strange alignment
yc_acp_quirk_table[] has strange alignment item.
Tidyup it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/874iiageo4.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-08 17:51:15 +01:00
Mark Brown
f21d74ef0c
Vijendar Mukunda <Vijendar.Mukunda@amd.com> says:
This series contains three bug fixes for the AMD common ACP PCI driver
(pci-ps.c) covering ACP6.3, ACP7.0, ACP7.1 and ACP7.2 platforms.

Link: https://patch.msgid.link/20260707060130.2514138-1-Vijendar.Mukunda@amd.com
2026-07-07 23:47:25 +01:00
Vijendar Mukunda
dec5aaa276
ASoC: amd: ps: replace bitwise OR with logical OR in IRQ return check
The condition 'irq_flag | wake_irq_flag' uses bitwise OR to combine two
integer flags that are used as booleans. Replace with logical OR '||' to
correctly express the intended boolean check.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Fixes: 7f91f012c1 ("ASoC: amd: ps: fix for irq handler return status")
Link: https://patch.msgid.link/20260707060130.2514138-4-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-07 23:47:18 +01:00
Vijendar Mukunda
f7697ecf6e
ASoC: amd: ps: fix wrong ACP version string in pci_request_regions()
The driver handles ACP6.3/7.0/7.1/7.2 platforms but the region was
claimed with the stale name "AMD ACP6.2 audio" left over from the
original ACP6.2 driver. Correct it to "AMD ACP6.3 audio".

Fixes: 95e43a170b ("ASoC: amd: add Pink Sardine ACP PCI driver")
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Link: https://patch.msgid.link/20260707060130.2514138-3-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-07 23:47:16 +01:00
Vijendar Mukunda
5893013efa
ASoC: amd: ps: disable MSI on resume in ACP PCI driver
BIOS/firmware may re-enable MSI in PCI config space during system
level resume even though this driver only uses legacy INTx interrupts.
If MSI is left enabled with stale address/data registers, the device
will write interrupts to a bogus address causing IOMMU IO_PAGE_FAULT
and interrupt delivery failure.

Clear the MSI Enable bit before reinitializing the ACP hardware on
system level resume.

Fixes: 4916283880 ("ASoC: amd: ps: add callback functions for acp pci driver pm ops")
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Link: https://patch.msgid.link/20260707060130.2514138-2-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-07 23:47:15 +01:00
Baojun Xu
dedf4ccbcb
ASoC: amd: acp: amd-acp70-acpi-match: Add tas2783 support
Add driver data and ACPI match table entries for the TAS2783 on ACP7.0 and
ACP7.1 platforms using SoundWire link 0.

Signed-off-by: Baojun Xu <baojun.xu@ti.com>
Link: https://patch.msgid.link/20260702104429.1157-1-baojun.xu@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-07 23:05:20 +01:00
Syed Saba Kareem
dbbb5bc517
ASoC: amd: acp: Fix linker error with SDCA quirks
Fix undefined reference to `snd_soc_acpi_amd_sdca_is_device_rt712_vb`
linker error when CONFIG_SND_SOC_ACPI_AMD_MATCH=y and
CONFIG_SND_SOC_ACPI_AMD_SDCA_QUIRKS=m, which causes built-in code to
reference a symbol only available in a module.

Fix this by changing SND_SOC_ACPI_AMD_SDCA_QUIRKS from tristate to bool
and compiling the quirks code directly into snd-soc-acpi-amd-match
rather than as a separate module. This ensures the quirks symbols are
always available at link time when the match tables reference them.

Fixes: 10d366a846 ("ASoC: amd: acp: Fix Kconfig dependencies for SND_SOC_ACPI_AMD_SDCA_QUIRKS")
Reported-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20260703123314.147977-1-syed.sabakareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-06 14:41:50 +01:00