Skip to content

Commit 8fd6558

Browse files
committed
ASoC: SOF: intel: hda-trace: Pass the dma buffer pointer to hda_dsp_trace_prepare
Pass the snd_dma_buffer pointer as parameter to hda_dsp_trace_prepare() function. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
1 parent 82a12cd commit 8fd6558

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

sound/soc/sof/intel/hda-trace.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,15 @@
1919
#include "../ops.h"
2020
#include "hda.h"
2121

22-
static int hda_dsp_trace_prepare(struct snd_sof_dev *sdev)
22+
static int hda_dsp_trace_prepare(struct snd_sof_dev *sdev, struct snd_dma_buffer *dmab)
2323
{
2424
struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata;
2525
struct hdac_ext_stream *stream = hda->dtrace_stream;
2626
struct hdac_stream *hstream = &stream->hstream;
27-
struct snd_dma_buffer *dmab = &sdev->dmatb;
2827
int ret;
2928

3029
hstream->period_bytes = 0;/* initialize period_bytes */
31-
hstream->bufsize = sdev->dmatb.bytes;
30+
hstream->bufsize = dmab->bytes;
3231

3332
ret = hda_dsp_stream_hw_params(sdev, stream, dmab, NULL);
3433
if (ret < 0)
@@ -57,7 +56,7 @@ int hda_dsp_trace_init(struct snd_sof_dev *sdev, u32 *stream_tag)
5756
* initialize capture stream, set BDL address and return corresponding
5857
* stream tag which will be sent to the firmware by IPC message.
5958
*/
60-
ret = hda_dsp_trace_prepare(sdev);
59+
ret = hda_dsp_trace_prepare(sdev, &sdev->dmatb);
6160
if (ret < 0) {
6261
dev_err(sdev->dev, "error: hdac trace init failed: %d\n", ret);
6362
hda_dsp_stream_put(sdev, SNDRV_PCM_STREAM_CAPTURE, *stream_tag);

0 commit comments

Comments
 (0)