From: Takashi Iwai Date: Tue, 20 Dec 2011 14:42:57 +0000 (+0100) Subject: Merge branch 'test/hda-jack' into topic/hda X-Git-Tag: MMI-PSA29.97-13-9~16612^2~116^2~13 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=78c058df6a120044455b5635daefdc515bf9d899;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git Merge branch 'test/hda-jack' into topic/hda Conflicts: sound/pci/hda/patch_hdmi.c sound/pci/hda/patch_via.c --- 78c058df6a120044455b5635daefdc515bf9d899 diff --cc sound/pci/hda/patch_hdmi.c index 6e0756febb2e,66dc7e651758..3f42cc965b46 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@@ -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); + hdmi_present_sense(per_pin, 0); - return 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) diff --cc sound/pci/hda/patch_via.c index b5137629f8e9,f73c98638abd..ab56866cc94e --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c @@@ -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; }