diff options
author | Dylan Reid <dgreid@chromium.org> | 2013-03-14 20:27:44 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-03-15 02:40:11 -0400 |
commit | d1d28500cccc269fdbf81ba33d7328d1d2c04b2f (patch) | |
tree | 00e3d310121c8cbf781e35e6c57a2dabbdae7b7a /sound/pci | |
parent | 303985f81019571db0b3a6f01fc7f03eb350657e (diff) |
ALSA: hda/ca0132 - Check if dspload_image succeeded.
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 <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/patch_ca0132.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c index eefc4563b2f9..cf24b75108d9 100644 --- a/sound/pci/hda/patch_ca0132.c +++ b/sound/pci/hda/patch_ca0132.c | |||
@@ -4351,12 +4351,16 @@ static bool ca0132_download_dsp_images(struct hda_codec *codec) | |||
4351 | return false; | 4351 | return false; |
4352 | 4352 | ||
4353 | dsp_os_image = (struct dsp_image_seg *)(fw_entry->data); | 4353 | dsp_os_image = (struct dsp_image_seg *)(fw_entry->data); |
4354 | dspload_image(codec, dsp_os_image, 0, 0, true, 0); | 4354 | if (dspload_image(codec, dsp_os_image, 0, 0, true, 0)) { |
4355 | pr_err("ca0132 dspload_image failed.\n"); | ||
4356 | goto exit_download; | ||
4357 | } | ||
4358 | |||
4355 | dsp_loaded = dspload_wait_loaded(codec); | 4359 | dsp_loaded = dspload_wait_loaded(codec); |
4356 | 4360 | ||
4361 | exit_download: | ||
4357 | release_firmware(fw_entry); | 4362 | release_firmware(fw_entry); |
4358 | 4363 | ||
4359 | |||
4360 | return dsp_loaded; | 4364 | return dsp_loaded; |
4361 | } | 4365 | } |
4362 | 4366 | ||