From patchwork Fri May 12 18:16:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 681836 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 32A2CC7EE26 for ; Fri, 12 May 2023 18:21:06 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9BD5CE9F; Fri, 12 May 2023 20:20:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9BD5CE9F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1683915663; bh=ye9jusbayFAN6BeKWnMrN/yfoHmOtz2V7Wbp+pSA61A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=K86ISmsrUy373/yTh4AWzrYWzfS7AmKOGEVh6a65eBuN35dRJi3oLUwBGzkW1Pbfz RyIThaYrz8V/H4QO4gNaEPHDlwe2cILqA6L2EMyVm2he5PKTzMj5fc5NQti5GAoMPE n0vubkkWqdLjjdXomWurcVFIp5+GCXDtzizFk3XQ= Received: by alsa1.perex.cz (Postfix, from userid 50401) id D06EBF805D2; Fri, 12 May 2023 20:18:04 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 7EC4FF805BA; Fri, 12 May 2023 20:18:04 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1A9A9F80587; Fri, 12 May 2023 20:17:54 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (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 E9766F8053B for ; Fri, 12 May 2023 20:17:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E9766F8053B Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=kH4XByKr DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683915463; x=1715451463; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ye9jusbayFAN6BeKWnMrN/yfoHmOtz2V7Wbp+pSA61A=; b=kH4XByKrpjriIseJloPleBlo0mJN8QQ4BWab8e31VCzGfMZ57VNFqkbP VNGN60sRu0fv54PGY+VlXDjnaJ0Xu6nphIpG9v3mk2pn9ZJZjH3haIAcD tvB/EpbSxxmVznttErHswC8YBHbyHUS8nbGmu5lUGa2+VEhrXEE5NHK8E NLekUbi91euYVwAcwx3lvGYw8PonP+tapXkxVGRMJlhpic0FK4LOvbt4h i7iPE05mBauCVNtBOh4lO3L/dSlc3q7ZdLuWObk02ky7ESgWyDm8sCyHp mb5hCGhd6rEUbt1j2jt3C5yup/ao7cPBiF/W/5TVh/GDa4rWDQlyCp2lt Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10708"; a="331223222" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="331223222" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2023 11:17:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10708"; a="769895088" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="769895088" Received: from winkelru-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.144.249]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2023 11:17:19 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Cc: tiwai@suse.de, broonie@kernel.org, vkoul@kernel.org, Pierre-Louis Bossart , =?utf-8?q?P?= =?utf-8?q?=C3=A9ter_Ujfalusi?= , Rander Wang , Bard Liao Subject: [PATCH 6/9] ASoC: SOF: Intel: hda-dai: move hda_dai_prepare() code Date: Fri, 12 May 2023 13:16:59 -0500 Message-Id: <20230512181702.117483-7-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230512181702.117483-1-pierre-louis.bossart@linux.intel.com> References: <20230512181702.117483-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: WH4SICZNRCHFOHXGRD3QBT7TY3LXE2VY X-Message-ID-Hash: WH4SICZNRCHFOHXGRD3QBT7TY3LXE2VY X-MailFrom: pierre-louis.bossart@linux.intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Before we change the Kconfig support, move code around. No functionality change with this commit in isolation. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Reviewed-by: Bard Liao --- sound/soc/sof/intel/hda-dai.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sound/soc/sof/intel/hda-dai.c b/sound/soc/sof/intel/hda-dai.c index 7e71cce7f531..cdd842288811 100644 --- a/sound/soc/sof/intel/hda-dai.c +++ b/sound/soc/sof/intel/hda-dai.c @@ -259,14 +259,6 @@ static int hda_dai_hw_params(struct snd_pcm_substream *substream, return hda_dai_config(w, flags, &data); } -static int hda_dai_prepare(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) -{ - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); - int stream = substream->stream; - - return hda_dai_hw_params(substream, &rtd->dpcm[stream].hw_params, dai); -} - /* * In contrast to IPC3, the dai trigger in IPC4 mixes pipeline state changes * (over IPC channel) and DMA state change (direct host register changes). @@ -325,6 +317,14 @@ static int hda_dai_trigger(struct snd_pcm_substream *substream, int cmd, struct return 0; } +static int hda_dai_prepare(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) +{ + struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); + int stream = substream->stream; + + return hda_dai_hw_params(substream, &rtd->dpcm[stream].hw_params, dai); +} + static const struct snd_soc_dai_ops hda_dai_ops = { .hw_params = hda_dai_hw_params, .hw_free = hda_dai_hw_free,