Merge branch 'test/hda-jack' into topic/hda
authorTakashi Iwai <tiwai@suse.de>
Tue, 20 Dec 2011 14:42:57 +0000 (15:42 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 20 Dec 2011 14:42:57 +0000 (15:42 +0100)
Conflicts:
sound/pci/hda/patch_hdmi.c
sound/pci/hda/patch_via.c

1  2 
sound/pci/hda/hda_codec.c
sound/pci/hda/hda_codec.h
sound/pci/hda/patch_cirrus.c
sound/pci/hda/patch_hdmi.c
sound/pci/hda/patch_realtek.c
sound/pci/hda/patch_sigmatel.c
sound/pci/hda/patch_via.c

Simple merge
Simple merge
Simple merge
index 6e0756febb2e4753fd1f6c1bb13b9363c64190f1,66dc7e651758d60febd5a1d800fc72eab879fb72..3f42cc965b464938c86924b913c77cbcdf5c49a3
@@@ -767,7 -775,8 +776,8 @@@ static void hdmi_intrinsic_event(struc
        if (pin_idx < 0)
                return;
  
 -      hdmi_present_sense(&spec->pins[pin_idx], true);
 +      hdmi_present_sense(&spec->pins[pin_idx], 1);
+       snd_hda_jack_report_sync(codec);
  }
  
  static void hdmi_non_intrinsic_event(struct hda_codec *codec, unsigned int res)
@@@ -1232,15 -1235,10 +1239,11 @@@ static int generic_hdmi_build_jack(stru
        struct hdmi_spec_per_pin *per_pin = &spec->pins[pin_idx];
        int pcmdev = spec->pcm_rec[pin_idx].device;
  
-       snprintf(hdmi_str, sizeof(hdmi_str), "HDMI/DP,pcm=%d", pcmdev);
-       err = snd_hda_input_jack_add(codec, per_pin->pin_nid,
-                            SND_JACK_VIDEOOUT, pcmdev > 0 ? hdmi_str : NULL);
-       if (err < 0)
-               return err;
+       if (pcmdev > 0)
+               sprintf(hdmi_str + strlen(hdmi_str), ",pcm=%d", pcmdev);
  
-       return 0;
 +      hdmi_present_sense(per_pin, 0);
+       return snd_hda_jack_add_kctl(codec, per_pin->pin_nid, hdmi_str, 0);
  }
  
  static int generic_hdmi_build_controls(struct hda_codec *codec)
Simple merge
Simple merge
index b5137629f8e942a75a941e0e183cef98fb58db02,f73c98638abd35883413b74f13e490c6d887bf0e..ab56866cc94e495f1a13847d662e691afc5edb90
@@@ -2778,7 -2776,7 +2783,8 @@@ static int via_init(struct hda_codec *c
        via_auto_init_unsol_event(codec);
  
        via_hp_automute(codec);
 +      vt1708_update_hp_work(spec);
+       snd_hda_jack_report_sync(codec);
  
        return 0;
  }