Skip to content

Commit

Permalink
ALSA: hda/ca0132 - Check if dspload_image succeeded.
Browse files Browse the repository at this point in the history
If dspload_image() fails, it was ignored and dspload_wait_loaded() was
still called.  dsp_loaded should never be set to true in this case,
skip it.  The check in dspload_wait_loaded() return true if the DSP is
loaded or if it never started.

Signed-off-by: Dylan Reid <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
dgreid authored and tiwai committed Mar 15, 2013
1 parent 303985f commit d1d2850
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sound/pci/hda/patch_ca0132.c
Original file line number Diff line number Diff line change
Expand Up @@ -4351,12 +4351,16 @@ static bool ca0132_download_dsp_images(struct hda_codec *codec)
return false;

dsp_os_image = (struct dsp_image_seg *)(fw_entry->data);
dspload_image(codec, dsp_os_image, 0, 0, true, 0);
if (dspload_image(codec, dsp_os_image, 0, 0, true, 0)) {
pr_err("ca0132 dspload_image failed.\n");
goto exit_download;
}

dsp_loaded = dspload_wait_loaded(codec);

exit_download:
release_firmware(fw_entry);


return dsp_loaded;
}

Expand Down

0 comments on commit d1d2850

Please sign in to comment.