From patchwork Sat Dec 9 20:53:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Ciocaltea X-Patchwork-Id: 176230 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp6236021vqy; Sat, 9 Dec 2023 12:54:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IEgKjMs/PD0Zz8iwvyS7CefgvIqF3bRaxEx01FnlPwqbJyRlcEc4m8HAeEAysJw+eXaG4Kg X-Received: by 2002:a05:6e02:19c7:b0:35d:a0f3:4192 with SMTP id r7-20020a056e0219c700b0035da0f34192mr3900012ill.9.1702155250200; Sat, 09 Dec 2023 12:54:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702155250; cv=none; d=google.com; s=arc-20160816; b=05fgeZdwVzSFNKoww1sjdIKo9fmrXJLApwklauNocEcPSTGX5+ypazOOJwbiG1WTt8 ctb99tt4fMi4cf0AessI6Xdm/4deuA+iuFjKawgZ/DMiGNs/qJ4d72vyqKlhLEE8shNz JPcylUyu3bxXyUYMtZb+ZTabFKqS85TanXr1Bn3NGEQuQitLtmNbeO8gQptS7HyVMILq UiXWboaMTSBSSqJvuIsyCEZPWXE/jfYg7vc7sdhCYsU5eziT0khZjuqgOmCxnwRnkO4z JMomdJXC8Nj8Ud4MnY+AVsz9W3mMtkDPgN4uIqWnl23L0LDHqSvZasbvbJbBVe+H5bFX fZTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gSW0RIc8us0R0CMlGpk/va8rY5gcb7Qi1HVdBTu/Usc=; fh=qH4A7sjuqsI+9iJQtQMmOmQRysg9CNJ3X6TEjzAzPQM=; b=Yi6TFk6216G2sgiszaf2K9YPFOv5ZFMDTVlqwuyKFB1YIcHcE9X05RBmrBMMgy85TU wa4LSfixACk6uZQAuuugTVAiSkXAicH7CNsCwKOgrvlXtsziw+WSvfYLI2gq9aMrzRGS 5ngGj4ASdcoux1Jh9jsee7QZSdnxNBvlzDjhp08Hk1Q3EEo7EaabS7huuO83bMV4ZzN4 UE2mqxzIqHTu3aIZEQdZG5qhaVUKM/Wsb3OVnfOzR7/LYqakPwX9KWvFN6yT7BjQ/EgG JogP9aKfAuVsWVtz5lOlr50xE6iguKxd6Mcj93TDrtGw3Pt2MkZkuUmm2/8kjmQYeNkM exVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Vc96KMna; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id ju5-20020a170903428500b001cbe9b9f160si3500103plb.5.2023.12.09.12.54.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Dec 2023 12:54:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Vc96KMna; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 8176F805F96E; Sat, 9 Dec 2023 12:54:08 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231148AbjLIUyA (ORCPT + 99 others); Sat, 9 Dec 2023 15:54:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230470AbjLIUx6 (ORCPT ); Sat, 9 Dec 2023 15:53:58 -0500 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6201E5; Sat, 9 Dec 2023 12:54:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702155243; bh=xw0Z9G6P6/9GD35fi7UmgEcXakf2yM/DrhCkyvNuWRQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vc96KMna3yO5G2XXYkNfOe46dqv56EBmIgLuKXN3IBahIDc0/mby273YIYxd9XXUp THSyCUl1lk6n/EoGvYIpTGQm+jMF+G0/vEjSvTVMQBGM9DOCaQlbsXMAUWFIl2d6X6 Xa1QnEGb0lGRshuByMXQWSLiBsshjorE9ZAtKvlPi39z1V8fPk/7c6o4IZWoIGBlRi z+P0rd+zEjKtj/yw7g2yoo/I1jz90Xq3vbsdKVbzb4/2bqqW5Mh1krvIVoRQPR1VFQ M6Jw8KL6XVMBLGsvhW94NYXkXm6L9wr1/ghCWXaicyBhWRuqQwcg5+qgeMfsqFTWIH wmc0l6UQdF67g== Received: from localhost (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 2CAEC37813DA; Sat, 9 Dec 2023 20:54:03 +0000 (UTC) From: Cristian Ciocaltea To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Pierre-Louis Bossart , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Venkata Prasad Potturu , 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 Subject: [PATCH 01/11] ASoC: amd: acp: Drop redundant initialization of machine driver data Date: Sat, 9 Dec 2023 22:53:40 +0200 Message-ID: <20231209205351.880797-2-cristian.ciocaltea@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231209205351.880797-1-cristian.ciocaltea@collabora.com> References: <20231209205351.880797-1-cristian.ciocaltea@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Sat, 09 Dec 2023 12:54:08 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784839143281906327 X-GMAIL-MSGID: 1784839143281906327 Simplify driver data configuration by removing redundant initialization of members in static structs. Signed-off-by: Cristian Ciocaltea --- sound/soc/amd/acp/acp-sof-mach.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/sound/soc/amd/acp/acp-sof-mach.c b/sound/soc/amd/acp/acp-sof-mach.c index 2a9fd3275e42..1d313fcb5f2d 100644 --- a/sound/soc/amd/acp/acp-sof-mach.c +++ b/sound/soc/amd/acp/acp-sof-mach.c @@ -28,7 +28,6 @@ static struct acp_card_drvdata sof_rt5682_rt1019_data = { .hs_codec_id = RT5682, .amp_codec_id = RT1019, .dmic_codec_id = DMIC, - .tdm_mode = false, }; static struct acp_card_drvdata sof_rt5682_max_data = { @@ -38,7 +37,6 @@ static struct acp_card_drvdata sof_rt5682_max_data = { .hs_codec_id = RT5682, .amp_codec_id = MAX98360A, .dmic_codec_id = DMIC, - .tdm_mode = false, }; static struct acp_card_drvdata sof_rt5682s_rt1019_data = { @@ -48,7 +46,6 @@ static struct acp_card_drvdata sof_rt5682s_rt1019_data = { .hs_codec_id = RT5682S, .amp_codec_id = RT1019, .dmic_codec_id = DMIC, - .tdm_mode = false, }; static struct acp_card_drvdata sof_rt5682s_max_data = { @@ -58,7 +55,6 @@ static struct acp_card_drvdata sof_rt5682s_max_data = { .hs_codec_id = RT5682S, .amp_codec_id = MAX98360A, .dmic_codec_id = DMIC, - .tdm_mode = false, }; static struct acp_card_drvdata sof_nau8825_data = { @@ -69,7 +65,6 @@ static struct acp_card_drvdata sof_nau8825_data = { .amp_codec_id = MAX98360A, .dmic_codec_id = DMIC, .soc_mclk = true, - .tdm_mode = false, }; static struct acp_card_drvdata sof_rt5682s_hs_rt1019_data = { @@ -80,20 +75,15 @@ static struct acp_card_drvdata sof_rt5682s_hs_rt1019_data = { .amp_codec_id = RT1019, .dmic_codec_id = DMIC, .soc_mclk = true, - .tdm_mode = false, }; static struct acp_card_drvdata sof_nau8821_max98388_data = { .hs_cpu_id = I2S_SP, .amp_cpu_id = I2S_HS, .bt_cpu_id = I2S_BT, - .dmic_cpu_id = NONE, .hs_codec_id = NAU8821, .amp_codec_id = MAX98388, - .bt_codec_id = NONE, - .dmic_codec_id = NONE, .soc_mclk = true, - .tdm_mode = false, }; static int acp_sof_probe(struct platform_device *pdev) From patchwork Sat Dec 9 20:53:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Ciocaltea X-Patchwork-Id: 176232 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp6236111vqy; Sat, 9 Dec 2023 12:54:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IExho8Y3EriRd+jRXsCjtGb8CEUYj7p3IUJ7nI0TPY3/oFDrvqI2aA64LTg4g1EpMYSQbj0 X-Received: by 2002:a17:903:2304:b0:1d2:eec4:5d34 with SMTP id d4-20020a170903230400b001d2eec45d34mr2762037plh.57.1702155265647; Sat, 09 Dec 2023 12:54:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702155265; cv=none; d=google.com; s=arc-20160816; b=wHexiEoW3B2ldazkYbHKZKZ4+70K6NoR8GtP/R6tw2BAp4yHTw6DlkDY/ICZRmoHIY z1eh1Lbw2S3X8W9Yi2QXjPPxxgX/thc5kZzYWggGLqEZFRjt3eZaTqJgS2bM99Pk8A7k bQ+BaP4UrPt8CwU2reBy5WkhaseKFInPmXWosdy5cLfkVBbQT7DOBghc4LhhFMdrkAtg lf2CcdzkUweo0nlHXml9+KperhQKdPvHvxRJ1BARK2X9croztVWAlUTn09JGS3Jj57n1 hehKFeTXWI7BsezMwMPgycAah1pklaxVUbzzFmX6nM470V7bS0mFoWAqDmiLlSg1S2rH vziA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QZuj0ox3mott+JlTsCKI4YLh1riK97Tlj99LoTQPM20=; fh=qH4A7sjuqsI+9iJQtQMmOmQRysg9CNJ3X6TEjzAzPQM=; b=yXeGT/UVGFztQDk8CFHDnWJ0xpzkHywqzkuP2IB1OoztDHPjn7aqKiKFJY5kDspnwv d9lFLClbQBrQtz67I6QAUFC3jHYKjvEavwVkjMyqiXCQxt0km1bvJwedYND47yJydN5x 7p4ziiCV/gmorVGXYzc+5hK+Wxw7VfzsYpspxIAk1tOoRzax14timPXlcjr+EoZUYjXq XnvRYkwn5GAVEdhlJAY+0GWoxvqRUn6cNPXZIsl5i1hdgRfZ/9+R/fGubVbuRRuymQA7 PX8GXVXFLN5qhX+Ex84+Oih7KCHD9qB6IDWFDR1cbm7Kn/4JWzTtFCu1WksdyTcoq2Ty Ls6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=hb1tucFH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id n2-20020a170902d2c200b001d0b0660f8dsi3615468plc.493.2023.12.09.12.54.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Dec 2023 12:54:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=hb1tucFH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id A36B88063CD1; Sat, 9 Dec 2023 12:54:22 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231208AbjLIUyB (ORCPT + 99 others); Sat, 9 Dec 2023 15:54:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229477AbjLIUx7 (ORCPT ); Sat, 9 Dec 2023 15:53:59 -0500 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [IPv6:2a00:1098:ed:100::25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09BD610E; Sat, 9 Dec 2023 12:54:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702155244; bh=S3lSsYPoY4wxI/kfv2j5W1QtfvDEhUSxemjQq9PNSFA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hb1tucFHItmP7GsGeZj9EpHQRCoVyF11SXdZd42UQ5ol0CfZuSRvqsX3ireCuF0Tn w3ccJBSXwAjX9zHCQzntJNUSCeUi1MVMlJBn5fyP68U2dSoR0p/93kzVCBpTyFGxOZ FwDYDBP0ivhNJ28/pG0VqANtnlWBgzs5qiKq+T0Dj3KqCVUX39z7kJPC2VdNG4O9eD 0u9O8jMxitu1GmLvba9EAl8rqIfSoLhXArkvnvAhfE9J5qAkmOO2GJwA/H8j0XqVrN hVG9eEtBQxXkfPkp6VCW+JyO9D/1UzcYDPFaOg7eP3f+Q7AAeB6jf9LJ8PDxx/Z4LJ o5zhXPq96KnEQ== Received: from localhost (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 5E99937813DB; Sat, 9 Dec 2023 20:54:04 +0000 (UTC) From: Cristian Ciocaltea To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Pierre-Louis Bossart , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Venkata Prasad Potturu , 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 Subject: [PATCH 02/11] ASoC: amd: acp: Make use of existing *_CODEC_DAI macros Date: Sat, 9 Dec 2023 22:53:41 +0200 Message-ID: <20231209205351.880797-3-cristian.ciocaltea@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231209205351.880797-1-cristian.ciocaltea@collabora.com> References: <20231209205351.880797-1-cristian.ciocaltea@collabora.com> MIME-Version: 1.0 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Sat, 09 Dec 2023 12:54:22 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784839159926290694 X-GMAIL-MSGID: 1784839159926290694 The generic ACP machine driver provides macros for NAU88221 and MAX98388 codec DAI names, but in places it is still using directly the related strings. For consistency, replace all strings with the equivalent macros. Signed-off-by: Cristian Ciocaltea --- sound/soc/amd/acp/acp-mach-common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/amd/acp/acp-mach-common.c b/sound/soc/amd/acp/acp-mach-common.c index c90ec3419247..346f7514c81a 100644 --- a/sound/soc/amd/acp/acp-mach-common.c +++ b/sound/soc/amd/acp/acp-mach-common.c @@ -821,8 +821,8 @@ static const struct snd_soc_ops acp_card_maxim_ops = { }; SND_SOC_DAILINK_DEF(max98388, - DAILINK_COMP_ARRAY(COMP_CODEC("i2c-ADS8388:00", "max98388-aif1"), - COMP_CODEC("i2c-ADS8388:01", "max98388-aif1"))); + DAILINK_COMP_ARRAY(COMP_CODEC("i2c-ADS8388:00", MAX98388_CODEC_DAI), + COMP_CODEC("i2c-ADS8388:01", MAX98388_CODEC_DAI))); static const struct snd_kcontrol_new max98388_controls[] = { SOC_DAPM_PIN_SWITCH("Left Spk"), @@ -1273,7 +1273,7 @@ static const struct snd_soc_ops acp_8821_ops = { SND_SOC_DAILINK_DEF(nau8821, DAILINK_COMP_ARRAY(COMP_CODEC("i2c-NVTN2020:00", - "nau8821-hifi"))); + NAU8821_CODEC_DAI))); /* Declare DMIC codec components */ SND_SOC_DAILINK_DEF(dmic_codec, From patchwork Sat Dec 9 20:53:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Ciocaltea X-Patchwork-Id: 176231 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp6236057vqy; Sat, 9 Dec 2023 12:54:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IEZOij0CQS6E7C56x46Z34xHTpL3v0PDv6+FVU+ZEcdqz1Jqg3gsaKUugKEYbRM0igPUUEl X-Received: by 2002:a05:6870:c191:b0:1fa:e8ec:8a2 with SMTP id h17-20020a056870c19100b001fae8ec08a2mr2735838oad.57.1702155254858; Sat, 09 Dec 2023 12:54:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702155254; cv=none; d=google.com; s=arc-20160816; b=cgl4VVvyFFrY0srKhC4oZlRg28s0zf1YHb9YLbqALeG/Rvs/lQE4yhQp7tWEPaDrlC uKOIqlHOJ+tCeT7rr/2T3LryjrpM5klZQna8jUKDeOXOvC7NuBNAmCb9PP1IeWzKHO/6 MfTcij29XOWTzsRYvuEvJZiUhB38mZdX71xqyTV+OyBTbGcK+CRv8D2QNkaj+S0l540m Zoe6UhZ7mtlnVdRWETXM/8t3N+BShfjZ3qdsK3rSQvW45B+z7jHsu+qpbs0HiKrOeI4q duO3MNPqT6wqKO15fHn7M1gmhiamqlSqGXGZHPiSfFTGuOsWUCZnvcJIxG+AP9LiYT3v 33SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wUhHVpZoSI7z8zK6ZFhtvo3G6g+ubVGFVPOFX5/pE8k=; fh=qH4A7sjuqsI+9iJQtQMmOmQRysg9CNJ3X6TEjzAzPQM=; b=F8kegZ2+XUfe0HGqWh0ft7Ps4uZx5s4mlzkFRhb12WJKmKHPExsgeFwc4xvDodhtdM /LHf9BE8EGMR5LUgL19KNrqcREKy2HGMBGSohSlPLBAZ/E+ksOPppS8WmVDCd7p2ZUah b10jPS4qVXVzv7kQI4f2KU/TOAj+vOa8W0iyCyQugXTpZAbslpeYVVRPYtUHUltHkCiF jIV1xvhqQvVG2ZnaPAs01EEDX0d/mg1Vu24fP5fbjVbmDv2Z4fI4p8Tw54RWHZDNtbBT 8l0X3ziQD8480UgOT0zbQJj9uYi9MZfbmCQtYfwReTqOYvMIhmzERbL9/3XQb+rJ+udq +WJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="ez+KkUY/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id h10-20020a63e14a000000b005c67bb15866si3603387pgk.52.2023.12.09.12.54.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Dec 2023 12:54:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="ez+KkUY/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 5F8D8805F97A; Sat, 9 Dec 2023 12:54:13 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231254AbjLIUyE (ORCPT + 99 others); Sat, 9 Dec 2023 15:54:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231192AbjLIUyB (ORCPT ); Sat, 9 Dec 2023 15:54:01 -0500 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [IPv6:2a00:1098:ed:100::25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3ECCFE1; Sat, 9 Dec 2023 12:54:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702155245; bh=Uzyzme1p3X66fqRyIz81KnujYtpDW+X/POMynZA7CsA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ez+KkUY/Mctyu+Il5OAscxfygxVAXr0MyAj8VUhaMowHF/cXZglw6BSp8PStaAbCk naQOFKrMDZ5urm2BOKiMbej+gsyGUucUEfg7E/+tz2/B75oJPLds4u6Q0UYCQ0VAHp 7BjI+Wch/+y1qjAgjmi/hU9UA5z+74AuuQQ5BLnVD05La5xEvYKLrFqUxEI9zzmIR8 ISQjCRVUDQ1FzaJOM9YzRWeXpVaVCGSg+u1sAieZHY+Tliq47eBmXYHTF89E4AESmk x5Wz8vZokHdUG+wAU4/CPb3Smb6OGWQS7T4USbQDyO2JNm+zkxDP+zp524Bz6U2Ihy dN/fpBpSGDFJg== Received: from localhost (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 8DB3937813E0; Sat, 9 Dec 2023 20:54:05 +0000 (UTC) From: Cristian Ciocaltea To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Pierre-Louis Bossart , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Venkata Prasad Potturu , 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 Subject: [PATCH 03/11] ASoC: amd: acp: Add missing error handling in sof-mach Date: Sat, 9 Dec 2023 22:53:42 +0200 Message-ID: <20231209205351.880797-4-cristian.ciocaltea@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231209205351.880797-1-cristian.ciocaltea@collabora.com> References: <20231209205351.880797-1-cristian.ciocaltea@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Sat, 09 Dec 2023 12:54:13 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784839148844472874 X-GMAIL-MSGID: 1784839148844472874 Handle potential acp_sofdsp_dai_links_create() errors in ACP SOF machine driver's probe function. Additionally, switch to dev_err_probe(). Fixes: 9f84940f5004 ("ASoC: amd: acp: Add SOF audio support on Chrome board") Signed-off-by: Cristian Ciocaltea Reviewed-by: Emil Velikov --- sound/soc/amd/acp/acp-sof-mach.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/sound/soc/amd/acp/acp-sof-mach.c b/sound/soc/amd/acp/acp-sof-mach.c index 1d313fcb5f2d..6f0ca23638af 100644 --- a/sound/soc/amd/acp/acp-sof-mach.c +++ b/sound/soc/amd/acp/acp-sof-mach.c @@ -112,16 +112,14 @@ static int acp_sof_probe(struct platform_device *pdev) if (dmi_id && dmi_id->driver_data) acp_card_drvdata->tdm_mode = dmi_id->driver_data; - acp_sofdsp_dai_links_create(card); + ret = acp_sofdsp_dai_links_create(card); + if (ret) + return dev_err_probe(&pdev->dev, ret, "Failed to create DAI links\n"); ret = devm_snd_soc_register_card(&pdev->dev, card); - if (ret) { - dev_err(&pdev->dev, - "devm_snd_soc_register_card(%s) failed: %d\n", - card->name, ret); - return ret; - } - + if (ret) + return dev_err_probe(&pdev->dev, ret, + "Failed to register card(%s)\n", card->name); return 0; } From patchwork Sat Dec 9 20:53:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Ciocaltea X-Patchwork-Id: 176235 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp6236169vqy; Sat, 9 Dec 2023 12:54:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IGHBuO5I3z85jz8t3W3muyddBD83o5WzqVR+qPZmgv7JIWB8Gv5TqIt/R04B5e7CIgVb5yr X-Received: by 2002:a6b:d918:0:b0:7b4:28f8:15be with SMTP id r24-20020a6bd918000000b007b428f815bemr2899413ioc.30.1702155278018; Sat, 09 Dec 2023 12:54:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702155277; cv=none; d=google.com; s=arc-20160816; b=pukMM+M4efmU8Mvlf/2yX56qoztuSfEiYQbDlF3J1zt1aibhNGneEk1+yqaNKteixl k7uNQESOehnlA/zo1cEI73LLtzl9XoThiSlOCI/V7TiqS7xjoaFiCuFkd843jz8leNSm UyGVec/z1ZyvlBFvq+AvVpkK2k2wCXMD8+4BL6BjBXKSP/VpyWj8Y4SdG9cJbfERpxrM 8xvbUJb0G5oMo+oo075gRA7Q+/6usRlc4prQyUq2mgaV/DHEYkP5V4iNTkwapAD0RH/n TAE/Jh5g1c1/pnx4q+DPSUHlnCLrnJ1r+OyRDX50gmanMutZQcKeCvXWFn23sa96ZgLc IESw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SUOqO68mQbiOMS6r5EtWr5ibKqg24mf64j9DqSUgCZw=; fh=qH4A7sjuqsI+9iJQtQMmOmQRysg9CNJ3X6TEjzAzPQM=; b=eHqPup94hmRxyuD43WkSWlJYLGVnpvVmX23zQnyE/ZQRFDLRseFbimVgf7364jfsqS EUGgRz/6rAlpsCakhMjJSc7HR16hNxYVgVX4kk+wnqF7mM6R8v5CTLvgeOY12HS/1Tis FDYCDuQqq0AR2asU0rAGGKiPM8e/6gXi+PDJ+kLmrofFUrsO3kTYFBEkhEA1OU3z9Smh Gp3iXqsy9gQ+vwkofUEM3BWTaiOiqKXf5WGv9TlCXJzYBuMsaxJNHuh7SzNs+JTuQYcL lwiXFl5fGF1HnOxrlT9E2x0nGi6KhDF+elKb2Lro2iwkOB3/El89WXSXMjj0fIHi9Rdd Ygpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="rfd3OPX/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id l19-20020a170902eb1300b001cfa22e6bd7si3581456plb.179.2023.12.09.12.54.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Dec 2023 12:54:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="rfd3OPX/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id 29AE78088A51; Sat, 9 Dec 2023 12:54:35 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231241AbjLIUyJ (ORCPT + 99 others); Sat, 9 Dec 2023 15:54:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231232AbjLIUyC (ORCPT ); Sat, 9 Dec 2023 15:54:02 -0500 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [IPv6:2a00:1098:ed:100::25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5212DE5; Sat, 9 Dec 2023 12:54:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702155247; bh=7CzCzac5cmO2jGM6VStYbZvLilLqPqRoSSC4o4Btjfg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rfd3OPX/DkJaYAA1IcJCQVo90e0x7b9wA6kgig0eMPt398yGiSuYOa1CuI4NEf0fD 2kbp0D9aPIkPkO2spXWV9LzA0H/sec4IMQI32PnAt/w2ZVXEFHsZpM3QIMl/6ZkX6z OHfd7uoZXjKWjtgCHrUej714vQGKH185wA/Z1gkh+28S23anVhDwRS8seJqukSdJ8X cKG/rkRNn8U6jQ5SJlWI+XYw4jYarfWnESkjpPTvc6SIVFdbDOYzpw+AwSMW1WOCEK V38nNMtGyMZt6UyMYtFTwIKedK7QAFYUhFzipmIUbC+icjCPtZ+EfdYMqukUNdrDxL N/tWuOX2hf76w== Received: from localhost (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madrid.collaboradmins.com (Postfix) with ESMTPSA id BBE0437813DD; Sat, 9 Dec 2023 20:54:06 +0000 (UTC) From: Cristian Ciocaltea To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Pierre-Louis Bossart , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Venkata Prasad Potturu , 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 Subject: [PATCH 04/11] ASoC: amd: acp: Update MODULE_DESCRIPTION for sof-mach Date: Sat, 9 Dec 2023 22:53:43 +0200 Message-ID: <20231209205351.880797-5-cristian.ciocaltea@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231209205351.880797-1-cristian.ciocaltea@collabora.com> References: <20231209205351.880797-1-cristian.ciocaltea@collabora.com> MIME-Version: 1.0 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 groat.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 (groat.vger.email [0.0.0.0]); Sat, 09 Dec 2023 12:54:35 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784839173115956065 X-GMAIL-MSGID: 1784839173115956065 The current MODULE_DESCRIPTION relates to a Chrome board, as that was what the driver initially supported. Nonetheless, it has since progressed incrementally and evolved into a more comprehensive machine driver. Hence, update MODULE_DESCRIPTION to better reflect this. Signed-off-by: Cristian Ciocaltea --- sound/soc/amd/acp/acp-sof-mach.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/amd/acp/acp-sof-mach.c b/sound/soc/amd/acp/acp-sof-mach.c index 6f0ca23638af..19ff4fe5b1ea 100644 --- a/sound/soc/amd/acp/acp-sof-mach.c +++ b/sound/soc/amd/acp/acp-sof-mach.c @@ -166,7 +166,7 @@ static struct platform_driver acp_asoc_audio = { module_platform_driver(acp_asoc_audio); MODULE_IMPORT_NS(SND_SOC_AMD_MACH); -MODULE_DESCRIPTION("ACP chrome SOF audio support"); +MODULE_DESCRIPTION("ACP SOF Machine Driver"); MODULE_ALIAS("platform:rt5682-rt1019"); MODULE_ALIAS("platform:rt5682-max"); MODULE_ALIAS("platform:rt5682s-max"); From patchwork Sat Dec 9 20:53:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Ciocaltea X-Patchwork-Id: 176233 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp6236122vqy; Sat, 9 Dec 2023 12:54:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IFydz9SW1EqKxNQbnNTVzhsU7imLDbK1nwnJiFEp0CfpHUZKae6N+x+UML7anFNfaKwr/Kh X-Received: by 2002:a05:6871:7990:b0:1fb:e5f:c539 with SMTP id pb16-20020a056871799000b001fb0e5fc539mr2539078oac.49.1702155268962; Sat, 09 Dec 2023 12:54:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702155268; cv=none; d=google.com; s=arc-20160816; b=v9SQDT2Sbf9FyDKsygfJ4/5unvtsUQ3V3NtiJU63E9VK6yWuSaRQHXj+Qeg4ncm3I4 KJlZHirt74SDbGPqrF3wf1dkQujgKwRhWOWhGHV+oxg/Xs12Dxmy5s6cpr5+xTtU7on2 5PyG0v4l6mhtDlAWddQ4GfKpMActjtytjwMnacFNjmN4XesrPRDHxi4mAsWzDsz0PBTK snPidHaWO3xZ7uUfxbW6MEKXCZAJKCGikpFb/a+mjaSwYoYPXDX2W+Y4VZ1+guYFAz38 GYZ6kx+QVBdZ1EtGlV+m+Zjk+Aj44xcsVwY2d0/5NkCScYOIOkY1A8QAphPZohBFrxT1 C4gA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Y3ALBveW+mtzjnnEQybdZ1/3+5daI38hDAL1I1i4hUE=; fh=qH4A7sjuqsI+9iJQtQMmOmQRysg9CNJ3X6TEjzAzPQM=; b=S4k5x0C7UcBoenQp/djwlEv3hkRzMaIXEbfk6bLvsIaCpy1AONDt8AHdLla+5HlyrQ G+e6Nos5YaoNIlqEGmgRKzY6/bKH5zbs9GFY7ZcSwBJKeYelc0W6XN7sFONZ11FOsJGx FeRxUet7Xow5AQrIT3xxxsnPMr1W4eRiLX4En9iPoAR6oKjK6ScxVDEQzJs+Ht897bh3 oa7GWBc3gd8UEKAByNWs0rCn1QFRmAJ6Ry+PcjYq9GvWZM2gykJwynqIHJ48U9xr41ry w2cUUfWpsNVZLhwQ8dv6L8c6u9E8yPViBoTMBKA8EHd6QKwIk1OYJsUHdVs+Ir6kM0Rj Vw+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=rxyt+4iK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id ob10-20020a17090b390a00b002802d12083fsi3664513pjb.54.2023.12.09.12.54.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Dec 2023 12:54:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=rxyt+4iK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 5BFE2806864F; Sat, 9 Dec 2023 12:54:25 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231262AbjLIUyM (ORCPT + 99 others); Sat, 9 Dec 2023 15:54:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231206AbjLIUyD (ORCPT ); Sat, 9 Dec 2023 15:54:03 -0500 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [IPv6:2a00:1098:ed:100::25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A8F3D54; Sat, 9 Dec 2023 12:54:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702155248; bh=K7+F8UBwdHP2JyxVJukQdnPKrvxHr2vYJDtD03JJZ0Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rxyt+4iKg2AcLD96VI3OwQILuScYANkQyEo/mPCV0OKSYEOAGdh6SybPeA8+qmdqS CvHkop353eV/VcRY8O2Dg93sn9+HXOlWlA2fYVhQKjsqxlVQ7puD5Vxd+OK0HWRxQo G6KZ7dSUnThcJ0EPxqRYJxsstp2CqNzTlA9OD6Js9jcCkJpoa+VyaXN65HDdk15I2u O+oMcAipSkRYB54ZKONhwCTyV37wBJ8t3Q/rNk5px0RZHxZosZlPmv8pTnJdGQL+WC oO3yNsFAi+kLlNEj+riYE34f0ht5odZQ7KXn47P1TQGNgLOw/1+4/m2FLde+uwhsjT G07+CssTpEG3Q== Received: from localhost (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madrid.collaboradmins.com (Postfix) with ESMTPSA id D19E837813E3; Sat, 9 Dec 2023 20:54:07 +0000 (UTC) From: Cristian Ciocaltea To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Pierre-Louis Bossart , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Venkata Prasad Potturu , 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 Subject: [PATCH 05/11] ASoC: SOF: amd: Fix memory leak in amd_sof_acp_probe() Date: Sat, 9 Dec 2023 22:53:44 +0200 Message-ID: <20231209205351.880797-6-cristian.ciocaltea@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231209205351.880797-1-cristian.ciocaltea@collabora.com> References: <20231209205351.880797-1-cristian.ciocaltea@collabora.com> MIME-Version: 1.0 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 howler.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 (howler.vger.email [0.0.0.0]); Sat, 09 Dec 2023 12:54:25 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784839163346162974 X-GMAIL-MSGID: 1784839163346162974 Driver uses kasprintf() to initialize fw_{code,data}_bin members of struct acp_dev_data, but kfree() is never called to deallocate the memory, which results in a memory leak. Fix the issue by switching to devm_kasprintf(). Additionally, ensure the allocation was successful by checking the pointer validity. Fixes: f7da88003c53 ("ASoC: SOF: amd: Enable signed firmware image loading for Vangogh platform") Signed-off-by: Cristian Ciocaltea --- sound/soc/sof/amd/acp.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/sound/soc/sof/amd/acp.c b/sound/soc/sof/amd/acp.c index 603ea5fc0d0d..c6f637f29847 100644 --- a/sound/soc/sof/amd/acp.c +++ b/sound/soc/sof/amd/acp.c @@ -547,17 +547,27 @@ int amd_sof_acp_probe(struct snd_sof_dev *sdev) adata->signed_fw_image = false; dmi_id = dmi_first_match(acp_sof_quirk_table); if (dmi_id && dmi_id->driver_data) { - adata->fw_code_bin = kasprintf(GFP_KERNEL, "%s/sof-%s-code.bin", - plat_data->fw_filename_prefix, - chip->name); - adata->fw_data_bin = kasprintf(GFP_KERNEL, "%s/sof-%s-data.bin", - plat_data->fw_filename_prefix, - chip->name); - adata->signed_fw_image = dmi_id->driver_data; + adata->fw_code_bin = devm_kasprintf(sdev->dev, GFP_KERNEL, + "%s/sof-%s-code.bin", + plat_data->fw_filename_prefix, + chip->name); + if (!adata->fw_code_bin) { + ret = -ENOMEM; + goto free_ipc_irq; + } + + adata->fw_data_bin = devm_kasprintf(sdev->dev, GFP_KERNEL, + "%s/sof-%s-data.bin", + plat_data->fw_filename_prefix, + chip->name); + if (!adata->fw_data_bin) { + ret = -ENOMEM; + goto free_ipc_irq; + } - dev_dbg(sdev->dev, "fw_code_bin:%s, fw_data_bin:%s\n", adata->fw_code_bin, - adata->fw_data_bin); + adata->signed_fw_image = dmi_id->driver_data; } + adata->enable_fw_debug = enable_fw_debug; acp_memory_init(sdev); From patchwork Sat Dec 9 20:53:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Ciocaltea X-Patchwork-Id: 176236 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp6236206vqy; Sat, 9 Dec 2023 12:54:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IF851EcE6qihkXVj4E3h0e7zshDmi5PfN1QtQPf4MULNdRclzyP4+V0YhY2P6VIA93gTpY/ X-Received: by 2002:a05:6e02:194a:b0:35d:59a2:3322 with SMTP id x10-20020a056e02194a00b0035d59a23322mr3872007ilu.38.1702155284712; Sat, 09 Dec 2023 12:54:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702155284; cv=none; d=google.com; s=arc-20160816; b=Gp+405RsYzHsJ9A8B5BrTcq/w1h5GEjj+8p2Lhd0DYk1ydJLP5+7ZVNwAJXD4hvbZT SvpgPttHq2gOwYP88GVhnAvhBnT3p0Hgy6A/T3UrB12v+0bbaQqPuMcRcUe0Ci4HsODy pErezn8YYCpNVHOXFaLVUVCU0CDE5h8BXBiLmGXhx/XEBF0Bum3A+LFmlLkYJp4FkCNS B+ePBMUVLADdUpMv4dDyLi1SVFzwbei0CAT4qAnWnP/kLRUsulpEKMfgKz2Cuydkv5xl Um9PeJERYZdMqQZ2yF0Lw4osiOhU8/am+KKvC1NlRcv8NJhLEMemt8kmtcKvLtPa70JJ YNTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SZu0Uet2d+YPHWGTkJc2OkottsqaWn+HFu/H1DdffHU=; fh=qH4A7sjuqsI+9iJQtQMmOmQRysg9CNJ3X6TEjzAzPQM=; b=obCkG3nzvAGjT6gLZk/GUHUngdS0Ws3fEny+5rux5vUolnVRp3pYOIY0ty+yrpUrnz zY62nOGB71O4PFz6hiXX1Uifn9ybIMqlDuYZ8uJDkxHn4ISvI/UuFMkVDrdS7HsUqtH+ BtYkkkPWQ/RgVos7vYD4y4SsvJGpY3rncHabjhwIZmSXy9rAaJpOdDRdJkWwmbQExRIu 9VO5pJaccBl+WJ7E6j4kdbr+E7LJsc7eyfAaR+RHI7JmoXrmC+0uVxo5aQmPMpUtf7Zs 8ykyIRLDlwmI3HWPulDTfh5BUArZwW9SfS26kUjfekvlPeFxD8O1MkBxp7L+I5tyb+pa Rpyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=tMyVa0w9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id o2-20020a170902d4c200b001d0a35a098bsi3674779plg.566.2023.12.09.12.54.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Dec 2023 12:54:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=tMyVa0w9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (Postfix) with ESMTP id BD21A80879E0; Sat, 9 Dec 2023 12:54:40 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231365AbjLIUyP (ORCPT + 99 others); Sat, 9 Dec 2023 15:54:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231268AbjLIUyI (ORCPT ); Sat, 9 Dec 2023 15:54:08 -0500 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACD3E1BB; Sat, 9 Dec 2023 12:54:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702155249; bh=4/ljxDEHtTvIlqAZ4vM3o3PXrWgZstPeEiyPFB52jiY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tMyVa0w9ssaQ4z2ta6GYiFSLZdAZzG6yiwDP9gWn5XrGdJDQCH+Eh9Si3zcfz2lmC sp9w+Fs9GHs4XfG4ovXDzzc3hOT2+iJZepIbbe2dtxomSOjXFU1pppqEUxS8g9wr21 C5sOYcBqZY7MvkEzHA+EYhCNS208rPtgTdaGOEu2/C43dT8k9bAYywI18CLOwLMOmk 0AsWWQTM8aJWiT5aCPJE2zqO/hhqwKRYc5upHlYMnpbCTlIfBhT7niaTz2aQmOTDl2 k/u0bVMrq7AJVO/t3nFZJj7TFRzY+8yLPscxnzpcsrcpMhklK49DPP8NDrULDh4DQF Yr60aIHteyFKQ== Received: from localhost (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 1031037813E1; Sat, 9 Dec 2023 20:54:09 +0000 (UTC) From: Cristian Ciocaltea To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Pierre-Louis Bossart , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Venkata Prasad Potturu , 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 Subject: [PATCH 06/11] ASoC: SOF: amd: Optimize quirk for Valve Galileo Date: Sat, 9 Dec 2023 22:53:45 +0200 Message-ID: <20231209205351.880797-7-cristian.ciocaltea@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231209205351.880797-1-cristian.ciocaltea@collabora.com> References: <20231209205351.880797-1-cristian.ciocaltea@collabora.com> MIME-Version: 1.0 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 fry.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 (fry.vger.email [0.0.0.0]); Sat, 09 Dec 2023 12:54:41 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784839179673597084 X-GMAIL-MSGID: 1784839179673597084 Valve's Steam Deck OLED is uniquely identified by vendor and product name (Galileo) DMI fields. Simplify the quirk by removing the unnecessary match on product family. Additionally, fix the related comment as it points to the old product variant. Signed-off-by: Cristian Ciocaltea --- sound/soc/sof/amd/acp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/sof/amd/acp.c b/sound/soc/sof/amd/acp.c index c6f637f29847..1e9840ae8938 100644 --- a/sound/soc/sof/amd/acp.c +++ b/sound/soc/sof/amd/acp.c @@ -28,11 +28,10 @@ MODULE_PARM_DESC(enable_fw_debug, "Enable Firmware debug"); const struct dmi_system_id acp_sof_quirk_table[] = { { - /* Valve Jupiter device */ + /* Steam Deck OLED device */ .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Valve"), DMI_MATCH(DMI_PRODUCT_NAME, "Galileo"), - DMI_MATCH(DMI_PRODUCT_FAMILY, "Sephiroth"), }, .driver_data = (void *)SECURED_FIRMWARE, }, From patchwork Sat Dec 9 20:53:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Ciocaltea X-Patchwork-Id: 176234 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp6236158vqy; Sat, 9 Dec 2023 12:54:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IHwTdf7KSVm+I1JRsVQTo8y/PeMnKr2TxmjeXs9MTGPE+EpYw2j3ormvz2B9KzxqRxm05DI X-Received: by 2002:a05:6e02:1d1a:b0:35c:a2bb:3fc with SMTP id i26-20020a056e021d1a00b0035ca2bb03fcmr3535719ila.26.1702155276523; Sat, 09 Dec 2023 12:54:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702155276; cv=none; d=google.com; s=arc-20160816; b=kKdc+anXoggM3+9Jzvc4JAY6OuLHkcQftWc18vFZ84rs1xO8VGXgnSFiXtrd8rkyYy rxP+Tw1wohD2oDnf+bkP9RMtkaBVRkCQoWPi440VSXEwl+d/0nK9/aXaAXJniDt92mct M9yl9EpCr2uiJz30xOjScCv3upWZiFlN6Q8TLvx1GSTcCsoqQTXKlFDQs7DRAwFPvejW WXVf3reeJG2n8H3SU35JlxOmTpaAjdiUP4/LnCqGOW4wfo6FdAwamdybjan0rMLDxia0 JU5MjARspuJtiXjmhY+FBGstZGx7/zCzCXJgBRPPm4wDazaW5rEnGcLD/KwFpbPflYrk dg0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PnBTsugWeKLA/vu9o6BluLhmbmjUBU2XHmtNMREqKw8=; fh=qH4A7sjuqsI+9iJQtQMmOmQRysg9CNJ3X6TEjzAzPQM=; b=kDJSf43kkk+CRRa4lfT4LK3u9KGLapjFt0VNUt7HzCaZrwBV/wdMK4atbt7OBQt/nl mQlfveZlWZJV219Tb4BkkpAI8RyOzLs7cPe4edhueGj8X9v7WoEi2Zk7mtc6GSMyya3x +KoOzXUtdWGFsuy2bDU26/joZnMvyQimoWCqFwrDJPE3iD+9J0jbofh4eMtUnxArS+Ez XPsYVusOy+xDJescWLHT1br7iYtRn5B4zbLc5CqnfRhJAI9hv475XBRhVGVd5w3+c4L3 7MUy92W1+Vl/NbogQ2rjV0mBMJCSIaBgjeTm9onABmz8EZtTG6uTZiRzUvj8VUxclwNV J95A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Id69ZyID; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id o3-20020a170902d4c300b001d003f8b649si3583661plg.142.2023.12.09.12.54.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Dec 2023 12:54:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Id69ZyID; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (Postfix) with ESMTP id 7283E808E0C3; Sat, 9 Dec 2023 12:54:32 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231404AbjLIUyT (ORCPT + 99 others); Sat, 9 Dec 2023 15:54:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231276AbjLIUyJ (ORCPT ); Sat, 9 Dec 2023 15:54:09 -0500 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 644AD10C7; Sat, 9 Dec 2023 12:54:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702155250; bh=6CEHnbgdwJYVfipM0adU97EnT1wECk7R50CpX/0QHJY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Id69ZyIDTAm3eTwaAMpObLY7Pfvb6t2SroKMHWS/GNl4eASvs3AODZdJo1MgYBzfV QPBxLhM3s0sbsu1URy5UST72rHUNLWndJ3X74dgM7qMWZVFHqewC4qkYvAxyNGqieX PCGW3w7aPuLW0Vz7NR7HoAWAqgDfx88TAWzGbnU7qem+ekTG9agiVJYk+Xv0gDqnoL u+CiA+lW8Xywq+/oilR2AEEds90QmQMPUgZXF7WboCYQr0JOrZt7zc9vg/VOE1pYZV kPepGinJUExbvcD79cBXMARcD00oP8c+NVWrAV9oIICG5CnKU8yFsQiFU16Dl9vPo8 iVdCqQ/FhubdQ== Received: from localhost (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 3E62337813E6; Sat, 9 Dec 2023 20:54:10 +0000 (UTC) From: Cristian Ciocaltea To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Pierre-Louis Bossart , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Venkata Prasad Potturu , 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 Subject: [PATCH 07/11] ASoC: SOF: core: Skip firmware test for undefined fw_name Date: Sat, 9 Dec 2023 22:53:46 +0200 Message-ID: <20231209205351.880797-8-cristian.ciocaltea@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231209205351.880797-1-cristian.ciocaltea@collabora.com> References: <20231209205351.880797-1-cristian.ciocaltea@collabora.com> MIME-Version: 1.0 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 howler.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 (howler.vger.email [0.0.0.0]); Sat, 09 Dec 2023 12:54:33 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784839171363658972 X-GMAIL-MSGID: 1784839171363658972 Some SOF drivers like AMD ACP do not always rely on a single static firmware file, but may require multiple files having their names dynamically computed on probe time, e.g. based on chip name. In those cases, providing an invalid default_fw_filename in their sof_dev_desc struct will prevent probing due to 'SOF firmware and/or topology file not found' error. Fix the issue by allowing drivers to omit initialization for this member (or alternatively provide a dynamic override via ipc_file_profile_base) and update sof_test_firmware_file() to verify the given profile data and skip firmware testing if either fw_path or fw_name is not defined. Fixes: 6c393ebbd74a ("ASoC: SOF: core: Implement IPC version fallback if firmware files are missing") Signed-off-by: Cristian Ciocaltea --- sound/soc/sof/fw-file-profile.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/soc/sof/fw-file-profile.c b/sound/soc/sof/fw-file-profile.c index 138a1ca2c4a8..e63700234df0 100644 --- a/sound/soc/sof/fw-file-profile.c +++ b/sound/soc/sof/fw-file-profile.c @@ -21,6 +21,9 @@ static int sof_test_firmware_file(struct device *dev, const u32 *magic; int ret; + if (!profile->fw_path || !profile->fw_name || !*profile->fw_name) + return 0; + fw_filename = kasprintf(GFP_KERNEL, "%s/%s", profile->fw_path, profile->fw_name); if (!fw_filename) From patchwork Sat Dec 9 20:53:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Ciocaltea X-Patchwork-Id: 176237 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp6236208vqy; Sat, 9 Dec 2023 12:54:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IHjHhhyZergwmOdHtqssv0ONrRHOn6jOYyMv1lSBIKv1dForg/QMFu9y2lyWpEfiKq25uOu X-Received: by 2002:a17:902:ec82:b0:1d1:cc09:50ba with SMTP id x2-20020a170902ec8200b001d1cc0950bamr916675plg.75.1702155285172; Sat, 09 Dec 2023 12:54:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702155285; cv=none; d=google.com; s=arc-20160816; b=qKyGfvdGBIKxBgwcAqzuVra6IAQUoXx9TDSvDLRCgAfFB8dI1ca9Zi3F0gdiaupVHb /8Q6ds7NcVvtUYP2tCzJgTMzNvjwowOk9WYJd1sFnF+rUt5qNZi/UNEQR9W/Vjj1XVfB BgyiR/q9rphEcwWrz5bH5mjJ2+z3QXx61vic5dHdjokW3w8h2vY2orntlK5jxLoE0W4o WUW2Dy8Um9lFt5SjdhWdLDYQEU5coQ/lF+dpjraW73rH8eipQ1q6uzzA2jtRF44RyUD1 AIvYbA7Oico3a9PTDzGo43P6BIwe718K27hR2n3Se1toztLI8htJb4VPPop/2uQwx7Wp ZVeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BPK6wGA6bxEqkjuP8ZUlHO24AVBl5ZrIef0mTP49DRU=; fh=qH4A7sjuqsI+9iJQtQMmOmQRysg9CNJ3X6TEjzAzPQM=; b=OgOj9QLhMYDMWDIf7eKWfX3s8u1THIA28mDcdeby9jcf6ELAkE+AyqFEFM9zUjJPc+ /XCwC2C5XrR8XuQiEI/5JIyIR6s4J751SpQdWKvaXOQlcRiSNn6xOvbYt1hzUEQH+dyx VadKxyxPdvD4LicZsjKxyNwe4mW0D7QVgXxTNHZQutAIC8J7xIxoihQGt3A1eZKtqNu9 +tCmm+l1hyNM/oDZptuwRIkHhlbjvh4tPd6+0XOdIeXtX0Ewv4g9BDcXEWnR/hU/BjPt E3npayq/2ipihg4MmXSk2vHz6B1NqU7AVZjM5eXYyNmZPNW09kIjoQucz0M7Dne+4U4P ZppA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=dmDDoM7D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id f11-20020a17090274cb00b001d062135ef8si3565940plt.601.2023.12.09.12.54.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Dec 2023 12:54:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=dmDDoM7D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (Postfix) with ESMTP id 94C8B80879D8; Sat, 9 Dec 2023 12:54:40 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231285AbjLIUyX (ORCPT + 99 others); Sat, 9 Dec 2023 15:54:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231298AbjLIUyK (ORCPT ); Sat, 9 Dec 2023 15:54:10 -0500 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA5261700; Sat, 9 Dec 2023 12:54:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702155251; bh=UoqvFkaEAiG7kyRT5ZdtctH0/Mb0yDTsfGCKAKoC8Dw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dmDDoM7D8lYjc+7UCUEnEFx8lXJdPtzd9zfFMJtjvvDErifqsb7bO2AfgE7510dBB m18vz0bHGZq6wpUKmdz4X84iBKF3Z+VYR17Jj9by1zDQ9YAH5v6I70MZlmAbuQpbg8 d5hDFEzxCo6l0H2QyTk1sbxbeEYSDjuuk7OZNwj3puCcHkt/4zEz5unzusJ/fPhGcB Cjp0WA2/h6gXAxtHxvPkUDZ1qB0+zf3kQQynIHpWN2PD8t0mFgMW4nCeKYnVx9O/I0 e4+vDEJPAS0QvuVBcduDAKFmhP6nlLKIniQXv5riUrGW8itC8mR133cfoficcmBbJq HHPjCtHiDiIZg== Received: from localhost (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 77FD637813DF; Sat, 9 Dec 2023 20:54:11 +0000 (UTC) From: Cristian Ciocaltea To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Pierre-Louis Bossart , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Venkata Prasad Potturu , 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 Subject: [PATCH 08/11] ASoC: SOF: amd: Override default fw name for Valve Galileo Date: Sat, 9 Dec 2023 22:53:47 +0200 Message-ID: <20231209205351.880797-9-cristian.ciocaltea@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231209205351.880797-1-cristian.ciocaltea@collabora.com> References: <20231209205351.880797-1-cristian.ciocaltea@collabora.com> MIME-Version: 1.0 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 fry.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 (fry.vger.email [0.0.0.0]); Sat, 09 Dec 2023 12:54:40 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784839180143320257 X-GMAIL-MSGID: 1784839180143320257 The ACP driver for Vangogh platform uses a quirk for Valve Galileo device to setup a custom firmware loader, which neither requires nor uses the firmware file indicated via the default_fw_filename member of struct sof_dev_desc. Since commit 6c393ebbd74a ("ASoC: SOF: core: Implement IPC version fallback if firmware files are missing"), the provided filename gets verified and triggers a fatal error on probe: [ 7.719337] snd_sof_amd_vangogh 0000:04:00.5: enabling device (0000 -> 0002) [ 7.721486] snd_sof_amd_vangogh 0000:04:00.5: SOF firmware and/or topology file not found. [ 7.721565] snd_sof_amd_vangogh 0000:04:00.5: Supported default profiles [ 7.721569] snd_sof_amd_vangogh 0000:04:00.5: - ipc type 0 (Requested): [ 7.721573] snd_sof_amd_vangogh 0000:04:00.5: Firmware file: amd/sof/sof-vangogh.ri [ 7.721577] snd_sof_amd_vangogh 0000:04:00.5: Topology file: amd/sof-tplg/sof-vangogh-nau8821-max.tplg [ 7.721582] snd_sof_amd_vangogh 0000:04:00.5: Check if you have 'sof-firmware' package installed. [ 7.721585] snd_sof_amd_vangogh 0000:04:00.5: Optionally it can be manually downloaded from: [ 7.721589] snd_sof_amd_vangogh 0000:04:00.5: https://github.com/thesofproject/sof-bin/ [ 7.721997] snd_sof_amd_vangogh: probe of 0000:04:00.5 failed with error -2 Skip testing the default firmware by overriding fw_name in sof_vangogh_ops_init(). Fixes: d0dab6b76a9f ("ASoC: SOF: amd: Add sof support for vangogh platform") Signed-off-by: Cristian Ciocaltea --- sound/soc/sof/amd/vangogh.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sound/soc/sof/amd/vangogh.c b/sound/soc/sof/amd/vangogh.c index de15d21aa6d9..5843ff8a8b40 100644 --- a/sound/soc/sof/amd/vangogh.c +++ b/sound/soc/sof/amd/vangogh.c @@ -151,8 +151,14 @@ int sof_vangogh_ops_init(struct snd_sof_dev *sdev) sof_vangogh_ops.num_drv = ARRAY_SIZE(vangogh_sof_dai); dmi_id = dmi_first_match(acp_sof_quirk_table); - if (dmi_id && dmi_id->driver_data) + if (dmi_id && dmi_id->driver_data) { sof_vangogh_ops.load_firmware = acp_sof_load_signed_firmware; + /* + * Board doesn't use the default firmware, hence override + * its name to prevent probe error due to fw validation. + */ + sdev->pdata->ipc_file_profile_base.fw_name = ""; + } return 0; } From patchwork Sat Dec 9 20:53:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Ciocaltea X-Patchwork-Id: 176238 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp6236218vqy; Sat, 9 Dec 2023 12:54:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IHJMXlXRkif2fCGCSqnk9y9eXS6t2EjczoGUNsZ9wtXM2dZxxIlLtW4BMH7bAHWytmry8kl X-Received: by 2002:a05:6a20:3942:b0:18b:d3db:7048 with SMTP id r2-20020a056a20394200b0018bd3db7048mr3219487pzg.23.1702155287252; Sat, 09 Dec 2023 12:54:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702155287; cv=none; d=google.com; s=arc-20160816; b=X9PMOMAYlmUWo/0vJUF8GUR7pY//TYHQFzpc57/BiZV+x1QlAjz/fBo5+1RDKCv46N 1vzFRaxXyLm5lMYC7p9NjYc4ew0DssfvE9tu2EYSIWTEFU0s5WfM8/3Bim5nk4HmlJQz FdSJr7uq79i5JmuGiQvMcbs/3PIKJ7GW8G5tsASnzbmSXiUYw2u9+x3gF6d/11cF+8F/ ewjX9ScahdmtN1yTostidJlQGSSPNoev3HyNIOzT/gTum7oeDrZRLtnW/OmywEPeRTbO JyJ+niOM5S+AvzUjLAN0JHRjCKBkSxOl5OZ2BifMtgYIpBmPXucSrW88pKD0oQOjcWfE ouTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lFddTm5boilq13pMkYOMd2QCiXJJKv2wHFQlC2PnzKk=; fh=qH4A7sjuqsI+9iJQtQMmOmQRysg9CNJ3X6TEjzAzPQM=; b=cbgwqjHJM8l0aYRDdTz70OrhwVV9ay3bUPVjItIDj5JVTOldfyPDm/BJT0UaLQ0GU5 tFybE55SLc0w+6yGniKoeajyTgYDzeVlT/+pCXkQm7BHQqC+gvUQz5S9PI/v4fQGoI4n R0k7uS/vSkRnLArf5QElNzgQOK46nAI5iKaG+KumKMrDc9GYyUZb3ODoaicgmXaZ2fkv 79vd3255zuLfB3SxQXJRj+kS2JAdU3WwO8qPvNHm9m+NjByahGIeBcXrCVcSGdBoJnJP Q/ouHZDKoq5hXlyv/9O/9yb8l2uhi8THO5L5WczjbO97ied/2W3RegrtjmeoS0Yv2HEi nTMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=kOjWMlwe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id h10-20020a63e14a000000b005be34495eedsi3454879pgk.118.2023.12.09.12.54.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Dec 2023 12:54:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=kOjWMlwe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id 4D1888087257; Sat, 9 Dec 2023 12:54:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231382AbjLIUy0 (ORCPT + 99 others); Sat, 9 Dec 2023 15:54:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231312AbjLIUyL (ORCPT ); Sat, 9 Dec 2023 15:54:11 -0500 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [IPv6:2a00:1098:ed:100::25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B78C1706; Sat, 9 Dec 2023 12:54:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702155252; bh=BLSj6AA16cSdujVBYYq70bIqHuGyTU5UrfHixq/ymCQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kOjWMlwetMwCh9GBKJNyjH+0D7xrtmX9ul5G6aBQ0omyXemNjzithDJNZ61ue00Q3 hr2hdRNNeM6fdMqtHy0KosrC2q40e1Xr519BQL7AMzHTegAokhJIZOP6mHnI4POmxi HpVmkpcH5d8R6pXBO9LuK7nLp8JnPoAvu8V11gKWmdju9bdkYEQHRy9tzsAcir04ap TWio7/EXM0mVcsVFrE1nplEU1Z8C3bDHQZkA7RibairQl7WddG03QqDiUaXAEgzxfs XJvRE5nks39I6zAMxAcPGzWVCazMOdZdwouxIkzU0MjYv21vdV7XCy1HRjMe3KQVzl f4uFsHkbkQTBg== Received: from localhost (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madrid.collaboradmins.com (Postfix) with ESMTPSA id A10B437813E8; Sat, 9 Dec 2023 20:54:12 +0000 (UTC) From: Cristian Ciocaltea To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Pierre-Louis Bossart , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Venkata Prasad Potturu , 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 Subject: [PATCH 09/11] ASoC: SOF: amd: Compute file paths on firmware load Date: Sat, 9 Dec 2023 22:53:48 +0200 Message-ID: <20231209205351.880797-10-cristian.ciocaltea@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231209205351.880797-1-cristian.ciocaltea@collabora.com> References: <20231209205351.880797-1-cristian.ciocaltea@collabora.com> MIME-Version: 1.0 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 fry.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 (fry.vger.email [0.0.0.0]); Sat, 09 Dec 2023 12:54:42 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784839182580644644 X-GMAIL-MSGID: 1784839182580644644 Commit 6c393ebbd74a ("ASoC: SOF: core: Implement IPC version fallback if firmware files are missing") changed the order of some operations and the firmware paths are not available anymore at snd_sof_probe() time. Precisely, fw_filename_prefix is set by sof_select_ipc_and_paths() via plat_data->fw_filename_prefix = out_profile.fw_path; but sof_init_environment() which calls this function was moved from snd_sof_device_probe() to sof_probe_continue(). Moreover, snd_sof_probe() was moved from sof_probe_continue() to sof_init_environment(), but before the call to sof_select_ipc_and_paths(). The problem here is that amd_sof_acp_probe() uses fw_filename_prefix to compute fw_code_bin and fw_data_bin paths, and because the field is not yet initialized, the paths end up containing (null): snd_sof_amd_vangogh 0000:04:00.5: Direct firmware load for (null)/sof-vangogh-code.bin failed with error -2 snd_sof_amd_vangogh 0000:04:00.5: sof signed firmware code bin is missing snd_sof_amd_vangogh 0000:04:00.5: error: failed to load DSP firmware -2 snd_sof_amd_vangogh: probe of 0000:04:00.5 failed with error -2 Move usage of fw_filename_prefix right before request_firmware() calls in acp_sof_load_signed_firmware(). Fixes: 6c393ebbd74a ("ASoC: SOF: core: Implement IPC version fallback if firmware files are missing") Signed-off-by: Cristian Ciocaltea --- sound/soc/sof/amd/acp-loader.c | 32 ++++++++++++++++++++++++++------ sound/soc/sof/amd/acp.c | 7 ++----- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/sound/soc/sof/amd/acp-loader.c b/sound/soc/sof/amd/acp-loader.c index e05eb7a86dd4..d2d21478399e 100644 --- a/sound/soc/sof/amd/acp-loader.c +++ b/sound/soc/sof/amd/acp-loader.c @@ -267,29 +267,49 @@ int acp_sof_load_signed_firmware(struct snd_sof_dev *sdev) { struct snd_sof_pdata *plat_data = sdev->pdata; struct acp_dev_data *adata = plat_data->hw_pdata; + const char *fw_filename; int ret; - ret = request_firmware(&sdev->basefw.fw, adata->fw_code_bin, sdev->dev); + fw_filename = kasprintf(GFP_KERNEL, "%s/%s", + plat_data->fw_filename_prefix, + adata->fw_code_bin); + if (!fw_filename) + return -ENOMEM; + + ret = request_firmware(&sdev->basefw.fw, fw_filename, sdev->dev); if (ret < 0) { + kfree(fw_filename); dev_err(sdev->dev, "sof signed firmware code bin is missing\n"); return ret; } else { - dev_dbg(sdev->dev, "request_firmware %s successful\n", adata->fw_code_bin); + dev_dbg(sdev->dev, "request_firmware %s successful\n", fw_filename); } + kfree(fw_filename); + ret = snd_sof_dsp_block_write(sdev, SOF_FW_BLK_TYPE_IRAM, 0, - (void *)sdev->basefw.fw->data, sdev->basefw.fw->size); + (void *)sdev->basefw.fw->data, + sdev->basefw.fw->size); + + fw_filename = kasprintf(GFP_KERNEL, "%s/%s", + plat_data->fw_filename_prefix, + adata->fw_data_bin); + if (!fw_filename) + return -ENOMEM; - ret = request_firmware(&adata->fw_dbin, adata->fw_data_bin, sdev->dev); + ret = request_firmware(&adata->fw_dbin, fw_filename, sdev->dev); if (ret < 0) { + kfree(fw_filename); dev_err(sdev->dev, "sof signed firmware data bin is missing\n"); return ret; } else { - dev_dbg(sdev->dev, "request_firmware %s successful\n", adata->fw_data_bin); + dev_dbg(sdev->dev, "request_firmware %s successful\n", fw_filename); } + kfree(fw_filename); ret = snd_sof_dsp_block_write(sdev, SOF_FW_BLK_TYPE_DRAM, 0, - (void *)adata->fw_dbin->data, adata->fw_dbin->size); + (void *)adata->fw_dbin->data, + adata->fw_dbin->size); return ret; } EXPORT_SYMBOL_NS(acp_sof_load_signed_firmware, SND_SOC_SOF_AMD_COMMON); diff --git a/sound/soc/sof/amd/acp.c b/sound/soc/sof/amd/acp.c index 1e9840ae8938..87c5c71eac68 100644 --- a/sound/soc/sof/amd/acp.c +++ b/sound/soc/sof/amd/acp.c @@ -479,7 +479,6 @@ EXPORT_SYMBOL_NS(amd_sof_acp_resume, SND_SOC_SOF_AMD_COMMON); int amd_sof_acp_probe(struct snd_sof_dev *sdev) { struct pci_dev *pci = to_pci_dev(sdev->dev); - struct snd_sof_pdata *plat_data = sdev->pdata; struct acp_dev_data *adata; const struct sof_amd_acp_desc *chip; const struct dmi_system_id *dmi_id; @@ -547,8 +546,7 @@ int amd_sof_acp_probe(struct snd_sof_dev *sdev) dmi_id = dmi_first_match(acp_sof_quirk_table); if (dmi_id && dmi_id->driver_data) { adata->fw_code_bin = devm_kasprintf(sdev->dev, GFP_KERNEL, - "%s/sof-%s-code.bin", - plat_data->fw_filename_prefix, + "sof-%s-code.bin", chip->name); if (!adata->fw_code_bin) { ret = -ENOMEM; @@ -556,8 +554,7 @@ int amd_sof_acp_probe(struct snd_sof_dev *sdev) } adata->fw_data_bin = devm_kasprintf(sdev->dev, GFP_KERNEL, - "%s/sof-%s-data.bin", - plat_data->fw_filename_prefix, + "sof-%s-data.bin", chip->name); if (!adata->fw_data_bin) { ret = -ENOMEM; From patchwork Sat Dec 9 20:53:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Ciocaltea X-Patchwork-Id: 176239 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp6236238vqy; Sat, 9 Dec 2023 12:54:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IFMJsHVNE3w9p5VJGFOwdNckpeodQtgo5hyBLGZgXo950QbJSz/3SHYiK97qvgbRPVwXrL8 X-Received: by 2002:a05:6e02:144e:b0:35d:a484:3d3 with SMTP id p14-20020a056e02144e00b0035da48403d3mr3769353ilo.81.1702155289065; Sat, 09 Dec 2023 12:54:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702155289; cv=none; d=google.com; s=arc-20160816; b=EY8A6rNHnrgcBHsLL4U+usSTmhUR24H0+8pgLYg/ZVAJOlZBSqnNiIMI46rt45JSo7 mD2pzrFFfftBV1xcywhLg7DRwah7PYIJz/6JnQT4wzvOVhf4YPPo/M8kI0Rurt2yY8jR BlMMVrzzdrP/kMC8OG3xC7yotncldq4Y/RHw4S9uYb4jsc4Cql3ixYQ/X6luwNM/QNHT 4N585s5M3iNC2S9z+tmR7lweV8ApsXy+N86mDaXxkZshrMu0p7z7HjOmQ6MZnNTCbv2V 6QonY063n/GyH+al2GZ3n6HThSJ7ig0Ba0aGqaSNpasM+97BU/UepSVY2Hr3lDIhY/xA iPtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6ci3rJ1YTclSbdvyV9M9Q3993uQYlFafbB2WMgDHBew=; fh=qH4A7sjuqsI+9iJQtQMmOmQRysg9CNJ3X6TEjzAzPQM=; b=sfBPhA8M5+eLTJMxBJD5QTGWd05QzdHDywK0Hdhnp9UXfTz+Qi4C5Uj1KF/YdQ8k73 J7T0AYkfY4CkAUQhZHghqlmSe6pjXdrBrrFFWM2moqf1Z+WFrIDeyxYMVxaZbG+wvDKo JdD0mhAF5Ybud0HAz3G3mwihOnQ0f8RdIaQkSxLHQ1HW8s4YYOfltkCSsFaxjbE882ml 6p+PdOGAxkE0oW/0B7CFiGDslHVmq7Kv2q7Lt0xuuppNGtFHmwvpoKSBGOqMoDB6O5CO 7E39TuFRmQ8QECvK/LhQTM4+jpne6IAmXe/DZt2Bb7sP0haXDKmYcu8H6aFd2ln0Gon3 ULVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=l+3Y9LQ2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id k82-20020a628455000000b006ce97669ffcsi3556817pfd.387.2023.12.09.12.54.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Dec 2023 12:54:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=l+3Y9LQ2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id 75195805FB81; Sat, 9 Dec 2023 12:54:46 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231436AbjLIUya (ORCPT + 99 others); Sat, 9 Dec 2023 15:54:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231254AbjLIUyL (ORCPT ); Sat, 9 Dec 2023 15:54:11 -0500 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [IPv6:2a00:1098:ed:100::25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B120171C; Sat, 9 Dec 2023 12:54:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702155253; bh=C0xLCzEAO0R7G8da8+2HO7Jslwis2dNNSzbFRoiRry8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l+3Y9LQ2EF/XqWMwdn3rYFEkdeec0wjfN9KT5CfsjqBo761Ajgyfusb8DkmWDDfKT jkc2iN/9i6IcqFtBHZRQYnxGi5g7zWC708Rgs0L79YB/v4ZVrexXk/ElU+TP70051T FnsobtbLEEdOrPTon+cUb19pPOZ8s1ZYGNVvaY0izNPwOYcySdJkizwSmrS9pRd1Ud ZErJ4/ixMM6VN2KcbnZgcyn0PI6UMnLL+j8I0xXUhsEx17u2Jg5Q0BX9oPpflLk35L S/PPfHOJY6EXJCDKw9dWVGROF5skYQxC0CG5j0+pZagHAE+UdwweYbLiEzCdnBGIBK qK8SZW1vhy0eQ== Received: from localhost (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madrid.collaboradmins.com (Postfix) with ESMTPSA id BE26837813EA; Sat, 9 Dec 2023 20:54:13 +0000 (UTC) From: Cristian Ciocaltea To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Pierre-Louis Bossart , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Venkata Prasad Potturu , 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 Subject: [PATCH 10/11] ASoC: amd: acp: Use correct DAI link ID for BT codec Date: Sat, 9 Dec 2023 22:53:49 +0200 Message-ID: <20231209205351.880797-11-cristian.ciocaltea@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231209205351.880797-1-cristian.ciocaltea@collabora.com> References: <20231209205351.880797-1-cristian.ciocaltea@collabora.com> MIME-Version: 1.0 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 agentk.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 (agentk.vger.email [0.0.0.0]); Sat, 09 Dec 2023 12:54:46 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784839184262240822 X-GMAIL-MSGID: 1784839184262240822 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, }; enum cpu_endpoints { From patchwork Sat Dec 9 20:53:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Ciocaltea X-Patchwork-Id: 176240 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp6236245vqy; Sat, 9 Dec 2023 12:54:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IHnuwK7jwXHs1WK4Lxt5ORSZEn34NQxbYE4tQYyWBZtLxvR5f0q8pGp2BakkIP72+G4jS1b X-Received: by 2002:a05:622a:15ce:b0:425:4043:1daf with SMTP id d14-20020a05622a15ce00b0042540431dafmr3531208qty.130.1702155290133; Sat, 09 Dec 2023 12:54:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702155290; cv=none; d=google.com; s=arc-20160816; b=AKlgPSypy3M88CXzwtVbily/HmvXUNeq2fN1RIdae6zTofhcx4IY8MdXxOkQ4n8xVH Fm/8qeWAtfMCbLMisri+NN14yJeH4ifEoFTvB5vbtFqLSAdCpg3OTt7keB8qGC70/H1k qMBaq31OV8dmwqbiiVoBSu5a5ld5JjmLkilxYpdEk7dn2pQS1O3bTScKR/GCPbKUET5B dwNaCSnpJQQyUwQvnJCgxpyYJ8T7qyns8YugGNyDTte+0AUbZwV4OMLXtY8JntMpAVzN 91cM5muweXzllz5CPjX4cyLEco79i0iUM1+64GNrOt728+dh9V9yLFzQvpcpGhbPfrK5 iJSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2gaqKkOYPhv5/uKJrSTB/l23PkWh4NVBjcV0Ui63m7g=; fh=qH4A7sjuqsI+9iJQtQMmOmQRysg9CNJ3X6TEjzAzPQM=; b=jxL24OSW1TrUQPU8u1dVzs2Tu+e9/sk6itV7acwC0kMWzjj+wezbSKH5YO65IhO2Yj leusX5Rhlw/W2cdMGncI7e7hXwh9n6roznoE+rLvrfLtCu5xqZGNDQoTNqHYa0Hh1YCM o6jJ7JKm6qJgYFyVe3aU0eKEqMdGoEdxmj94Yi8J5E65sOE85Q97Q/Oy4Cn3iQv3jFPU UWMNnw5Kbot/SjqBYXFZrrlSW30keK/HAIbUTR45NURwJN3PsqJNuSz6oS/J7CJMACYW waN4HVXu6ncOV0mcxGuB/1Fznp4IdjkOg+UgXM206heELH62CaksYaws1TQic7eDTeOO 9saw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="BM1AxB/9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id l7-20020a17090a850700b00286c7b26eb0si4943607pjn.70.2023.12.09.12.54.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Dec 2023 12:54:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="BM1AxB/9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 5D7C88088A55; Sat, 9 Dec 2023 12:54:47 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231455AbjLIUyd (ORCPT + 99 others); Sat, 9 Dec 2023 15:54:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231279AbjLIUyL (ORCPT ); Sat, 9 Dec 2023 15:54:11 -0500 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5116A13A; Sat, 9 Dec 2023 12:54:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702155255; bh=Xs+m1eeyJ8qSJwxEkU2Al7uwFtkLxLKKyx9Q9Aji0SQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BM1AxB/90+ZZf9BPE3xnjreVuHJFGy9SalattDgPSSrF66q6vmhvYZdHx0dPJxHyj EvCObBHwhMyZKBEkp62RGYREpOQdDJjEvkzYRXH4dBrMuxaGO87T/aDpvnz3459VDm tBtOqigUoPuQlYRa9GCUVL4eY4BLgzcxoNBRvSDXofTijK2+Q9Uj1YgpDX5Miievab CPaxcg11RfkJbwP/vb8IR8fgcAusgnBLLZdPP29tjIt6XhlDB3AeIhWcc4ESUfts/p DeHOcnZjaQ5LkFUFklS0ZkOhnwmuQEzsNFHH0+Oijb7mpFOd7mCPThhe3Hl/JwHYnQ aSSJMxewyAStA== Received: from localhost (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madrid.collaboradmins.com (Postfix) with ESMTPSA id CCD2537813ED; Sat, 9 Dec 2023 20:54:14 +0000 (UTC) From: Cristian Ciocaltea To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Pierre-Louis Bossart , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Venkata Prasad Potturu , 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 Subject: [PATCH 11/11] ASoC: SOF: topology: Add new DAI type entry for SOF_DAI_AMD_BT Date: Sat, 9 Dec 2023 22:53:50 +0200 Message-ID: <20231209205351.880797-12-cristian.ciocaltea@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231209205351.880797-1-cristian.ciocaltea@collabora.com> References: <20231209205351.880797-1-cristian.ciocaltea@collabora.com> MIME-Version: 1.0 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 groat.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 (groat.vger.email [0.0.0.0]); Sat, 09 Dec 2023 12:54:47 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784839184992352612 X-GMAIL-MSGID: 1784839184992352612 Commit efb931cdc4b9 ("ASoC: SOF: topology: Add support for AMD ACP DAIs") registered "ACP" name for SOF_DAI_AMD_BT DAI type. However, some boards, i.e. Steam Deck OLED, seem to require "ACPBT" for the same type: [ 467.489680] snd_sof_amd_vangogh 0000:04:00.5: ipc tx error for 0x30030000 (msg/reply size: 16/0): -22 [ 467.492775] snd_sof_amd_vangogh 0000:04:00.5: sof_ipc3_route_setup: route ACPBT2.IN -> BUF5.0 failed [ 467.495839] snd_sof_amd_vangogh 0000:04:00.5: sof_ipc3_set_up_all_pipelines: route set up failed [ 467.499128] snd_sof_amd_vangogh 0000:04:00.5: error: tplg component load failed -22 [ 467.502210] snd_sof_amd_vangogh 0000:04:00.5: error: failed to load DSP topology -22 [ 467.505289] snd_sof_amd_vangogh 0000:04:00.5: ASoC: error at snd_soc_component_probe on 0000:04:00.5: -22 [ 467.508430] sof_mach nau8821-max: ASoC: failed to instantiate card -22 [ 467.511725] sof_mach nau8821-max: error -EINVAL: Failed to register card(sof-nau8821-max) [ 467.514861] sof_mach: probe of nau8821-max failed with error -22 Add "ACPBT" alias for "ACP" SOF DAI type. Signed-off-by: Cristian Ciocaltea --- sound/soc/sof/topology.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c index e3e7fbe40fa6..73bf791e7520 100644 --- a/sound/soc/sof/topology.c +++ b/sound/soc/sof/topology.c @@ -290,6 +290,7 @@ static const struct sof_dai_types sof_dais[] = { {"SAI", SOF_DAI_IMX_SAI}, {"ESAI", SOF_DAI_IMX_ESAI}, {"ACP", SOF_DAI_AMD_BT}, + {"ACPBT", SOF_DAI_AMD_BT}, {"ACPSP", SOF_DAI_AMD_SP}, {"ACPDMIC", SOF_DAI_AMD_DMIC}, {"ACPHS", SOF_DAI_AMD_HS},