Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.134 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793663660; b=m6hr43ogdj2VboewNPv4UzCyJc8yLSPJwP0xKCyxX+b6DTQYx4oNUMDsa7hr1zEswCaV Af4O0FasfKBZOxUcSPOmn8u7WyhegHvx7ec9ilQjOyBOWX9P5kDqux2Ph9tQPxfbKepZr PIer0iGWll4NyuYGpXpNvbKX4NdEcUBGD/JRbuxJWueePcTYRYEOchDNZbhP5+OPd/ni2 VUUMHOJ8/dHC83sMTjVf3MUVf1hXbcu84Bn0Qmm566Xm0/pJo21Cxj0qtA0dJ9+Om67E7 Qtu3zgsLSa/oh0A2ElfcLvpdbIs42BposY2smAadvPJF2PInnresLrs7R/X6RxLk4Og== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793663660; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date:MIME-Version:User-Agent: Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=DRZUBsfLVs5ALhAcjOQBIw2GOcnXP13A4aZ3TqgnF6s=; b=5mZr3zS5miwuGRNPQ/vt1AQ2WzVlbS+esQ4M3DF+cwC4Jfo6qlI4vYlDbAS4v5nrDbJq MydD5K32/S10Xfy0TvZUJDTt/Cd6qpehhXhKIIutBsOUge2yzKfy3DzEx15mPcyKj7U2L w5O+JLexCVdqyHa43fPURLu6JAUNYVnBr1N0py27lqadAccfFMpRVk1MOppIwJZjue7eb r/YpLMAwrcJrr4lUVgP7PBo7gm95Dnjnck0A4QJCC6UOflAOAqSG/S81my/9C8OVp9sZY BkemVzNN3Y1+M4128Wn6bO1GquCMjmXVCEwFp0IaW+egbfnWRN1D2nc/3mdVek93K7w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=DlBMigJr; arc=none smtp.remote-ip=95.215.58.134 Received: from mta1.migadu.com (out-134.mta1.migadu.com [95.215.58.134]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0A453606A324 for ; Mon, 2 Nov 2026 23:54:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0A453606A324 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=DlBMigJr X-Envelope-To: linux-sound@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=5rwLWZUQEywqqEx+DZVIR9XTXe9WId4zBAGAoP+BUcM=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1793663656; v=1; x=1794268456; b=DlBMigJrUgvmUuJ3beCBNtnAY6MVJ3h4mHxQyJ8cGpAhWfaCyobpjTyQqyGcTalA5Oy0NZS5 fmcAmQL8u+9c0jV1kSG03hTo1XazOE+Jfu/jJP0cVAOtpEp3X5z4Lfi/H8/ygXclM47ueKWqPMR g9nKbxvNy0H4PLSG1fclXLt8= X-Envelope-To: linux-sound@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id eb444f0ad2101dca; Mon, 02 Nov 2026 23:54:16 +0000 X-Mizu-Trace-ID: eb444f0ad2101dca X-Migadu-Flow: FLOW_OUT Message-ID: Date: Mon, 2 Nov 2026 15:54:12 -0800 X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/5] ASoC: tas2783-sdw: use the BIOS speaker ID in the firmware name To: Mark Brown Cc: Shenghao Ding , Kevin Lu , Baojun Xu , Sen Wang , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org References: <20261016232416.2628603-1-matthew.schwartz@linux.dev> <20261016232416.2628603-4-matthew.schwartz@linux.dev> <179366321499.2186205.14199496267448130552.b4-review@b4> Content-Language: en-US From: Matthew Schwartz In-Reply-To: <179366321499.2186205.14199496267448130552.b4-review@b4> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 11/2/26 3:46 PM, Mark Brown wrote: >> Some boards have TAS2783 firmware in linux-firmware named >> SSID-SPKID-LINK-0xUID.bin, with a speaker ID ahead of the link ID (the >> HP 8EA1 has its amps on link 0 and ships 8EA1-{0,1}-0-0x*.bin). The >> driver only builds the three-field SSID-LINK-0xUID name, so these boards >> never load firmware. On the ASUS ROG Xbox Ally X20 (SSID 1954) the BIOS >> provides the speaker ID in a 4-byte SPEAKER_ID EFI variable, and only >> the four-field 1954-*-*-0x*.bin files exist. > >> Read SPEAKER_ID once and request the four-field name first when it is >> present. Boards without the variable keep the current names, and the >> unprefixed three-field name is still tried if the four-field file is >> missing. > >> +static int tas2783_get_spk_id(void) >> +{ >> + efi_guid_t guid = TAS2783_SPKID_GUID; >> + unsigned long size = sizeof(u32); >> + efi_status_t status; >> + u32 spk_id = 0; >> + >> + if (!efi_rt_services_supported(EFI_RT_SUPPORTED_GET_VARIABLE)) >> + return -ENOENT; >> + >> + status = efi.get_variable(L"SPEAKER_ID", &guid, NULL, &size, &spk_id); >> + if (status != EFI_SUCCESS) >> + return -ENOENT; >> + >> + return spk_id; > > This returns a u32 as an int so if someone decides to pick a very large > value it'll look like an error value. That's likely unrealistic though. > >> for (; dev; dev = dev->parent) { >> if (dev->bus == &pci_bus_type) { >> pci = to_pci_dev(dev); >> - scnprintf(name, size, "%04X-%1X-%s%1X.bin", >> - pci->subsystem_device, bus->link_id, >> - fw_uid_prefix, unique_id); >> + if (!tas_dev->spk_id_read) { >> + tas_dev->spk_id = tas2783_get_spk_id(); >> + tas_dev->spk_id_read = true; >> + } >> + if (tas_dev->spk_id >= 0 && !tas_dev->fw_use_fallback) >> + scnprintf(name, size, "%04X-%X-%1X-0x%1X.bin", >> + pci->subsystem_device, tas_dev->spk_id, >> + bus->link_id, unique_id); >> + else >> + scnprintf(name, size, "%04X-%1X-%s%1X.bin", >> + pci->subsystem_device, bus->link_id, >> + fw_uid_prefix, unique_id); > > Mixing this in with the fallback decision seems confusing. There's some > cases generated in the Sashiko review which look plausible though I > didn't fully work through everything: > > https://sashiko.dev/#/patchset/20261016232416.2628603-1-matthew.schwartz%40linux.dev Thanks, didn't know Sashiko feedback wasn't in-line anymore. I'll take a look and send out a v2. >