Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9f113e0ef47451defa950eed738d87387c0aa8f6
Commit:     9f113e0ef47451defa950eed738d87387c0aa8f6
Parent:     15908c36aaefe9f1300fd2f0ee6d5d848131b217
Author:     Marc Boucher <[EMAIL PROTECTED]>
AuthorDate: Tue Jan 22 15:18:08 2008 +0100
Committer:  Jaroslav Kysela <[EMAIL PROTECTED]>
CommitDate: Thu Jan 31 17:30:10 2008 +0100

    [ALSA] hda-codec - Add missing input controls for Cxt5047 test model
    
    The input volume/switch elements are missing in Cxt5047 test model.
    Also the patch includes some code clean ups.
    
    Signed-off-by: Marc Boucher <[EMAIL PROTECTED]>
    Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]>
    Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]>
---
 sound/pci/hda/patch_conexant.c |   22 ++++++++++++++++------
 1 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index ea3559f..1ed0f07 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -1020,13 +1020,13 @@ static void cxt5047_hp2_automute(struct hda_codec 
*codec)
 static void cxt5047_hp_automic(struct hda_codec *codec)
 {
        static struct hda_verb mic_jack_on[] = {
-               {0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080},
-               {0x17, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000},
+               {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
+               {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
                {}
        };
        static struct hda_verb mic_jack_off[] = {
-               {0x17, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080},
-               {0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000},
+               {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
+               {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
                {}
        };
        unsigned int present;
@@ -1043,8 +1043,7 @@ static void cxt5047_hp_automic(struct hda_codec *codec)
 static void cxt5047_hp_unsol_event(struct hda_codec *codec,
                                  unsigned int res)
 {
-       res >>= 26;
-       switch (res) {
+       switch (res >> 26) {
        case CONEXANT_HP_EVENT:
                cxt5047_hp_automute(codec);
                break;
@@ -1253,6 +1252,17 @@ static struct snd_kcontrol_new cxt5047_test_mixer[] = {
                .get = conexant_mux_enum_get,
                .put = conexant_mux_enum_put,
        },
+       HDA_CODEC_VOLUME("Input-1 Volume", 0x1a, 0x0, HDA_INPUT),
+       HDA_CODEC_MUTE("Input-1 Switch", 0x1a, 0x0, HDA_INPUT),
+       HDA_CODEC_VOLUME("Input-2 Volume", 0x1a, 0x1, HDA_INPUT),
+       HDA_CODEC_MUTE("Input-2 Switch", 0x1a, 0x1, HDA_INPUT),
+       HDA_CODEC_VOLUME("Input-3 Volume", 0x1a, 0x2, HDA_INPUT),
+       HDA_CODEC_MUTE("Input-3 Switch", 0x1a, 0x2, HDA_INPUT),
+       HDA_CODEC_VOLUME("Input-4 Volume", 0x1a, 0x3, HDA_INPUT),
+       HDA_CODEC_MUTE("Input-4 Switch", 0x1a, 0x3, HDA_INPUT),
+       HDA_CODEC_VOLUME("Input-5 Volume", 0x1a, 0x4, HDA_INPUT),
+       HDA_CODEC_MUTE("Input-5 Switch", 0x1a, 0x4, HDA_INPUT),
+
        { } /* end */
 };
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to