This is Russell's HDMI notification prototype [1], currently waiting for the HDMI CEC situation to resolve. The use case for the notifications on MediaTek MT8173 is to let the (dis)connection notifications control an ALSA jack object. No Signed-off-by since this is not my code, and still up for discussion. [1] https://patchwork.kernel.org/patch/8351501/ (am from https://patchwork.kernel.org/patch/8887261/) Signed-off-by: Chris Zhong <zyw@rock-chips.com> Change-Id: I87daa156de6cfa7ff8db9df9d8ecc8c42d76798f
44 lines
898 B
C
44 lines
898 B
C
#ifndef LINUX_HDMI_NOTIFIER_H
|
|
#define LINUX_HDMI_NOTIFIER_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
enum {
|
|
HDMI_CONNECTED,
|
|
HDMI_DISCONNECTED,
|
|
HDMI_NEW_EDID,
|
|
HDMI_NEW_ELD,
|
|
};
|
|
|
|
struct hdmi_event_base {
|
|
struct device *source;
|
|
};
|
|
|
|
struct hdmi_event_new_edid {
|
|
struct hdmi_event_base base;
|
|
const void *edid;
|
|
size_t size;
|
|
};
|
|
|
|
struct hdmi_event_new_eld {
|
|
struct hdmi_event_base base;
|
|
unsigned char eld[128];
|
|
};
|
|
|
|
union hdmi_event {
|
|
struct hdmi_event_base base;
|
|
struct hdmi_event_new_edid edid;
|
|
struct hdmi_event_new_eld eld;
|
|
};
|
|
|
|
struct notifier_block;
|
|
|
|
int hdmi_register_notifier(struct notifier_block *nb);
|
|
int hdmi_unregister_notifier(struct notifier_block *nb);
|
|
|
|
void hdmi_event_connect(struct device *dev);
|
|
void hdmi_event_disconnect(struct device *dev);
|
|
void hdmi_event_new_edid(struct device *dev, const void *edid, size_t size);
|
|
void hdmi_event_new_eld(struct device *dev, const void *eld);
|
|
|
|
#endif
|