aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai2007-02-26 15:55:43 +0100
committerJaroslav Kysela2007-05-11 16:55:43 +0200
commit8ad2da1937168d48a84dcf6d5cc2001c0e4a6992 (patch)
tree6d3f73f922126c339532113a69b368e245d5c05a
parent8f7ba051d2abb3d3bde9b95e47246c60b704d2b4 (diff)
[ALSA] Enable Kconfig options for external firmwares
Some drivers are already ifdefs for enabling external firmwares but not defined in Kconfig. Now they appear as the kernel configs. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
-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
config SND_SB16_CSP
bool "Sound Blaster 16/AWE CSP support"
depends on (SND_SB16 || SND_SBAWE) && (BROKEN || !PPC)
- select FW_LOADER
help
Say Y here to include support for the CSP core. This special
coprocessor can do variable tasks like various compression and
decompression algorithms.
+config SND_SB16_CSP_FIRMWARE_IN_KERNEL
+ bool "In-kernel firmware for SB16 CSP"
+ depends on SND_SB16_CSP
+ select FW_LOADER
+ default y
+ help
+ Say Y here to include the static firmware built in the kernel
+ for SB16 CSP controller. If you choose N here, the external
+ firmware files from alsa-plugins pacakge are necessary.
+
config SND_SGALAXY
tristate "Aztech Sound Galaxy"
depends on SND
@@ -391,7 +400,6 @@ config SND_SSCAPE
config SND_WAVEFRONT
tristate "Turtle Beach Maui,Tropez,Tropez+ (Wavefront)"
depends on SND
- select FW_LOADER
select SND_OPL3_LIB
select SND_MPU401_UART
select SND_CS4231_LIB
@@ -402,4 +410,14 @@ config SND_WAVEFRONT
To compile this driver as a module, choose M here: the module
will be called snd-wavefront.
+config SND_WAVEFRONT_FIRMWARE_IN_KERNEL
+ bool "In-kernel firmware for Wavefront"
+ depends on SND_WAVEFRONT
+ select FW_LOADER
+ default y
+ help
+ Say Y here to include the static firmware built in the kernel
+ for Wavefront driver. If you choose N here, the external
+ firmware files from alsa-plugins pacakge are necessary.
+
endmenu
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
return err;
}
-#define FIRMWARE_IN_THE_KERNEL
-
-#ifdef FIRMWARE_IN_THE_KERNEL
+#ifdef CONFIG_SND_SB16_CSP_FIRMWARE_IN_KERNEL
#include "sb16_csp_codecs.h"
static 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)
if (err >= 0)
p->csp_programs[index] = program;
else {
-#ifdef FIRMWARE_IN_THE_KERNEL
+#ifdef CONFIG_SND_SB16_CSP_FIRMWARE_IN_KERNEL
program = &snd_sb_csp_static_programs[index];
#else
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 @@
#define WAIT_IDLE 0xff
-#define FIRMWARE_IN_THE_KERNEL
-
-#ifdef FIRMWARE_IN_THE_KERNEL
+#ifdef CONFIG_SND_WAVEFRONT_FIRMWARE_IN_KERNEL
#include "yss225.c"
static const struct firmware yss225_registers_firmware = {
.data = (u8 *)yss225_registers,
@@ -266,7 +264,7 @@ snd_wavefront_fx_start (snd_wavefront_t *dev)
err = request_firmware(&firmware, "yamaha/yss225_registers.bin",
dev->card->dev);
if (err < 0) {
-#ifdef FIRMWARE_IN_THE_KERNEL
+#ifdef CONFIG_SND_WAVEFRONT_FIRMWARE_IN_KERNEL
firmware = &yss225_registers_firmware;
#else
err = -1;
@@ -295,7 +293,7 @@ snd_wavefront_fx_start (snd_wavefront_t *dev)
err = 0;
out:
-#ifdef FIRMWARE_IN_THE_KERNEL
+#ifdef CONFIG_SND_WAVEFRONT_FIRMWARE_IN_KERNEL
if (firmware != &yss225_registers_firmware)
#endif
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
config SND_KORG1212
tristate "Korg 1212 IO"
depends on SND
- select FW_LOADER
select SND_PCM
help
Say Y here to include support for Korg 1212IO soundcards.
@@ -584,6 +583,16 @@ config SND_KORG1212
To compile this driver as a module, choose M here: the module
will be called snd-korg1212.
+config SND_KORG1212_FIRMWARE_IN_KERNEL
+ bool "In-kernel firmware for Korg1212 driver"
+ depends on SND_KORG1212
+ select FW_LOADER
+ default y
+ help
+ Say Y here to include the static firmware built in the kernel
+ for Korg1212 driver. If you choose N here, the external
+ firmware files from alsa-plugins pacakge are necessary.
+
config SND_MAESTRO3
tristate "ESS Allegro/Maestro3"
depends on SND
@@ -596,6 +605,16 @@ config SND_MAESTRO3
To compile this driver as a module, choose M here: the module
will be called snd-maestro3.
+config SND_MAESTRO3_FIRMWARE_IN_KERNEL
+ bool "In-kernel firmware for Maestro3 driver"
+ depends on SND_MAESTRO3
+ select FW_LOADER
+ default y
+ help
+ Say Y here to include the static firmware built in the kernel
+ for Maestro3 driver. If you choose N here, the external
+ firmware files from alsa-plugins pacakge are necessary.
+
config SND_MIXART
tristate "Digigram miXart"
depends on SND
@@ -737,7 +756,6 @@ config SND_VX222
config SND_YMFPCI
tristate "Yamaha YMF724/740/744/754"
depends on SND
- select FW_LOADER
select SND_OPL3_LIB
select SND_MPU401_UART
select SND_AC97_CODEC
@@ -748,6 +766,16 @@ config SND_YMFPCI
To compile this driver as a module, choose M here: the module
will be called snd-ymfpci.
+config SND_YMFPCI_FIRMWARE_IN_KERNEL
+ bool "In-kernel firmware for YMFPCI driver"
+ depends on SND_YMFPCI
+ select FW_LOADER
+ default y
+ help
+ Say Y here to include the static firmware built in the kernel
+ for YMFPCI driver. If you choose N here, the external
+ firmware files from alsa-plugins pacakge are necessary.
+
config SND_AC97_POWER_SAVE
bool "AC97 Power-Saving Mode"
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 {
#define COMMAND_ACK_DELAY 13 // number of RTC ticks to wait for an acknowledgement
// from the card after sending a command.
-#define FIRMWARE_IN_THE_KERNEL
-
-#ifdef FIRMWARE_IN_THE_KERNEL
+#ifdef CONFIG_SND_KORG1212_FIRMWARE_IN_KERNEL
#include "korg1212-firmware.h"
static const struct firmware static_dsp_code = {
.data = (u8 *)dspCode,
@@ -2345,7 +2343,7 @@ static int __devinit snd_korg1212_create(struct snd_card *card, struct pci_dev *
err = request_firmware(&dsp_code, "korg/k1212.dsp", &pci->dev);
if (err < 0) {
release_firmware(dsp_code);
-#ifdef FIRMWARE_IN_THE_KERNEL
+#ifdef CONFIG_SND_KORG1212_FIRMWARE_IN_KERNEL
dsp_code = &static_dsp_code;
#else
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 *
dsp_code->size, &korg1212->dma_dsp) < 0) {
snd_printk(KERN_ERR "korg1212: cannot allocate dsp code memory (%zd bytes)\n", dsp_code->size);
snd_korg1212_free(korg1212);
-#ifdef FIRMWARE_IN_THE_KERNEL
+#ifdef CONFIG_SND_KORG1212_FIRMWARE_IN_KERNEL
if (dsp_code != &static_dsp_code)
#endif
release_firmware(dsp_code);
@@ -2371,7 +2369,7 @@ static int __devinit snd_korg1212_create(struct snd_card *card, struct pci_dev *
memcpy(korg1212->dma_dsp.area, dsp_code->data, dsp_code->size);
-#ifdef FIRMWARE_IN_THE_KERNEL
+#ifdef CONFIG_SND_KORG1212_FIRMWARE_IN_KERNEL
if (dsp_code != &static_dsp_code)
#endif
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)
}
-#define FIRMWARE_IN_THE_KERNEL
-
-#ifdef FIRMWARE_IN_THE_KERNEL
+#ifdef CONFIG_SND_MAESTRO3_FIRMWARE_IN_KERNEL
/*
* DSP Code images
@@ -2242,7 +2240,7 @@ static const struct firmware assp_minisrc = {
.size = sizeof assp_minisrc_image
};
-#endif /* FIRMWARE_IN_THE_KERNEL */
+#endif /* CONFIG_SND_MAESTRO3_FIRMWARE_IN_KERNEL */
#ifdef __LITTLE_ENDIAN
static inline void snd_m3_convert_from_le(const struct firmware *fw) { }
@@ -2550,11 +2548,11 @@ static int snd_m3_free(struct snd_m3 *chip)
if (chip->iobase)
pci_release_regions(chip->pci);
-#ifdef FIRMWARE_IN_THE_KERNEL
+#ifdef CONFIG_SND_MAESTRO3_FIRMWARE_IN_KERNEL
if (chip->assp_kernel_image != &assp_kernel)
#endif
release_firmware(chip->assp_kernel_image);
-#ifdef FIRMWARE_IN_THE_KERNEL
+#ifdef CONFIG_SND_MAESTRO3_FIRMWARE_IN_KERNEL
if (chip->assp_minisrc_image != &assp_minisrc)
#endif
release_firmware(chip->assp_minisrc_image);
@@ -2750,7 +2748,7 @@ snd_m3_create(struct snd_card *card, struct pci_dev *pci,
err = request_firmware(&chip->assp_kernel_image,
"ess/maestro3_assp_kernel.fw", &pci->dev);
if (err < 0) {
-#ifdef FIRMWARE_IN_THE_KERNEL
+#ifdef CONFIG_SND_MAESTRO3_FIRMWARE_IN_KERNEL
chip->assp_kernel_image = &assp_kernel;
#else
snd_m3_free(chip);
@@ -2762,7 +2760,7 @@ snd_m3_create(struct snd_card *card, struct pci_dev *pci,
err = request_firmware(&chip->assp_minisrc_image,
"ess/maestro3_assp_minisrc.fw", &pci->dev);
if (err < 0) {
-#ifdef FIRMWARE_IN_THE_KERNEL
+#ifdef CONFIG_SND_MAESTRO3_FIRMWARE_IN_KERNEL
chip->assp_minisrc_image = &assp_minisrc;
#else
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)
}
}
-#define FIRMWARE_IN_THE_KERNEL
-
-#ifdef FIRMWARE_IN_THE_KERNEL
+#ifdef CONFIG_SND_YMFPCI_FIRMWARE_IN_KERNEL
#include "ymfpci_image.h"
@@ -2047,7 +2045,7 @@ static int snd_ymfpci_request_firmware(struct snd_ymfpci *chip)
}
}
if (err < 0) {
-#ifdef FIRMWARE_IN_THE_KERNEL
+#ifdef CONFIG_SND_YMFPCI_FIRMWARE_IN_KERNEL
chip->dsp_microcode = &snd_ymfpci_dsp_microcode;
#else
return err;
@@ -2070,7 +2068,7 @@ static int snd_ymfpci_request_firmware(struct snd_ymfpci *chip)
}
}
if (err < 0) {
-#ifdef FIRMWARE_IN_THE_KERNEL
+#ifdef CONFIG_SND_YMFPCI_FIRMWARE_IN_KERNEL
chip->controller_microcode =
is_1e ? &snd_ymfpci_controller_1e_microcode
: &snd_ymfpci_controller_microcode;
@@ -2259,11 +2257,11 @@ static int snd_ymfpci_free(struct snd_ymfpci *chip)
pci_write_config_word(chip->pci, 0x40, chip->old_legacy_ctrl);
pci_disable_device(chip->pci);
-#ifdef FIRMWARE_IN_THE_KERNEL
+#ifdef CONFIG_SND_YMFPCI_FIRMWARE_IN_KERNEL
if (chip->dsp_microcode != &snd_ymfpci_dsp_microcode)
#endif
release_firmware(chip->dsp_microcode);
-#ifdef FIRMWARE_IN_THE_KERNEL
+#ifdef CONFIG_SND_YMFPCI_FIRMWARE_IN_KERNEL
if (chip->controller_microcode != &snd_ymfpci_controller_microcode &&
chip->controller_microcode != &snd_ymfpci_controller_1e_microcode)
#endif