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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A52F1C433FE for ; Wed, 16 Nov 2022 16:34:21 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 53DDB168D; Wed, 16 Nov 2022 17:33:29 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 53DDB168D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1668616459; bh=biznPrim6v3j67mmokefG4uANW8FWl0pdve+bNyLKHI=; h=Date:Subject:To:References:From:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Jd25uAQtaFVK32iv+YulKSiqjkCzxPY1eAiKRHvjYsPAtjBfzVZY6NyRkCEgyzhcb yeGmEiwyA2IoeQmUHp7qJw/BhTQDbFCb1ar3/sxYUQmkm5M4/6ko0AbyMvWpg14W1u bkeCXV9Dpz3s2KEFp87PTpgr2cu1DvB2DtyL0hUU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id DA0A7F80163; Wed, 16 Nov 2022 17:33:28 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9FD37F80169; Wed, 16 Nov 2022 17:33:26 +0100 (CET) Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 525BDF80089; Wed, 16 Nov 2022 17:33:20 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 525BDF80089 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="FaYkrewN" 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 AB06D660296C; Wed, 16 Nov 2022 16:33:18 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1668616399; bh=biznPrim6v3j67mmokefG4uANW8FWl0pdve+bNyLKHI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=FaYkrewNwJWpomf67Dxnvy5ojNxDTGFdWBoooXKj0hSmNSokV4Z92Vqcyr2ZTomN2 d6bGGvo45oZXiTR1c6bvFIOPC42y/e0f4Bb2mVfdYyEE0lNl0EcJctDB30W2oF59j4 OIdxJfO5tUzQTd69+K5gLN5vQ30BgeHhuBKZLRtwuwsDF0m+rECRIaVhPUbWAM+4tM 2ct5aUIDWWMjXQJ1g9DS3anPxDCgRk4uFkoadUIq688GpU3I184H0d8NYWaKsQD9Qd w8hLrkP0oAKnkrvUJk0CyqCQocmxeLgdXV/lnuOSgZNGhweKzPZwrcyPLeZY/xC732 U9Rg+kjVxr+lA== Message-ID: <02c2643f-bd32-c3db-51a1-d7773b60c655@collabora.com> Date: Wed, 16 Nov 2022 17:33:16 +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 Content-Language: en-US To: Pierre-Louis Bossart , V sujith kumar Reddy , broonie@kernel.org, alsa-devel@alsa-project.org References: <20220913144319.1055302-1-Vsujithkumar.Reddy@amd.com> <20220913144319.1055302-4-Vsujithkumar.Reddy@amd.com> <36a45c7a-820a-7675-d740-c0e83ae2c417@collabora.com> From: AngeloGioacchino Del Regno In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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" X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 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 :-) Thanks, Angelo