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 C5C12C636D4 for ; Thu, 9 Feb 2023 11:15:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230147AbjBILPy (ORCPT ); Thu, 9 Feb 2023 06:15:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230107AbjBILPc (ORCPT ); Thu, 9 Feb 2023 06:15:32 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CA9D69522; Thu, 9 Feb 2023 03:15:23 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A94FFB82101; Thu, 9 Feb 2023 11:15:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8DA17C433D2; Thu, 9 Feb 2023 11:15:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675941320; bh=9rLlVB1jpelL9+8LUjrW3CmbzB3b3aqI9KG+KjlKFQo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fn7+KnyEVrn9/5O2M56hb396IulK/pcoKsTF4FTVE72zuvKlttVvkgGCUw5r3qut9 IVBVpZqPvsBMBCC9B5GujwkUU1ceGdj8InwfeO1kGvSHz8N9j0KQEhAuvWH0g4Z9DW iORqz497zZLJnNAyG8tkhcSG0hS+Vb4vuDEVX/WYg4RFG/jg09DXs/MH4V+fumDdzR 6JK0RF6gqBu50B3FbR+j4hdc4Y7lGeN14HjOMpn53ZvDL4PhMk9q7UuFOkT//Pun5W Jnd3vr8p5AqqXMsJd7al6WzuGAHxaxRV8t3R5LaAuCkfusgueikxz9J6Rd7n/HsRaB lODwPzmZ9Xftw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Pierre-Louis Bossart , Ranjani Sridharan , =?UTF-8?q?P=C3=A9ter=20Ujfalusi?= , Bard Liao , Kai Vehmanen , Mark Brown , Sasha Levin , cezary.rojewski@intel.com, liam.r.girdwood@linux.intel.com, perex@perex.cz, tiwai@suse.com, arnd@arndb.de, ye.xingchen@zte.com.cn, brent.lu@intel.com, akihiko.odaki@gmail.com, ajye_huang@compal.corp-partner.google.com, yong.zhi@intel.com, alsa-devel@alsa-project.org Subject: [PATCH AUTOSEL 6.1 06/38] ASoC: Intel: sof_nau8825: always set dpcm_capture for amplifiers Date: Thu, 9 Feb 2023 06:14:25 -0500 Message-Id: <20230209111459.1891941-6-sashal@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230209111459.1891941-1-sashal@kernel.org> References: <20230209111459.1891941-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pierre-Louis Bossart [ Upstream commit 36a71a0eb7cdb5ccf4b0214dbd41ab00dff18c7f ] The amplifier may provide hardware support for I/V feedback, or alternatively the firmware may generate an echo reference attached to the SSP and dailink used for the amplifier. To avoid any issues with invalid/NULL substreams in the latter case, always unconditionally set dpcm_capture. Link: https://github.com/thesofproject/linux/issues/4083 Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20230119163459.2235843-4-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/intel/boards/sof_nau8825.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sound/soc/intel/boards/sof_nau8825.c b/sound/soc/intel/boards/sof_nau8825.c index 009a41fbefa10..0c723d4d2d63b 100644 --- a/sound/soc/intel/boards/sof_nau8825.c +++ b/sound/soc/intel/boards/sof_nau8825.c @@ -479,8 +479,6 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, links[id].num_codecs = ARRAY_SIZE(max_98373_components); links[id].init = max_98373_spk_codec_init; links[id].ops = &max_98373_ops; - /* feedback stream */ - links[id].dpcm_capture = 1; } else if (sof_nau8825_quirk & SOF_MAX98360A_SPEAKER_AMP_PRESENT) { max_98360a_dai_link(&links[id]); @@ -493,6 +491,9 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, links[id].platforms = platform_component; links[id].num_platforms = ARRAY_SIZE(platform_component); links[id].dpcm_playback = 1; + /* feedback stream or firmware-generated echo reference */ + links[id].dpcm_capture = 1; + links[id].no_pcm = 1; links[id].cpus = &cpus[id]; links[id].num_cpus = 1; -- 2.39.0