Skip to content

Commit

Permalink
ASoC: SOF: Intel: hda-loader: use small buffer for iccmax stream
Browse files Browse the repository at this point in the history
The data received via iccmax stream is not used anywhere, so no need to
allocate a big DMA buffer for it. This is especially important as the
allocation is done even in cases where reload of the firmware is skipped
and execution happens directly from the firmware stored in IMR.

BugLink: thesofproject#3844
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
  • Loading branch information
kv2019i committed Sep 8, 2022
1 parent debd6f8 commit 14aa2c1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sound/soc/sof/intel/hda-loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,11 @@ int hda_dsp_cl_boot_firmware_iccmax(struct snd_sof_dev *sdev)

stripped_firmware.size = plat_data->fw->size - plat_data->fw_offset;

/* prepare capture stream for ICCMAX */
iccmax_stream = hda_cl_stream_prepare(sdev, HDA_CL_STREAM_FORMAT, stripped_firmware.size,
/*
* Prepare capture stream for ICCMAX. We do not need to store
* the data, so use a buffer of PAGE_SIZE for receiving.
*/
iccmax_stream = hda_cl_stream_prepare(sdev, HDA_CL_STREAM_FORMAT, PAGE_SIZE,
&dmab_bdl, SNDRV_PCM_STREAM_CAPTURE);
if (IS_ERR(iccmax_stream)) {
dev_err(sdev->dev, "error: dma prepare for ICCMAX stream failed\n");
Expand Down

0 comments on commit 14aa2c1

Please sign in to comment.