Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3360821rdb; Sun, 10 Dec 2023 02:32:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IGvXmIfOhOAqfM7SC2u0sL1sAyfgHvHffPI1gamoJcGP+yuvltcR0lTtNRZgQnRSHe8Q+Ro X-Received: by 2002:a05:6870:b28d:b0:1fb:75b:12eb with SMTP id c13-20020a056870b28d00b001fb075b12ebmr3491583oao.61.1702204374674; Sun, 10 Dec 2023 02:32:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702204374; cv=none; d=google.com; s=arc-20160816; b=ibmjCSZ2DCVNf+irryHfHzlLflsYCxzVDa3MSRX4GgKkY85yaYerHKlUF/gDT0gP9V 3a9AdT2MtBoi8w/d5jIXoGSHx/SyzTvtGeGJ5RYRiD/hWPmYtcMvvQ+VdRUR0cOOPc32 C1wYFuiKPH/+smd2a0F3A54tQzHl4nI0ei5BIcJyvCI45CbxbhLfNkAhF5s+ioXOM4tm NB0LhuMdM9aZkaZ100DwU6bxN7U8hyRuLwzB6V9RrPSjmjikV+aERCs2vhYF03d6pHkM AGdtSyEoD53Un3OiXmbIZ2K8YSIg1jNJ7aiDzirv1Ef7RhctX0HueivRU5muIQcezVr8 XPvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=5PdxrQqe9fs5gcjsGu18VyYx56F0t/jRsVi5sRSs/7s=; fh=cJc4+lGN67dHzmmM2O3FUiFxBGS9Em2nOnXKZ4iEubk=; b=RM1gWNgVKpBSsDmcT+sKWmTUMONfiD4gyASpJo2nsE557w04NemMfTebflTUBk3HDI gtZ2XAaQorHNyL5mvXjBGA13I144Tganze6ZCzzIZHp3ptR4NqrM6/IeVn6p/elNZ8wO oy29YjItZU//Gb+aiaJNx4K64zGTFJgkKoHA+tYqiZJBSdfGVun6DIJ+2NIwnSsC2cfo gL+EHCtCaHEAEC20u5Pw3kZyFdIWOLmyrynhn+b6dpFqJFyaHYEgQX2cUZEn0mwcwDia U+htn6OzPqwcU/w9lXpS3F+mxv5BtywETMAHuBRzf7mo3+Kpybiuuu1WTH74KsvCgEmI zPgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=5fKpWA9l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id s6-20020a62e706000000b006cd853221easi4304439pfh.362.2023.12.10.02.32.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Dec 2023 02:32:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=5fKpWA9l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 830158096D96; Sun, 10 Dec 2023 02:32:51 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229596AbjLJKcd (ORCPT + 99 others); Sun, 10 Dec 2023 05:32:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229482AbjLJKcc (ORCPT ); Sun, 10 Dec 2023 05:32:32 -0500 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F21FD101; Sun, 10 Dec 2023 02:32:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702204357; bh=ntPKH8fXnlQDW6fmLSdVDIatJhgzlPI024QuGRVz70Q=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=5fKpWA9l7nDKlKkxrgZtJXhtkFTe3i/khwDwyohsoHBJ3iUDhE1tpwGW5dwkaIRLV EoGEMNKq/JT6Aj96eaICoWsOPmeBP+TaqSeeWaBOm15cNfNf32CRbrLV56T/XyELd8 6/ocI8NJpZJXCR6yjZv2WHdZ7cT/s0k9xa+K8p7hfD/OOwuKNotGFGCyfdkapZ8v0S zAECN4yoIrQBhEjue5SE/V3VZqQSSv8PkWCt9ObOyT3zD9xkYCMf4kC4ovAF3cT9l6 NAjFpQ618VTbTWKZ1yNLYnXSmdcM3Ihk8YY8QcQbsuPA9GsEKM7qLxyXeb6zqduO5/ GFstCPA3XveOA== Received: from [100.115.223.179] (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madrid.collaboradmins.com (Postfix) with ESMTPSA id EFC76378000B; Sun, 10 Dec 2023 10:32:35 +0000 (UTC) Message-ID: <41e63870-ab22-45d8-b8b0-c406dbcb07f0@collabora.com> Date: Sun, 10 Dec 2023 12:32:35 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 10/11] ASoC: amd: acp: Use correct DAI link ID for BT codec Content-Language: en-US To: Venkata Prasad Potturu , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Pierre-Louis Bossart , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Alper Nebi Yasak , Syed Saba Kareem , Kuninori Morimoto , Marian Postevca , Vijendar Mukunda , V sujith kumar Reddy , Mastan Katragadda , Ajit Kumar Pandey Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, sound-open-firmware@alsa-project.org, kernel@collabora.com References: <20231209205351.880797-1-cristian.ciocaltea@collabora.com> <20231209205351.880797-11-cristian.ciocaltea@collabora.com> <8a218987-965b-4228-b1d1-f7c061d553ab@amd.com> <391d2476-8f4a-4670-a248-8d4d9c46ee09@collabora.com> <1de9b77a-5737-40e0-ba3b-79c8713be93e@amd.com> From: Cristian Ciocaltea In-Reply-To: <1de9b77a-5737-40e0-ba3b-79c8713be93e@amd.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Sun, 10 Dec 2023 02:32:51 -0800 (PST) On 12/10/23 12:05, Venkata Prasad Potturu wrote: > > On 12/10/23 14:36, Cristian Ciocaltea wrote: >> On 12/10/23 05:24, Venkata Prasad Potturu wrote: >>> On 12/10/23 02:23, Cristian Ciocaltea wrote: >>>> Commit 671dd2ffbd8b ("ASoC: amd: acp: Add new cpu dai and dailink >>>> creation for I2S BT instance") added I2S BT support in ACP common >>>> machine driver, but using a wrong BT_BE_ID, i.e. 3 instead of 2: >>>> >>>> [ 7.799659] snd_sof_amd_vangogh 0000:04:00.5: Firmware info: version >>>> 0:0:0-7863d >>>> [ 7.803906] snd_sof_amd_vangogh 0000:04:00.5: Firmware: ABI 3:26:0 >>>> Kernel ABI 3:23:0 >>>> [ 7.872873] snd_sof_amd_vangogh 0000:04:00.5: Topology: ABI 3:26:0 >>>> Kernel ABI 3:23:0 >>>> [ 8.508218] sof_mach nau8821-max: ASoC: physical link acp-bt-codec (id >>>> 2) not exist >>>> [ 8.513468] sof_mach nau8821-max: ASoC: topology: could not load >>>> header: -22 >>>> [ 8.518853] snd_sof_amd_vangogh 0000:04:00.5: error: tplg component >>>> load failed -22 >>>> [ 8.524049] snd_sof_amd_vangogh 0000:04:00.5: error: failed to load >>>> DSP topology -22 >>>> [ 8.529230] snd_sof_amd_vangogh 0000:04:00.5: ASoC: error at >>>> snd_soc_component_probe on 0000:04:00.5: -22 >>>> [ 8.534465] sof_mach nau8821-max: ASoC: failed to instantiate card -22 >>>> [ 8.539820] sof_mach nau8821-max: error -EINVAL: Failed to register >>>> card(sof-nau8821-max) >>>> [ 8.545022] sof_mach: probe of nau8821-max failed with error -22 >>>> >>>> Move BT_BE_ID to the correct position in the enum. >>>> >>>> Fixes: 671dd2ffbd8b ("ASoC: amd: acp: Add new cpu dai and dailink >>>> creation for I2S BT instance") >>>> Signed-off-by: Cristian Ciocaltea >>>> --- >>>>    sound/soc/amd/acp/acp-mach.h | 2 +- >>>>    1 file changed, 1 insertion(+), 1 deletion(-) >>>> >>>> diff --git a/sound/soc/amd/acp/acp-mach.h >>>> b/sound/soc/amd/acp/acp-mach.h >>>> index a48546d8d407..0c18ccd29305 100644 >>>> --- a/sound/soc/amd/acp/acp-mach.h >>>> +++ b/sound/soc/amd/acp/acp-mach.h >>>> @@ -27,8 +27,8 @@ >>>>    enum be_id { >>>>        HEADSET_BE_ID = 0, >>>>        AMP_BE_ID, >>>> -    DMIC_BE_ID, >>>>        BT_BE_ID, >>>> +    DMIC_BE_ID, >>> This will break the other platforms as this same enum used in topology >>> to create dailink. >> If I understand this correctly, there is no consistency across firmware >> regarding the IDs used for DAI link identification.  What would be the >> suggested solution in this case? > > These id values should be same in machine driver and topology file, then > only dailink can create without an error. Yes, my point was that some topology files seem to require different IDs for the same DAI link types. In this case the topology expects ID 2 for BT, but other topologies would interpret that as DMIC. > Always new be_id should add at the end only. > > In this case BT_BE_ID should be at the end. > >   enum be_id { >       HEADSET_BE_ID = 0, >       AMP_BE_ID, >       DMIC_BE_ID, >       BT_BE_ID, >   } So you are basically stating the firmware is broken and needs an update to use ID 3 for BT, and there is nothing we can do about it on driver's side. Is that correct? > > >> >> Thanks, >> Cristian >> >>>>    }; >>>>      enum cpu_endpoints {