Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8ad2da19 authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela
Browse files

[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: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@suse.cz>
parent 8f7ba051
Loading
Loading
Loading
Loading
+20 −2
Original line number Diff line number Diff line
@@ -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
+2 −4
Original line number Diff line number Diff line
@@ -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;
+3 −5
Original line number Diff line number Diff line
@@ -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);
+30 −2
Original line number Diff line number Diff line
@@ -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
+4 −6
Original line number Diff line number Diff line
@@ -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);
Loading