Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1859898pxb; Wed, 30 Mar 2022 11:24:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytlvxG5/izQLLiiY8H9ltf7WehUyv+lV3GmcLECVz8BTEPadg9yzGYgY6zWydV/I4btK3o X-Received: by 2002:aa7:c30f:0:b0:419:2af:4845 with SMTP id l15-20020aa7c30f000000b0041902af4845mr12446375edq.296.1648664635438; Wed, 30 Mar 2022 11:23:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648664635; cv=none; d=google.com; s=arc-20160816; b=V50qQaOKokDMgewtrvG2AudFphP28Zgsh6ibLjcmpylO7AtvuSQWsqWZVbIeyE9IhW 7rfezoETUrvWpsh3rUpTARa889S5ONqAWY4cmrtTTBik60tuzeO4DlEOQseTZNS+9FzQ uwmYPOV90nenfFHeQ8k/VZT2NhNEzKu3H3jMH9hsW+xWR0p5I53ogxVcCPyIlUajBC04 gXYOpmIt/yFYRtne0niouUPsUmRQ0mXIZwol7iPQuJ7niCV2tAq4eG0OUH82bKXIFlOV Ddh0fNAoN+GTprklfBT3ACyLIt4scPorb+qGE+sUXc87y6PwA3mAD8YUROTb243ZTM2N iRug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=TgEPM+ZVK7JvT9CbeMToZQWgbsG7M0Z/el51VgT44PE=; b=lxZ8CtILb1/s8LzBSdSGRVs+kraj9shD09/26ykilwVU4DED+YJ6oR+hgjOOi3x+Jz SV//a2J/ltZ7zMerZqIcCow6LfLABbJ2sPDQzhJgILtIXmpAHXm41ddKrhcKMUjUKnmq SIJIUv4J+d7ugaFlpO6UpJlV1U263Eq0XuM606/AJGsectIkPu4ORvnvZvBEtDBIDrNt flGuIOxxDR2GGBy7EtKcc+S1zK/ZktNjDCXKfkSwyZQuK3tX8FKfmXJYrERCeqrgPKTp Sw0lr0zrPENjcC5dPZgFKE4NohqW4+qhn2XFMB6jsbPdabK4mlABwadmm29Iz44bHGbe 2dJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=C4Pfoj3r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o6-20020a17090637c600b006dfa350f0b5si19205521ejc.797.2022.03.30.11.23.14; Wed, 30 Mar 2022 11:23:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=C4Pfoj3r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345090AbiC3L5S (ORCPT + 99 others); Wed, 30 Mar 2022 07:57:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344412AbiC3LxI (ORCPT ); Wed, 30 Mar 2022 07:53:08 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 198652619B1; Wed, 30 Mar 2022 04:48:50 -0700 (PDT) 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 ADD4FB81C34; Wed, 30 Mar 2022 11:48:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1416EC36AF8; Wed, 30 Mar 2022 11:48:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648640928; bh=hM7XmzpCz1LY2zUE0Z1Ob1vRypXKE20pNn9jFFw1gE0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C4Pfoj3r5zBHz7SEfLir8om9RKYAAK0JkR2/bz8Y/27ye7KGESqq4UsahJkhWdGYh mLGDoEoaCfds7CudHszwmhpI0sDqMEq146Pi1g79LTRrxRBM2BG9YgkdcMMkx9iU30 qRWfPjn+IfGN0D8bUc8gmpPBoAuxOzDNW3pDtOYWqmlQqdedGLCgu2LpwU+T+oQpj9 MN2cS2qP7e8QHTbmrtZXdUXAvyMvU7qlwVP/GnEA6oA+7GlVPrC4U3Z5TekO8Fif9x eCJ1hMBs9QrCKfdJr+RN1Qqr5S+XAKtElWjfA66T2SABkzVKxS6Dtj3kAkUN+Pz3d3 nItJfgYO3ao2g== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Ranjani Sridharan , Pierre-Louis Bossart , Rander Wang , Kai Vehmanen , Peter Ujfalusi , Mark Brown , Sasha Levin , lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org Subject: [PATCH AUTOSEL 5.16 10/59] ASoC: SOF: Intel: hda: Remove link assignment limitation Date: Wed, 30 Mar 2022 07:47:42 -0400 Message-Id: <20220330114831.1670235-10-sashal@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220330114831.1670235-1-sashal@kernel.org> References: <20220330114831.1670235-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ranjani Sridharan [ Upstream commit 2ce0d008dcc59f9c01f43277b9f9743af7b01dad ] The limitation to assign a link DMA channel for a BE iff the corresponding host DMA channel is assigned to a connected FE is only applicable if the PROCEN_FMT_QUIRK is set. So, remove it for platforms that do not enable the quirk. Complements: a792bfc1c2bc ("ASoC: SOF: Intel: hda-stream: limit PROCEN workaround") Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Kai Vehmanen Reviewed-by: Peter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20220128130017.28508-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/sof/intel/hda-dai.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sound/soc/sof/intel/hda-dai.c b/sound/soc/sof/intel/hda-dai.c index 76579383d290..1b7ba7f3e99b 100644 --- a/sound/soc/sof/intel/hda-dai.c +++ b/sound/soc/sof/intel/hda-dai.c @@ -62,6 +62,8 @@ static struct hdac_ext_stream * { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct sof_intel_hda_stream *hda_stream; + const struct sof_intel_dsp_desc *chip; + struct snd_sof_dev *sdev; struct hdac_ext_stream *res = NULL; struct hdac_stream *stream = NULL; @@ -80,9 +82,20 @@ static struct hdac_ext_stream * continue; hda_stream = hstream_to_sof_hda_stream(hstream); + sdev = hda_stream->sdev; + chip = get_chip_info(sdev->pdata); /* check if link is available */ if (!hstream->link_locked) { + /* + * choose the first available link for platforms that do not have the + * PROCEN_FMT_QUIRK set. + */ + if (!(chip->quirks & SOF_INTEL_PROCEN_FMT_QUIRK)) { + res = hstream; + break; + } + if (stream->opened) { /* * check if the stream tag matches the stream -- 2.34.1