summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-11-21 09:26:20 +0100
committerTakashi Iwai <tiwai@suse.de>2008-11-21 09:26:20 +0100
commite7ee058cac89ec2f2c0c9ab0ec92a3776c182642 (patch)
tree2d092e35b11ef997c30b661bd3f82aa1fb797b90 /sound
parentALSA: hda - Release ELD proc file (diff)
downloadlinux-e7ee058cac89ec2f2c0c9ab0ec92a3776c182642.tar.xz
linux-e7ee058cac89ec2f2c0c9ab0ec92a3776c182642.zip
ALSA: hda - Make CONFIG_SND_HDA_RECONFIG for codec reconfiguration
Make the codec re-configuration feature selectable via Kconfig, CONFIG_SND_HDA_RECONFIG. Also mark it as experimental (as it really is). Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/Kconfig9
-rw-r--r--sound/pci/hda/hda_hwdep.c4
-rw-r--r--sound/pci/hda/hda_local.h10
3 files changed, 22 insertions, 1 deletions
diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig
index 157a0a6b10ae..cc6cf89c32e6 100644
--- a/sound/pci/Kconfig
+++ b/sound/pci/Kconfig
@@ -518,6 +518,15 @@ config SND_HDA_HWDEP
This interface can be used for out-of-band communication
with codecs for debugging purposes.
+config SND_HDA_RECONFIG
+ bool "Allow dynamic codec reconfiguration (EXPERIMENTAL)"
+ depends on SND_HDA_HWDEP && EXPERIMENTAL
+ help
+ Say Y here to enable the HD-audio codec re-configuration feature.
+ This adds the sysfs interfaces to allow user to clear the whole
+ codec configuration, change the codec setup, add extra verbs,
+ and re-configure the codec dynamically.
+
config SND_HDA_INPUT_BEEP
bool "Support digital beep via input layer"
depends on SND_HDA_INTEL
diff --git a/sound/pci/hda/hda_hwdep.c b/sound/pci/hda/hda_hwdep.c
index 653da1d3e4df..5868bbc131cd 100644
--- a/sound/pci/hda/hda_hwdep.c
+++ b/sound/pci/hda/hda_hwdep.c
@@ -145,6 +145,8 @@ int __devinit snd_hda_create_hwdep(struct hda_codec *codec)
return 0;
}
+#ifdef CONFIG_SND_HDA_RECONFIG
+
/*
* sysfs interface
*/
@@ -347,3 +349,5 @@ int snd_hda_hwdep_add_sysfs(struct hda_codec *codec)
hwdep->device, &codec_attrs[i]);
return 0;
}
+
+#endif /* CONFIG_SND_HDA_RECONFIG */
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h
index bf7ba8b62973..6f2fe0f9fdd8 100644
--- a/sound/pci/hda/hda_local.h
+++ b/sound/pci/hda/hda_local.h
@@ -409,11 +409,19 @@ void snd_hda_ctls_clear(struct hda_codec *codec);
*/
#ifdef CONFIG_SND_HDA_HWDEP
int snd_hda_create_hwdep(struct hda_codec *codec);
-int snd_hda_hwdep_add_sysfs(struct hda_codec *codec);
#else
static inline int snd_hda_create_hwdep(struct hda_codec *codec) { return 0; }
#endif
+#ifdef CONFIG_SND_HDA_RECONFIG
+int snd_hda_hwdep_add_sysfs(struct hda_codec *codec);
+#else
+static inline int snd_hda_hwdep_add_sysfs(struct hda_codec *codec)
+{
+ return 0;
+}
+#endif
+
/*
* power-management
*/