From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6045BC4332F for ; Thu, 17 Nov 2022 09:05:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239593AbiKQJF1 (ORCPT ); Thu, 17 Nov 2022 04:05:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239560AbiKQJFK (ORCPT ); Thu, 17 Nov 2022 04:05:10 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C56045A6C2 for ; Thu, 17 Nov 2022 01:05:09 -0800 (PST) Received: from [192.168.1.100] (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (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: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 8068E6602A93; Thu, 17 Nov 2022 09:05:07 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1668675908; bh=p6YpsqupWmMHDs3TaSsKpSsAZEWOlE0sLkaMc79YVaE=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=g5ZXiea3ZGKBuoVs9zj0Rf5EhnQuDlkfxJIZKTGzw3IvJFcvNCC/wICgyioYV6Kt+ CvYvfE7CmLT6Q4hvLlKz9ClEJlnqlsYxYSq8THGwPZxoB9SRTdleneqhPJonethBH8 IKiJWY9jveo83vlK6g8cfp8pyVQD9FhqL8Y6esPLu/Hf3qt8Hvx9Bt+pTXuWUAUBr2 9Une+RQrDAxPaGQunszWowtuP+mzN6YLYSYTPkfa2K4jky4yIqTqq3jfHLyLkmnjIM RFlCdbYh5fFXpqxs5nWXa7qJPf83Y+Rype0QfhY7s3QA+dezySHuh6wj9JXsDv6SYd KQqZbTc/s194g== Message-ID: Date: Thu, 17 Nov 2022 10:05:04 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.3 Subject: Re: [Sound-open-firmware] [PATCH 3/4] ASoC: SOF: Adding amd HS functionality to the sof core To: Pierre-Louis Bossart , V sujith kumar Reddy , broonie@kernel.org, alsa-devel@alsa-project.org Cc: Daniel Baluta , Sunil-kumar.Dommati@amd.com, ssabakar@amd.com, Kai Vehmanen , venkataprasad.potturu@amd.com, Peter Ujfalusi , Basavaraj.Hiregoudar@amd.com, Chen-Yu Tsai , Takashi Iwai , Liam Girdwood , YC Hung , Ranjani Sridharan , Vijendar.Mukunda@amd.com, Bard Liao , Ajit Kumar Pandey , open list , "moderated list:SOUND - SOUND OPEN FIRMWARE (SOF) DRIVERS" References: <20220913144319.1055302-1-Vsujithkumar.Reddy@amd.com> <20220913144319.1055302-4-Vsujithkumar.Reddy@amd.com> <36a45c7a-820a-7675-d740-c0e83ae2c417@collabora.com> <02c2643f-bd32-c3db-51a1-d7773b60c655@collabora.com> Content-Language: en-US From: AngeloGioacchino Del Regno In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Il 16/11/22 17:55, Pierre-Louis Bossart ha scritto: > > > On 11/16/22 10:33, AngeloGioacchino Del Regno wrote: >> Il 16/11/22 16:04, Pierre-Louis Bossart ha scritto: >>> >>>>> diff --git a/include/sound/sof/dai.h b/include/sound/sof/dai.h >>>>> index 21d98f31a9ca..83fd81c82e4c 100644 >>>>> --- a/include/sound/sof/dai.h >>>>> +++ b/include/sound/sof/dai.h >>>>> @@ -84,6 +84,7 @@ enum sof_ipc_dai_type { >>>>>        SOF_DAI_AMD_BT,            /**< AMD ACP BT*/ >>>>>        SOF_DAI_AMD_SP,            /**< AMD ACP SP */ >>>>>        SOF_DAI_AMD_DMIC,        /**< AMD ACP DMIC */ >>>>> +    SOF_DAI_AMD_HS,            /**< Amd HS */ >>>>>        SOF_DAI_MEDIATEK_AFE,        /**< Mediatek AFE */ >>>> >>>> Adding SOF_DAI_AMD_HS before SOF_DAI_MEDIATEK_AFE desynced this >>>> enumeration >>>> so the DAI type is now 11 and not 10 anymore, leading to a failure in >>>> firmware >>>> at IPC3 helper function `dai_get()`, as when `dai_find_type()` is >>>> called, the >>>> DAI type that the firmware expects doesn't match with the one that gets >>>> sent >>>> in the request message from the kernel. >>>> >>>> As a local test, I tried moving SOF_DAI_AMD_HS after >>>> SOF_DAI_MEDIATEK_AFE and >>>> this has restored full functionality on my MT8195 platform (Tomato >>>> Chromebook). >>>> >>>> If SOF is supposed to guarantee backwards compatibility (and I believe >>>> it is), >>>> this commit breaks that. >>>> >>>> I would be tempted to send a commit that moves SOF_DAI_AMD_HS to the >>>> end, but >>>> that would break the already compiled firmware for AMD platforms, so I >>>> am not >>>> sure how to proceed. >>> >>> D'oh. Yes this breaks backwards-compatibility and this is a clear >>> mistake. I think your suggestion to add the AMD_HS at the end is the >>> only practical solution indeed - this would need to be done for both >>> kernel and SOF version of dai.h. >>> >> >> Okay, I will send a commit tomorrow :-) > > I sent those two GitHub pull requests already: > > https://github.com/thesofproject/linux/pull/4017 > https://github.com/thesofproject/sof/pull/6616 > Thanks for the fast action. Regards, Angelo