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 CF53AC4332F for ; Wed, 16 Nov 2022 15:04:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234003AbiKPPEW (ORCPT ); Wed, 16 Nov 2022 10:04:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233356AbiKPPES (ORCPT ); Wed, 16 Nov 2022 10:04:18 -0500 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2BDF616E for ; Wed, 16 Nov 2022 07:04:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668611057; x=1700147057; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=Lc2im2WNuflvec4Il7akKcrjVAyNll8uTfelvJ8MY/I=; b=h+7ynyVXejAPFB/GLD71yi3rNP6XItlhzFakG+ri7buKVXRHvjXc2zvH PeGzAZurESv41E9rVRYmgBJ1/cZJou0GtKvQDwJs7cpATPYr7WjSG+Bri Tnzfh6zpTgSRk1BMTmJGwGlztNQ9yDUJGWcucaLcPdKL1/dXSagjBQt4F vsU/z8bma+fQtfPTwQ0nXUBSS2VhKOgUmW8tulP1LgGB+8U1jUsJmCC/X HOeCF9q5QEsyhZbKz9BiFLOnbJjYThhn3zKOBl4idHnoXaTINVbt4xqjs 1+fElcLo8NLCj7O/lVtjteTom+JMI3nNwqoJfwfyZGKf/EOGFgKmgAOwU Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10533"; a="311270990" X-IronPort-AV: E=Sophos;i="5.96,167,1665471600"; d="scan'208";a="311270990" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Nov 2022 07:04:12 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10533"; a="639385030" X-IronPort-AV: E=Sophos;i="5.96,167,1665471600"; d="scan'208";a="639385030" Received: from msureshb-mobl3.amr.corp.intel.com (HELO [10.212.45.114]) ([10.212.45.114]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Nov 2022 07:04:10 -0800 Message-ID: Date: Wed, 16 Nov 2022 09:04:09 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.4.2 Subject: Re: [Sound-open-firmware] [PATCH 3/4] ASoC: SOF: Adding amd HS functionality to the sof core Content-Language: en-US To: AngeloGioacchino Del Regno , 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: Pierre-Louis Bossart In-Reply-To: <36a45c7a-820a-7675-d740-c0e83ae2c417@collabora.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> 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.