[ALSA] HDA-Intel: Fix headphone squeal on Conexant audio
authorTobin Davis <gruemaster@email.uophx.edu>
Tue, 24 Apr 2007 15:56:55 +0000 (17:56 +0200)
committerJaroslav Kysela <perex@suse.cz>
Fri, 11 May 2007 14:56:10 +0000 (16:56 +0200)
This patch fixes the headphone squeal and noise on Conexant CX20551
(Waikiki) audio.

Signed-off-by: Tobin Davis <gruemaster@email.uophx.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
sound/pci/hda/patch_conexant.c

index 2349b5eb5aaa7664e9b998aef6e139e7e2d70968..ddaa811887a62f5d2557a2713e46864ad31ff2ce 100644 (file)
@@ -993,22 +993,10 @@ static struct snd_kcontrol_new cxt5047_mixers[] = {
        HDA_CODEC_MUTE("PCM Switch", 0x10, 0x00, HDA_OUTPUT),
        HDA_CODEC_VOLUME("PCM-2 Volume", 0x1c, 0x00, HDA_OUTPUT),
        HDA_CODEC_MUTE("PCM-2 Switch", 0x1c, 0x00, HDA_OUTPUT),
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               .name = "Master Playback Volume",
-               .info = snd_hda_mixer_amp_volume_info,
-               .get = snd_hda_mixer_amp_volume_get,
-               .put = cxt5047_hp_master_vol_put,
-               .private_value = HDA_COMPOSE_AMP_VAL(0x13, 3, 0, HDA_OUTPUT),
-       },
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               .name = "Master Playback Switch",
-               .info = cxt_eapd_info,
-               .get = cxt_eapd_get,
-               .put = cxt5047_hp_master_sw_put,
-               .private_value = 0x13,
-       },
+       HDA_CODEC_VOLUME("Speaker Playback Volume", 0x1d, 0x00, HDA_OUTPUT),
+       HDA_CODEC_MUTE("Speaker Playback Switch", 0x1d, 0x00, HDA_OUTPUT),
+       HDA_CODEC_VOLUME("Headphone Playback Volume", 0x13, 0x00, HDA_OUTPUT),
+       HDA_CODEC_MUTE("Headphone Playback Switch", 0x13, 0x00, HDA_OUTPUT),
 
        {}
 };
@@ -1079,7 +1067,8 @@ static struct hda_verb cxt5047_init_verbs[] = {
        {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN|AC_PINCTL_VREF_50 },
        {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN|AC_PINCTL_VREF_50 },
        /* HP, Speaker  */
-       {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
+       {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP },
+       {0x13, AC_VERB_SET_CONNECT_SEL,0x1},
        {0x1d, AC_VERB_SET_CONNECT_SEL,0x0},
        /* Record selector: Mic */
        {0x12, AC_VERB_SET_CONNECT_SEL,0x03},