From patchwork Thu Mar 10 04:27:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ranjani Sridharan X-Patchwork-Id: 550158 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 BFB73C433EF for ; Thu, 10 Mar 2022 04:29:13 +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 BE14C173B; Thu, 10 Mar 2022 05:28:21 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BE14C173B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1646886551; bh=0diQQ9gkswuCJ+kcMI+Tzgu6ZpIe60c5jyJoLPE9nDw=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=IfhaS2HGKTK0YhW/48QKDjE3R4/oTgM4RuPXxnoD5kbCFpbP8EFNoSfKwwKCJuiDx 6V3oixTSGvavP+GUSofryzLpsX5Y0pUyrN/WCALoNAsPWfIxDa7ERP8+Mb5RUZcETU yjEvRSor65nFF/r+quNPLhX/ON6RTTV6268jANJw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 4BC2CF804CA; Thu, 10 Mar 2022 05:27:50 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9DAA6F80517; Thu, 10 Mar 2022 05:27:48 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 17CD2F800FD for ; Thu, 10 Mar 2022 05:27:41 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 17CD2F800FD Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="hFFYf++q" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646886463; x=1678422463; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0diQQ9gkswuCJ+kcMI+Tzgu6ZpIe60c5jyJoLPE9nDw=; b=hFFYf++qdVjSLZ7k9e9/pLELkj/48f3bVN4ksYsNbzhqyhPvXYxw8vYT 6cbhePLzy/3q0rEl/ZimXFNj1QKV0m/qFCcN8s0laQfvgtzflEXc1GhUT hAbEar2WfcSy2iJRBHKrILedCryzm0Xxm81qLqQmdJFkSl9oyNTqKhyjB bxjOIiyGt/CeoWqges2uLfaHzMo/gG8+TlEaXXjSc0zHhDPo9TY9yohMQ IjN4SRSuS+0sF/XcY10lScWlbNdvgmvYRr9SYB+IMN+/T5t2DJ6SyUCOV rOeNztoXWeoK5Eh0e69vV2MhthgI2ClqIrcf5fhMKHiqIFtr2X3xAAe34 A==; X-IronPort-AV: E=McAfee;i="6200,9189,10281"; a="318380881" X-IronPort-AV: E=Sophos;i="5.90,169,1643702400"; d="scan'208";a="318380881" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2022 20:27:31 -0800 X-IronPort-AV: E=Sophos;i="5.90,169,1643702400"; d="scan'208";a="547884667" Received: from ttahmed-mobl2.amr.corp.intel.com (HELO rsridh2-mobl1.localdomain) ([10.254.50.225]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2022 20:27:31 -0800 From: Ranjani Sridharan To: alsa-devel@alsa-project.org Subject: [PATCH 01/10] ASoC: SOF: sof-priv: Remove stale snd_sof_ipc_stream_pcm_params() declaration Date: Wed, 9 Mar 2022 20:27:11 -0800 Message-Id: <20220310042720.976809-2-ranjani.sridharan@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220310042720.976809-1-ranjani.sridharan@linux.intel.com> References: <20220310042720.976809-1-ranjani.sridharan@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, Peter Ujfalusi , Pierre-Louis Bossart , Rander Wang , broonie@kernel.org, Ranjani Sridharan , Daniel Baluta 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: Peter Ujfalusi The implementation for snd_sof_ipc_stream_pcm_params() does not exist, remove it from the header file. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Daniel Baluta Signed-off-by: Ranjani Sridharan --- sound/soc/sof/sof-priv.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/sound/soc/sof/sof-priv.h b/sound/soc/sof/sof-priv.h index 2e19ac619ad5..2cff62e75f1e 100644 --- a/sound/soc/sof/sof-priv.h +++ b/sound/soc/sof/sof-priv.h @@ -520,8 +520,6 @@ void snd_sof_ipc_free(struct snd_sof_dev *sdev); void snd_sof_ipc_get_reply(struct snd_sof_dev *sdev); void snd_sof_ipc_reply(struct snd_sof_dev *sdev, u32 msg_id); void snd_sof_ipc_msgs_rx(struct snd_sof_dev *sdev); -int snd_sof_ipc_stream_pcm_params(struct snd_sof_dev *sdev, - struct sof_ipc_pcm_params *params); int snd_sof_ipc_valid(struct snd_sof_dev *sdev); int sof_ipc_tx_message(struct snd_sof_ipc *ipc, u32 header, void *msg_data, size_t msg_bytes, void *reply_data, From patchwork Thu Mar 10 04:27:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ranjani Sridharan X-Patchwork-Id: 550536 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 4F1C1C433F5 for ; Thu, 10 Mar 2022 04:29:30 +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 8EE661723; Thu, 10 Mar 2022 05:28:38 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8EE661723 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1646886568; bh=QuUK9doqQlifKJaxhMiRiajklEKEGpEGdfsE0aB3svE=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=jjXV1w6opJIM5QXCuuT4ajGL5vjC4ybBNPqq0e7n3JvhNaAWKN8mQzg4jC1871PSd UHxG9Y02w7JPumMw8MNAMsuZKr29003W57YzUuvITRgRe65KCuyPvimazXH36PUMn5 9hQCxoq45+TpQxUTRQyYT+tgWJdT/kcAm6wVAmNE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 91805F8013C; Thu, 10 Mar 2022 05:27:54 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B93BFF8012C; Thu, 10 Mar 2022 05:27:50 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 12888F8012C for ; Thu, 10 Mar 2022 05:27:43 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 12888F8012C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="SHXJ20xM" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646886465; x=1678422465; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QuUK9doqQlifKJaxhMiRiajklEKEGpEGdfsE0aB3svE=; b=SHXJ20xMqkEjCwqUpe8bA79Z0jluNGlOzmSQlswaY9ZtKGuEEjRDVgGd ddQekwuhLxQYWC5vdIniJsI9MrRdZ2BMuwEShqv25bDcHS8ZbIYChc4Iq Zcv7ZD3kDr+uMbgD4CJ1qite/tdxwEJl5WtpkbHt05pflNT2HHJVdGyKC 5OHWVurZacAD51GPKWPP6+xjJz760jziML5qGEPxduLsfKGtjzZF1+lv2 GJCtNgGiW1nQ8C4e7rUSas4U2ZtqMb75WH23st+CLLL0EkMmNB8jnb/La mOHu4lfSbKBLjXlXkdl6PxIHWNeDNu/aqrxxf5Htg0BuIJZ34B2SAQ1IP g==; X-IronPort-AV: E=McAfee;i="6200,9189,10281"; a="318380883" X-IronPort-AV: E=Sophos;i="5.90,169,1643702400"; d="scan'208";a="318380883" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2022 20:27:31 -0800 X-IronPort-AV: E=Sophos;i="5.90,169,1643702400"; d="scan'208";a="547884670" Received: from ttahmed-mobl2.amr.corp.intel.com (HELO rsridh2-mobl1.localdomain) ([10.254.50.225]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2022 20:27:31 -0800 From: Ranjani Sridharan To: alsa-devel@alsa-project.org Subject: [PATCH 02/10] ASoC: SOF: Make pcm_hw_params snd_sof_dsp_ops callback IPC neutral Date: Wed, 9 Mar 2022 20:27:12 -0800 Message-Id: <20220310042720.976809-3-ranjani.sridharan@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220310042720.976809-1-ranjani.sridharan@linux.intel.com> References: <20220310042720.976809-1-ranjani.sridharan@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, Peter Ujfalusi , Pierre-Louis Bossart , Rander Wang , broonie@kernel.org, Ranjani Sridharan , Daniel Baluta 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: Peter Ujfalusi Do not send IPC structure directly via pcm_hw_params to make it IPC agnostic. A new struct is created to retrieve the needed platform parameters and if there is a need it can be extended with new options. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Daniel Baluta Signed-off-by: Ranjani Sridharan --- sound/soc/sof/amd/acp-pcm.c | 8 +++++--- sound/soc/sof/amd/acp.h | 3 ++- sound/soc/sof/intel/hda-pcm.c | 18 ++++-------------- sound/soc/sof/intel/hda.h | 2 +- sound/soc/sof/ops.h | 6 +++--- sound/soc/sof/pcm.c | 21 ++++++++++++++++++++- sound/soc/sof/sof-priv.h | 17 ++++++++++++++++- 7 files changed, 51 insertions(+), 24 deletions(-) diff --git a/sound/soc/sof/amd/acp-pcm.c b/sound/soc/sof/amd/acp-pcm.c index b49cc55980ae..0ba8ae46bd76 100644 --- a/sound/soc/sof/amd/acp-pcm.c +++ b/sound/soc/sof/amd/acp-pcm.c @@ -17,7 +17,8 @@ #include "acp-dsp-offset.h" int acp_pcm_hw_params(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream, - struct snd_pcm_hw_params *params, struct sof_ipc_stream_params *ipc_params) + struct snd_pcm_hw_params *params, + struct snd_sof_platform_stream_params *platform_params) { struct snd_pcm_runtime *runtime = substream->runtime; struct acp_dsp_stream *stream = runtime->private_data; @@ -35,8 +36,9 @@ int acp_pcm_hw_params(struct snd_sof_dev *sdev, struct snd_pcm_substream *substr return ret; } - ipc_params->buffer.phy_addr = stream->reg_offset; - ipc_params->stream_tag = stream->stream_tag; + platform_params->use_phy_address = true; + platform_params->phy_addr = stream->reg_offset; + platform_params->stream_tag = stream->stream_tag; /* write buffer size of stream in scratch memory */ diff --git a/sound/soc/sof/amd/acp.h b/sound/soc/sof/amd/acp.h index f550a5010a91..35e46fe6676a 100644 --- a/sound/soc/sof/amd/acp.h +++ b/sound/soc/sof/amd/acp.h @@ -201,7 +201,8 @@ int acp_dsp_stream_put(struct snd_sof_dev *sdev, struct acp_dsp_stream *acp_stre int acp_pcm_open(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream); int acp_pcm_close(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream); int acp_pcm_hw_params(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream, - struct snd_pcm_hw_params *params, struct sof_ipc_stream_params *ipc_params); + struct snd_pcm_hw_params *params, + struct snd_sof_platform_stream_params *platform_params); extern const struct snd_sof_dsp_ops sof_renoir_ops; diff --git a/sound/soc/sof/intel/hda-pcm.c b/sound/soc/sof/intel/hda-pcm.c index eec83ca557a1..7991407d5508 100644 --- a/sound/soc/sof/intel/hda-pcm.c +++ b/sound/soc/sof/intel/hda-pcm.c @@ -93,13 +93,12 @@ u32 hda_dsp_get_bits(struct snd_sof_dev *sdev, int sample_bits) int hda_dsp_pcm_hw_params(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, - struct sof_ipc_stream_params *ipc_params) + struct snd_sof_platform_stream_params *platform_params) { struct hdac_stream *hstream = substream->runtime->private_data; struct hdac_ext_stream *hext_stream = stream_to_hdac_ext_stream(hstream); struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata; struct snd_dma_buffer *dmab; - struct sof_ipc_fw_version *v = &sdev->fw_ready.version; int ret; u32 size, rate, bits; @@ -130,19 +129,10 @@ int hda_dsp_pcm_hw_params(struct snd_sof_dev *sdev, else hda_dsp_stream_spib_config(sdev, hext_stream, HDA_DSP_SPIB_DISABLE, 0); - /* update no_stream_position flag for ipc params */ - if (hda && hda->no_ipc_position) { - /* For older ABIs set host_period_bytes to zero to inform - * FW we don't want position updates. Newer versions use - * no_stream_position for this purpose. - */ - if (v->abi_version < SOF_ABI_VER(3, 10, 0)) - ipc_params->host_period_bytes = 0; - else - ipc_params->no_stream_position = 1; - } + if (hda) + platform_params->no_ipc_position = hda->no_ipc_position; - ipc_params->stream_tag = hstream->stream_tag; + platform_params->stream_tag = hstream->stream_tag; return 0; } diff --git a/sound/soc/sof/intel/hda.h b/sound/soc/sof/intel/hda.h index 21e34580a403..46641d31e9c5 100644 --- a/sound/soc/sof/intel/hda.h +++ b/sound/soc/sof/intel/hda.h @@ -524,7 +524,7 @@ int hda_dsp_pcm_close(struct snd_sof_dev *sdev, int hda_dsp_pcm_hw_params(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, - struct sof_ipc_stream_params *ipc_params); + struct snd_sof_platform_stream_params *platform_params); int hda_dsp_stream_hw_free(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream); int hda_dsp_pcm_trigger(struct snd_sof_dev *sdev, diff --git a/sound/soc/sof/ops.h b/sound/soc/sof/ops.h index 999a36208b11..98fa91f5927d 100644 --- a/sound/soc/sof/ops.h +++ b/sound/soc/sof/ops.h @@ -420,11 +420,11 @@ static inline int snd_sof_pcm_platform_hw_params(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, - struct sof_ipc_stream_params *ipc_params) + struct snd_sof_platform_stream_params *platform_params) { if (sof_ops(sdev) && sof_ops(sdev)->pcm_hw_params) - return sof_ops(sdev)->pcm_hw_params(sdev, substream, - params, ipc_params); + return sof_ops(sdev)->pcm_hw_params(sdev, substream, params, + platform_params); return 0; } diff --git a/sound/soc/sof/pcm.c b/sound/soc/sof/pcm.c index 1d04f75e6d32..d952ea8ccd12 100644 --- a/sound/soc/sof/pcm.c +++ b/sound/soc/sof/pcm.c @@ -162,6 +162,8 @@ static int sof_pcm_hw_params(struct snd_soc_component *component, struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(component); + struct snd_sof_platform_stream_params platform_params = { 0 }; + struct sof_ipc_fw_version *v = &sdev->fw_ready.version; struct snd_sof_pcm *spcm; struct sof_ipc_pcm_params pcm; struct sof_ipc_pcm_params_reply ipc_params_reply; @@ -242,12 +244,29 @@ static int sof_pcm_hw_params(struct snd_soc_component *component, ret = snd_sof_pcm_platform_hw_params(sdev, substream, params, - &pcm.params); + &platform_params); if (ret < 0) { dev_err(component->dev, "error: platform hw params failed\n"); return ret; } + /* Update the IPC message with information from the platform */ + pcm.params.stream_tag = platform_params.stream_tag; + + if (platform_params.use_phy_address) + pcm.params.buffer.phy_addr = platform_params.phy_addr; + + if (platform_params.no_ipc_position) { + /* For older ABIs set host_period_bytes to zero to inform + * FW we don't want position updates. Newer versions use + * no_stream_position for this purpose. + */ + if (v->abi_version < SOF_ABI_VER(3, 10, 0)) + pcm.params.host_period_bytes = 0; + else + pcm.params.no_stream_position = 1; + } + dev_dbg(component->dev, "stream_tag %d", pcm.params.stream_tag); /* if this is a repeated hw_params without hw_free, skip setting up widgets */ diff --git a/sound/soc/sof/sof-priv.h b/sound/soc/sof/sof-priv.h index 2cff62e75f1e..3c50defcfb25 100644 --- a/sound/soc/sof/sof-priv.h +++ b/sound/soc/sof/sof-priv.h @@ -105,6 +105,21 @@ struct snd_soc_tplg_ops; struct snd_soc_component; struct snd_sof_pdata; +/** + * struct snd_sof_platform_stream_params - platform dependent stream parameters + * @stream_tag: Stream tag to use + * @use_phy_addr: Use the provided @phy_addr for configuration + * @phy_addr: Platform dependent address to be used, if @use_phy_addr + * is true + * @no_ipc_position: Disable position update IPC from firmware + */ +struct snd_sof_platform_stream_params { + u16 stream_tag; + bool use_phy_address; + u32 phy_addr; + bool no_ipc_position; +}; + /* * SOF DSP HW abstraction operations. * Used to abstract DSP HW architecture and any IO busses between host CPU @@ -183,7 +198,7 @@ struct snd_sof_dsp_ops { int (*pcm_hw_params)(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, - struct sof_ipc_stream_params *ipc_params); /* optional */ + struct snd_sof_platform_stream_params *platform_params); /* optional */ /* host stream hw_free */ int (*pcm_hw_free)(struct snd_sof_dev *sdev, From patchwork Thu Mar 10 04:27:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ranjani Sridharan X-Patchwork-Id: 550535 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 E15C5C433EF for ; Thu, 10 Mar 2022 04:30:04 +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 2FA4D1753; Thu, 10 Mar 2022 05:29:13 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2FA4D1753 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1646886603; bh=sGuKLGEnlhUeu/ZDoTWrMX/BpPNizb7za9JQMXG4NhE=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=oewMFeTVwAMy4Ufz/fjQJOm/T0oMqe2i1T5FY5aQZhQ0gSA3BjcGfckUJa1JwFRrp CsY1b56D6x/VDzl8VZw2BfCHwygrHIhWNVGf72XWaBqQVmsdWzAgwLqtuBAYINS38T WP6tUpFHiW9k5CtpcOoGhPyJewZebXBhI12FBiLs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A282BF8051D; Thu, 10 Mar 2022 05:27:56 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 20B82F8051B; Thu, 10 Mar 2022 05:27:54 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 29DB0F8013C for ; Thu, 10 Mar 2022 05:27:43 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 29DB0F8013C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="n4/R7XiU" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646886466; x=1678422466; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=sGuKLGEnlhUeu/ZDoTWrMX/BpPNizb7za9JQMXG4NhE=; b=n4/R7XiURFyGZfFHelfGTtAFdDPIgZZYUD7QC3apmHV3VgCA2jyo8ywn 1E6ThNdM9pw+KjHAf+i05yY6Ms/OWHyDlhVqlMzFxMae73ex/pypCa/k+ BXhkZIoOgUu4pz3wv50eTwQ+Ld6ks47fAkvVPlDOnzs7owO/2ubLd+3Kj 2GxyWuOtnBlrRLMgsW4MNcDu2kc6AQbMIVc34bFCsb28IG3rjn4gjqqz9 e6D8PHlmgflZ74KxnPnUHHDLN8GOQcb4lPbamDUUWYyEH2dDnbm60uEGq E8SlunOCSy4yOnkb1xGmwd3j+uxjTmLoFwQdhHdwrEbhdq1oOK9nXz9ET Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10281"; a="318380885" X-IronPort-AV: E=Sophos;i="5.90,169,1643702400"; d="scan'208";a="318380885" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2022 20:27:32 -0800 X-IronPort-AV: E=Sophos;i="5.90,169,1643702400"; d="scan'208";a="547884673" Received: from ttahmed-mobl2.amr.corp.intel.com (HELO rsridh2-mobl1.localdomain) ([10.254.50.225]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2022 20:27:31 -0800 From: Ranjani Sridharan To: alsa-devel@alsa-project.org Subject: [PATCH 03/10] ASoC: SOF: pcm: Remove sof_pcm_dsp_params() wrapper Date: Wed, 9 Mar 2022 20:27:13 -0800 Message-Id: <20220310042720.976809-4-ranjani.sridharan@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220310042720.976809-1-ranjani.sridharan@linux.intel.com> References: <20220310042720.976809-1-ranjani.sridharan@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, Peter Ujfalusi , Pierre-Louis Bossart , Rander Wang , broonie@kernel.org, Ranjani Sridharan , Daniel Baluta 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: Peter Ujfalusi Call directly for snd_sof_ipc_pcm_params() from sof_pcm_hw_params() and remove the wrapper for it. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Daniel Baluta Signed-off-by: Ranjani Sridharan --- sound/soc/sof/pcm.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/sound/soc/sof/pcm.c b/sound/soc/sof/pcm.c index d952ea8ccd12..93989a77873a 100644 --- a/sound/soc/sof/pcm.c +++ b/sound/soc/sof/pcm.c @@ -36,22 +36,6 @@ static int create_page_table(struct snd_soc_component *component, spcm->stream[stream].page_table.area, size); } -static int sof_pcm_dsp_params(struct snd_sof_pcm *spcm, struct snd_pcm_substream *substream, - const struct sof_ipc_pcm_params_reply *reply) -{ - struct snd_soc_component *scomp = spcm->scomp; - struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp); - - /* validate offset */ - int ret = snd_sof_ipc_pcm_params(sdev, substream, reply); - - if (ret < 0) - dev_err(scomp->dev, "error: got wrong reply for PCM %d\n", - spcm->pcm.pcm_id); - - return ret; -} - /* * sof pcm period elapse work */ @@ -285,9 +269,12 @@ static int sof_pcm_hw_params(struct snd_soc_component *component, return ret; } - ret = sof_pcm_dsp_params(spcm, substream, &ipc_params_reply); - if (ret < 0) + ret = snd_sof_ipc_pcm_params(sdev, substream, &ipc_params_reply); + if (ret < 0) { + dev_err(component->dev, "%s: got wrong reply for PCM %d\n", + __func__, spcm->pcm.pcm_id); return ret; + } spcm->prepared[substream->stream] = true; From patchwork Thu Mar 10 04:27:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ranjani Sridharan X-Patchwork-Id: 550157 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 82CD5C433F5 for ; Thu, 10 Mar 2022 04:29: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 C3BF516FD; Thu, 10 Mar 2022 05:28:55 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C3BF516FD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1646886585; bh=1iRPoXf5x2Di7zV/Jh4ft5+ROpXXG4SQf/grKiwLFEA=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Skx4Ce624x1TSZk65QUS/9L/VZZc6NSV+8xUq4tgKncBPCKGTgK0J67fW/ovWm7rf Gc5ZmPFohm+p05a9/2L8jf1p2GzW0tgBbI74uML9viAoQok/fvuJp18CHhg9qfoq7a qvb0ij29MoU98THKoS5HUiJ5rvH4MypTniOEZvTA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id DCA65F8051B; Thu, 10 Mar 2022 05:27:55 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 26FFAF8051C; Thu, 10 Mar 2022 05:27:53 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 9537EF80515 for ; Thu, 10 Mar 2022 05:27:45 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9537EF80515 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="fp5F6Nhl" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646886468; x=1678422468; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1iRPoXf5x2Di7zV/Jh4ft5+ROpXXG4SQf/grKiwLFEA=; b=fp5F6Nhlz//ObhSCBjyYagtfyiZ06fI0JdQUc7EJz4NTkQeIUZ1JMD1F wcjCOf1PWL5M9bmZFVoT41PnsxHpWmM5nhBSyYlOq6F2Q+06tdKA65tx7 nvTlF3DbQ+D5JSDe4mojCtHXi+R/F9B3MXPjUBVW+0Q0kfFo0N737jmWH I4dH9zOZw7mzuU2iGPYkYKqgHJKbvw+1QqMCw7/FILajU7+4uwYzX5per qX3KUf53rcvPfAo4Yv1ISN1yWnxgVTgRb8u2AmXFs+3K7y13X4KVWj4Gg Tu555Zbu+6AbqXGTJogQPxdQ2jJVJiHsI+kRe3/VEK8SePpwXqDe6SzLx g==; X-IronPort-AV: E=McAfee;i="6200,9189,10281"; a="318380887" X-IronPort-AV: E=Sophos;i="5.90,169,1643702400"; d="scan'208";a="318380887" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2022 20:27:32 -0800 X-IronPort-AV: E=Sophos;i="5.90,169,1643702400"; d="scan'208";a="547884676" Received: from ttahmed-mobl2.amr.corp.intel.com (HELO rsridh2-mobl1.localdomain) ([10.254.50.225]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2022 20:27:31 -0800 From: Ranjani Sridharan To: alsa-devel@alsa-project.org Subject: [PATCH 04/10] ASoC: SOF: Introduce optional callback to configure stream data offset Date: Wed, 9 Mar 2022 20:27:14 -0800 Message-Id: <20220310042720.976809-5-ranjani.sridharan@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220310042720.976809-1-ranjani.sridharan@linux.intel.com> References: <20220310042720.976809-1-ranjani.sridharan@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, Peter Ujfalusi , Pierre-Louis Bossart , Rander Wang , broonie@kernel.org, Ranjani Sridharan , Daniel Baluta 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: Peter Ujfalusi Each running audio stream's data have distinct start offset within the stream mailbox area from/to where the host can read/write. Instead of using the struct sof_ipc_pcm_params_reply to configure this offset, add an optional callback which is IPC agnostic. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Daniel Baluta Signed-off-by: Ranjani Sridharan --- sound/soc/sof/ops.h | 13 +++++++++++++ sound/soc/sof/pcm.c | 8 ++++++++ sound/soc/sof/sof-priv.h | 5 +++++ 3 files changed, 26 insertions(+) diff --git a/sound/soc/sof/ops.h b/sound/soc/sof/ops.h index 98fa91f5927d..f21d4a7ac261 100644 --- a/sound/soc/sof/ops.h +++ b/sound/soc/sof/ops.h @@ -476,6 +476,19 @@ snd_sof_ipc_pcm_params(struct snd_sof_dev *sdev, return sof_ops(sdev)->ipc_pcm_params(sdev, substream, reply); } +/* host side configuration of the stream's data offset in stream mailbox area */ +static inline int +snd_sof_set_stream_data_offset(struct snd_sof_dev *sdev, + struct snd_pcm_substream *substream, + size_t posn_offset) +{ + if (sof_ops(sdev) && sof_ops(sdev)->set_stream_data_offset) + return sof_ops(sdev)->set_stream_data_offset(sdev, substream, + posn_offset); + + return 0; +} + /* host stream pointer */ static inline snd_pcm_uframes_t snd_sof_pcm_platform_pointer(struct snd_sof_dev *sdev, diff --git a/sound/soc/sof/pcm.c b/sound/soc/sof/pcm.c index 93989a77873a..af8c367cd55c 100644 --- a/sound/soc/sof/pcm.c +++ b/sound/soc/sof/pcm.c @@ -276,6 +276,14 @@ static int sof_pcm_hw_params(struct snd_soc_component *component, return ret; } + ret = snd_sof_set_stream_data_offset(sdev, substream, + ipc_params_reply.posn_offset); + if (ret < 0) { + dev_err(component->dev, "%s: invalid stream data offset for PCM %d\n", + __func__, spcm->pcm.pcm_id); + return ret; + } + spcm->prepared[substream->stream] = true; /* save pcm hw_params */ diff --git a/sound/soc/sof/sof-priv.h b/sound/soc/sof/sof-priv.h index 3c50defcfb25..3a2804c82bae 100644 --- a/sound/soc/sof/sof-priv.h +++ b/sound/soc/sof/sof-priv.h @@ -226,6 +226,11 @@ struct snd_sof_dsp_ops { struct snd_pcm_substream *substream, const struct sof_ipc_pcm_params_reply *reply); /* mandatory */ + /* host side configuration of the stream's data offset in stream mailbox area */ + int (*set_stream_data_offset)(struct snd_sof_dev *sdev, + struct snd_pcm_substream *substream, + size_t posn_offset); /* optional */ + /* pre/post firmware run */ int (*pre_fw_run)(struct snd_sof_dev *sof_dev); /* optional */ int (*post_fw_run)(struct snd_sof_dev *sof_dev); /* optional */ From patchwork Thu Mar 10 04:27:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ranjani Sridharan X-Patchwork-Id: 550534 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 7945BC433EF for ; Thu, 10 Mar 2022 04:30:39 +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 B3ECB16F3; Thu, 10 Mar 2022 05:29:47 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B3ECB16F3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1646886637; bh=vqxJCGfKK1aFARKmjRI10bWwmKTRKUy5GX+L15uh40Y=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=KCTSGVWYm8OSxH4AjX9Ik8tGmgdGnLruyRefFYufFENlhFMilxQrItC0Q21QEF4uZ DyUtVa60G+HBOrr9u3pneBLpvYhydAsyiLxWDxEDJv7sjC7/x/XECACHYlvApCL6ts uCd8XcR9zGlrp6a5IA6TdsqR6ZLPIrBNjP61GAyY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id BDF2EF80516; Thu, 10 Mar 2022 05:28:03 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id EDD7DF8051B; Thu, 10 Mar 2022 05:27:54 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 0DC24F8015B for ; Thu, 10 Mar 2022 05:27:45 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0DC24F8015B Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="GpYft+j/" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646886467; x=1678422467; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vqxJCGfKK1aFARKmjRI10bWwmKTRKUy5GX+L15uh40Y=; b=GpYft+j/eSld9UqoX0WZ/ArOxd8Mm1fvd3p5sfC3Ke7k4HxlURpTNPIX cTNMlXrWoYPmfa83ZtmRH+Pvhb6xd9cEhI5x8HdptBaARtfX4s4KoJNW5 C8NeQT45PZIKL8/qFnkJfHvqz+rE10V4OdNSKMdJUm8lj9wJnKZBXs9ST 0oqQuSwMznX1CL6BMiB+IjldUOpU9dgsSs5x5GwtnhUi6SWa1Bnzyc8Ks EWVOy1Z4zRqU6Fzz3nSXLJjGflJH1Pugbru4IAeeP8Lt0l2pn7XaqmTgG zvUBRJa/BjhZ42eJgtOplRq81qDB1A9d9PdvveLpETNWGVQgLmiRdxEJq Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10281"; a="318380889" X-IronPort-AV: E=Sophos;i="5.90,169,1643702400"; d="scan'208";a="318380889" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2022 20:27:32 -0800 X-IronPort-AV: E=Sophos;i="5.90,169,1643702400"; d="scan'208";a="547884681" Received: from ttahmed-mobl2.amr.corp.intel.com (HELO rsridh2-mobl1.localdomain) ([10.254.50.225]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2022 20:27:32 -0800 From: Ranjani Sridharan To: alsa-devel@alsa-project.org Subject: [PATCH 05/10] ASoC: SOF: Mark snd_sof_dsp_ops.ipc_pcm_params() callback optional Date: Wed, 9 Mar 2022 20:27:15 -0800 Message-Id: <20220310042720.976809-6-ranjani.sridharan@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220310042720.976809-1-ranjani.sridharan@linux.intel.com> References: <20220310042720.976809-1-ranjani.sridharan@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, Peter Ujfalusi , Pierre-Louis Bossart , Rander Wang , broonie@kernel.org, Ranjani Sridharan , Daniel Baluta 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: Peter Ujfalusi AMD is only implementing an empty function to pass the required test and it is going to be deprecated in favor of the IPC agnostic set_stream_data_offset() callback. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Daniel Baluta Signed-off-by: Ranjani Sridharan --- sound/soc/sof/core.c | 3 +-- sound/soc/sof/ops.h | 5 ++++- sound/soc/sof/sof-priv.h | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/sof/core.c b/sound/soc/sof/core.c index 95a845d26f6e..9217644e2eab 100644 --- a/sound/soc/sof/core.c +++ b/sound/soc/sof/core.c @@ -361,8 +361,7 @@ int snd_sof_device_probe(struct device *dev, struct snd_sof_pdata *plat_data) if (!sof_ops(sdev) || !sof_ops(sdev)->probe || !sof_ops(sdev)->run || !sof_ops(sdev)->block_read || !sof_ops(sdev)->block_write || !sof_ops(sdev)->send_msg || !sof_ops(sdev)->load_firmware || - !sof_ops(sdev)->ipc_msg_data || !sof_ops(sdev)->ipc_pcm_params || - !sof_ops(sdev)->fw_ready) { + !sof_ops(sdev)->ipc_msg_data || !sof_ops(sdev)->fw_ready) { dev_err(dev, "error: missing mandatory ops\n"); return -EINVAL; } diff --git a/sound/soc/sof/ops.h b/sound/soc/sof/ops.h index f21d4a7ac261..aeea73efcb2f 100644 --- a/sound/soc/sof/ops.h +++ b/sound/soc/sof/ops.h @@ -473,7 +473,10 @@ snd_sof_ipc_pcm_params(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream, const struct sof_ipc_pcm_params_reply *reply) { - return sof_ops(sdev)->ipc_pcm_params(sdev, substream, reply); + if (sof_ops(sdev) && sof_ops(sdev)->ipc_pcm_params) + return sof_ops(sdev)->ipc_pcm_params(sdev, substream, reply); + + return 0; } /* host side configuration of the stream's data offset in stream mailbox area */ diff --git a/sound/soc/sof/sof-priv.h b/sound/soc/sof/sof-priv.h index 3a2804c82bae..2791d25f7ac3 100644 --- a/sound/soc/sof/sof-priv.h +++ b/sound/soc/sof/sof-priv.h @@ -224,7 +224,7 @@ struct snd_sof_dsp_ops { /* host configure DSP HW parameters */ int (*ipc_pcm_params)(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream, - const struct sof_ipc_pcm_params_reply *reply); /* mandatory */ + const struct sof_ipc_pcm_params_reply *reply); /* optional */ /* host side configuration of the stream's data offset in stream mailbox area */ int (*set_stream_data_offset)(struct snd_sof_dev *sdev, From patchwork Thu Mar 10 04:27:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ranjani Sridharan X-Patchwork-Id: 550156 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 2E09FC433F5 for ; Thu, 10 Mar 2022 04:30:24 +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 8281E17DE; Thu, 10 Mar 2022 05:29:31 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8281E17DE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1646886622; bh=7QBiyqzjIivBGSxyLTX8Sy7Um8n0/kj3Eb9Rbn/aaA0=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=qYBz3ZP5ZMScIVFTNJuutfsa4m21NXkp9YUunxY8FG8sSu45oDAmRC7oEDf6KhVlH 5lTZEBFiCY2RgLyBoAumZmTi9rupt/2YBcSZCScj4T1BT8sGGAiUQesSYW2VytOmg4 FMzGFnnLDGO5hZrrxWgY7f0nRMcmUoiuP2szMLiU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 11D43F80519; Thu, 10 Mar 2022 05:28:01 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B7C3CF8051D; Thu, 10 Mar 2022 05:27:54 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 75D29F80425 for ; Thu, 10 Mar 2022 05:27:47 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 75D29F80425 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="nkhNXFTa" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646886468; x=1678422468; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7QBiyqzjIivBGSxyLTX8Sy7Um8n0/kj3Eb9Rbn/aaA0=; b=nkhNXFTalj2xvZkcRbJuEeVWxU8kWU9hOMwpqvgG/pJQmEfg7lNj6VdJ aCyDx6IXZ2dw/DHjbmgV5PwOtHH4q1RmCD/zRtO04Rgm8419k5Pmmltvm 2qtPj5LOyoK5sCH+qXaRHfHxcp9qHIKtKueLtdOV9ZrQsDvK0XQEZY5my mezeIHTGMVhOV0zDs0c9rFbFALo2Dg+uTGIduoQH5mDQMBMFmwxbnNeoP f4Esii1slSxFxci+0MdQtTAQKcw97CllOaybGP125ptogySrY/xQliiNe +LNkyO0Gk4vfajuINjKSIFJrN4Tf78F+lZ1RDXkKw5Zk52q78Id3TQ2Zr Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10281"; a="318380891" X-IronPort-AV: E=Sophos;i="5.90,169,1643702400"; d="scan'208";a="318380891" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2022 20:27:32 -0800 X-IronPort-AV: E=Sophos;i="5.90,169,1643702400"; d="scan'208";a="547884685" Received: from ttahmed-mobl2.amr.corp.intel.com (HELO rsridh2-mobl1.localdomain) ([10.254.50.225]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2022 20:27:32 -0800 From: Ranjani Sridharan To: alsa-devel@alsa-project.org Subject: [PATCH 06/10] ASoC: SOF: stream-ipc: Add sof_set_stream_data_offset() Date: Wed, 9 Mar 2022 20:27:16 -0800 Message-Id: <20220310042720.976809-7-ranjani.sridharan@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220310042720.976809-1-ranjani.sridharan@linux.intel.com> References: <20220310042720.976809-1-ranjani.sridharan@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, Peter Ujfalusi , Pierre-Louis Bossart , Rander Wang , broonie@kernel.org, Ranjani Sridharan , Daniel Baluta 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: Peter Ujfalusi Add implementation for the generic set_stream_data_offset() callback in core to be used by platforms. Convert the sof_ipc_pcm_params() to a wrapper for the new function. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Daniel Baluta Signed-off-by: Ranjani Sridharan --- sound/soc/sof/sof-priv.h | 3 +++ sound/soc/sof/stream-ipc.c | 15 +++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/sound/soc/sof/sof-priv.h b/sound/soc/sof/sof-priv.h index 2791d25f7ac3..49e4d87bd467 100644 --- a/sound/soc/sof/sof-priv.h +++ b/sound/soc/sof/sof-priv.h @@ -626,6 +626,9 @@ int sof_ipc_msg_data(struct snd_sof_dev *sdev, int sof_ipc_pcm_params(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream, const struct sof_ipc_pcm_params_reply *reply); +int sof_set_stream_data_offset(struct snd_sof_dev *sdev, + struct snd_pcm_substream *substream, + size_t posn_offset); int sof_stream_pcm_open(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream); diff --git a/sound/soc/sof/stream-ipc.c b/sound/soc/sof/stream-ipc.c index 15a55851faeb..b7b96b9f5279 100644 --- a/sound/soc/sof/stream-ipc.c +++ b/sound/soc/sof/stream-ipc.c @@ -45,12 +45,11 @@ int sof_ipc_msg_data(struct snd_sof_dev *sdev, } EXPORT_SYMBOL(sof_ipc_msg_data); -int sof_ipc_pcm_params(struct snd_sof_dev *sdev, - struct snd_pcm_substream *substream, - const struct sof_ipc_pcm_params_reply *reply) +int sof_set_stream_data_offset(struct snd_sof_dev *sdev, + struct snd_pcm_substream *substream, + size_t posn_offset) { struct sof_stream *stream = substream->runtime->private_data; - size_t posn_offset = reply->posn_offset; /* check if offset is overflow or it is not aligned */ if (posn_offset > sdev->stream_box.size || @@ -64,6 +63,14 @@ int sof_ipc_pcm_params(struct snd_sof_dev *sdev, return 0; } +EXPORT_SYMBOL(sof_set_stream_data_offset); + +int sof_ipc_pcm_params(struct snd_sof_dev *sdev, + struct snd_pcm_substream *substream, + const struct sof_ipc_pcm_params_reply *reply) +{ + return sof_set_stream_data_offset(sdev, substream, reply->posn_offset); +} EXPORT_SYMBOL(sof_ipc_pcm_params); int sof_stream_pcm_open(struct snd_sof_dev *sdev, From patchwork Thu Mar 10 04:27:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ranjani Sridharan X-Patchwork-Id: 550533 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 159FEC433F5 for ; Thu, 10 Mar 2022 04:31:15 +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 F239D17C5; Thu, 10 Mar 2022 05:30:22 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz F239D17C5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1646886673; bh=7OHrCJ0NJ0ZJTKjh3p8jbkOOXaaZSfn/roJlICXpeyo=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=CNQNCJ5emA/c1JGB6tfBb48puR5AnDUEHkKi9y51FalP3lN0+b8USeV5hO72wHB3n AaFwGSeWCdNscYB7SHXXYpjSfFXXmia/Bzz+BZdg/2Dh/ARLX6l3SLHMmQ5w8YdBsB jvAyW+/mDWREac28hswK0U1dyRBGmfkPVUXMxQyo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 8D497F80537; Thu, 10 Mar 2022 05:28:05 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 00EB6F80525; Thu, 10 Mar 2022 05:27:56 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 355E0F8012F for ; Thu, 10 Mar 2022 05:27:47 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 355E0F8012F Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="lk9XChS7" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646886469; x=1678422469; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7OHrCJ0NJ0ZJTKjh3p8jbkOOXaaZSfn/roJlICXpeyo=; b=lk9XChS7bboNHS9UiazSG74q8oknZh1OZLemOjLTNKXx6lQtfPhK0dpk Q2snN5erQfYn0h+/38kgKc/DuF68aS4hbnPZghSjtVEaRWIlNwMExQTYY xWgzDLfbO0Dyt+8FSMIukAKe3Z5Vn6CXQQ+UueRnV1d8L+/Q3/pWSG3UM BFuI3MNsVGtjdnk4tK6Rsr5AsJuUYCehSPzt3iYHltLMZmF9ZIQ54P2U/ gOtWfxf7+lcq/naFuRda8RoO9EhyQDyw8bhsNUeJJgqNywFRFKjy09ATx zi1s1Wifu4+ZEPV5T0PRKOgiwn1NtNupWaJKsO4KZRXLm+u5yIJjt9y3d w==; X-IronPort-AV: E=McAfee;i="6200,9189,10281"; a="318380895" X-IronPort-AV: E=Sophos;i="5.90,169,1643702400"; d="scan'208";a="318380895" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2022 20:27:32 -0800 X-IronPort-AV: E=Sophos;i="5.90,169,1643702400"; d="scan'208";a="547884689" Received: from ttahmed-mobl2.amr.corp.intel.com (HELO rsridh2-mobl1.localdomain) ([10.254.50.225]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2022 20:27:32 -0800 From: Ranjani Sridharan To: alsa-devel@alsa-project.org Subject: [PATCH 07/10] ASoC: SOF: Intel: hda-ipc: Add hda_set_stream_data_offset() Date: Wed, 9 Mar 2022 20:27:17 -0800 Message-Id: <20220310042720.976809-8-ranjani.sridharan@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220310042720.976809-1-ranjani.sridharan@linux.intel.com> References: <20220310042720.976809-1-ranjani.sridharan@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, Peter Ujfalusi , Pierre-Louis Bossart , Rander Wang , broonie@kernel.org, Ranjani Sridharan , Daniel Baluta 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: Peter Ujfalusi Add implementation for the generic set_stream_data_offset() callback to be used by HDA platforms. Convert the hda_ipc_pcm_params() to a wrapper for the new function. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Daniel Baluta Signed-off-by: Ranjani Sridharan --- sound/soc/sof/intel/hda-ipc.c | 15 ++++++++++----- sound/soc/sof/intel/hda.h | 3 +++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/sound/soc/sof/intel/hda-ipc.c b/sound/soc/sof/intel/hda-ipc.c index a8c452144168..317c3ab7e768 100644 --- a/sound/soc/sof/intel/hda-ipc.c +++ b/sound/soc/sof/intel/hda-ipc.c @@ -267,14 +267,12 @@ int hda_ipc_msg_data(struct snd_sof_dev *sdev, return 0; } -int hda_ipc_pcm_params(struct snd_sof_dev *sdev, - struct snd_pcm_substream *substream, - const struct sof_ipc_pcm_params_reply *reply) +int hda_set_stream_data_offset(struct snd_sof_dev *sdev, + struct snd_pcm_substream *substream, + size_t posn_offset) { struct hdac_stream *hstream = substream->runtime->private_data; struct sof_intel_hda_stream *hda_stream; - /* validate offset */ - size_t posn_offset = reply->posn_offset; hda_stream = container_of(hstream, struct sof_intel_hda_stream, hext_stream.hstream); @@ -291,3 +289,10 @@ int hda_ipc_pcm_params(struct snd_sof_dev *sdev, return 0; } + +int hda_ipc_pcm_params(struct snd_sof_dev *sdev, + struct snd_pcm_substream *substream, + const struct sof_ipc_pcm_params_reply *reply) +{ + return hda_set_stream_data_offset(sdev, substream, reply->posn_offset); +} diff --git a/sound/soc/sof/intel/hda.h b/sound/soc/sof/intel/hda.h index 46641d31e9c5..1e0a6d7bde17 100644 --- a/sound/soc/sof/intel/hda.h +++ b/sound/soc/sof/intel/hda.h @@ -569,6 +569,9 @@ int hda_ipc_msg_data(struct snd_sof_dev *sdev, int hda_ipc_pcm_params(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream, const struct sof_ipc_pcm_params_reply *reply); +int hda_set_stream_data_offset(struct snd_sof_dev *sdev, + struct snd_pcm_substream *substream, + size_t posn_offset); /* * DSP IPC Operations. From patchwork Thu Mar 10 04:27:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ranjani Sridharan X-Patchwork-Id: 550155 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 BC5ABC433EF for ; Thu, 10 Mar 2022 04:30:55 +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 D4AC017F2; Thu, 10 Mar 2022 05:30:03 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D4AC017F2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1646886653; bh=iNiQtCd/oPSic95w5KV0EuTTGxoqCn/PuC44oqX0LJk=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=mCWxQpvcrzg6vpx17Sa6Nt5C21GCDEq6/+9x6mgk2Am8SjdS6qUgUF5z8SOHaG91e i6WC2UIUt6VGqNgPwjc12Q+3wujDRKg9hlmlp2Uy6n3FZRX4NcfiEMDEetM1YTNWyP ZfZnObrUqlMFPKDzjQ0+544qkikVLX6cIi3ObokE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 91D5DF80536; Thu, 10 Mar 2022 05:28:04 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 74C9EF80520; Thu, 10 Mar 2022 05:27:56 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 7100FF80518 for ; Thu, 10 Mar 2022 05:27:49 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7100FF80518 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="PDRY3xe8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646886470; x=1678422470; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=iNiQtCd/oPSic95w5KV0EuTTGxoqCn/PuC44oqX0LJk=; b=PDRY3xe8XiLebOyo9FT9EWGB3zSi9oDyeTBiewKkpnJ8LPTNAxaIq3LA ss8uw4gvJM/AMqs+ewiIP8Uhd6IqYJaNz7uqR7eI8JcWoOi8fwYaoKQDT paajjH5yu1MvIlRxfXYfbYVSZs0b7wpNVOXxlOiaV3U9Z7oWSG2Hj/v6S vOrj71oXYyDheSakdQYPQPQ9MB5EO2aQhn7jFr+qF/9bO2eNpknmcGxBp Y+Y2Pp49vhO67eKjxOmLNnoXQZoup9p5mVAWc/jsIc1cD/trBoCMtY0ZN 8YSZu8ygjclFZbyFKTuYixnp+K8s9J4LaaQYtNaJ9G5aXRMCHQoS8nvUj w==; X-IronPort-AV: E=McAfee;i="6200,9189,10281"; a="318380898" X-IronPort-AV: E=Sophos;i="5.90,169,1643702400"; d="scan'208";a="318380898" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2022 20:27:32 -0800 X-IronPort-AV: E=Sophos;i="5.90,169,1643702400"; d="scan'208";a="547884692" Received: from ttahmed-mobl2.amr.corp.intel.com (HELO rsridh2-mobl1.localdomain) ([10.254.50.225]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2022 20:27:32 -0800 From: Ranjani Sridharan To: alsa-devel@alsa-project.org Subject: [PATCH 08/10] ASoC: SOF: Intel: Convert to use the generic set_stream_data_offset ops Date: Wed, 9 Mar 2022 20:27:18 -0800 Message-Id: <20220310042720.976809-9-ranjani.sridharan@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220310042720.976809-1-ranjani.sridharan@linux.intel.com> References: <20220310042720.976809-1-ranjani.sridharan@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, Peter Ujfalusi , Pierre-Louis Bossart , Rander Wang , broonie@kernel.org, Ranjani Sridharan , Daniel Baluta 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: Peter Ujfalusi Switch from the IPC dependent ipc_pcm_params() ops to the IPC neutral set_stream_data_offset(). Remove the no longer used hda_ipc_pcm_params() function as well. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Daniel Baluta Signed-off-by: Ranjani Sridharan --- sound/soc/sof/intel/apl.c | 2 +- sound/soc/sof/intel/bdw.c | 2 +- sound/soc/sof/intel/byt.c | 4 ++-- sound/soc/sof/intel/cnl.c | 2 +- sound/soc/sof/intel/hda-ipc.c | 7 ------- sound/soc/sof/intel/hda.h | 3 --- sound/soc/sof/intel/icl.c | 2 +- sound/soc/sof/intel/pci-tng.c | 2 +- sound/soc/sof/intel/tgl.c | 2 +- 9 files changed, 8 insertions(+), 18 deletions(-) diff --git a/sound/soc/sof/intel/apl.c b/sound/soc/sof/intel/apl.c index cd8d08c17561..6721c8f95161 100644 --- a/sound/soc/sof/intel/apl.c +++ b/sound/soc/sof/intel/apl.c @@ -56,7 +56,7 @@ const struct snd_sof_dsp_ops sof_apl_ops = { .get_window_offset = hda_dsp_ipc_get_window_offset, .ipc_msg_data = hda_ipc_msg_data, - .ipc_pcm_params = hda_ipc_pcm_params, + .set_stream_data_offset = hda_set_stream_data_offset, /* machine driver */ .machine_select = hda_machine_select, diff --git a/sound/soc/sof/intel/bdw.c b/sound/soc/sof/intel/bdw.c index d627b7498d5e..fb9682b2fe32 100644 --- a/sound/soc/sof/intel/bdw.c +++ b/sound/soc/sof/intel/bdw.c @@ -596,7 +596,7 @@ static const struct snd_sof_dsp_ops sof_bdw_ops = { .get_window_offset = bdw_get_window_offset, .ipc_msg_data = sof_ipc_msg_data, - .ipc_pcm_params = sof_ipc_pcm_params, + .set_stream_data_offset = sof_set_stream_data_offset, /* machine driver */ .machine_select = bdw_machine_select, diff --git a/sound/soc/sof/intel/byt.c b/sound/soc/sof/intel/byt.c index dcfeaedb8fd5..bb84a4aa587a 100644 --- a/sound/soc/sof/intel/byt.c +++ b/sound/soc/sof/intel/byt.c @@ -250,7 +250,7 @@ static const struct snd_sof_dsp_ops sof_byt_ops = { .get_window_offset = atom_get_window_offset, .ipc_msg_data = sof_ipc_msg_data, - .ipc_pcm_params = sof_ipc_pcm_params, + .set_stream_data_offset = sof_set_stream_data_offset, /* machine driver */ .machine_select = atom_machine_select, @@ -332,7 +332,7 @@ static const struct snd_sof_dsp_ops sof_cht_ops = { .get_window_offset = atom_get_window_offset, .ipc_msg_data = sof_ipc_msg_data, - .ipc_pcm_params = sof_ipc_pcm_params, + .set_stream_data_offset = sof_set_stream_data_offset, /* machine driver */ .machine_select = atom_machine_select, diff --git a/sound/soc/sof/intel/cnl.c b/sound/soc/sof/intel/cnl.c index bef27e8751f2..6a96470b967f 100644 --- a/sound/soc/sof/intel/cnl.c +++ b/sound/soc/sof/intel/cnl.c @@ -274,7 +274,7 @@ const struct snd_sof_dsp_ops sof_cnl_ops = { .get_window_offset = hda_dsp_ipc_get_window_offset, .ipc_msg_data = hda_ipc_msg_data, - .ipc_pcm_params = hda_ipc_pcm_params, + .set_stream_data_offset = hda_set_stream_data_offset, /* machine driver */ .machine_select = hda_machine_select, diff --git a/sound/soc/sof/intel/hda-ipc.c b/sound/soc/sof/intel/hda-ipc.c index 317c3ab7e768..0395638c43ae 100644 --- a/sound/soc/sof/intel/hda-ipc.c +++ b/sound/soc/sof/intel/hda-ipc.c @@ -289,10 +289,3 @@ int hda_set_stream_data_offset(struct snd_sof_dev *sdev, return 0; } - -int hda_ipc_pcm_params(struct snd_sof_dev *sdev, - struct snd_pcm_substream *substream, - const struct sof_ipc_pcm_params_reply *reply) -{ - return hda_set_stream_data_offset(sdev, substream, reply->posn_offset); -} diff --git a/sound/soc/sof/intel/hda.h b/sound/soc/sof/intel/hda.h index 1e0a6d7bde17..13b509c9f481 100644 --- a/sound/soc/sof/intel/hda.h +++ b/sound/soc/sof/intel/hda.h @@ -566,9 +566,6 @@ int hda_dsp_stream_spib_config(struct snd_sof_dev *sdev, int hda_ipc_msg_data(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream, void *p, size_t sz); -int hda_ipc_pcm_params(struct snd_sof_dev *sdev, - struct snd_pcm_substream *substream, - const struct sof_ipc_pcm_params_reply *reply); int hda_set_stream_data_offset(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream, size_t posn_offset); diff --git a/sound/soc/sof/intel/icl.c b/sound/soc/sof/intel/icl.c index f20ab60e8a52..b44a649bfc0b 100644 --- a/sound/soc/sof/intel/icl.c +++ b/sound/soc/sof/intel/icl.c @@ -118,7 +118,7 @@ const struct snd_sof_dsp_ops sof_icl_ops = { .get_window_offset = hda_dsp_ipc_get_window_offset, .ipc_msg_data = hda_ipc_msg_data, - .ipc_pcm_params = hda_ipc_pcm_params, + .set_stream_data_offset = hda_set_stream_data_offset, /* machine driver */ .machine_select = hda_machine_select, diff --git a/sound/soc/sof/intel/pci-tng.c b/sound/soc/sof/intel/pci-tng.c index 7d5062f8076e..6efef225973f 100644 --- a/sound/soc/sof/intel/pci-tng.c +++ b/sound/soc/sof/intel/pci-tng.c @@ -165,7 +165,7 @@ const struct snd_sof_dsp_ops sof_tng_ops = { .get_window_offset = atom_get_window_offset, .ipc_msg_data = sof_ipc_msg_data, - .ipc_pcm_params = sof_ipc_pcm_params, + .set_stream_data_offset = sof_set_stream_data_offset, /* machine driver */ .machine_select = atom_machine_select, diff --git a/sound/soc/sof/intel/tgl.c b/sound/soc/sof/intel/tgl.c index c7d1c244bc48..cb1c319d5bee 100644 --- a/sound/soc/sof/intel/tgl.c +++ b/sound/soc/sof/intel/tgl.c @@ -91,7 +91,7 @@ const struct snd_sof_dsp_ops sof_tgl_ops = { .get_window_offset = hda_dsp_ipc_get_window_offset, .ipc_msg_data = hda_ipc_msg_data, - .ipc_pcm_params = hda_ipc_pcm_params, + .set_stream_data_offset = hda_set_stream_data_offset, /* machine driver */ .machine_select = hda_machine_select, From patchwork Thu Mar 10 04:27:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ranjani Sridharan X-Patchwork-Id: 550154 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 AD095C433EF for ; Thu, 10 Mar 2022 04:31:36 +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 E5E351836; Thu, 10 Mar 2022 05:30:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E5E351836 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1646886695; bh=HaBgjpbZfVTtTKNjir1EsTFf8XFL+KnirMv1xWARbWI=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=FadZjbP4XhMs7mMw6XppImEeQtcCFVoxHzHkrDjmEL2wEUIAMxl/2Et8OhbqCNx3H 6o4WXuCOOqxbSn97s8PdKftoy7P1Kpf79OOH/G424BtSNCbuW9Fbv3WVPf2bVYrvBk c4lpGaYcajqQvhOyKYhvN/HjfEkVFq7ICijKeuLs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 593D3F80549; Thu, 10 Mar 2022 05:28:08 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CB48EF8052D; Thu, 10 Mar 2022 05:28:00 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 8D83BF80519 for ; Thu, 10 Mar 2022 05:27:49 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8D83BF80519 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="CgqNN2qx" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646886470; x=1678422470; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HaBgjpbZfVTtTKNjir1EsTFf8XFL+KnirMv1xWARbWI=; b=CgqNN2qxsbZ4IgKGs5IC6NrHmV3VJqolf7z1vmB5uZ6X/JPcyzmmUNmu 5kZhLasgIWx3wRXI9NIkCReFF2+ORh9WLrmRITR6OF7w3w2fmtF3UwnXt OLEdlS4u0i/nN0nQcyFnkwAr+L8rbNVvsu+71hZKwevo1drz59E3x9c1N lPALoznziCzn8GvfPIUlURW1pUz3l4SFH7hvN4ngZpMU+lzICwT5zCXjv 5RwDb50frFyXH+4J5LU0o1Bk+28iFMrT0A83q+wlbeKtgHbVIyk6uVG00 /qCwae0w6sEbQJPzbGNRLkCM+AyPoqDymxXws9OePL2qZRxe+WNk+pAjB g==; X-IronPort-AV: E=McAfee;i="6200,9189,10281"; a="318380899" X-IronPort-AV: E=Sophos;i="5.90,169,1643702400"; d="scan'208";a="318380899" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2022 20:27:32 -0800 X-IronPort-AV: E=Sophos;i="5.90,169,1643702400"; d="scan'208";a="547884695" Received: from ttahmed-mobl2.amr.corp.intel.com (HELO rsridh2-mobl1.localdomain) ([10.254.50.225]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2022 20:27:32 -0800 From: Ranjani Sridharan To: alsa-devel@alsa-project.org Subject: [PATCH 09/10] ASoC: SOF: imx: Convert to use the generic set_stream_data_offset ops Date: Wed, 9 Mar 2022 20:27:19 -0800 Message-Id: <20220310042720.976809-10-ranjani.sridharan@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220310042720.976809-1-ranjani.sridharan@linux.intel.com> References: <20220310042720.976809-1-ranjani.sridharan@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, Peter Ujfalusi , Pierre-Louis Bossart , Rander Wang , broonie@kernel.org, Ranjani Sridharan , Daniel Baluta 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: Peter Ujfalusi Switch from the IPC dependent ipc_pcm_params() ops to the IPC neutral set_stream_data_offset(). Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Daniel Baluta Signed-off-by: Ranjani Sridharan --- sound/soc/sof/imx/imx8.c | 4 ++-- sound/soc/sof/imx/imx8m.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/sof/imx/imx8.c b/sound/soc/sof/imx/imx8.c index f6baecbb57fb..825bd2b9b7a1 100644 --- a/sound/soc/sof/imx/imx8.c +++ b/sound/soc/sof/imx/imx8.c @@ -509,7 +509,7 @@ static const struct snd_sof_dsp_ops sof_imx8_ops = { .get_window_offset = imx8_get_window_offset, .ipc_msg_data = sof_ipc_msg_data, - .ipc_pcm_params = sof_ipc_pcm_params, + .set_stream_data_offset = sof_set_stream_data_offset, /* module loading */ .load_module = snd_sof_parse_module_memcpy, @@ -572,7 +572,7 @@ static const struct snd_sof_dsp_ops sof_imx8x_ops = { .get_window_offset = imx8_get_window_offset, .ipc_msg_data = sof_ipc_msg_data, - .ipc_pcm_params = sof_ipc_pcm_params, + .set_stream_data_offset = sof_set_stream_data_offset, /* module loading */ .load_module = snd_sof_parse_module_memcpy, diff --git a/sound/soc/sof/imx/imx8m.c b/sound/soc/sof/imx/imx8m.c index 60251486b24b..803d6be6b4fb 100644 --- a/sound/soc/sof/imx/imx8m.c +++ b/sound/soc/sof/imx/imx8m.c @@ -435,7 +435,7 @@ static const struct snd_sof_dsp_ops sof_imx8m_ops = { .get_window_offset = imx8m_get_window_offset, .ipc_msg_data = sof_ipc_msg_data, - .ipc_pcm_params = sof_ipc_pcm_params, + .set_stream_data_offset = sof_set_stream_data_offset, /* module loading */ .load_module = snd_sof_parse_module_memcpy, From patchwork Thu Mar 10 04:27:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ranjani Sridharan X-Patchwork-Id: 550532 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 6D744C433EF for ; Thu, 10 Mar 2022 04:31: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 9916E16E6; Thu, 10 Mar 2022 05:30:55 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9916E16E6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1646886705; bh=7MYXtZnKDHSo2xbbMJ6vVclEE+XkS9Gx/S0AK9K0fXM=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Hghmmd83L8JaofuTDcxC7e4xf4jbRVhmZlXXHzGJHdoxksWX0JeOiUAy1VxcwSH/u S4oZj6IFd97fAmdt0vEIGe4MQmkGH3z2qj0NNo2nO+zS1/3C6h6VjY+hLUElXASpvS 4KKnKQVTfrzfr2wi5jVR/zhuibdPsF1PPFk51sx4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 14B0EF80551; Thu, 10 Mar 2022 05:28:09 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1BA4DF8052F; Thu, 10 Mar 2022 05:28:01 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 2CE44F80516 for ; Thu, 10 Mar 2022 05:27:49 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2CE44F80516 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="agYhfiwz" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646886471; x=1678422471; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7MYXtZnKDHSo2xbbMJ6vVclEE+XkS9Gx/S0AK9K0fXM=; b=agYhfiwz7J9MfwQ6XrTDVTewhcN4iq5vhN/BAXodVBRdatKSyRJW4fRp LbLwHqcbeLNzRkgA9QGKWVwD+66/VPnk38s59mzRrOUFxAMnhO0Yy8ibw YnuqttJbr9eOSDq4mSt1R30LNu4EHZHMOqM/0hqpu6CL++Uc2c8RdKJCk hjg71FKcniQPT3JNFx/pqGVF2+J8sWtcf2IJoTAIwZuuszJkG/n8/zlTE meeC/zW8jQfgB/SOuhKeqCK8chGYxXNWlIMq2zi+TX5M2W1B3d64ASNiz TdKTvIvFR8M86Z5RXvXWhY9Bc6BxUeCFnHhdInDyyDouUVcSKmTJ99eJ2 g==; X-IronPort-AV: E=McAfee;i="6200,9189,10281"; a="318380900" X-IronPort-AV: E=Sophos;i="5.90,169,1643702400"; d="scan'208";a="318380900" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2022 20:27:33 -0800 X-IronPort-AV: E=Sophos;i="5.90,169,1643702400"; d="scan'208";a="547884698" Received: from ttahmed-mobl2.amr.corp.intel.com (HELO rsridh2-mobl1.localdomain) ([10.254.50.225]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2022 20:27:32 -0800 From: Ranjani Sridharan To: alsa-devel@alsa-project.org Subject: [PATCH 10/10] ASoC: SOF: Remove ipc_pcm_params() ops Date: Wed, 9 Mar 2022 20:27:20 -0800 Message-Id: <20220310042720.976809-11-ranjani.sridharan@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220310042720.976809-1-ranjani.sridharan@linux.intel.com> References: <20220310042720.976809-1-ranjani.sridharan@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, Peter Ujfalusi , Pierre-Louis Bossart , Rander Wang , broonie@kernel.org, Ranjani Sridharan , Daniel Baluta 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: Peter Ujfalusi All users have been converted to use the IPC agnostic set_stream_data_offsett() Remove all code related to the old API. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Daniel Baluta Signed-off-by: Ranjani Sridharan --- sound/soc/sof/ops.h | 13 ------------- sound/soc/sof/pcm.c | 7 ------- sound/soc/sof/sof-priv.h | 8 -------- sound/soc/sof/stream-ipc.c | 8 -------- 4 files changed, 36 deletions(-) diff --git a/sound/soc/sof/ops.h b/sound/soc/sof/ops.h index aeea73efcb2f..a19474663767 100644 --- a/sound/soc/sof/ops.h +++ b/sound/soc/sof/ops.h @@ -466,19 +466,6 @@ static inline int snd_sof_ipc_msg_data(struct snd_sof_dev *sdev, { return sof_ops(sdev)->ipc_msg_data(sdev, substream, p, sz); } - -/* host configure DSP HW parameters */ -static inline int -snd_sof_ipc_pcm_params(struct snd_sof_dev *sdev, - struct snd_pcm_substream *substream, - const struct sof_ipc_pcm_params_reply *reply) -{ - if (sof_ops(sdev) && sof_ops(sdev)->ipc_pcm_params) - return sof_ops(sdev)->ipc_pcm_params(sdev, substream, reply); - - return 0; -} - /* host side configuration of the stream's data offset in stream mailbox area */ static inline int snd_sof_set_stream_data_offset(struct snd_sof_dev *sdev, diff --git a/sound/soc/sof/pcm.c b/sound/soc/sof/pcm.c index af8c367cd55c..d402f288acf5 100644 --- a/sound/soc/sof/pcm.c +++ b/sound/soc/sof/pcm.c @@ -269,13 +269,6 @@ static int sof_pcm_hw_params(struct snd_soc_component *component, return ret; } - ret = snd_sof_ipc_pcm_params(sdev, substream, &ipc_params_reply); - if (ret < 0) { - dev_err(component->dev, "%s: got wrong reply for PCM %d\n", - __func__, spcm->pcm.pcm_id); - return ret; - } - ret = snd_sof_set_stream_data_offset(sdev, substream, ipc_params_reply.posn_offset); if (ret < 0) { diff --git a/sound/soc/sof/sof-priv.h b/sound/soc/sof/sof-priv.h index 49e4d87bd467..0a916eb4f149 100644 --- a/sound/soc/sof/sof-priv.h +++ b/sound/soc/sof/sof-priv.h @@ -221,11 +221,6 @@ struct snd_sof_dsp_ops { struct snd_pcm_substream *substream, void *p, size_t sz); /* mandatory */ - /* host configure DSP HW parameters */ - int (*ipc_pcm_params)(struct snd_sof_dev *sdev, - struct snd_pcm_substream *substream, - const struct sof_ipc_pcm_params_reply *reply); /* optional */ - /* host side configuration of the stream's data offset in stream mailbox area */ int (*set_stream_data_offset)(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream, @@ -623,9 +618,6 @@ int sof_fw_ready(struct snd_sof_dev *sdev, u32 msg_id); int sof_ipc_msg_data(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream, void *p, size_t sz); -int sof_ipc_pcm_params(struct snd_sof_dev *sdev, - struct snd_pcm_substream *substream, - const struct sof_ipc_pcm_params_reply *reply); int sof_set_stream_data_offset(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream, size_t posn_offset); diff --git a/sound/soc/sof/stream-ipc.c b/sound/soc/sof/stream-ipc.c index b7b96b9f5279..5f1ceeea893a 100644 --- a/sound/soc/sof/stream-ipc.c +++ b/sound/soc/sof/stream-ipc.c @@ -65,14 +65,6 @@ int sof_set_stream_data_offset(struct snd_sof_dev *sdev, } EXPORT_SYMBOL(sof_set_stream_data_offset); -int sof_ipc_pcm_params(struct snd_sof_dev *sdev, - struct snd_pcm_substream *substream, - const struct sof_ipc_pcm_params_reply *reply) -{ - return sof_set_stream_data_offset(sdev, substream, reply->posn_offset); -} -EXPORT_SYMBOL(sof_ipc_pcm_params); - int sof_stream_pcm_open(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream) {