Just as for headphones and microphone jacks, this patch adds reporting
of HDMI jack status through the input layer.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
return "Line-out";
case SND_JACK_HEADSET:
return "Headset";
return "Line-out";
case SND_JACK_HEADSET:
return "Headset";
+ case SND_JACK_VIDEOOUT:
+ return "HDMI/DP";
default:
return "Misc";
}
default:
return "Misc";
}
#include <linux/slab.h>
#include <linux/moduleparam.h>
#include <sound/core.h>
#include <linux/slab.h>
#include <linux/moduleparam.h>
#include <sound/core.h>
#include "hda_codec.h"
#include "hda_local.h"
#include "hda_codec.h"
#include "hda_local.h"
&spec->sink_eld[index]);
/* TODO: do real things about ELD */
}
&spec->sink_eld[index]);
/* TODO: do real things about ELD */
}
+
+ snd_hda_input_jack_report(codec, tag);
}
static void hdmi_non_intrinsic_event(struct hda_codec *codec, unsigned int res)
}
static void hdmi_non_intrinsic_event(struct hda_codec *codec, unsigned int res)
static int hdmi_add_pin(struct hda_codec *codec, hda_nid_t pin_nid)
{
struct hdmi_spec *spec = codec->spec;
static int hdmi_add_pin(struct hda_codec *codec, hda_nid_t pin_nid)
{
struct hdmi_spec *spec = codec->spec;
if (spec->num_pins >= MAX_HDMI_PINS) {
snd_printk(KERN_WARNING
if (spec->num_pins >= MAX_HDMI_PINS) {
snd_printk(KERN_WARNING
+ err = snd_hda_input_jack_add(codec, pin_nid,
+ SND_JACK_VIDEOOUT, NULL);
+ if (err < 0)
+ return err;
+ snd_hda_input_jack_report(codec, pin_nid);
+
hdmi_present_sense(codec, pin_nid, &spec->sink_eld[spec->num_pins]);
spec->pin[spec->num_pins] = pin_nid;
hdmi_present_sense(codec, pin_nid, &spec->sink_eld[spec->num_pins]);
spec->pin[spec->num_pins] = pin_nid;
for (i = 0; i < spec->num_pins; i++)
snd_hda_eld_proc_free(codec, &spec->sink_eld[i]);
for (i = 0; i < spec->num_pins; i++)
snd_hda_eld_proc_free(codec, &spec->sink_eld[i]);
+ snd_hda_input_jack_free(codec);