diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-02-26 09:55:43 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2007-05-11 10:55:43 -0400 |
commit | 8ad2da1937168d48a84dcf6d5cc2001c0e4a6992 (patch) | |
tree | 6d3f73f922126c339532113a69b368e245d5c05a /sound/pci | |
parent | 8f7ba051d2abb3d3bde9b95e47246c60b704d2b4 (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>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/Kconfig | 32 | ||||
-rw-r--r-- | sound/pci/korg1212/korg1212.c | 10 | ||||
-rw-r--r-- | sound/pci/maestro3.c | 14 | ||||
-rw-r--r-- | sound/pci/ymfpci/ymfpci_main.c | 12 |
4 files changed, 45 insertions, 23 deletions
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 | |||
576 | config SND_KORG1212 | 576 | config 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 | ||
586 | config 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 | |||
587 | config SND_MAESTRO3 | 596 | config 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 | ||
608 | config 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 | |||
599 | config SND_MIXART | 618 | config 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 | |||
737 | config SND_YMFPCI | 756 | config 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 | ||
769 | config 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 | |||
751 | config SND_AC97_POWER_SAVE | 779 | config 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" |
271 | static const struct firmware static_dsp_code = { | 269 | static 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 |
2248 | static inline void snd_m3_convert_from_le(const struct firmware *fw) { } | 2246 | 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) | |||
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 |