Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions sound/soc/sof/intel/hda-loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ int hda_dsp_cl_boot_firmware(struct snd_sof_dev *sdev)
struct snd_sof_pdata *plat_data = sdev->pdata;
const struct sof_dev_desc *desc = plat_data->desc;
const struct sof_intel_dsp_desc *chip_info;
struct hdac_ext_stream *stream;
struct hdac_ext_stream *hext_stream;
struct firmware stripped_firmware;
int ret, ret1, i;

Expand All @@ -369,11 +369,11 @@ int hda_dsp_cl_boot_firmware(struct snd_sof_dev *sdev)
init_waitqueue_head(&sdev->boot_wait);

/* prepare DMA for code loader stream */
stream = cl_stream_prepare(sdev, HDA_CL_STREAM_FORMAT, stripped_firmware.size,
&sdev->dmab, SNDRV_PCM_STREAM_PLAYBACK);
if (IS_ERR(stream)) {
hext_stream = cl_stream_prepare(sdev, HDA_CL_STREAM_FORMAT, stripped_firmware.size,
&sdev->dmab, SNDRV_PCM_STREAM_PLAYBACK);
if (IS_ERR(hext_stream)) {
dev_err(sdev->dev, "error: dma prepare for fw loading failed\n");
return PTR_ERR(stream);
return PTR_ERR(hext_stream);
}

memcpy(sdev->dmab.area, stripped_firmware.data,
Expand All @@ -385,7 +385,7 @@ int hda_dsp_cl_boot_firmware(struct snd_sof_dev *sdev)
"Attempting iteration %d of Core En/ROM load...\n", i);

hda->boot_iteration = i + 1;
ret = cl_dsp_init(sdev, stream->hstream.stream_tag);
ret = cl_dsp_init(sdev, hext_stream->hstream.stream_tag);

/* don't retry anymore if successful */
if (!ret)
Expand Down Expand Up @@ -424,7 +424,7 @@ int hda_dsp_cl_boot_firmware(struct snd_sof_dev *sdev)
* Continue with code loading and firmware boot
*/
hda->boot_iteration = HDA_FW_BOOT_ATTEMPTS;
ret = cl_copy_fw(sdev, stream);
ret = cl_copy_fw(sdev, hext_stream);
if (!ret)
dev_dbg(sdev->dev, "Firmware download successful, booting...\n");
else
Expand All @@ -437,7 +437,7 @@ int hda_dsp_cl_boot_firmware(struct snd_sof_dev *sdev)
* This should be done even if firmware loading fails.
* If the cleanup also fails, we return the initial error
*/
ret1 = cl_cleanup(sdev, &sdev->dmab, stream);
ret1 = cl_cleanup(sdev, &sdev->dmab, hext_stream);
if (ret1 < 0) {
dev_err(sdev->dev, "error: Code loader DSP cleanup failed\n");

Expand Down
4 changes: 2 additions & 2 deletions sound/soc/sof/intel/hda-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ int hda_dsp_pcm_hw_params(struct snd_sof_dev *sdev,
int hda_dsp_pcm_ack(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream)
{
struct hdac_stream *hstream = substream->runtime->private_data;
struct hdac_ext_stream *stream = stream_to_hdac_ext_stream(hstream);
struct hdac_ext_stream *hext_stream = stream_to_hdac_ext_stream(hstream);
struct snd_pcm_runtime *runtime = substream->runtime;
ssize_t appl_pos, buf_size;
u32 spib;
Expand All @@ -165,7 +165,7 @@ int hda_dsp_pcm_ack(struct snd_sof_dev *sdev, struct snd_pcm_substream *substrea
if (!spib)
spib = buf_size;

sof_io_write(sdev, stream->spib_addr, spib);
sof_io_write(sdev, hext_stream->spib_addr, spib);

return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions sound/soc/sof/intel/hda-probes.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ int hda_probe_compr_trigger(struct snd_sof_dev *sdev,
struct snd_compr_stream *cstream, int cmd,
struct snd_soc_dai *dai)
{
struct hdac_ext_stream *stream = hda_compr_get_stream(cstream);
struct hdac_ext_stream *hext_stream = hda_compr_get_stream(cstream);

return hda_dsp_stream_trigger(sdev, stream, cmd);
return hda_dsp_stream_trigger(sdev, hext_stream, cmd);
}

int hda_probe_compr_pointer(struct snd_sof_dev *sdev,
Expand Down