From: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
To: lgirdwood@gmail.com, broonie@kernel.org
Cc: alsa-devel@alsa-project.org, kai.vehmanen@linux.intel.com,
AjitKumar.Pandey@amd.com, pierre-louis.bossart@linux.intel.com,
ranjani.sridharan@linux.intel.com, vsreddy@amd.com,
daniel.baluta@nxp.com
Subject: [PATCH 1/2] ASoC: SOF: intel: hda-trace: Pass the dma buffer pointer to hda_dsp_trace_prepare
Date: Fri, 28 Jan 2022 14:36:22 +0200 [thread overview]
Message-ID: <20220128123623.23569-2-peter.ujfalusi@linux.intel.com> (raw)
In-Reply-To: <20220128123623.23569-1-peter.ujfalusi@linux.intel.com>
Pass the snd_dma_buffer pointer as parameter to hda_dsp_trace_prepare()
function.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
---
sound/soc/sof/intel/hda-trace.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/sound/soc/sof/intel/hda-trace.c b/sound/soc/sof/intel/hda-trace.c
index 29e3da3c63db..c5dc833b57b8 100644
--- a/sound/soc/sof/intel/hda-trace.c
+++ b/sound/soc/sof/intel/hda-trace.c
@@ -19,16 +19,15 @@
#include "../ops.h"
#include "hda.h"
-static int hda_dsp_trace_prepare(struct snd_sof_dev *sdev)
+static int hda_dsp_trace_prepare(struct snd_sof_dev *sdev, struct snd_dma_buffer *dmab)
{
struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata;
struct hdac_ext_stream *stream = hda->dtrace_stream;
struct hdac_stream *hstream = &stream->hstream;
- struct snd_dma_buffer *dmab = &sdev->dmatb;
int ret;
hstream->period_bytes = 0;/* initialize period_bytes */
- hstream->bufsize = sdev->dmatb.bytes;
+ hstream->bufsize = dmab->bytes;
ret = hda_dsp_stream_hw_params(sdev, stream, dmab, NULL);
if (ret < 0)
@@ -57,7 +56,7 @@ int hda_dsp_trace_init(struct snd_sof_dev *sdev, u32 *stream_tag)
* initialize capture stream, set BDL address and return corresponding
* stream tag which will be sent to the firmware by IPC message.
*/
- ret = hda_dsp_trace_prepare(sdev);
+ ret = hda_dsp_trace_prepare(sdev, &sdev->dmatb);
if (ret < 0) {
dev_err(sdev->dev, "error: hdac trace init failed: %d\n", ret);
hda_dsp_stream_put(sdev, SNDRV_PCM_STREAM_CAPTURE, *stream_tag);
--
2.35.0
next prev parent reply other threads:[~2022-01-28 12:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-28 12:36 [PATCH 0/2] ASoC: SOF: dma-trace: Change trace_init() ops parameter list Peter Ujfalusi
2022-01-28 12:36 ` Peter Ujfalusi [this message]
2022-01-28 12:36 ` [PATCH 2/2] ASoC: SOF: dma-trace: Pass pointer to params_ext struct in trace_init() Peter Ujfalusi
2022-02-08 18:59 ` [PATCH 0/2] ASoC: SOF: dma-trace: Change trace_init() ops parameter list Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220128123623.23569-2-peter.ujfalusi@linux.intel.com \
--to=peter.ujfalusi@linux.intel.com \
--cc=AjitKumar.Pandey@amd.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=daniel.baluta@nxp.com \
--cc=kai.vehmanen@linux.intel.com \
--cc=lgirdwood@gmail.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=ranjani.sridharan@linux.intel.com \
--cc=vsreddy@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.