Commit 595fe1b7 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: hda - Make CONFIG_SND_HDA_CODEC_* tristate

So far, CONFIG_SND_HDA_CODEC_* kconfigs have been booleans due to
historical reasons.  The major reason was that the automatic codec
driver probing wouldn't work if user sets a codec driver as a module
while the controller driver as a built-in.  And, another reason was to
avoid exporting symbols of the helper codes when all drivers are built
in.

But, this sort of "kindness" rather confuses people in the end,
especially makes the config refinement via localmodconfig unhappy.
Also, a codec module would still work if you re-bind the controller
driver via sysfs (although it's no automatic loading), so there might
be a slight use case.

That said, better to let people fallen into a pitfall than being too
smart and restrict something.  Let's make things straightforward: now
all CONFIG_SND_HDA_CODEC_* become tristate, and all symbols exported
unconditionally.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent da4a7a39
...@@ -87,126 +87,72 @@ config SND_HDA_PATCH_LOADER ...@@ -87,126 +87,72 @@ config SND_HDA_PATCH_LOADER
This option turns on hwdep and reconfig features automatically. This option turns on hwdep and reconfig features automatically.
config SND_HDA_CODEC_REALTEK config SND_HDA_CODEC_REALTEK
bool "Build Realtek HD-audio codec support" tristate "Build Realtek HD-audio codec support"
default y
select SND_HDA_GENERIC select SND_HDA_GENERIC
help help
Say Y here to include Realtek HD-audio codec support in Say Y or M here to include Realtek HD-audio codec support in
snd-hda-intel driver, such as ALC880. snd-hda-intel driver, such as ALC880.
When the HD-audio driver is built as a module, the codec
support code is also built as another module,
snd-hda-codec-realtek.
This module is automatically loaded at probing.
config SND_HDA_CODEC_ANALOG config SND_HDA_CODEC_ANALOG
bool "Build Analog Device HD-audio codec support" tristate "Build Analog Device HD-audio codec support"
default y
select SND_HDA_GENERIC select SND_HDA_GENERIC
help help
Say Y here to include Analog Device HD-audio codec support in Say Y or M here to include Analog Device HD-audio codec support in
snd-hda-intel driver, such as AD1986A. snd-hda-intel driver, such as AD1986A.
When the HD-audio driver is built as a module, the codec
support code is also built as another module,
snd-hda-codec-analog.
This module is automatically loaded at probing.
config SND_HDA_CODEC_SIGMATEL config SND_HDA_CODEC_SIGMATEL
bool "Build IDT/Sigmatel HD-audio codec support" tristate "Build IDT/Sigmatel HD-audio codec support"
default y
select SND_HDA_GENERIC select SND_HDA_GENERIC
help help
Say Y here to include IDT (Sigmatel) HD-audio codec support in Say Y or M here to include IDT (Sigmatel) HD-audio codec support in
snd-hda-intel driver, such as STAC9200. snd-hda-intel driver, such as STAC9200.
When the HD-audio driver is built as a module, the codec
support code is also built as another module,
snd-hda-codec-idt.
This module is automatically loaded at probing.
config SND_HDA_CODEC_VIA config SND_HDA_CODEC_VIA
bool "Build VIA HD-audio codec support" tristate "Build VIA HD-audio codec support"
default y
select SND_HDA_GENERIC select SND_HDA_GENERIC
help help
Say Y here to include VIA HD-audio codec support in Say Y or M here to include VIA HD-audio codec support in
snd-hda-intel driver, such as VT1708. snd-hda-intel driver, such as VT1708.
When the HD-audio driver is built as a module, the codec
support code is also built as another module,
snd-hda-codec-via.
This module is automatically loaded at probing.
config SND_HDA_CODEC_HDMI config SND_HDA_CODEC_HDMI
bool "Build HDMI/DisplayPort HD-audio codec support" tristate "Build HDMI/DisplayPort HD-audio codec support"
default y
help help
Say Y here to include HDMI and DisplayPort HD-audio codec Say Y or M here to include HDMI and DisplayPort HD-audio codec
support in snd-hda-intel driver. This includes all AMD/ATI, support in snd-hda-intel driver. This includes all AMD/ATI,
Intel and Nvidia HDMI/DisplayPort codecs. Intel and Nvidia HDMI/DisplayPort codecs.
When the HD-audio driver is built as a module, the codec
support code is also built as another module,
snd-hda-codec-hdmi.
This module is automatically loaded at probing.
config SND_HDA_I915 config SND_HDA_I915
bool bool
default y default y
depends on DRM_I915 depends on DRM_I915
config SND_HDA_CODEC_CIRRUS config SND_HDA_CODEC_CIRRUS
bool "Build Cirrus Logic codec support" tristate "Build Cirrus Logic codec support"
default y
select SND_HDA_GENERIC select SND_HDA_GENERIC
help help
Say Y here to include Cirrus Logic codec support in Say Y or M here to include Cirrus Logic codec support in
snd-hda-intel driver, such as CS4206. snd-hda-intel driver, such as CS4206.
When the HD-audio driver is built as a module, the codec
support code is also built as another module,
snd-hda-codec-cirrus.
This module is automatically loaded at probing.
config SND_HDA_CODEC_CONEXANT config SND_HDA_CODEC_CONEXANT
bool "Build Conexant HD-audio codec support" tristate "Build Conexant HD-audio codec support"
default y
select SND_HDA_GENERIC select SND_HDA_GENERIC
help help
Say Y here to include Conexant HD-audio codec support in Say Y or M here to include Conexant HD-audio codec support in
snd-hda-intel driver, such as CX20549. snd-hda-intel driver, such as CX20549.
When the HD-audio driver is built as a module, the codec
support code is also built as another module,
snd-hda-codec-conexant.
This module is automatically loaded at probing.
config SND_HDA_CODEC_CA0110 config SND_HDA_CODEC_CA0110
bool "Build Creative CA0110-IBG codec support" tristate "Build Creative CA0110-IBG codec support"
default y
select SND_HDA_GENERIC select SND_HDA_GENERIC
help help
Say Y here to include Creative CA0110-IBG codec support in Say Y or M here to include Creative CA0110-IBG codec support in
snd-hda-intel driver, found on some Creative X-Fi cards. snd-hda-intel driver, found on some Creative X-Fi cards.
When the HD-audio driver is built as a module, the codec
support code is also built as another module,
snd-hda-codec-ca0110.
This module is automatically loaded at probing.
config SND_HDA_CODEC_CA0132 config SND_HDA_CODEC_CA0132
bool "Build Creative CA0132 codec support" tristate "Build Creative CA0132 codec support"
default y
help help
Say Y here to include Creative CA0132 codec support in Say Y or M here to include Creative CA0132 codec support in
snd-hda-intel driver. snd-hda-intel driver.
When the HD-audio driver is built as a module, the codec
support code is also built as another module,
snd-hda-codec-ca0132.
This module is automatically loaded at probing.
config SND_HDA_CODEC_CA0132_DSP config SND_HDA_CODEC_CA0132_DSP
bool "Support new DSP code for CA0132 codec" bool "Support new DSP code for CA0132 codec"
depends on SND_HDA_CODEC_CA0132 depends on SND_HDA_CODEC_CA0132
...@@ -220,35 +166,22 @@ config SND_HDA_CODEC_CA0132_DSP ...@@ -220,35 +166,22 @@ config SND_HDA_CODEC_CA0132_DSP
(ctefx.bin). (ctefx.bin).
config SND_HDA_CODEC_CMEDIA config SND_HDA_CODEC_CMEDIA
bool "Build C-Media HD-audio codec support" tristate "Build C-Media HD-audio codec support"
default y
select SND_HDA_GENERIC select SND_HDA_GENERIC
help help
Say Y here to include C-Media HD-audio codec support in Say Y or M here to include C-Media HD-audio codec support in
snd-hda-intel driver, such as CMI9880. snd-hda-intel driver, such as CMI9880.
When the HD-audio driver is built as a module, the codec
support code is also built as another module,
snd-hda-codec-cmedia.
This module is automatically loaded at probing.
config SND_HDA_CODEC_SI3054 config SND_HDA_CODEC_SI3054
bool "Build Silicon Labs 3054 HD-modem codec support" tristate "Build Silicon Labs 3054 HD-modem codec support"
default y
help help
Say Y here to include Silicon Labs 3054 HD-modem codec Say Y or M here to include Silicon Labs 3054 HD-modem codec
(and compatibles) support in snd-hda-intel driver. (and compatibles) support in snd-hda-intel driver.
When the HD-audio driver is built as a module, the codec
support code is also built as another module,
snd-hda-codec-si3054.
This module is automatically loaded at probing.
config SND_HDA_GENERIC config SND_HDA_GENERIC
bool "Enable generic HD-audio codec parser" tristate "Enable generic HD-audio codec parser"
default y
help help
Say Y here to enable the generic HD-audio codec parser Say Y or M here to enable the generic HD-audio codec parser
in snd-hda-intel driver. in snd-hda-intel driver.
config SND_HDA_POWER_SAVE_DEFAULT config SND_HDA_POWER_SAVE_DEFAULT
......
...@@ -27,43 +27,19 @@ snd-hda-codec-hdmi-objs := patch_hdmi.o hda_eld.o ...@@ -27,43 +27,19 @@ snd-hda-codec-hdmi-objs := patch_hdmi.o hda_eld.o
# common driver # common driver
obj-$(CONFIG_SND_HDA_INTEL) := snd-hda-codec.o obj-$(CONFIG_SND_HDA_INTEL) := snd-hda-codec.o
# codec drivers (note: CONFIG_SND_HDA_CODEC_XXX are booleans) # codec drivers
ifdef CONFIG_SND_HDA_GENERIC obj-$(CONFIG_SND_HDA_GENERIC) += snd-hda-codec-generic.o
obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-codec-generic.o obj-$(CONFIG_SND_HDA_CODEC_REALTEK) += snd-hda-codec-realtek.o
endif obj-$(CONFIG_SND_HDA_CODEC_CMEDIA) += snd-hda-codec-cmedia.o
ifdef CONFIG_SND_HDA_CODEC_REALTEK obj-$(CONFIG_SND_HDA_CODEC_ANALOG) += snd-hda-codec-analog.o
obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-codec-realtek.o obj-$(CONFIG_SND_HDA_CODEC_SIGMATEL) += snd-hda-codec-idt.o
endif obj-$(CONFIG_SND_HDA_CODEC_SI3054) += snd-hda-codec-si3054.o
ifdef CONFIG_SND_HDA_CODEC_CMEDIA obj-$(CONFIG_SND_HDA_CODEC_CIRRUS) += snd-hda-codec-cirrus.o
obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-codec-cmedia.o obj-$(CONFIG_SND_HDA_CODEC_CA0110) += snd-hda-codec-ca0110.o
endif obj-$(CONFIG_SND_HDA_CODEC_CA0132) += snd-hda-codec-ca0132.o
ifdef CONFIG_SND_HDA_CODEC_ANALOG obj-$(CONFIG_SND_HDA_CODEC_CONEXANT) += snd-hda-codec-conexant.o
obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-codec-analog.o obj-$(CONFIG_SND_HDA_CODEC_VIA) += snd-hda-codec-via.o
endif obj-$(CONFIG_SND_HDA_CODEC_HDMI) += snd-hda-codec-hdmi.o
ifdef CONFIG_SND_HDA_CODEC_SIGMATEL
obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-codec-idt.o
endif
ifdef CONFIG_SND_HDA_CODEC_SI3054
obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-codec-si3054.o
endif
ifdef CONFIG_SND_HDA_CODEC_CIRRUS
obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-codec-cirrus.o
endif
ifdef CONFIG_SND_HDA_CODEC_CA0110
obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-codec-ca0110.o
endif
ifdef CONFIG_SND_HDA_CODEC_CA0132
obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-codec-ca0132.o
endif
ifdef CONFIG_SND_HDA_CODEC_CONEXANT
obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-codec-conexant.o
endif
ifdef CONFIG_SND_HDA_CODEC_VIA
obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-codec-via.o
endif
ifdef CONFIG_SND_HDA_CODEC_HDMI
obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-codec-hdmi.o
endif
# this must be the last entry after codec drivers; # this must be the last entry after codec drivers;
# otherwise the codec patches won't be hooked before the PCI probe # otherwise the codec patches won't be hooked before the PCI probe
......
...@@ -681,19 +681,6 @@ snd_hda_codec_load_dsp_cleanup(struct hda_codec *codec, ...@@ -681,19 +681,6 @@ snd_hda_codec_load_dsp_cleanup(struct hda_codec *codec,
struct snd_dma_buffer *dmab) {} struct snd_dma_buffer *dmab) {}
#endif #endif
/*
* Codec modularization
*/
/* Export symbols only for communication with codec drivers;
* When built in kernel, all HD-audio drivers are supposed to be statically
* linked to the kernel. Thus, the symbols don't have to (or shouldn't) be
* exported unless it's built as a module.
*/
#ifdef MODULE
#define EXPORT_SYMBOL_HDA(sym) EXPORT_SYMBOL_GPL(sym) #define EXPORT_SYMBOL_HDA(sym) EXPORT_SYMBOL_GPL(sym)
#else
#define EXPORT_SYMBOL_HDA(sym)
#endif
#endif /* __SOUND_HDA_CODEC_H */ #endif /* __SOUND_HDA_CODEC_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment