diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-04-26 08:13:44 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2007-05-11 10:56:11 -0400 |
commit | b7dd2b349a9fa9e4347780c2bbb41e51484b5bb5 (patch) | |
tree | f5b896fd062a410e46bc35963fe15cdaed38f654 /sound/isa/wavefront | |
parent | f223a9fc3d5707c354588570e2cf1f3abf6b1f84 (diff) |
[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')
-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) | |||
256 | { | 256 | { |
257 | unsigned int i; | 257 | unsigned int i; |
258 | int err; | 258 | int err; |
259 | const struct firmware *firmware; | 259 | const struct firmware *firmware = NULL; |
260 | 260 | ||
261 | if (dev->fx_initialized) | 261 | if (dev->fx_initialized) |
262 | return 0; | 262 | return 0; |
263 | 263 | ||
264 | #ifdef CONFIG_SND_WAVEFRONT_FIRMWARE_IN_KERNEL | ||
265 | firmware = &yss225_registers_firmware; | ||
266 | #else | ||
264 | err = request_firmware(&firmware, "yamaha/yss225_registers.bin", | 267 | err = request_firmware(&firmware, "yamaha/yss225_registers.bin", |
265 | dev->card->dev); | 268 | dev->card->dev); |
266 | if (err < 0) { | 269 | if (err < 0) { |
267 | #ifdef CONFIG_SND_WAVEFRONT_FIRMWARE_IN_KERNEL | ||
268 | firmware = &yss225_registers_firmware; | ||
269 | #else | ||
270 | err = -1; | 270 | err = -1; |
271 | goto out; | 271 | goto out; |
272 | #endif | ||
273 | } | 272 | } |
273 | #endif | ||
274 | 274 | ||
275 | for (i = 0; i + 1 < firmware->size; i += 2) { | 275 | for (i = 0; i + 1 < firmware->size; i += 2) { |
276 | if (firmware->data[i] >= 8 && firmware->data[i] < 16) { | 276 | if (firmware->data[i] >= 8 && firmware->data[i] < 16) { |
@@ -293,9 +293,8 @@ snd_wavefront_fx_start (snd_wavefront_t *dev) | |||
293 | err = 0; | 293 | err = 0; |
294 | 294 | ||
295 | out: | 295 | out: |
296 | #ifdef CONFIG_SND_WAVEFRONT_FIRMWARE_IN_KERNEL | 296 | #ifndef CONFIG_SND_WAVEFRONT_FIRMWARE_IN_KERNEL |
297 | if (firmware != &yss225_registers_firmware) | 297 | release_firmware(firmware); |
298 | #endif | 298 | #endif |
299 | release_firmware(firmware); | ||
300 | return err; | 299 | return err; |
301 | } | 300 | } |