Skip to content

Commit

Permalink
ASoC: SOF: set up memory windows only at first boot
Browse files Browse the repository at this point in the history
This will also prevent the debugfs entry creation errors seen
every time the device resumes from runtime suspend
or system suspend.

Signed-off-by: Ranjani Sridharan <[email protected]>
  • Loading branch information
ranj063 authored and lgirdwood committed Oct 15, 2018
1 parent 2a28aca commit 856bb51
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sound/soc/sof/intel/hda-ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,8 @@ int hda_dsp_ipc_fw_ready(struct snd_sof_dev *sdev, u32 msg_id)
snd_sof_fw_parse_ext_data(sdev, HDA_DSP_MBOX_UPLINK_OFFSET +
sizeof(struct sof_ipc_fw_ready));

ipc_get_windows(sdev);
if (sdev->first_boot)
ipc_get_windows(sdev);

return 0;
}
2 changes: 2 additions & 0 deletions sound/soc/sof/loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,8 @@ int snd_sof_load_firmware(struct snd_sof_dev *sdev,
{
dev_dbg(sdev->dev, "loading firmware\n");

sdev->first_boot = first_boot;

if (sdev->ops->load_firmware)
return sdev->ops->load_firmware(sdev, first_boot);
return 0;
Expand Down
1 change: 1 addition & 0 deletions sound/soc/sof/sof-priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ struct snd_sof_dev {

/* PM */
bool restore_kcontrols; /* restore kcontrols upon resume */
bool first_boot;

void *private; /* core does not touch this */
};
Expand Down

0 comments on commit 856bb51

Please sign in to comment.