diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-04-26 14:13:44 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2007-05-11 16:56:11 +0200 |
commit | b7dd2b349a9fa9e4347780c2bbb41e51484b5bb5 (patch) | |
tree | f5b896fd062a410e46bc35963fe15cdaed38f654 /sound/isa/wavefront/wavefront_fx.c | |
parent | [ALSA] hda-codec - Fix model for ASUS A9rp (diff) | |
download | linux-b7dd2b349a9fa9e4347780c2bbb41e51484b5bb5.tar.xz linux-b7dd2b349a9fa9e4347780c2bbb41e51484b5bb5.zip |
[ALSA] Don't use request_firmware if internal firmwares are defined
Don't use request_firmware() if the internal firmwares are defined
via Kconfig. Otherwise it results in a significant delay at loading
time (minutes).
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/isa/wavefront/wavefront_fx.c')
-rw-r--r-- | sound/isa/wavefront/wavefront_fx.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sound/isa/wavefront/wavefront_fx.c b/sound/isa/wavefront/wavefront_fx.c index 3a8c0565d676..0e948a9a7205 100644 --- a/sound/isa/wavefront/wavefront_fx.c +++ b/sound/isa/wavefront/wavefront_fx.c @@ -256,21 +256,21 @@ snd_wavefront_fx_start (snd_wavefront_t *dev) { unsigned int i; int err; - const struct firmware *firmware; + const struct firmware *firmware = NULL; if (dev->fx_initialized) return 0; +#ifdef CONFIG_SND_WAVEFRONT_FIRMWARE_IN_KERNEL + firmware = &yss225_registers_firmware; +#else err = request_firmware(&firmware, "yamaha/yss225_registers.bin", dev->card->dev); if (err < 0) { -#ifdef CONFIG_SND_WAVEFRONT_FIRMWARE_IN_KERNEL - firmware = &yss225_registers_firmware; -#else err = -1; goto out; -#endif } +#endif for (i = 0; i + 1 < firmware->size; i += 2) { if (firmware->data[i] >= 8 && firmware->data[i] < 16) { @@ -293,9 +293,8 @@ snd_wavefront_fx_start (snd_wavefront_t *dev) err = 0; out: -#ifdef CONFIG_SND_WAVEFRONT_FIRMWARE_IN_KERNEL - if (firmware != &yss225_registers_firmware) +#ifndef CONFIG_SND_WAVEFRONT_FIRMWARE_IN_KERNEL + release_firmware(firmware); #endif - release_firmware(firmware); return err; } |