diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-06-22 11:00:38 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-06-22 11:02:03 -0400 |
commit | 8c8145b8734028f6deb487f7d64748da4c6c39ac (patch) | |
tree | 5453074ea9d8e1d8961d3903e3508ac3296951e6 /sound | |
parent | 8c927b4acf819ed0170bff991bc9eaec4c85deb8 (diff) |
ALSA: hda - Make jack-plug notification selectable
Make the jack-plug notification via input layer selectable via Kconfig.
This is often unnecessary, and the similr function will be provided
using the ALSA control API in near future anyway.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/Kconfig | 9 | ||||
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 4 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 6 |
3 files changed, 13 insertions, 6 deletions
diff --git a/sound/pci/hda/Kconfig b/sound/pci/hda/Kconfig index c710150d5065..04438f1d682d 100644 --- a/sound/pci/hda/Kconfig +++ b/sound/pci/hda/Kconfig | |||
@@ -2,7 +2,6 @@ menuconfig SND_HDA_INTEL | |||
2 | tristate "Intel HD Audio" | 2 | tristate "Intel HD Audio" |
3 | select SND_PCM | 3 | select SND_PCM |
4 | select SND_VMASTER | 4 | select SND_VMASTER |
5 | select SND_JACK if INPUT=y || INPUT=SND | ||
6 | help | 5 | help |
7 | Say Y here to include support for Intel "High Definition | 6 | Say Y here to include support for Intel "High Definition |
8 | Audio" (Azalia) and its compatible devices. | 7 | Audio" (Azalia) and its compatible devices. |
@@ -39,6 +38,14 @@ config SND_HDA_INPUT_BEEP | |||
39 | Say Y here to build a digital beep interface for HD-audio | 38 | Say Y here to build a digital beep interface for HD-audio |
40 | driver. This interface is used to generate digital beeps. | 39 | driver. This interface is used to generate digital beeps. |
41 | 40 | ||
41 | config SND_HDA_INPUT_JACK | ||
42 | bool "Support jack plugging notification via input layer" | ||
43 | depends on INPUT=y || INPUT=SND_HDA_INTEL | ||
44 | select SND_JACK | ||
45 | help | ||
46 | Say Y here to enable the jack plugging notification via | ||
47 | input layer. | ||
48 | |||
42 | config SND_HDA_CODEC_REALTEK | 49 | config SND_HDA_CODEC_REALTEK |
43 | bool "Build Realtek HD-audio codec support" | 50 | bool "Build Realtek HD-audio codec support" |
44 | default y | 51 | default y |
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 4fcbe21829ab..ac868c59f9e3 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -349,7 +349,7 @@ static int conexant_mux_enum_put(struct snd_kcontrol *kcontrol, | |||
349 | &spec->cur_mux[adc_idx]); | 349 | &spec->cur_mux[adc_idx]); |
350 | } | 350 | } |
351 | 351 | ||
352 | #ifdef CONFIG_SND_JACK | 352 | #ifdef CONFIG_SND_HDA_INPUT_JACK |
353 | static void conexant_free_jack_priv(struct snd_jack *jack) | 353 | static void conexant_free_jack_priv(struct snd_jack *jack) |
354 | { | 354 | { |
355 | struct conexant_jack *jacks = jack->private_data; | 355 | struct conexant_jack *jacks = jack->private_data; |
@@ -463,7 +463,7 @@ static int conexant_init(struct hda_codec *codec) | |||
463 | 463 | ||
464 | static void conexant_free(struct hda_codec *codec) | 464 | static void conexant_free(struct hda_codec *codec) |
465 | { | 465 | { |
466 | #ifdef CONFIG_SND_JACK | 466 | #ifdef CONFIG_SND_HDA_INPUT_JACK |
467 | struct conexant_spec *spec = codec->spec; | 467 | struct conexant_spec *spec = codec->spec; |
468 | if (spec->jacks.list) { | 468 | if (spec->jacks.list) { |
469 | struct conexant_jack *jacks = spec->jacks.list; | 469 | struct conexant_jack *jacks = spec->jacks.list; |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 090957735e05..14f3c3e0f62d 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -4035,7 +4035,7 @@ static void stac_gpio_set(struct hda_codec *codec, unsigned int mask, | |||
4035 | AC_VERB_SET_GPIO_DATA, gpiostate); /* sync */ | 4035 | AC_VERB_SET_GPIO_DATA, gpiostate); /* sync */ |
4036 | } | 4036 | } |
4037 | 4037 | ||
4038 | #ifdef CONFIG_SND_JACK | 4038 | #ifdef CONFIG_SND_HDA_INPUT_JACK |
4039 | static void stac92xx_free_jack_priv(struct snd_jack *jack) | 4039 | static void stac92xx_free_jack_priv(struct snd_jack *jack) |
4040 | { | 4040 | { |
4041 | struct sigmatel_jack *jacks = jack->private_data; | 4041 | struct sigmatel_jack *jacks = jack->private_data; |
@@ -4047,7 +4047,7 @@ static void stac92xx_free_jack_priv(struct snd_jack *jack) | |||
4047 | static int stac92xx_add_jack(struct hda_codec *codec, | 4047 | static int stac92xx_add_jack(struct hda_codec *codec, |
4048 | hda_nid_t nid, int type) | 4048 | hda_nid_t nid, int type) |
4049 | { | 4049 | { |
4050 | #ifdef CONFIG_SND_JACK | 4050 | #ifdef CONFIG_SND_HDA_INPUT_JACK |
4051 | struct sigmatel_spec *spec = codec->spec; | 4051 | struct sigmatel_spec *spec = codec->spec; |
4052 | struct sigmatel_jack *jack; | 4052 | struct sigmatel_jack *jack; |
4053 | int def_conf = snd_hda_codec_get_pincfg(codec, nid); | 4053 | int def_conf = snd_hda_codec_get_pincfg(codec, nid); |
@@ -4336,7 +4336,7 @@ static int stac92xx_init(struct hda_codec *codec) | |||
4336 | 4336 | ||
4337 | static void stac92xx_free_jacks(struct hda_codec *codec) | 4337 | static void stac92xx_free_jacks(struct hda_codec *codec) |
4338 | { | 4338 | { |
4339 | #ifdef CONFIG_SND_JACK | 4339 | #ifdef CONFIG_SND_HDA_INPUT_JACK |
4340 | /* free jack instances manually when clearing/reconfiguring */ | 4340 | /* free jack instances manually when clearing/reconfiguring */ |
4341 | struct sigmatel_spec *spec = codec->spec; | 4341 | struct sigmatel_spec *spec = codec->spec; |
4342 | if (!codec->bus->shutdown && spec->jacks.list) { | 4342 | if (!codec->bus->shutdown && spec->jacks.list) { |