aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-08-10 07:30:08 -0400
committerTakashi Iwai <tiwai@suse.de>2014-08-10 07:30:08 -0400
commite24aa0a4c5ac92a171d9dd74a8d3dbf652990d36 (patch)
tree330d205ad7d7a25243266672195bda4b894a1c42 /sound/pci
parentde3da4f696b473e7810bd9837c18bf9fd30a9a6d (diff)
ALSA: hda/ca0132 - Don't try loading firmware at resume when already failed
CA0132 driver tries to reload the firmware at resume. Usually this works since the firmware loader core caches the firmware contents by itself. However, if the driver failed to load the firmwares (e.g. missing files), reloading the firmware at resume goes through the actual file loading code path, and triggers a kernel WARNING like: WARNING: CPU: 10 PID:11371 at drivers/base/firmware_class.c:1105 _request_firmware+0x9ab/0x9d0() For avoiding this situation, this patch makes CA0132 skipping the f/w loading at resume when it failed at probe time. Reported-and-tested-by: Janek Kozicki <cosurgi@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_ca0132.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c
index 4f3aba78f720..5d8455e2dacd 100644
--- a/sound/pci/hda/patch_ca0132.c
+++ b/sound/pci/hda/patch_ca0132.c
@@ -4376,6 +4376,9 @@ static void ca0132_download_dsp(struct hda_codec *codec)
4376 return; /* NOP */ 4376 return; /* NOP */
4377#endif 4377#endif
4378 4378
4379 if (spec->dsp_state == DSP_DOWNLOAD_FAILED)
4380 return; /* don't retry failures */
4381
4379 chipio_enable_clocks(codec); 4382 chipio_enable_clocks(codec);
4380 spec->dsp_state = DSP_DOWNLOADING; 4383 spec->dsp_state = DSP_DOWNLOADING;
4381 if (!ca0132_download_dsp_images(codec)) 4384 if (!ca0132_download_dsp_images(codec))
@@ -4552,7 +4555,8 @@ static int ca0132_init(struct hda_codec *codec)
4552 struct auto_pin_cfg *cfg = &spec->autocfg; 4555 struct auto_pin_cfg *cfg = &spec->autocfg;
4553 int i; 4556 int i;
4554 4557
4555 spec->dsp_state = DSP_DOWNLOAD_INIT; 4558 if (spec->dsp_state != DSP_DOWNLOAD_FAILED)
4559 spec->dsp_state = DSP_DOWNLOAD_INIT;
4556 spec->curr_chip_addx = INVALID_CHIP_ADDRESS; 4560 spec->curr_chip_addx = INVALID_CHIP_ADDRESS;
4557 4561
4558 snd_hda_power_up(codec); 4562 snd_hda_power_up(codec);
@@ -4663,6 +4667,7 @@ static int patch_ca0132(struct hda_codec *codec)
4663 codec->spec = spec; 4667 codec->spec = spec;
4664 spec->codec = codec; 4668 spec->codec = codec;
4665 4669
4670 spec->dsp_state = DSP_DOWNLOAD_INIT;
4666 spec->num_mixers = 1; 4671 spec->num_mixers = 1;
4667 spec->mixers[0] = ca0132_mixer; 4672 spec->mixers[0] = ca0132_mixer;
4668 4673