Merge branch 'topic/fix/hda' into topic/hda
authorTakashi Iwai <tiwai@suse.de>
Tue, 25 Nov 2008 10:56:25 +0000 (11:56 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 25 Nov 2008 10:56:25 +0000 (11:56 +0100)
Conflicts:
sound/pci/hda/patch_sigmatel.c

1  2 
sound/pci/hda/hda_codec.c
sound/pci/hda/patch_sigmatel.c

Simple merge
@@@ -4127,33 -3994,11 +4150,38 @@@ static void stac_toggle_power_map(struc
        snd_hda_codec_write(codec, codec->afg, 0, 0x7ec, val);
  }
  
+ static void stac92xx_pin_sense(struct hda_codec *codec, hda_nid_t nid)
+ {
+       stac_toggle_power_map(codec, nid, get_hp_pin_presence(codec, nid));
+ }
 +static void stac92xx_report_jack(struct hda_codec *codec, hda_nid_t nid)
 +{
 +      struct sigmatel_spec *spec = codec->spec;
 +      struct sigmatel_jack *jacks = spec->jacks.list;
 +
 +      if (jacks) {
 +              int i;
 +              for (i = 0; i < spec->jacks.used; i++) {
 +                      if (jacks->nid == nid) {
 +                              unsigned int pin_ctl =
 +                                      snd_hda_codec_read(codec, nid,
 +                                      0, AC_VERB_GET_PIN_WIDGET_CONTROL,
 +                                       0x00);
 +                              int type = jacks->type;
 +                              if (type == (SND_JACK_LINEOUT
 +                                              | SND_JACK_HEADPHONE))
 +                                      type = (pin_ctl & AC_PINCTL_HP_EN)
 +                                      ? SND_JACK_HEADPHONE : SND_JACK_LINEOUT;
 +                              snd_jack_report(jacks->jack,
 +                                      get_hp_pin_presence(codec, nid)
 +                                      ? type : 0);
 +                      }
 +                      jacks++;
 +              }
 +      }
 +}
 +
  static void stac92xx_unsol_event(struct hda_codec *codec, unsigned int res)
  {
        struct sigmatel_spec *spec = codec->spec;