Loading drivers/video/msm/mdss/mdss_dba_utils.c +7 −2 Original line number Diff line number Diff line Loading @@ -300,6 +300,7 @@ static void mdss_dba_utils_dba_cb(void *data, enum msm_dba_callback_event event) bool operands_present = false; u32 no_of_operands, size, i; u32 operands_offset = MAX_CEC_FRAME_SIZE - MAX_OPERAND_SIZE; struct msm_hdmi_audio_edid_blk blk; if (!udata) { pr_err("Invalid data\n"); Loading @@ -319,11 +320,15 @@ static void mdss_dba_utils_dba_cb(void *data, enum msm_dba_callback_event event) ret = udata->ops.get_raw_edid(udata->dba_data, udata->edid_buf_size, udata->edid_buf, 0); if (!ret) if (!ret) { hdmi_edid_parser(udata->edid_data); else hdmi_edid_get_audio_blk(udata->edid_data, &blk); udata->ops.set_audio_block(udata->dba_data, sizeof(blk), &blk); } else { pr_err("failed to get edid%d\n", ret); } } if (pluggable) { mdss_dba_utils_send_display_notification(udata, 1); Loading drivers/video/msm/msm_dba/adv7533.c +43 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,8 @@ #define MDSS_MAX_PANEL_LEN 256 #define EDID_SEG_SIZE 0x100 /* size of audio and speaker info Block */ #define AUDIO_DATA_SIZE 32 /* 0x94 interrupts */ #define HPD_INT_ENABLE BIT(7) Loading Loading @@ -129,6 +131,7 @@ struct adv7533 { bool is_power_on; void *edid_data; u8 edid_buf[EDID_SEG_SIZE]; u8 audio_spkr_data[AUDIO_DATA_SIZE]; struct workqueue_struct *workq; struct delayed_work adv7533_intr_work_id; struct msm_dba_device_info dev_info; Loading Loading @@ -1274,6 +1277,44 @@ static int adv7533_cec_enable(void *client, bool cec_on, u32 flags) end: return ret; } static void adv7533_set_audio_block(void *client, u32 size, void *buf) { struct adv7533 *pdata = adv7533_get_platform_data(client); if (!pdata || !buf) { pr_err("%s: invalid data\n", __func__); return; } mutex_lock(&pdata->ops_mutex); size = min_t(u32, size, AUDIO_DATA_SIZE); memset(pdata->audio_spkr_data, 0, AUDIO_DATA_SIZE); memcpy(pdata->audio_spkr_data, buf, size); mutex_unlock(&pdata->ops_mutex); } static void adv7533_get_audio_block(void *client, u32 size, void *buf) { struct adv7533 *pdata = adv7533_get_platform_data(client); if (!pdata || !buf) { pr_err("%s: invalid data\n", __func__); return; } mutex_lock(&pdata->ops_mutex); size = min_t(u32, size, AUDIO_DATA_SIZE); memcpy(buf, pdata->audio_spkr_data, size); mutex_unlock(&pdata->ops_mutex); } static int adv7533_check_hpd(void *client, u32 flags) { Loading Loading @@ -1880,6 +1921,8 @@ static int adv7533_register_dba(struct adv7533 *pdata) client_ops->get_edid_size = adv7533_get_edid_size; client_ops->get_raw_edid = adv7533_get_raw_edid; client_ops->check_hpd = adv7533_check_hpd; client_ops->get_audio_block = adv7533_get_audio_block; client_ops->set_audio_block = adv7533_set_audio_block; dev_ops->write_reg = adv7533_write_reg; dev_ops->read_reg = adv7533_read_reg; Loading include/video/msm_dba.h +6 −0 Original line number Diff line number Diff line Loading @@ -466,6 +466,10 @@ struct msm_dba_video_cfg { * @dump_debug_info: dumps debug information to dmesg. * @check_hpd: Check if cable is connected or not. if cable is connected we * send notification to display framework. * @set_audio_block: This function will populate the raw audio speaker block * data along with size of each block in bridgechip buffer. * @get_audio_block: This function will return the raw audio speaker block * along with size of each block. * * The msm_dba_ops structure represents a set of operations that can be * supported by each bridge chip. Depending on the functionality supported by a Loading Loading @@ -564,6 +568,8 @@ struct msm_dba_ops { int (*force_reset)(void *client, u32 flags); int (*dump_debug_info)(void *client, u32 flags); int (*check_hpd)(void *client, u32 flags); void (*set_audio_block)(void *client, u32 size, void *buf); void (*get_audio_block)(void *client, u32 size, void *buf); }; /** Loading Loading
drivers/video/msm/mdss/mdss_dba_utils.c +7 −2 Original line number Diff line number Diff line Loading @@ -300,6 +300,7 @@ static void mdss_dba_utils_dba_cb(void *data, enum msm_dba_callback_event event) bool operands_present = false; u32 no_of_operands, size, i; u32 operands_offset = MAX_CEC_FRAME_SIZE - MAX_OPERAND_SIZE; struct msm_hdmi_audio_edid_blk blk; if (!udata) { pr_err("Invalid data\n"); Loading @@ -319,11 +320,15 @@ static void mdss_dba_utils_dba_cb(void *data, enum msm_dba_callback_event event) ret = udata->ops.get_raw_edid(udata->dba_data, udata->edid_buf_size, udata->edid_buf, 0); if (!ret) if (!ret) { hdmi_edid_parser(udata->edid_data); else hdmi_edid_get_audio_blk(udata->edid_data, &blk); udata->ops.set_audio_block(udata->dba_data, sizeof(blk), &blk); } else { pr_err("failed to get edid%d\n", ret); } } if (pluggable) { mdss_dba_utils_send_display_notification(udata, 1); Loading
drivers/video/msm/msm_dba/adv7533.c +43 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,8 @@ #define MDSS_MAX_PANEL_LEN 256 #define EDID_SEG_SIZE 0x100 /* size of audio and speaker info Block */ #define AUDIO_DATA_SIZE 32 /* 0x94 interrupts */ #define HPD_INT_ENABLE BIT(7) Loading Loading @@ -129,6 +131,7 @@ struct adv7533 { bool is_power_on; void *edid_data; u8 edid_buf[EDID_SEG_SIZE]; u8 audio_spkr_data[AUDIO_DATA_SIZE]; struct workqueue_struct *workq; struct delayed_work adv7533_intr_work_id; struct msm_dba_device_info dev_info; Loading Loading @@ -1274,6 +1277,44 @@ static int adv7533_cec_enable(void *client, bool cec_on, u32 flags) end: return ret; } static void adv7533_set_audio_block(void *client, u32 size, void *buf) { struct adv7533 *pdata = adv7533_get_platform_data(client); if (!pdata || !buf) { pr_err("%s: invalid data\n", __func__); return; } mutex_lock(&pdata->ops_mutex); size = min_t(u32, size, AUDIO_DATA_SIZE); memset(pdata->audio_spkr_data, 0, AUDIO_DATA_SIZE); memcpy(pdata->audio_spkr_data, buf, size); mutex_unlock(&pdata->ops_mutex); } static void adv7533_get_audio_block(void *client, u32 size, void *buf) { struct adv7533 *pdata = adv7533_get_platform_data(client); if (!pdata || !buf) { pr_err("%s: invalid data\n", __func__); return; } mutex_lock(&pdata->ops_mutex); size = min_t(u32, size, AUDIO_DATA_SIZE); memcpy(buf, pdata->audio_spkr_data, size); mutex_unlock(&pdata->ops_mutex); } static int adv7533_check_hpd(void *client, u32 flags) { Loading Loading @@ -1880,6 +1921,8 @@ static int adv7533_register_dba(struct adv7533 *pdata) client_ops->get_edid_size = adv7533_get_edid_size; client_ops->get_raw_edid = adv7533_get_raw_edid; client_ops->check_hpd = adv7533_check_hpd; client_ops->get_audio_block = adv7533_get_audio_block; client_ops->set_audio_block = adv7533_set_audio_block; dev_ops->write_reg = adv7533_write_reg; dev_ops->read_reg = adv7533_read_reg; Loading
include/video/msm_dba.h +6 −0 Original line number Diff line number Diff line Loading @@ -466,6 +466,10 @@ struct msm_dba_video_cfg { * @dump_debug_info: dumps debug information to dmesg. * @check_hpd: Check if cable is connected or not. if cable is connected we * send notification to display framework. * @set_audio_block: This function will populate the raw audio speaker block * data along with size of each block in bridgechip buffer. * @get_audio_block: This function will return the raw audio speaker block * along with size of each block. * * The msm_dba_ops structure represents a set of operations that can be * supported by each bridge chip. Depending on the functionality supported by a Loading Loading @@ -564,6 +568,8 @@ struct msm_dba_ops { int (*force_reset)(void *client, u32 flags); int (*dump_debug_info)(void *client, u32 flags); int (*check_hpd)(void *client, u32 flags); void (*set_audio_block)(void *client, u32 size, void *buf); void (*get_audio_block)(void *client, u32 size, void *buf); }; /** Loading