From a2fa534537a75901ceb1eb519030ccaafe0cce84 Mon Sep 17 00:00:00 2001 From: Casey Piper Date: Wed, 26 Mar 2014 18:22:37 -0700 Subject: linux: Move hdmi audio codec header to common location Move contents of msm_hdmi_audio_codec.h directory to msm_hdmi.h in common linux directory to remove platform dependence. Change-Id: I6331073ba1e5e119770c5e8cb50f6ff677807292 Signed-off-by: Casey Piper --- include/linux/msm_hdmi.h | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) (limited to 'include/linux') diff --git a/include/linux/msm_hdmi.h b/include/linux/msm_hdmi.h index 70fae94f8881..369d07e7b133 100644 --- a/include/linux/msm_hdmi.h +++ b/include/linux/msm_hdmi.h @@ -14,6 +14,9 @@ #ifndef _MSM_HDMI_H_ #define _MSM_HDMI_H_ +#include +#include + /* * HDMI cable notify handler sturcture. * link A link for the linked list @@ -26,6 +29,23 @@ struct hdmi_cable_notify { void (*hpd_notify) (struct hdmi_cable_notify *h); }; +struct msm_hdmi_audio_edid_blk { + u8 *audio_data_blk; + unsigned int audio_data_blk_size; /* in bytes */ + u8 *spk_alloc_data_blk; + unsigned int spk_alloc_data_blk_size; /* in bytes */ +}; + +struct msm_hdmi_audio_codec_ops { + int (*audio_info_setup)(struct platform_device *pdev, + u32 sample_rate, u32 num_of_channels, + u32 channel_allocation, u32 level_shift, + bool down_mix); + int (*get_audio_edid_blk) (struct platform_device *pdev, + struct msm_hdmi_audio_edid_blk *blk); + int (*hdmi_cable_status) (struct platform_device *pdev, u32 vote); +}; + #ifdef CONFIG_FB_MSM_MDSS_HDMI_PANEL /* * Register for HDMI cable connect or disconnect notification. @@ -42,16 +62,25 @@ int register_hdmi_cable_notification( */ int unregister_hdmi_cable_notification( struct hdmi_cable_notify *handler); + +int msm_hdmi_register_audio_codec(struct platform_device *pdev, + struct msm_hdmi_audio_codec_ops *ops); + #else -int register_hdmi_cable_notification( +static inline int register_hdmi_cable_notification( struct hdmi_cable_notify *handler) { return 0; } -int unregister_hdmi_cable_notification( +static inline int unregister_hdmi_cable_notification( struct hdmi_cable_notify *handler) { return 0; } + +static inline int msm_hdmi_register_audio_codec(struct platform_device *pdev, + struct msm_hdmi_audio_codec_ops *ops) { + return 0; +} #endif /* CONFIG_FB_MSM_MDSS_HDMI_PANEL */ #endif /*_MSM_HDMI_H_*/ -- cgit v1.2.3