[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>
This commit is contained in:
Takashi Iwai 2007-02-26 15:55:43 +01:00 committed by Jaroslav Kysela
parent 8f7ba051d2
commit 8ad2da1937
7 changed files with 70 additions and 34 deletions

View File

@ -358,12 +358,21 @@ config SND_SBAWE
config SND_SB16_CSP config SND_SB16_CSP
bool "Sound Blaster 16/AWE CSP support" bool "Sound Blaster 16/AWE CSP support"
depends on (SND_SB16 || SND_SBAWE) && (BROKEN || !PPC) depends on (SND_SB16 || SND_SBAWE) && (BROKEN || !PPC)
select FW_LOADER
help help
Say Y here to include support for the CSP core. This special Say Y here to include support for the CSP core. This special
coprocessor can do variable tasks like various compression and coprocessor can do variable tasks like various compression and
decompression algorithms. 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 config SND_SGALAXY
tristate "Aztech Sound Galaxy" tristate "Aztech Sound Galaxy"
depends on SND depends on SND
@ -391,7 +400,6 @@ config SND_SSCAPE
config SND_WAVEFRONT config SND_WAVEFRONT
tristate "Turtle Beach Maui,Tropez,Tropez+ (Wavefront)" tristate "Turtle Beach Maui,Tropez,Tropez+ (Wavefront)"
depends on SND depends on SND
select FW_LOADER
select SND_OPL3_LIB select SND_OPL3_LIB
select SND_MPU401_UART select SND_MPU401_UART
select SND_CS4231_LIB select SND_CS4231_LIB
@ -402,4 +410,14 @@ config SND_WAVEFRONT
To compile this driver as a module, choose M here: the module To compile this driver as a module, choose M here: the module
will be called snd-wavefront. 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 endmenu

View File

@ -690,9 +690,7 @@ static int snd_sb_csp_load_user(struct snd_sb_csp * p, const unsigned char __use
return err; return err;
} }
#define FIRMWARE_IN_THE_KERNEL #ifdef CONFIG_SND_SB16_CSP_FIRMWARE_IN_KERNEL
#ifdef FIRMWARE_IN_THE_KERNEL
#include "sb16_csp_codecs.h" #include "sb16_csp_codecs.h"
static const struct firmware snd_sb_csp_static_programs[] = { 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) if (err >= 0)
p->csp_programs[index] = program; p->csp_programs[index] = program;
else { else {
#ifdef FIRMWARE_IN_THE_KERNEL #ifdef CONFIG_SND_SB16_CSP_FIRMWARE_IN_KERNEL
program = &snd_sb_csp_static_programs[index]; program = &snd_sb_csp_static_programs[index];
#else #else
return err; return err;

View File

@ -35,9 +35,7 @@
#define WAIT_IDLE 0xff #define WAIT_IDLE 0xff
#define FIRMWARE_IN_THE_KERNEL #ifdef CONFIG_SND_WAVEFRONT_FIRMWARE_IN_KERNEL
#ifdef FIRMWARE_IN_THE_KERNEL
#include "yss225.c" #include "yss225.c"
static const struct firmware yss225_registers_firmware = { static const struct firmware yss225_registers_firmware = {
.data = (u8 *)yss225_registers, .data = (u8 *)yss225_registers,
@ -266,7 +264,7 @@ snd_wavefront_fx_start (snd_wavefront_t *dev)
err = request_firmware(&firmware, "yamaha/yss225_registers.bin", err = request_firmware(&firmware, "yamaha/yss225_registers.bin",
dev->card->dev); dev->card->dev);
if (err < 0) { if (err < 0) {
#ifdef FIRMWARE_IN_THE_KERNEL #ifdef CONFIG_SND_WAVEFRONT_FIRMWARE_IN_KERNEL
firmware = &yss225_registers_firmware; firmware = &yss225_registers_firmware;
#else #else
err = -1; err = -1;
@ -295,7 +293,7 @@ snd_wavefront_fx_start (snd_wavefront_t *dev)
err = 0; err = 0;
out: out:
#ifdef FIRMWARE_IN_THE_KERNEL #ifdef CONFIG_SND_WAVEFRONT_FIRMWARE_IN_KERNEL
if (firmware != &yss225_registers_firmware) if (firmware != &yss225_registers_firmware)
#endif #endif
release_firmware(firmware); release_firmware(firmware);

View File

@ -576,7 +576,6 @@ config SND_INTEL8X0M
config SND_KORG1212 config SND_KORG1212
tristate "Korg 1212 IO" tristate "Korg 1212 IO"
depends on SND depends on SND
select FW_LOADER
select SND_PCM select SND_PCM
help help
Say Y here to include support for Korg 1212IO soundcards. 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 To compile this driver as a module, choose M here: the module
will be called snd-korg1212. 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 config SND_MAESTRO3
tristate "ESS Allegro/Maestro3" tristate "ESS Allegro/Maestro3"
depends on SND depends on SND
@ -596,6 +605,16 @@ config SND_MAESTRO3
To compile this driver as a module, choose M here: the module To compile this driver as a module, choose M here: the module
will be called snd-maestro3. 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 config SND_MIXART
tristate "Digigram miXart" tristate "Digigram miXart"
depends on SND depends on SND
@ -737,7 +756,6 @@ config SND_VX222
config SND_YMFPCI config SND_YMFPCI
tristate "Yamaha YMF724/740/744/754" tristate "Yamaha YMF724/740/744/754"
depends on SND depends on SND
select FW_LOADER
select SND_OPL3_LIB select SND_OPL3_LIB
select SND_MPU401_UART select SND_MPU401_UART
select SND_AC97_CODEC select SND_AC97_CODEC
@ -748,6 +766,16 @@ config SND_YMFPCI
To compile this driver as a module, choose M here: the module To compile this driver as a module, choose M here: the module
will be called snd-ymfpci. 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 config SND_AC97_POWER_SAVE
bool "AC97 Power-Saving Mode" bool "AC97 Power-Saving Mode"
depends on SND_AC97_CODEC && EXPERIMENTAL depends on SND_AC97_CODEC && EXPERIMENTAL

View File

@ -264,9 +264,7 @@ enum MonitorModeSelector {
#define COMMAND_ACK_DELAY 13 // number of RTC ticks to wait for an acknowledgement #define COMMAND_ACK_DELAY 13 // number of RTC ticks to wait for an acknowledgement
// from the card after sending a command. // from the card after sending a command.
#define FIRMWARE_IN_THE_KERNEL #ifdef CONFIG_SND_KORG1212_FIRMWARE_IN_KERNEL
#ifdef FIRMWARE_IN_THE_KERNEL
#include "korg1212-firmware.h" #include "korg1212-firmware.h"
static const struct firmware static_dsp_code = { static const struct firmware static_dsp_code = {
.data = (u8 *)dspCode, .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); err = request_firmware(&dsp_code, "korg/k1212.dsp", &pci->dev);
if (err < 0) { if (err < 0) {
release_firmware(dsp_code); release_firmware(dsp_code);
#ifdef FIRMWARE_IN_THE_KERNEL #ifdef CONFIG_SND_KORG1212_FIRMWARE_IN_KERNEL
dsp_code = &static_dsp_code; dsp_code = &static_dsp_code;
#else #else
snd_printk(KERN_ERR "firmware not available\n"); 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) { dsp_code->size, &korg1212->dma_dsp) < 0) {
snd_printk(KERN_ERR "korg1212: cannot allocate dsp code memory (%zd bytes)\n", dsp_code->size); snd_printk(KERN_ERR "korg1212: cannot allocate dsp code memory (%zd bytes)\n", dsp_code->size);
snd_korg1212_free(korg1212); snd_korg1212_free(korg1212);
#ifdef FIRMWARE_IN_THE_KERNEL #ifdef CONFIG_SND_KORG1212_FIRMWARE_IN_KERNEL
if (dsp_code != &static_dsp_code) if (dsp_code != &static_dsp_code)
#endif #endif
release_firmware(dsp_code); 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); 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) if (dsp_code != &static_dsp_code)
#endif #endif
release_firmware(dsp_code); release_firmware(dsp_code);

View File

@ -2101,9 +2101,7 @@ static int __devinit snd_m3_mixer(struct snd_m3 *chip)
} }
#define FIRMWARE_IN_THE_KERNEL #ifdef CONFIG_SND_MAESTRO3_FIRMWARE_IN_KERNEL
#ifdef FIRMWARE_IN_THE_KERNEL
/* /*
* DSP Code images * DSP Code images
@ -2242,7 +2240,7 @@ static const struct firmware assp_minisrc = {
.size = sizeof assp_minisrc_image .size = sizeof assp_minisrc_image
}; };
#endif /* FIRMWARE_IN_THE_KERNEL */ #endif /* CONFIG_SND_MAESTRO3_FIRMWARE_IN_KERNEL */
#ifdef __LITTLE_ENDIAN #ifdef __LITTLE_ENDIAN
static inline void snd_m3_convert_from_le(const struct firmware *fw) { } 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) if (chip->iobase)
pci_release_regions(chip->pci); pci_release_regions(chip->pci);
#ifdef FIRMWARE_IN_THE_KERNEL #ifdef CONFIG_SND_MAESTRO3_FIRMWARE_IN_KERNEL
if (chip->assp_kernel_image != &assp_kernel) if (chip->assp_kernel_image != &assp_kernel)
#endif #endif
release_firmware(chip->assp_kernel_image); 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) if (chip->assp_minisrc_image != &assp_minisrc)
#endif #endif
release_firmware(chip->assp_minisrc_image); 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, err = request_firmware(&chip->assp_kernel_image,
"ess/maestro3_assp_kernel.fw", &pci->dev); "ess/maestro3_assp_kernel.fw", &pci->dev);
if (err < 0) { if (err < 0) {
#ifdef FIRMWARE_IN_THE_KERNEL #ifdef CONFIG_SND_MAESTRO3_FIRMWARE_IN_KERNEL
chip->assp_kernel_image = &assp_kernel; chip->assp_kernel_image = &assp_kernel;
#else #else
snd_m3_free(chip); 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, err = request_firmware(&chip->assp_minisrc_image,
"ess/maestro3_assp_minisrc.fw", &pci->dev); "ess/maestro3_assp_minisrc.fw", &pci->dev);
if (err < 0) { if (err < 0) {
#ifdef FIRMWARE_IN_THE_KERNEL #ifdef CONFIG_SND_MAESTRO3_FIRMWARE_IN_KERNEL
chip->assp_minisrc_image = &assp_minisrc; chip->assp_minisrc_image = &assp_minisrc;
#else #else
snd_m3_free(chip); snd_m3_free(chip);

View File

@ -1998,9 +1998,7 @@ static void snd_ymfpci_disable_dsp(struct snd_ymfpci *chip)
} }
} }
#define FIRMWARE_IN_THE_KERNEL #ifdef CONFIG_SND_YMFPCI_FIRMWARE_IN_KERNEL
#ifdef FIRMWARE_IN_THE_KERNEL
#include "ymfpci_image.h" #include "ymfpci_image.h"
@ -2047,7 +2045,7 @@ static int snd_ymfpci_request_firmware(struct snd_ymfpci *chip)
} }
} }
if (err < 0) { if (err < 0) {
#ifdef FIRMWARE_IN_THE_KERNEL #ifdef CONFIG_SND_YMFPCI_FIRMWARE_IN_KERNEL
chip->dsp_microcode = &snd_ymfpci_dsp_microcode; chip->dsp_microcode = &snd_ymfpci_dsp_microcode;
#else #else
return err; return err;
@ -2070,7 +2068,7 @@ static int snd_ymfpci_request_firmware(struct snd_ymfpci *chip)
} }
} }
if (err < 0) { if (err < 0) {
#ifdef FIRMWARE_IN_THE_KERNEL #ifdef CONFIG_SND_YMFPCI_FIRMWARE_IN_KERNEL
chip->controller_microcode = chip->controller_microcode =
is_1e ? &snd_ymfpci_controller_1e_microcode is_1e ? &snd_ymfpci_controller_1e_microcode
: &snd_ymfpci_controller_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_write_config_word(chip->pci, 0x40, chip->old_legacy_ctrl);
pci_disable_device(chip->pci); 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) if (chip->dsp_microcode != &snd_ymfpci_dsp_microcode)
#endif #endif
release_firmware(chip->dsp_microcode); 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 && if (chip->controller_microcode != &snd_ymfpci_controller_microcode &&
chip->controller_microcode != &snd_ymfpci_controller_1e_microcode) chip->controller_microcode != &snd_ymfpci_controller_1e_microcode)
#endif #endif