aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/isa/Kconfig22
-rw-r--r--sound/isa/sb/sb16_csp.c6
-rw-r--r--sound/isa/wavefront/wavefront_fx.c8
-rw-r--r--sound/pci/Kconfig32
-rw-r--r--sound/pci/korg1212/korg1212.c10
-rw-r--r--sound/pci/maestro3.c14
-rw-r--r--sound/pci/ymfpci/ymfpci_main.c12
7 files changed, 70 insertions, 34 deletions
diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig
index 4e3a9729f569..c855e350789a 100644
--- a/sound/isa/Kconfig
+++ b/sound/isa/Kconfig
@@ -358,12 +358,21 @@ config SND_SBAWE
358config SND_SB16_CSP 358config SND_SB16_CSP
359 bool "Sound Blaster 16/AWE CSP support" 359 bool "Sound Blaster 16/AWE CSP support"
360 depends on (SND_SB16 || SND_SBAWE) && (BROKEN || !PPC) 360 depends on (SND_SB16 || SND_SBAWE) && (BROKEN || !PPC)
361 select FW_LOADER
362 help 361 help
363 Say Y here to include support for the CSP core. This special 362 Say Y here to include support for the CSP core. This special
364 coprocessor can do variable tasks like various compression and 363 coprocessor can do variable tasks like various compression and
365 decompression algorithms. 364 decompression algorithms.
366 365
366config SND_SB16_CSP_FIRMWARE_IN_KERNEL
367 bool "In-kernel firmware for SB16 CSP"
368 depends on SND_SB16_CSP
369 select FW_LOADER
370 default y
371 help
372 Say Y here to include the static firmware built in the kernel
373 for SB16 CSP controller. If you choose N here, the external
374 firmware files from alsa-plugins pacakge are necessary.
375
367config SND_SGALAXY 376config SND_SGALAXY
368 tristate "Aztech Sound Galaxy" 377 tristate "Aztech Sound Galaxy"
369 depends on SND 378 depends on SND
@@ -391,7 +400,6 @@ config SND_SSCAPE
391config SND_WAVEFRONT 400config SND_WAVEFRONT
392 tristate "Turtle Beach Maui,Tropez,Tropez+ (Wavefront)" 401 tristate "Turtle Beach Maui,Tropez,Tropez+ (Wavefront)"
393 depends on SND 402 depends on SND
394 select FW_LOADER
395 select SND_OPL3_LIB 403 select SND_OPL3_LIB
396 select SND_MPU401_UART 404 select SND_MPU401_UART
397 select SND_CS4231_LIB 405 select SND_CS4231_LIB
@@ -402,4 +410,14 @@ config SND_WAVEFRONT
402 To compile this driver as a module, choose M here: the module 410 To compile this driver as a module, choose M here: the module
403 will be called snd-wavefront. 411 will be called snd-wavefront.
404 412
413config SND_WAVEFRONT_FIRMWARE_IN_KERNEL
414 bool "In-kernel firmware for Wavefront"
415 depends on SND_WAVEFRONT
416 select FW_LOADER
417 default y
418 help
419 Say Y here to include the static firmware built in the kernel
420 for Wavefront driver. If you choose N here, the external
421 firmware files from alsa-plugins pacakge are necessary.
422
405endmenu 423endmenu
diff --git a/sound/isa/sb/sb16_csp.c b/sound/isa/sb/sb16_csp.c
index 3d9d7e0107ca..ef71e50744e9 100644
--- a/sound/isa/sb/sb16_csp.c
+++ b/sound/isa/sb/sb16_csp.c
@@ -690,9 +690,7 @@ static int snd_sb_csp_load_user(struct snd_sb_csp * p, const unsigned char __use
690 return err; 690 return err;
691} 691}
692 692
693#define FIRMWARE_IN_THE_KERNEL 693#ifdef CONFIG_SND_SB16_CSP_FIRMWARE_IN_KERNEL
694
695#ifdef FIRMWARE_IN_THE_KERNEL
696#include "sb16_csp_codecs.h" 694#include "sb16_csp_codecs.h"
697 695
698static const struct firmware snd_sb_csp_static_programs[] = { 696static const struct firmware snd_sb_csp_static_programs[] = {
@@ -724,7 +722,7 @@ static int snd_sb_csp_firmware_load(struct snd_sb_csp *p, int index, int flags)
724 if (err >= 0) 722 if (err >= 0)
725 p->csp_programs[index] = program; 723 p->csp_programs[index] = program;
726 else { 724 else {
727#ifdef FIRMWARE_IN_THE_KERNEL 725#ifdef CONFIG_SND_SB16_CSP_FIRMWARE_IN_KERNEL
728 program = &snd_sb_csp_static_programs[index]; 726 program = &snd_sb_csp_static_programs[index];
729#else 727#else
730 return err; 728 return err;
diff --git a/sound/isa/wavefront/wavefront_fx.c b/sound/isa/wavefront/wavefront_fx.c
index 15331ed88194..3a8c0565d676 100644
--- a/sound/isa/wavefront/wavefront_fx.c
+++ b/sound/isa/wavefront/wavefront_fx.c
@@ -35,9 +35,7 @@
35 35
36#define WAIT_IDLE 0xff 36#define WAIT_IDLE 0xff
37 37
38#define FIRMWARE_IN_THE_KERNEL 38#ifdef CONFIG_SND_WAVEFRONT_FIRMWARE_IN_KERNEL
39
40#ifdef FIRMWARE_IN_THE_KERNEL
41#include "yss225.c" 39#include "yss225.c"
42static const struct firmware yss225_registers_firmware = { 40static const struct firmware yss225_registers_firmware = {
43 .data = (u8 *)yss225_registers, 41 .data = (u8 *)yss225_registers,
@@ -266,7 +264,7 @@ snd_wavefront_fx_start (snd_wavefront_t *dev)
266 err = request_firmware(&firmware, "yamaha/yss225_registers.bin", 264 err = request_firmware(&firmware, "yamaha/yss225_registers.bin",
267 dev->card->dev); 265 dev->card->dev);
268 if (err < 0) { 266 if (err < 0) {
269#ifdef FIRMWARE_IN_THE_KERNEL 267#ifdef CONFIG_SND_WAVEFRONT_FIRMWARE_IN_KERNEL
270 firmware = &yss225_registers_firmware; 268 firmware = &yss225_registers_firmware;
271#else 269#else
272 err = -1; 270 err = -1;
@@ -295,7 +293,7 @@ snd_wavefront_fx_start (snd_wavefront_t *dev)
295 err = 0; 293 err = 0;
296 294
297out: 295out:
298#ifdef FIRMWARE_IN_THE_KERNEL 296#ifdef CONFIG_SND_WAVEFRONT_FIRMWARE_IN_KERNEL
299 if (firmware != &yss225_registers_firmware) 297 if (firmware != &yss225_registers_firmware)
300#endif 298#endif
301 release_firmware(firmware); 299 release_firmware(firmware);
diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig
index 1bcfb3aac18d..12dfda3123a0 100644
--- a/sound/pci/Kconfig
+++ b/sound/pci/Kconfig
@@ -576,7 +576,6 @@ config SND_INTEL8X0M
576config SND_KORG1212 576config SND_KORG1212
577 tristate "Korg 1212 IO" 577 tristate "Korg 1212 IO"
578 depends on SND 578 depends on SND
579 select FW_LOADER
580 select SND_PCM 579 select SND_PCM
581 help 580 help
582 Say Y here to include support for Korg 1212IO soundcards. 581 Say Y here to include support for Korg 1212IO soundcards.
@@ -584,6 +583,16 @@ config SND_KORG1212
584 To compile this driver as a module, choose M here: the module 583 To compile this driver as a module, choose M here: the module
585 will be called snd-korg1212. 584 will be called snd-korg1212.
586 585
586config SND_KORG1212_FIRMWARE_IN_KERNEL
587 bool "In-kernel firmware for Korg1212 driver"
588 depends on SND_KORG1212
589 select FW_LOADER
590 default y
591 help
592 Say Y here to include the static firmware built in the kernel
593 for Korg1212 driver. If you choose N here, the external
594 firmware files from alsa-plugins pacakge are necessary.
595
587config SND_MAESTRO3 596config SND_MAESTRO3
588 tristate "ESS Allegro/Maestro3" 597 tristate "ESS Allegro/Maestro3"
589 depends on SND 598 depends on SND
@@ -596,6 +605,16 @@ config SND_MAESTRO3
596 To compile this driver as a module, choose M here: the module 605 To compile this driver as a module, choose M here: the module
597 will be called snd-maestro3. 606 will be called snd-maestro3.
598 607
608config SND_MAESTRO3_FIRMWARE_IN_KERNEL
609 bool "In-kernel firmware for Maestro3 driver"
610 depends on SND_MAESTRO3
611 select FW_LOADER
612 default y
613 help
614 Say Y here to include the static firmware built in the kernel
615 for Maestro3 driver. If you choose N here, the external
616 firmware files from alsa-plugins pacakge are necessary.
617
599config SND_MIXART 618config SND_MIXART
600 tristate "Digigram miXart" 619 tristate "Digigram miXart"
601 depends on SND 620 depends on SND
@@ -737,7 +756,6 @@ config SND_VX222
737config SND_YMFPCI 756config SND_YMFPCI
738 tristate "Yamaha YMF724/740/744/754" 757 tristate "Yamaha YMF724/740/744/754"
739 depends on SND 758 depends on SND
740 select FW_LOADER
741 select SND_OPL3_LIB 759 select SND_OPL3_LIB
742 select SND_MPU401_UART 760 select SND_MPU401_UART
743 select SND_AC97_CODEC 761 select SND_AC97_CODEC
@@ -748,6 +766,16 @@ config SND_YMFPCI
748 To compile this driver as a module, choose M here: the module 766 To compile this driver as a module, choose M here: the module
749 will be called snd-ymfpci. 767 will be called snd-ymfpci.
750 768
769config SND_YMFPCI_FIRMWARE_IN_KERNEL
770 bool "In-kernel firmware for YMFPCI driver"
771 depends on SND_YMFPCI
772 select FW_LOADER
773 default y
774 help
775 Say Y here to include the static firmware built in the kernel
776 for YMFPCI driver. If you choose N here, the external
777 firmware files from alsa-plugins pacakge are necessary.
778
751config SND_AC97_POWER_SAVE 779config SND_AC97_POWER_SAVE
752 bool "AC97 Power-Saving Mode" 780 bool "AC97 Power-Saving Mode"
753 depends on SND_AC97_CODEC && EXPERIMENTAL 781 depends on SND_AC97_CODEC && EXPERIMENTAL
diff --git a/sound/pci/korg1212/korg1212.c b/sound/pci/korg1212/korg1212.c
index 21d0899ac382..e2e59cae2f6e 100644
--- a/sound/pci/korg1212/korg1212.c
+++ b/sound/pci/korg1212/korg1212.c
@@ -264,9 +264,7 @@ enum MonitorModeSelector {
264#define COMMAND_ACK_DELAY 13 // number of RTC ticks to wait for an acknowledgement 264#define COMMAND_ACK_DELAY 13 // number of RTC ticks to wait for an acknowledgement
265 // from the card after sending a command. 265 // from the card after sending a command.
266 266
267#define FIRMWARE_IN_THE_KERNEL 267#ifdef CONFIG_SND_KORG1212_FIRMWARE_IN_KERNEL
268
269#ifdef FIRMWARE_IN_THE_KERNEL
270#include "korg1212-firmware.h" 268#include "korg1212-firmware.h"
271static const struct firmware static_dsp_code = { 269static const struct firmware static_dsp_code = {
272 .data = (u8 *)dspCode, 270 .data = (u8 *)dspCode,
@@ -2345,7 +2343,7 @@ static int __devinit snd_korg1212_create(struct snd_card *card, struct pci_dev *
2345 err = request_firmware(&dsp_code, "korg/k1212.dsp", &pci->dev); 2343 err = request_firmware(&dsp_code, "korg/k1212.dsp", &pci->dev);
2346 if (err < 0) { 2344 if (err < 0) {
2347 release_firmware(dsp_code); 2345 release_firmware(dsp_code);
2348#ifdef FIRMWARE_IN_THE_KERNEL 2346#ifdef CONFIG_SND_KORG1212_FIRMWARE_IN_KERNEL
2349 dsp_code = &static_dsp_code; 2347 dsp_code = &static_dsp_code;
2350#else 2348#else
2351 snd_printk(KERN_ERR "firmware not available\n"); 2349 snd_printk(KERN_ERR "firmware not available\n");
@@ -2358,7 +2356,7 @@ static int __devinit snd_korg1212_create(struct snd_card *card, struct pci_dev *
2358 dsp_code->size, &korg1212->dma_dsp) < 0) { 2356 dsp_code->size, &korg1212->dma_dsp) < 0) {
2359 snd_printk(KERN_ERR "korg1212: cannot allocate dsp code memory (%zd bytes)\n", dsp_code->size); 2357 snd_printk(KERN_ERR "korg1212: cannot allocate dsp code memory (%zd bytes)\n", dsp_code->size);
2360 snd_korg1212_free(korg1212); 2358 snd_korg1212_free(korg1212);
2361#ifdef FIRMWARE_IN_THE_KERNEL 2359#ifdef CONFIG_SND_KORG1212_FIRMWARE_IN_KERNEL
2362 if (dsp_code != &static_dsp_code) 2360 if (dsp_code != &static_dsp_code)
2363#endif 2361#endif
2364 release_firmware(dsp_code); 2362 release_firmware(dsp_code);
@@ -2371,7 +2369,7 @@ static int __devinit snd_korg1212_create(struct snd_card *card, struct pci_dev *
2371 2369
2372 memcpy(korg1212->dma_dsp.area, dsp_code->data, dsp_code->size); 2370 memcpy(korg1212->dma_dsp.area, dsp_code->data, dsp_code->size);
2373 2371
2374#ifdef FIRMWARE_IN_THE_KERNEL 2372#ifdef CONFIG_SND_KORG1212_FIRMWARE_IN_KERNEL
2375 if (dsp_code != &static_dsp_code) 2373 if (dsp_code != &static_dsp_code)
2376#endif 2374#endif
2377 release_firmware(dsp_code); 2375 release_firmware(dsp_code);
diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c
index 4526904e3f86..9badbb3bfbd1 100644
--- a/sound/pci/maestro3.c
+++ b/sound/pci/maestro3.c
@@ -2101,9 +2101,7 @@ static int __devinit snd_m3_mixer(struct snd_m3 *chip)
2101} 2101}
2102 2102
2103 2103
2104#define FIRMWARE_IN_THE_KERNEL 2104#ifdef CONFIG_SND_MAESTRO3_FIRMWARE_IN_KERNEL
2105
2106#ifdef FIRMWARE_IN_THE_KERNEL
2107 2105
2108/* 2106/*
2109 * DSP Code images 2107 * DSP Code images
@@ -2242,7 +2240,7 @@ static const struct firmware assp_minisrc = {
2242 .size = sizeof assp_minisrc_image 2240 .size = sizeof assp_minisrc_image
2243}; 2241};
2244 2242
2245#endif /* FIRMWARE_IN_THE_KERNEL */ 2243#endif /* CONFIG_SND_MAESTRO3_FIRMWARE_IN_KERNEL */
2246 2244
2247#ifdef __LITTLE_ENDIAN 2245#ifdef __LITTLE_ENDIAN
2248static inline void snd_m3_convert_from_le(const struct firmware *fw) { } 2246static inline void snd_m3_convert_from_le(const struct firmware *fw) { }
@@ -2550,11 +2548,11 @@ static int snd_m3_free(struct snd_m3 *chip)
2550 if (chip->iobase) 2548 if (chip->iobase)
2551 pci_release_regions(chip->pci); 2549 pci_release_regions(chip->pci);
2552 2550
2553#ifdef FIRMWARE_IN_THE_KERNEL 2551#ifdef CONFIG_SND_MAESTRO3_FIRMWARE_IN_KERNEL
2554 if (chip->assp_kernel_image != &assp_kernel) 2552 if (chip->assp_kernel_image != &assp_kernel)
2555#endif 2553#endif
2556 release_firmware(chip->assp_kernel_image); 2554 release_firmware(chip->assp_kernel_image);
2557#ifdef FIRMWARE_IN_THE_KERNEL 2555#ifdef CONFIG_SND_MAESTRO3_FIRMWARE_IN_KERNEL
2558 if (chip->assp_minisrc_image != &assp_minisrc) 2556 if (chip->assp_minisrc_image != &assp_minisrc)
2559#endif 2557#endif
2560 release_firmware(chip->assp_minisrc_image); 2558 release_firmware(chip->assp_minisrc_image);
@@ -2750,7 +2748,7 @@ snd_m3_create(struct snd_card *card, struct pci_dev *pci,
2750 err = request_firmware(&chip->assp_kernel_image, 2748 err = request_firmware(&chip->assp_kernel_image,
2751 "ess/maestro3_assp_kernel.fw", &pci->dev); 2749 "ess/maestro3_assp_kernel.fw", &pci->dev);
2752 if (err < 0) { 2750 if (err < 0) {
2753#ifdef FIRMWARE_IN_THE_KERNEL 2751#ifdef CONFIG_SND_MAESTRO3_FIRMWARE_IN_KERNEL
2754 chip->assp_kernel_image = &assp_kernel; 2752 chip->assp_kernel_image = &assp_kernel;
2755#else 2753#else
2756 snd_m3_free(chip); 2754 snd_m3_free(chip);
@@ -2762,7 +2760,7 @@ snd_m3_create(struct snd_card *card, struct pci_dev *pci,
2762 err = request_firmware(&chip->assp_minisrc_image, 2760 err = request_firmware(&chip->assp_minisrc_image,
2763 "ess/maestro3_assp_minisrc.fw", &pci->dev); 2761 "ess/maestro3_assp_minisrc.fw", &pci->dev);
2764 if (err < 0) { 2762 if (err < 0) {
2765#ifdef FIRMWARE_IN_THE_KERNEL 2763#ifdef CONFIG_SND_MAESTRO3_FIRMWARE_IN_KERNEL
2766 chip->assp_minisrc_image = &assp_minisrc; 2764 chip->assp_minisrc_image = &assp_minisrc;
2767#else 2765#else
2768 snd_m3_free(chip); 2766 snd_m3_free(chip);
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c
index fd12674d0394..b34c3bce270b 100644
--- a/sound/pci/ymfpci/ymfpci_main.c
+++ b/sound/pci/ymfpci/ymfpci_main.c
@@ -1998,9 +1998,7 @@ static void snd_ymfpci_disable_dsp(struct snd_ymfpci *chip)
1998 } 1998 }
1999} 1999}
2000 2000
2001#define FIRMWARE_IN_THE_KERNEL 2001#ifdef CONFIG_SND_YMFPCI_FIRMWARE_IN_KERNEL
2002
2003#ifdef FIRMWARE_IN_THE_KERNEL
2004 2002
2005#include "ymfpci_image.h" 2003#include "ymfpci_image.h"
2006 2004
@@ -2047,7 +2045,7 @@ static int snd_ymfpci_request_firmware(struct snd_ymfpci *chip)
2047 } 2045 }
2048 } 2046 }
2049 if (err < 0) { 2047 if (err < 0) {
2050#ifdef FIRMWARE_IN_THE_KERNEL 2048#ifdef CONFIG_SND_YMFPCI_FIRMWARE_IN_KERNEL
2051 chip->dsp_microcode = &snd_ymfpci_dsp_microcode; 2049 chip->dsp_microcode = &snd_ymfpci_dsp_microcode;
2052#else 2050#else
2053 return err; 2051 return err;
@@ -2070,7 +2068,7 @@ static int snd_ymfpci_request_firmware(struct snd_ymfpci *chip)
2070 } 2068 }
2071 } 2069 }
2072 if (err < 0) { 2070 if (err < 0) {
2073#ifdef FIRMWARE_IN_THE_KERNEL 2071#ifdef CONFIG_SND_YMFPCI_FIRMWARE_IN_KERNEL
2074 chip->controller_microcode = 2072 chip->controller_microcode =
2075 is_1e ? &snd_ymfpci_controller_1e_microcode 2073 is_1e ? &snd_ymfpci_controller_1e_microcode
2076 : &snd_ymfpci_controller_microcode; 2074 : &snd_ymfpci_controller_microcode;
@@ -2259,11 +2257,11 @@ static int snd_ymfpci_free(struct snd_ymfpci *chip)
2259 pci_write_config_word(chip->pci, 0x40, chip->old_legacy_ctrl); 2257 pci_write_config_word(chip->pci, 0x40, chip->old_legacy_ctrl);
2260 2258
2261 pci_disable_device(chip->pci); 2259 pci_disable_device(chip->pci);
2262#ifdef FIRMWARE_IN_THE_KERNEL 2260#ifdef CONFIG_SND_YMFPCI_FIRMWARE_IN_KERNEL
2263 if (chip->dsp_microcode != &snd_ymfpci_dsp_microcode) 2261 if (chip->dsp_microcode != &snd_ymfpci_dsp_microcode)
2264#endif 2262#endif
2265 release_firmware(chip->dsp_microcode); 2263 release_firmware(chip->dsp_microcode);
2266#ifdef FIRMWARE_IN_THE_KERNEL 2264#ifdef CONFIG_SND_YMFPCI_FIRMWARE_IN_KERNEL
2267 if (chip->controller_microcode != &snd_ymfpci_controller_microcode && 2265 if (chip->controller_microcode != &snd_ymfpci_controller_microcode &&
2268 chip->controller_microcode != &snd_ymfpci_controller_1e_microcode) 2266 chip->controller_microcode != &snd_ymfpci_controller_1e_microcode)
2269#endif 2267#endif