[ALSA] hda-codec - kernel config for each codec
Create kernel configs to choose the codec support codes to build. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
This commit is contained in:
parent
532d538179
commit
82467611ff
|
@ -509,6 +509,78 @@ config SND_HDA_HWDEP
|
||||||
This interface can be used for out-of-bound communication
|
This interface can be used for out-of-bound communication
|
||||||
with codesc for debugging purposes.
|
with codesc for debugging purposes.
|
||||||
|
|
||||||
|
config SND_HDA_CODEC_REALTEK
|
||||||
|
bool "Build Realtek HD-audio codec support"
|
||||||
|
depends on SND_HDA_INTEL
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Say Y here to include Realtek HD-audio codec support in
|
||||||
|
snd-hda-intel driver, such as ALC880.
|
||||||
|
|
||||||
|
config SND_HDA_CODEC_ANALOG
|
||||||
|
bool "Build Analog Device HD-audio codec support"
|
||||||
|
depends on SND_HDA_INTEL
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Say Y here to include Analog Device HD-audio codec support in
|
||||||
|
snd-hda-intel driver, such as AD1986A.
|
||||||
|
|
||||||
|
config SND_HDA_CODEC_SIGMATEL
|
||||||
|
bool "Build IDT/Sigmatel HD-audio codec support"
|
||||||
|
depends on SND_HDA_INTEL
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Say Y here to include IDT (Sigmatel) HD-audio codec support in
|
||||||
|
snd-hda-intel driver, such as STAC9200.
|
||||||
|
|
||||||
|
config SND_HDA_CODEC_VIA
|
||||||
|
bool "Build VIA HD-audio codec support"
|
||||||
|
depends on SND_HDA_INTEL
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Say Y here to include VIA HD-audio codec support in
|
||||||
|
snd-hda-intel driver, such as VT1708.
|
||||||
|
|
||||||
|
config SND_HDA_CODEC_ATIHDMI
|
||||||
|
bool "Build ATI HDMI HD-audio codec support"
|
||||||
|
depends on SND_HDA_INTEL
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Say Y here to include ATI HDMI HD-audio codec support in
|
||||||
|
snd-hda-intel driver, such as ATI RS600 HDMI.
|
||||||
|
|
||||||
|
config SND_HDA_CODEC_CONEXANT
|
||||||
|
bool "Build Conexant HD-audio codec support"
|
||||||
|
depends on SND_HDA_INTEL
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Say Y here to include Conexant HD-audio codec support in
|
||||||
|
snd-hda-intel driver, such as CX20549.
|
||||||
|
|
||||||
|
config SND_HDA_CODEC_CMEDIA
|
||||||
|
bool "Build C-Media HD-audio codec support"
|
||||||
|
depends on SND_HDA_INTEL
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Say Y here to include C-Media HD-audio codec support in
|
||||||
|
snd-hda-intel driver, such as CMI9880.
|
||||||
|
|
||||||
|
config SND_HDA_CODEC_SI3054
|
||||||
|
bool "Build Silicon Labs 3054 HD-modem codec support"
|
||||||
|
depends on SND_HDA_INTEL
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Say Y here to include Silicon Labs 3054 HD-modem codec
|
||||||
|
(and compatibles) support in snd-hda-intel driver.
|
||||||
|
|
||||||
|
config SND_HDA_GENERIC
|
||||||
|
bool "Enable generic HD-audio codec parser"
|
||||||
|
depends on SND_HDA_INTEL
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Say Y here to enable the generic HD-audio codec parser
|
||||||
|
in snd-hda-intel driver.
|
||||||
|
|
||||||
config SND_HDSP
|
config SND_HDSP
|
||||||
tristate "RME Hammerfall DSP Audio"
|
tristate "RME Hammerfall DSP Audio"
|
||||||
depends on SND
|
depends on SND
|
||||||
|
|
|
@ -2,17 +2,17 @@ snd-hda-intel-y := hda_intel.o
|
||||||
# since snd-hda-intel is the only driver using hda-codec,
|
# since snd-hda-intel is the only driver using hda-codec,
|
||||||
# merge it into a single module although it was originally
|
# merge it into a single module although it was originally
|
||||||
# designed to be individual modules
|
# designed to be individual modules
|
||||||
snd-hda-intel-y += hda_codec.o \
|
snd-hda-intel-y += hda_codec.o
|
||||||
hda_generic.o \
|
|
||||||
patch_realtek.o \
|
|
||||||
patch_cmedia.o \
|
|
||||||
patch_analog.o \
|
|
||||||
patch_sigmatel.o \
|
|
||||||
patch_si3054.o \
|
|
||||||
patch_atihdmi.o \
|
|
||||||
patch_conexant.o \
|
|
||||||
patch_via.o
|
|
||||||
snd-hda-intel-$(CONFIG_PROC_FS) += hda_proc.o
|
snd-hda-intel-$(CONFIG_PROC_FS) += hda_proc.o
|
||||||
snd-hda-intel-$(CONFIG_SND_HDA_HWDEP) += hda_hwdep.o
|
snd-hda-intel-$(CONFIG_SND_HDA_HWDEP) += hda_hwdep.o
|
||||||
|
snd-hda-intel-$(CONFIG_SND_HDA_CODEC_GENERIC) += hda_generic.o
|
||||||
|
snd-hda-intel-$(CONFIG_SND_HDA_CODEC_REALTEK) += patch_realtek.o
|
||||||
|
snd-hda-intel-$(CONFIG_SND_HDA_CODEC_CMEDIA) += patch_cmedia.o
|
||||||
|
snd-hda-intel-$(CONFIG_SND_HDA_CODEC_ANALOG) += patch_analog.o
|
||||||
|
snd-hda-intel-$(CONFIG_SND_HDA_CODEC_SIGMATEL) += patch_sigmatel.o
|
||||||
|
snd-hda-intel-$(CONFIG_SND_HDA_CODEC_SI3054) += patch_si3054.o
|
||||||
|
snd-hda-intel-$(CONFIG_SND_HDA_CODEC_ATIHDMI) += patch_atihdmi.o
|
||||||
|
snd-hda-intel-$(CONFIG_SND_HDA_CODEC_CONEXANT) += patch_conexant.o
|
||||||
|
snd-hda-intel-$(CONFIG_SND_HDA_CODEC_VIA) += patch_via.o
|
||||||
|
|
||||||
obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-intel.o
|
obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-intel.o
|
||||||
|
|
|
@ -388,6 +388,13 @@ int __devinit snd_hda_bus_new(struct snd_card *card,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_SND_HDA_GENERIC
|
||||||
|
#define is_generic_config(codec) \
|
||||||
|
(codec->bus->modelname && !strcmp(codec->bus->modelname, "generic"))
|
||||||
|
#else
|
||||||
|
#define is_generic_config(codec) 0
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* find a matching codec preset
|
* find a matching codec preset
|
||||||
*/
|
*/
|
||||||
|
@ -396,7 +403,7 @@ find_codec_preset(struct hda_codec *codec)
|
||||||
{
|
{
|
||||||
const struct hda_codec_preset **tbl, *preset;
|
const struct hda_codec_preset **tbl, *preset;
|
||||||
|
|
||||||
if (codec->bus->modelname && !strcmp(codec->bus->modelname, "generic"))
|
if (is_generic_config(codec))
|
||||||
return NULL; /* use the generic parser */
|
return NULL; /* use the generic parser */
|
||||||
|
|
||||||
for (tbl = hda_preset_tables; *tbl; tbl++) {
|
for (tbl = hda_preset_tables; *tbl; tbl++) {
|
||||||
|
@ -582,10 +589,26 @@ int __devinit snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr,
|
||||||
snd_hda_get_codec_name(codec, bus->card->mixername,
|
snd_hda_get_codec_name(codec, bus->card->mixername,
|
||||||
sizeof(bus->card->mixername));
|
sizeof(bus->card->mixername));
|
||||||
|
|
||||||
if (codec->preset && codec->preset->patch)
|
#ifdef CONFIG_SND_HDA_GENERIC
|
||||||
err = codec->preset->patch(codec);
|
if (is_generic_config(codec)) {
|
||||||
else
|
|
||||||
err = snd_hda_parse_generic_codec(codec);
|
err = snd_hda_parse_generic_codec(codec);
|
||||||
|
goto patched;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
if (codec->preset && codec->preset->patch) {
|
||||||
|
err = codec->preset->patch(codec);
|
||||||
|
goto patched;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* call the default parser */
|
||||||
|
#ifdef CONFIG_SND_HDA_GENERIC
|
||||||
|
err = snd_hda_parse_generic_codec(codec);
|
||||||
|
#else
|
||||||
|
printk(KERN_ERR "hda-codec: No codec parser is available\n");
|
||||||
|
err = -ENODEV;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
patched:
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
snd_hda_codec_free(codec);
|
snd_hda_codec_free(codec);
|
||||||
return err;
|
return err;
|
||||||
|
|
|
@ -20,13 +20,29 @@ extern struct hda_codec_preset snd_hda_preset_conexant[];
|
||||||
extern struct hda_codec_preset snd_hda_preset_via[];
|
extern struct hda_codec_preset snd_hda_preset_via[];
|
||||||
|
|
||||||
static const struct hda_codec_preset *hda_preset_tables[] = {
|
static const struct hda_codec_preset *hda_preset_tables[] = {
|
||||||
|
#ifdef CONFIG_SND_HDA_CODEC_REALTEK
|
||||||
snd_hda_preset_realtek,
|
snd_hda_preset_realtek,
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_SND_HDA_CODEC_CMEDIA
|
||||||
snd_hda_preset_cmedia,
|
snd_hda_preset_cmedia,
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_SND_HDA_CODEC_ANALOG
|
||||||
snd_hda_preset_analog,
|
snd_hda_preset_analog,
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_SND_HDA_CODEC_SIGMATEL
|
||||||
snd_hda_preset_sigmatel,
|
snd_hda_preset_sigmatel,
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_SND_HDA_CODEC_SI3054
|
||||||
snd_hda_preset_si3054,
|
snd_hda_preset_si3054,
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_SND_HDA_CODEC_ATIHDMI
|
||||||
snd_hda_preset_atihdmi,
|
snd_hda_preset_atihdmi,
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_SND_HDA_CODEC_CONEXANT
|
||||||
snd_hda_preset_conexant,
|
snd_hda_preset_conexant,
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_SND_HDA_CODEC_VIA
|
||||||
snd_hda_preset_via,
|
snd_hda_preset_via,
|
||||||
|
#endif
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue