From patchwork Tue Apr 5 07:27:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 557898 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 6F709C433FE for ; Tue, 5 Apr 2022 08:38:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235729AbiDEIkW (ORCPT ); Tue, 5 Apr 2022 04:40:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233975AbiDEIYn (ORCPT ); Tue, 5 Apr 2022 04:24:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C17B12AA8; Tue, 5 Apr 2022 01:20:15 -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 dfw.source.kernel.org (Postfix) with ESMTPS id BF53860B12; Tue, 5 Apr 2022 08:20:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0B0FC385A0; Tue, 5 Apr 2022 08:20:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649146814; bh=yGnjY+lYxJXOnr0rrff8LCirneIsgVl27V7mWnMwbyg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IzfDuBtk3IVygzvX9QBtQbbO2yFEFqsfhKcGJaB13X7eitKAJYRF8bS0e1VSc6P1u btPFFg+zQKapiNE3+hglTWuaHTJ+mygi3nVKJU0rFvmK8VHwsCBe68csKFoyikitJm Q17y5mjCYatMGT3X6PAVac+QlveX9hm/z5ljshlA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ranjani Sridharan , Pierre-Louis Bossart , Rander Wang , Kai Vehmanen , Peter Ujfalusi , Mark Brown , Sasha Levin Subject: [PATCH 5.17 0898/1126] ASoC: SOF: Intel: hda: Remove link assignment limitation Date: Tue, 5 Apr 2022 09:27:25 +0200 Message-Id: <20220405070433.883456893@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070407.513532867@linuxfoundation.org> References: <20220405070407.513532867@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@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 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