From patchwork Fri Jan 28 13:00:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 539004 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 D044EC433F5 for ; Fri, 28 Jan 2022 13:00:47 +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 3F9C31753; Fri, 28 Jan 2022 13:59:55 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3F9C31753 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1643374845; bh=E7LaCogL6sNxrIL2f2xOOZHN4GvFkbyq4t6V3oSAAPs=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=Z0aNKZM+VIIuH19oNLbCUQm4m4mA9QczVrzgSWy+MLReeB77o4Ai95GbHlknzaS1r GyFIT9dRZwfFwT3RjbSWsT+0KCUTJyheg63dtMBdwYqdB/iqFNeIjbX3O9xeGoq+iy zF9io2ho73+Nt+1a7rQ0QN8wshQO0kVV0WPaMbdw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C9A3FF8023B; Fri, 28 Jan 2022 13:59:54 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 95F96F80118; Fri, 28 Jan 2022 13:59:53 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 1C520F80118 for ; Fri, 28 Jan 2022 13:59:46 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1C520F80118 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Eail/v8/" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643374788; x=1674910788; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=E7LaCogL6sNxrIL2f2xOOZHN4GvFkbyq4t6V3oSAAPs=; b=Eail/v8/tRQ8KxuWfYVLPRoNVIua4Y1zEQ1GGNC6W67nQnVNYeXM8xtp 8WfDSrcjfG8/dK06Zawbxvw/eaIvFzxROntgcqzVK7w1OsEdMnqvvN1Uk T5cfs9K2nCEP2UaXFymyo4UPhTTKRgJjRw7/TQ5E/S7LbeZNieeVOOkk0 B2B6ahsAfnXbeHtaG42g33uqb+RWY9HE+a1wwLeVqyllpA/oCbgX7u5J9 utmZwpD/HujddBAkSzyzIAzSP1/YnfIQJzXvAU/EZGSvY2sbx4TIdkYeE O+dTMuZ+Vqg2spnQJF+QBw7P8P2+ET9ri5cZuyFKvgwoWF+DrIzxbPKrk g==; X-IronPort-AV: E=McAfee;i="6200,9189,10240"; a="247062696" X-IronPort-AV: E=Sophos;i="5.88,323,1635231600"; d="scan'208";a="247062696" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jan 2022 04:59:44 -0800 X-IronPort-AV: E=Sophos;i="5.88,323,1635231600"; d="scan'208";a="480733212" Received: from dlita-mobl2.ger.corp.intel.com (HELO pujfalus-desk.ger.corp.intel.com) ([10.249.43.152]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jan 2022 04:59:42 -0800 From: Peter Ujfalusi To: lgirdwood@gmail.com, broonie@kernel.org Subject: [PATCH] ASoC: SOF: Intel: hda: Remove link assignment limitation Date: Fri, 28 Jan 2022 15:00:17 +0200 Message-Id: <20220128130017.28508-1-peter.ujfalusi@linux.intel.com> X-Mailer: git-send-email 2.35.0 MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, pierre-louis.bossart@linux.intel.com, kai.vehmanen@linux.intel.com, ranjani.sridharan@linux.intel.com 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" From: Ranjani Sridharan 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 --- 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 cd12589355ef..28a54145c150 100644 --- a/sound/soc/sof/intel/hda-dai.c +++ b/sound/soc/sof/intel/hda-dai.c @@ -59,6 +59,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; @@ -77,9 +79,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