diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-11-21 03:26:20 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-11-21 03:26:20 -0500 |
commit | e7ee058cac89ec2f2c0c9ab0ec92a3776c182642 (patch) | |
tree | 2d092e35b11ef997c30b661bd3f82aa1fb797b90 /sound/pci | |
parent | f208dba97f2f3ff2fbcbe771195061e2a0dac870 (diff) |
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/pci')
-rw-r--r-- | sound/pci/Kconfig | 9 | ||||
-rw-r--r-- | sound/pci/hda/hda_hwdep.c | 4 | ||||
-rw-r--r-- | sound/pci/hda/hda_local.h | 10 |
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 | |||
518 | This interface can be used for out-of-band communication | 518 | This interface can be used for out-of-band communication |
519 | with codecs for debugging purposes. | 519 | with codecs for debugging purposes. |
520 | 520 | ||
521 | config SND_HDA_RECONFIG | ||
522 | bool "Allow dynamic codec reconfiguration (EXPERIMENTAL)" | ||
523 | depends on SND_HDA_HWDEP && EXPERIMENTAL | ||
524 | help | ||
525 | Say Y here to enable the HD-audio codec re-configuration feature. | ||
526 | This adds the sysfs interfaces to allow user to clear the whole | ||
527 | codec configuration, change the codec setup, add extra verbs, | ||
528 | and re-configure the codec dynamically. | ||
529 | |||
521 | config SND_HDA_INPUT_BEEP | 530 | config SND_HDA_INPUT_BEEP |
522 | bool "Support digital beep via input layer" | 531 | bool "Support digital beep via input layer" |
523 | depends on SND_HDA_INTEL | 532 | 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) | |||
145 | return 0; | 145 | return 0; |
146 | } | 146 | } |
147 | 147 | ||
148 | #ifdef CONFIG_SND_HDA_RECONFIG | ||
149 | |||
148 | /* | 150 | /* |
149 | * sysfs interface | 151 | * sysfs interface |
150 | */ | 152 | */ |
@@ -347,3 +349,5 @@ int snd_hda_hwdep_add_sysfs(struct hda_codec *codec) | |||
347 | hwdep->device, &codec_attrs[i]); | 349 | hwdep->device, &codec_attrs[i]); |
348 | return 0; | 350 | return 0; |
349 | } | 351 | } |
352 | |||
353 | #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); | |||
409 | */ | 409 | */ |
410 | #ifdef CONFIG_SND_HDA_HWDEP | 410 | #ifdef CONFIG_SND_HDA_HWDEP |
411 | int snd_hda_create_hwdep(struct hda_codec *codec); | 411 | int snd_hda_create_hwdep(struct hda_codec *codec); |
412 | int snd_hda_hwdep_add_sysfs(struct hda_codec *codec); | ||
413 | #else | 412 | #else |
414 | static inline int snd_hda_create_hwdep(struct hda_codec *codec) { return 0; } | 413 | static inline int snd_hda_create_hwdep(struct hda_codec *codec) { return 0; } |
415 | #endif | 414 | #endif |
416 | 415 | ||
416 | #ifdef CONFIG_SND_HDA_RECONFIG | ||
417 | int snd_hda_hwdep_add_sysfs(struct hda_codec *codec); | ||
418 | #else | ||
419 | static inline int snd_hda_hwdep_add_sysfs(struct hda_codec *codec) | ||
420 | { | ||
421 | return 0; | ||
422 | } | ||
423 | #endif | ||
424 | |||
417 | /* | 425 | /* |
418 | * power-management | 426 | * power-management |
419 | */ | 427 | */ |