Loading Documentation/devicetree/bindings/fb/msm-hdmi-tx.txt +12 −0 Original line number Diff line number Diff line Loading @@ -61,7 +61,17 @@ these devices will be disabled as well. Ex. HDMI Audio Codec device. Required properties: - compatible : "msm-hdmi-audio-codec-rx"; msm_ext_disp is a device which manages the interaction between external displays (HDMI and Display Port) and the audio and display frameworks. Required properties: - compatible: Must be "qcom,msm-ext-disp" Example: msm_ext_disp: qcom,msm_ext_disp { compatible = "qcom,msm-ext-disp"; }; mdss_hdmi_tx: qcom,hdmi_tx@fd922100 { cell-index = <0>; compatible = "qcom,hdmi-tx"; Loading @@ -83,6 +93,8 @@ Example: qcom,enable-load = <0 0 0 1800000 0>; qcom,disable-load = <0 0 0 0 0>; qcom,msm_ext_disp = <&msm_ext_disp>; qcom,hdmi-tx-ddc-mux-sel = <&pma8084_gpios 6 0>; qcom,hdmi-tx-cec = <&msmgpio 31 0>; qcom,hdmi-tx-ddc-clk = <&msmgpio 32 0>; Loading arch/arm/boot/dts/qcom/msmcobalt-mdss.dtsi +7 −1 Original line number Diff line number Diff line Loading @@ -589,6 +589,10 @@ }; }; msm_ext_disp: qcom,msm_ext_disp { compatible = "qcom,msm-ext-disp"; }; mdss_hdmi_tx: qcom,hdmi_tx@c9a0000 { cell-index = <0>; compatible = "qcom,hdmi-tx"; Loading @@ -606,6 +610,8 @@ qcom,enable-load = <0>; qcom,disable-load = <0>; qcom,msm_ext_disp = <&msm_ext_disp>; clocks = <&clock_mmss clk_mmss_mnoc_ahb_clk>, <&clock_mmss clk_mmss_mdss_ahb_clk>, <&clock_mmss clk_mmss_mdss_hdmi_clk>, Loading drivers/video/fbdev/msm/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ obj-$(CONFIG_FB_MSM_MDSS_DP_PANEL) += mdss_dp.o mdss_dp_util.o obj-$(CONFIG_FB_MSM_MDSS_DP_PANEL) += mdss_dp_aux.o obj-$(CONFIG_FB_MSM_MDSS) += mdss_io_util.o obj-$(CONFIG_FB_MSM_MDSS) += msm_ext_display.o obj-$(CONFIG_FB_MSM_MDSS_HDMI_PANEL) += mdss_hdmi_tx.o obj-$(CONFIG_FB_MSM_MDSS_HDMI_PANEL) += mdss_hdmi_panel.o obj-$(CONFIG_FB_MSM_MDSS_HDMI_PANEL) += mdss_hdmi_hdcp.o Loading drivers/video/fbdev/msm/mdss_hdmi_audio.c +1 −100 Original line number Diff line number Diff line Loading @@ -65,7 +65,6 @@ enum hdmi_audio_sample_rates { struct hdmi_audio { struct dss_io_data *io; struct msm_ext_disp_audio_setup_params params; struct switch_dev sdev; u32 pclk; bool ack_enabled; bool audio_ack_enabled; Loading Loading @@ -370,76 +369,6 @@ static void hdmi_audio_off(void *ctx) pr_debug("HDMI Audio: Disabled\n"); } static void hdmi_audio_notify(void *ctx, int val) { struct hdmi_audio *audio = ctx; int state = 0; bool switched; if (!audio) { pr_err("invalid input\n"); return; } state = audio->sdev.state; if (state == val) return; if (audio->ack_enabled && atomic_read(&audio->ack_pending)) { pr_err("%s ack pending, not notifying %s\n", state ? "connect" : "disconnect", val ? "connect" : "disconnect"); return; } switch_set_state(&audio->sdev, val); switched = audio->sdev.state != state; if (audio->ack_enabled && switched) atomic_set(&audio->ack_pending, 1); pr_debug("audio %s %s\n", switched ? "switched to" : "same as", audio->sdev.state ? "HDMI" : "SPKR"); } static void hdmi_audio_ack(void *ctx, u32 ack, u32 hpd) { struct hdmi_audio *audio = ctx; u32 ack_hpd; if (!audio) { pr_err("invalid input\n"); return; } if (ack & AUDIO_ACK_SET_ENABLE) { audio->ack_enabled = ack & AUDIO_ACK_ENABLE ? true : false; pr_debug("audio ack feature %s\n", audio->ack_enabled ? "enabled" : "disabled"); return; } if (!audio->ack_enabled) return; atomic_set(&audio->ack_pending, 0); ack_hpd = ack & AUDIO_ACK_CONNECT; pr_debug("acknowledging %s\n", ack_hpd ? "connect" : "disconnect"); if (ack_hpd != hpd) { pr_debug("unbalanced audio state, ack %d, hpd %d\n", ack_hpd, hpd); hdmi_audio_notify(ctx, hpd); } } static void hdmi_audio_reset(void *ctx) { struct hdmi_audio *audio = ctx; Loading @@ -452,20 +381,6 @@ static void hdmi_audio_reset(void *ctx) atomic_set(&audio->ack_pending, 0); } static void hdmi_audio_status(void *ctx, struct hdmi_audio_status *status) { struct hdmi_audio *audio = ctx; if (!audio || !status) { pr_err("invalid input\n"); return; } status->ack_enabled = audio->ack_enabled; status->ack_pending = atomic_read(&audio->ack_pending); status->switched = audio->sdev.state; } /** * hdmi_audio_register() - audio registeration function * @data: registeration initialization data Loading @@ -480,7 +395,6 @@ static void hdmi_audio_status(void *ctx, struct hdmi_audio_status *status) void *hdmi_audio_register(struct hdmi_audio_init_data *data) { struct hdmi_audio *audio = NULL; int rc = 0; if (!data) goto end; Loading @@ -489,22 +403,11 @@ void *hdmi_audio_register(struct hdmi_audio_init_data *data) if (!audio) goto end; audio->sdev.name = "hdmi_audio"; rc = switch_dev_register(&audio->sdev); if (rc) { pr_err("audio switch registration failed\n"); kzfree(audio); goto end; } audio->io = data->io; data->ops->on = hdmi_audio_on; data->ops->off = hdmi_audio_off; data->ops->notify = hdmi_audio_notify; data->ops->ack = hdmi_audio_ack; data->ops->reset = hdmi_audio_reset; data->ops->status = hdmi_audio_status; end: return audio; } Loading @@ -519,8 +422,6 @@ void hdmi_audio_unregister(void *ctx) { struct hdmi_audio *audio = ctx; if (audio) { switch_dev_unregister(&audio->sdev); if (audio) kfree(ctx); } } drivers/video/fbdev/msm/mdss_hdmi_audio.h +0 −21 Original line number Diff line number Diff line Loading @@ -16,24 +16,6 @@ #include <linux/mdss_io_util.h> #include <linux/msm_ext_display.h> #define AUDIO_ACK_SET_ENABLE BIT(5) #define AUDIO_ACK_ENABLE BIT(4) #define AUDIO_ACK_CONNECT BIT(0) /** * struct hdmi_audio_status - hdmi audio current status info * @ack_pending: notification acknowledgment status * @ack_enabled: acknowledgment feature is enabled or disabled * @switched: audio notification status for routing * * Data for client to query about the current status of audio */ struct hdmi_audio_status { bool ack_pending; bool ack_enabled; bool switched; }; /** * struct hdmi_audio_ops - audio operations for clients to call * @on: function pointer to enable audio Loading @@ -49,9 +31,6 @@ struct hdmi_audio_ops { struct msm_ext_disp_audio_setup_params *params); void (*off)(void *ctx); void (*reset)(void *ctx); void (*status)(void *ctx, struct hdmi_audio_status *status); void (*notify)(void *ctx, int val); void (*ack)(void *ctx, u32 ack, u32 hpd); }; /** Loading Loading
Documentation/devicetree/bindings/fb/msm-hdmi-tx.txt +12 −0 Original line number Diff line number Diff line Loading @@ -61,7 +61,17 @@ these devices will be disabled as well. Ex. HDMI Audio Codec device. Required properties: - compatible : "msm-hdmi-audio-codec-rx"; msm_ext_disp is a device which manages the interaction between external displays (HDMI and Display Port) and the audio and display frameworks. Required properties: - compatible: Must be "qcom,msm-ext-disp" Example: msm_ext_disp: qcom,msm_ext_disp { compatible = "qcom,msm-ext-disp"; }; mdss_hdmi_tx: qcom,hdmi_tx@fd922100 { cell-index = <0>; compatible = "qcom,hdmi-tx"; Loading @@ -83,6 +93,8 @@ Example: qcom,enable-load = <0 0 0 1800000 0>; qcom,disable-load = <0 0 0 0 0>; qcom,msm_ext_disp = <&msm_ext_disp>; qcom,hdmi-tx-ddc-mux-sel = <&pma8084_gpios 6 0>; qcom,hdmi-tx-cec = <&msmgpio 31 0>; qcom,hdmi-tx-ddc-clk = <&msmgpio 32 0>; Loading
arch/arm/boot/dts/qcom/msmcobalt-mdss.dtsi +7 −1 Original line number Diff line number Diff line Loading @@ -589,6 +589,10 @@ }; }; msm_ext_disp: qcom,msm_ext_disp { compatible = "qcom,msm-ext-disp"; }; mdss_hdmi_tx: qcom,hdmi_tx@c9a0000 { cell-index = <0>; compatible = "qcom,hdmi-tx"; Loading @@ -606,6 +610,8 @@ qcom,enable-load = <0>; qcom,disable-load = <0>; qcom,msm_ext_disp = <&msm_ext_disp>; clocks = <&clock_mmss clk_mmss_mnoc_ahb_clk>, <&clock_mmss clk_mmss_mdss_ahb_clk>, <&clock_mmss clk_mmss_mdss_hdmi_clk>, Loading
drivers/video/fbdev/msm/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ obj-$(CONFIG_FB_MSM_MDSS_DP_PANEL) += mdss_dp.o mdss_dp_util.o obj-$(CONFIG_FB_MSM_MDSS_DP_PANEL) += mdss_dp_aux.o obj-$(CONFIG_FB_MSM_MDSS) += mdss_io_util.o obj-$(CONFIG_FB_MSM_MDSS) += msm_ext_display.o obj-$(CONFIG_FB_MSM_MDSS_HDMI_PANEL) += mdss_hdmi_tx.o obj-$(CONFIG_FB_MSM_MDSS_HDMI_PANEL) += mdss_hdmi_panel.o obj-$(CONFIG_FB_MSM_MDSS_HDMI_PANEL) += mdss_hdmi_hdcp.o Loading
drivers/video/fbdev/msm/mdss_hdmi_audio.c +1 −100 Original line number Diff line number Diff line Loading @@ -65,7 +65,6 @@ enum hdmi_audio_sample_rates { struct hdmi_audio { struct dss_io_data *io; struct msm_ext_disp_audio_setup_params params; struct switch_dev sdev; u32 pclk; bool ack_enabled; bool audio_ack_enabled; Loading Loading @@ -370,76 +369,6 @@ static void hdmi_audio_off(void *ctx) pr_debug("HDMI Audio: Disabled\n"); } static void hdmi_audio_notify(void *ctx, int val) { struct hdmi_audio *audio = ctx; int state = 0; bool switched; if (!audio) { pr_err("invalid input\n"); return; } state = audio->sdev.state; if (state == val) return; if (audio->ack_enabled && atomic_read(&audio->ack_pending)) { pr_err("%s ack pending, not notifying %s\n", state ? "connect" : "disconnect", val ? "connect" : "disconnect"); return; } switch_set_state(&audio->sdev, val); switched = audio->sdev.state != state; if (audio->ack_enabled && switched) atomic_set(&audio->ack_pending, 1); pr_debug("audio %s %s\n", switched ? "switched to" : "same as", audio->sdev.state ? "HDMI" : "SPKR"); } static void hdmi_audio_ack(void *ctx, u32 ack, u32 hpd) { struct hdmi_audio *audio = ctx; u32 ack_hpd; if (!audio) { pr_err("invalid input\n"); return; } if (ack & AUDIO_ACK_SET_ENABLE) { audio->ack_enabled = ack & AUDIO_ACK_ENABLE ? true : false; pr_debug("audio ack feature %s\n", audio->ack_enabled ? "enabled" : "disabled"); return; } if (!audio->ack_enabled) return; atomic_set(&audio->ack_pending, 0); ack_hpd = ack & AUDIO_ACK_CONNECT; pr_debug("acknowledging %s\n", ack_hpd ? "connect" : "disconnect"); if (ack_hpd != hpd) { pr_debug("unbalanced audio state, ack %d, hpd %d\n", ack_hpd, hpd); hdmi_audio_notify(ctx, hpd); } } static void hdmi_audio_reset(void *ctx) { struct hdmi_audio *audio = ctx; Loading @@ -452,20 +381,6 @@ static void hdmi_audio_reset(void *ctx) atomic_set(&audio->ack_pending, 0); } static void hdmi_audio_status(void *ctx, struct hdmi_audio_status *status) { struct hdmi_audio *audio = ctx; if (!audio || !status) { pr_err("invalid input\n"); return; } status->ack_enabled = audio->ack_enabled; status->ack_pending = atomic_read(&audio->ack_pending); status->switched = audio->sdev.state; } /** * hdmi_audio_register() - audio registeration function * @data: registeration initialization data Loading @@ -480,7 +395,6 @@ static void hdmi_audio_status(void *ctx, struct hdmi_audio_status *status) void *hdmi_audio_register(struct hdmi_audio_init_data *data) { struct hdmi_audio *audio = NULL; int rc = 0; if (!data) goto end; Loading @@ -489,22 +403,11 @@ void *hdmi_audio_register(struct hdmi_audio_init_data *data) if (!audio) goto end; audio->sdev.name = "hdmi_audio"; rc = switch_dev_register(&audio->sdev); if (rc) { pr_err("audio switch registration failed\n"); kzfree(audio); goto end; } audio->io = data->io; data->ops->on = hdmi_audio_on; data->ops->off = hdmi_audio_off; data->ops->notify = hdmi_audio_notify; data->ops->ack = hdmi_audio_ack; data->ops->reset = hdmi_audio_reset; data->ops->status = hdmi_audio_status; end: return audio; } Loading @@ -519,8 +422,6 @@ void hdmi_audio_unregister(void *ctx) { struct hdmi_audio *audio = ctx; if (audio) { switch_dev_unregister(&audio->sdev); if (audio) kfree(ctx); } }
drivers/video/fbdev/msm/mdss_hdmi_audio.h +0 −21 Original line number Diff line number Diff line Loading @@ -16,24 +16,6 @@ #include <linux/mdss_io_util.h> #include <linux/msm_ext_display.h> #define AUDIO_ACK_SET_ENABLE BIT(5) #define AUDIO_ACK_ENABLE BIT(4) #define AUDIO_ACK_CONNECT BIT(0) /** * struct hdmi_audio_status - hdmi audio current status info * @ack_pending: notification acknowledgment status * @ack_enabled: acknowledgment feature is enabled or disabled * @switched: audio notification status for routing * * Data for client to query about the current status of audio */ struct hdmi_audio_status { bool ack_pending; bool ack_enabled; bool switched; }; /** * struct hdmi_audio_ops - audio operations for clients to call * @on: function pointer to enable audio Loading @@ -49,9 +31,6 @@ struct hdmi_audio_ops { struct msm_ext_disp_audio_setup_params *params); void (*off)(void *ctx); void (*reset)(void *ctx); void (*status)(void *ctx, struct hdmi_audio_status *status); void (*notify)(void *ctx, int val); void (*ack)(void *ctx, u32 ack, u32 hpd); }; /** Loading