From nobody Wed Jun 17 02:52:13 2026 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 233D038B135; Thu, 23 Apr 2026 18:35:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.97.179.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776969326; cv=none; b=TrpiH5QD1LqHIIdOswLvN3c2UMuc27o0EotEi/qx7C2EHjwyBqQmdYoLJ8dn18jB0ejt4H1II0rOsqhbjuzQQ3liqoKfuXF7EL7eY4ObA3OZyGtPUnCBkCIiR8xVUcQZ5Ni23pRdB+3wuh+/4QFmrn1Z0lQROnA8J/i67el2ucY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776969326; c=relaxed/simple; bh=7y/CdWWncXLRts65xzBszPB4re+rYPxNJaz//HkFM2s=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=taxB3YOHYMGNXYrnEQIv4G0ketzphO/gtb3SbCivcPnA0n1P8AhI+jYQT1oc8OozdrfAAdAcwNYeXMfe8uiM9iRnJyYm5XWzCuAPeEh/7Ey8vBaSZN2GV4TSt0kHRoV572TZZm9auiIqXpn6eFk/FWPbww5VfliGPyhNMjzdlMo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com; spf=pass smtp.mailfrom=igalia.com; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b=sa2ov6dc; arc=none smtp.client-ip=213.97.179.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=igalia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b="sa2ov6dc" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject: Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=2k6kgWQ4kPx2I/9YZuOiEiKwpLqwlbIty9dlSJm17BM=; b=sa2ov6dcHq5XYh8AtgbOCGuvky 5d9p3ngXDNWCcHIEtLfVVm1DNFBJBNdj1C5uHBrVs6CrziFnjVFPYDlIIW/4L7TaUetW0TgFypoU2 EiFyZUgo1jz2b4C7Z6kUvCDUUT+poSr9JKtmnoCfy3cgNkVwNodBbElKSB7Uptj4siKbiwLpAhGMa bPNGY6pKjNsMtxN3KlnWx4xlRcMQ7UWgXOML61fUvuXgmpXswvAfxXDVPBzH9+3xdFOqerBagfNgg MOqkDTfeSF11xKwiu8sOrgSpNW45n5a+xDRshbocYjjDWr2HUGvZ+6ue/r6gAH577p2TiT31LWXTi GFVV7tFA==; Received: from [179.111.22.136] (helo=localhost) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1wFytQ-001EGO-16; Thu, 23 Apr 2026 20:35:15 +0200 From: "Guilherme G. Piccoli" To: linux-sound@vger.kernel.org Cc: Vijendar.Mukunda@amd.com, venkataprasad.potturu@amd.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, linux-kernel@vger.kernel.org, kernel-dev@igalia.com, kernel@gpiccoli.net, "Guilherme G. Piccoli" , Robert Beckett , Umang Jain , Cristian Ciocaltea , Mario Limonciello , Melissa Wen Subject: [PATCH V2] ASoC: amd: acp: Add DMI quirk for Valve Steam Deck OLED Date: Thu, 23 Apr 2026 15:30:58 -0300 Message-ID: <20260423183505.116445-1-gpiccoli@igalia.com> X-Mailer: git-send-email 2.50.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Commit 671dd2ffbd8b ("ASoC: amd: acp: Add new cpu dai and dailink creation = for I2S BT instance") introduced a change that "broke" Steam Deck's audio probe, in the OLED model, as observed in the following dmesg snippet: [...] snd_sof_amd_vangogh 0000:04:00.5: Topology: ABI 3:26:0 Kernel ABI 3:23:1 sof_mach nau8821-max: ASoC: physical link acp-bt-codec (id 2) not exist sof_mach nau8821-max: ASoC: topology: could not load header: -22 snd_sof_amd_vangogh 0000:04:00.5: tplg amd/sof-tplg/sof-vangogh-nau8821-max= .tplg component load failed -22 snd_sof_amd_vangogh 0000:04:00.5: error: failed to load DSP topology -22 snd_sof_amd_vangogh 0000:04:00.5: ASoC error (-22): at snd_soc_component_pr= obe() on 0000:04:00.5 sof_mach nau8821-max: ASoC: failed to instantiate card -22 sof_mach nau8821-max: error -EINVAL: Failed to register card(sof-nau8821-ma= x) sof_mach nau8821-max: probe with driver sof_mach failed with error -22 [...] Notice the quotes in "broke": it's not really a bug in such commit, but instead a problem with a topology file from Steam Deck OLED. This was discussed to great extent in [1], and Cristian proposed a pretty simple and functional change that resolved the issue for the Deck's issue. That change, though, would break other devices, so it wasn't accepted upstream. And the proper suggested solution (fix the topology) was never implemented, so Valve's kernel (and anyone that wants to boot the mainline on Steam Deck OLED) is carrying that fix downstream. So, we propose hereby a different approach: a DMI quirk, as many already present in the sound drivers, to address this issue solely on Steam Deck OLED, not breaking other devices and as a bonus, allowing simple patch up in case eventually the topology file gets fixed (we'd just need to check against any DMI info reflecting that or the topology/FW versions). The motivation of such upstream quirk is related to users that want to test latest kernel trees on their devices and get no only non-working sound device, but seems some games (like Ori and the Blind Forest) can't properly work without a proper functional audio device. Example of such report can be seen at [2]. Cc: Mark Brown Cc: Robert Beckett Cc: Umang Jain Fixes: 671dd2ffbd8b ("ASoC: amd: acp: Add new cpu dai and dailink creation = for I2S BT instance") Link: https://lore.kernel.org/r/20231209205351.880797-11-cristian.ciocaltea= @collabora.com/ [1] Link: https://bugzilla.kernel.org/show_bug.cgi?id=3D218677 [2] Reviewed-by: Cristian Ciocaltea Reviewed-by: Mario Limonciello Tested-by: Melissa Wen Signed-off-by: Guilherme G. Piccoli --- V1 link: https://lore.kernel.org/r/20260421192214.77819-1-gpiccoli@igalia.c= om/ Hi folks, thanks for the reviews so far. This V2 includes a single change suggested by Cristian (thanks!), also vouched by Mark: s/quirk-name/QUIRK_quirk-name/ in the code. Other than that, I've added the Reviewed-by tags. Thanks, Guilherme sound/soc/amd/acp/acp-legacy-mach.c | 2 +- sound/soc/amd/acp/acp-mach-common.c | 22 +++++++++++++++++++--- sound/soc/amd/acp/acp-mach.h | 4 ++++ sound/soc/amd/acp/acp-sof-mach.c | 2 +- 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/sound/soc/amd/acp/acp-legacy-mach.c b/sound/soc/amd/acp/acp-le= gacy-mach.c index a7a551366a40..235d6cc83fa9 100644 --- a/sound/soc/amd/acp/acp-legacy-mach.c +++ b/sound/soc/amd/acp/acp-legacy-mach.c @@ -174,7 +174,7 @@ static int acp_asoc_probe(struct platform_device *pdev) acp_card_drvdata->acp_rev =3D mach->mach_params.subsystem_rev; =20 dmi_id =3D dmi_first_match(acp_quirk_table); - if (dmi_id && dmi_id->driver_data) + if (dmi_id && dmi_id->driver_data =3D=3D (void *)QUIRK_TDM_MODE_ENABLE) acp_card_drvdata->tdm_mode =3D dmi_id->driver_data; =20 ret =3D acp_legacy_dai_links_create(card); diff --git a/sound/soc/amd/acp/acp-mach-common.c b/sound/soc/amd/acp/acp-ma= ch-common.c index 09f6c9a2c041..ef784cca13f2 100644 --- a/sound/soc/amd/acp/acp-mach-common.c +++ b/sound/soc/amd/acp/acp-mach-common.c @@ -20,6 +20,7 @@ #include #include #include +#include =20 #include "../../codecs/rt5682.h" #include "../../codecs/rt1019.h" @@ -37,15 +38,21 @@ #define NAU8821_FREQ_OUT 12288000 #define MAX98388_CODEC_DAI "max98388-aif1" =20 -#define TDM_MODE_ENABLE 1 - const struct dmi_system_id acp_quirk_table[] =3D { { /* Google skyrim proto-0 */ .matches =3D { DMI_EXACT_MATCH(DMI_PRODUCT_FAMILY, "Google_Skyrim"), }, - .driver_data =3D (void *)TDM_MODE_ENABLE, + .driver_data =3D (void *)QUIRK_TDM_MODE_ENABLE, + }, + { + /* Valve Steam Deck OLED */ + .matches =3D { + DMI_MATCH(DMI_SYS_VENDOR, "Valve"), + DMI_MATCH(DMI_PRODUCT_NAME, "Galileo"), + }, + .driver_data =3D (void *)QUIRK_REMAP_DMIC_BT, }, {} }; @@ -1401,6 +1408,7 @@ int acp_sofdsp_dai_links_create(struct snd_soc_card *= card) struct snd_soc_dai_link *links; struct device *dev =3D card->dev; struct acp_card_drvdata *drv_data =3D card->drvdata; + const struct dmi_system_id *dmi_id =3D dmi_first_match(acp_quirk_table); int i =3D 0, num_links =3D 0; =20 if (drv_data->hs_cpu_id) @@ -1572,6 +1580,9 @@ int acp_sofdsp_dai_links_create(struct snd_soc_card *= card) links[i].codecs =3D &snd_soc_dummy_dlc; links[i].num_codecs =3D 1; } + + if (dmi_id && dmi_id->driver_data =3D=3D (void *)QUIRK_REMAP_DMIC_BT) + links[i].id =3D DMIC_BE_ID; i++; } =20 @@ -1587,6 +1598,11 @@ int acp_sofdsp_dai_links_create(struct snd_soc_card = *card) links[i].capture_only =3D 1; links[i].nonatomic =3D true; links[i].no_pcm =3D 1; + + if (dmi_id && dmi_id->driver_data =3D=3D (void *)QUIRK_REMAP_DMIC_BT) { + links[i].id =3D BT_BE_ID; + dev_dbg(dev, "quirk REMAP_DMIC_BT enabled\n"); + } } =20 card->dai_link =3D links; diff --git a/sound/soc/amd/acp/acp-mach.h b/sound/soc/amd/acp/acp-mach.h index f94c30c20f20..7177d3fd9619 100644 --- a/sound/soc/amd/acp/acp-mach.h +++ b/sound/soc/amd/acp/acp-mach.h @@ -26,6 +26,10 @@ =20 #define acp_get_drvdata(card) ((struct acp_card_drvdata *)(card)->drvdata) =20 +/* List of DMI quirks - check acp-mach-common.c for usage. */ +#define QUIRK_TDM_MODE_ENABLE 1 +#define QUIRK_REMAP_DMIC_BT 2 + enum be_id { HEADSET_BE_ID =3D 0, AMP_BE_ID, diff --git a/sound/soc/amd/acp/acp-sof-mach.c b/sound/soc/amd/acp/acp-sof-m= ach.c index 6215e31ecedd..36ecef7013b9 100644 --- a/sound/soc/amd/acp/acp-sof-mach.c +++ b/sound/soc/amd/acp/acp-sof-mach.c @@ -110,7 +110,7 @@ static int acp_sof_probe(struct platform_device *pdev) =20 acp_card_drvdata =3D card->drvdata; dmi_id =3D dmi_first_match(acp_quirk_table); - if (dmi_id && dmi_id->driver_data) + if (dmi_id && dmi_id->driver_data =3D=3D (void *)QUIRK_TDM_MODE_ENABLE) acp_card_drvdata->tdm_mode =3D dmi_id->driver_data; =20 acp_card_drvdata->acp_rev =3D mach->mach_params.subsystem_rev; --=20 2.50.1