ALSA: hda: Use LPIB for ga-ma770-ud3 board
[safe/jmp/linux-2.6] / sound / pci / hda / patch_ca0110.c
index 392d108..af47801 100644 (file)
@@ -144,7 +144,7 @@ static int _add_switch(struct hda_codec *codec, hda_nid_t nid, const char *pfx,
        struct snd_kcontrol_new knew =
                HDA_CODEC_MUTE_MONO(namestr, nid, chan, 0, type);
        sprintf(namestr, "%s %s Switch", pfx, dirstr[dir]);
-       return snd_hda_ctl_add(codec, snd_ctl_new1(&knew, codec));
+       return snd_hda_ctl_add(codec, nid, snd_ctl_new1(&knew, codec));
 }
 
 static int _add_volume(struct hda_codec *codec, hda_nid_t nid, const char *pfx,
@@ -155,7 +155,7 @@ static int _add_volume(struct hda_codec *codec, hda_nid_t nid, const char *pfx,
        struct snd_kcontrol_new knew =
                HDA_CODEC_VOLUME_MONO(namestr, nid, chan, 0, type);
        sprintf(namestr, "%s %s Volume", pfx, dirstr[dir]);
-       return snd_hda_ctl_add(codec, snd_ctl_new1(&knew, codec));
+       return snd_hda_ctl_add(codec, nid, snd_ctl_new1(&knew, codec));
 }
 
 #define add_out_switch(codec, nid, pfx)        _add_switch(codec, nid, pfx, 3, 0)
@@ -459,8 +459,7 @@ static void parse_input(struct hda_codec *codec)
        nid = codec->start_nid;
        for (i = 0; i < codec->num_nodes; i++, nid++) {
                unsigned int wcaps = get_wcaps(codec, nid);
-               unsigned int type = (wcaps & AC_WCAP_TYPE) >>
-                       AC_WCAP_TYPE_SHIFT;
+               unsigned int type = get_wcaps_type(wcaps);
                if (type != AC_WID_AUD_IN)
                        continue;
                if (snd_hda_get_connections(codec, nid, &pin, 1) != 1)
@@ -510,7 +509,7 @@ static int ca0110_parse_auto_config(struct hda_codec *codec)
 }
 
 
-int patch_ca0110(struct hda_codec *codec)
+static int patch_ca0110(struct hda_codec *codec)
 {
        struct ca0110_spec *spec;
        int err;