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 D0B3FC43217 for ; Wed, 16 Nov 2022 16:39:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234143AbiKPQjM (ORCPT ); Wed, 16 Nov 2022 11:39:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233946AbiKPQir (ORCPT ); Wed, 16 Nov 2022 11:38:47 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 493DF5F86C for ; Wed, 16 Nov 2022 08:33:21 -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 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 Cc: Sunil-kumar.Dommati@amd.com, Vijendar.Mukunda@amd.com, ssabakar@amd.com, Kai Vehmanen , venkataprasad.potturu@amd.com, Bard Liao , Basavaraj.Hiregoudar@amd.com, Takashi Iwai , Peter Ujfalusi , Liam Girdwood , Chen-Yu Tsai , Ranjani Sridharan , YC Hung , Daniel Baluta , 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> 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 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