diff options
author | Cheng-Yi Chiang <cychiang@chromium.org> | 2019-07-17 11:33:23 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-09-09 16:50:03 +0300 |
commit | 6fa5963c37a2e3335eba0b7455e35a01318ebc15 (patch) | |
tree | db022d21562efc12856c2efa7b5a82f3e601560c /include | |
parent | dfe58f2011595e7512bde9dffbd0abfc3a736ab7 (diff) | |
download | linux-6fa5963c37a2e3335eba0b7455e35a01318ebc15.tar.xz |
ASoC: hdmi-codec: Add an op to set callback function for plug event
Add an op in hdmi_codec_ops so codec driver can register callback
function to handle plug event.
Driver in DRM can use this callback function to report connector status.
Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org>
Link: https://lore.kernel.org/r/20190717083327.47646-2-cychiang@chromium.org
Reviewed-by: Tzung-Bi Shih <tzungbi@google.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/sound/hdmi-codec.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/sound/hdmi-codec.h b/include/sound/hdmi-codec.h index 7fea496f1f34..83b17682e01c 100644 --- a/include/sound/hdmi-codec.h +++ b/include/sound/hdmi-codec.h @@ -47,6 +47,9 @@ struct hdmi_codec_params { int channels; }; +typedef void (*hdmi_codec_plugged_cb)(struct device *dev, + bool plugged); + struct hdmi_codec_pdata; struct hdmi_codec_ops { /* @@ -88,6 +91,14 @@ struct hdmi_codec_ops { */ int (*get_dai_id)(struct snd_soc_component *comment, struct device_node *endpoint); + + /* + * Hook callback function to handle connector plug event. + * Optional + */ + int (*hook_plugged_cb)(struct device *dev, void *data, + hdmi_codec_plugged_cb fn, + struct device *codec_dev); }; /* HDMI codec initalization data */ @@ -99,6 +110,12 @@ struct hdmi_codec_pdata { void *data; }; +struct snd_soc_component; +struct snd_soc_jack; + +int hdmi_codec_set_jack_detect(struct snd_soc_component *component, + struct snd_soc_jack *jack); + #define HDMI_CODEC_DRV_NAME "hdmi-audio-codec" #endif /* __HDMI_CODEC_H__ */ |