diff --git a/interfaces/display/2.1/impl/handlers/BerlinVideoOutput.cpp b/interfaces/display/2.1/impl/handlers/BerlinVideoOutput.cpp index 291c073..79abb9b 100644 --- a/interfaces/display/2.1/impl/handlers/BerlinVideoOutput.cpp +++ b/interfaces/display/2.1/impl/handlers/BerlinVideoOutput.cpp @@ -839,46 +839,46 @@ status_t BerlinVideoOutput::SetDisplayMode(VideoOutputType vout_type, disp_handle_, AMP_DISP_TG_PRI, resID, hdmi_vout_config_.bit_depth); AVS_CHECK(ret, "AMP_DISP_OUT_SetResolution"); - } - //Vas add modified; River 2021/09/17 - - AMP_RPC(ret, AMP_DISP_OUT_HDMI_SetVidFmt, - disp_handle_, - hdmi_vout_config_.color_format, - hdmi_vout_config_.bit_depth, - hdmi_vout_config_.pixel_repetition); - AVS_CHECK(ret, "AMP_DISP_OUT_HDMI_SetVidFmt"); - - // only need to check SD resolution - if (display_mode.width <= 720) { - for (uint32_t i = 0; i < hdmi_sink_caps_.uiResCnt && i < 64; i++) { - if (hdmi_sink_caps_.ResInfo[i].ihActive == (int)display_mode.width && - hdmi_sink_caps_.ResInfo[i].ivActive == (int)display_mode.height) { - aspect = hdmi_sink_caps_.ResInfo[i].iAspRatio; - break; - } - } - - if (aspect == AMP_DISP_OUT_ASPECT_RATIO_4BY3 || - aspect == AMP_DISP_OUT_ASPECT_RATIO_16BY9) { - // scaninfor unchanged, configure it to -1 - AMP_RPC(ret, AMP_DISP_OUT_HDMI_SetVidInfo, disp_handle_, aspect, -1); - AVS_CHECK(ret, "AMP_DISP_OUT_HDMI_SetVidInfo"); - } - } - - // Reset HDR enable setting concern the new format support HDR - ResetHdrSettings(); - - if (notify) { - // Check if notify is required - // We have already notified observers if call from ApplySetting - value.setString(display_mode.ToString()); - key = AVSettingsHelper::GetFullKey(marvell::kVideoOutputSettingsPrefix, - marvell::kHDMIDisplayMode); - av_settings_handle_->NotifyValue(key.string(), value); - } - + //Vas add modified; River 2021/09/17 + + AMP_RPC(ret, AMP_DISP_OUT_HDMI_SetVidFmt, + disp_handle_, + hdmi_vout_config_.color_format, + hdmi_vout_config_.bit_depth, + hdmi_vout_config_.pixel_repetition); + AVS_CHECK(ret, "AMP_DISP_OUT_HDMI_SetVidFmt"); + + // only need to check SD resolution + if (display_mode.width <= 720) { + for (uint32_t i = 0; i < hdmi_sink_caps_.uiResCnt && i < 64; i++) { + if (hdmi_sink_caps_.ResInfo[i].ihActive == (int)display_mode.width && + hdmi_sink_caps_.ResInfo[i].ivActive == (int)display_mode.height) { + aspect = hdmi_sink_caps_.ResInfo[i].iAspRatio; + break; + } + } + + if (aspect == AMP_DISP_OUT_ASPECT_RATIO_4BY3 || + aspect == AMP_DISP_OUT_ASPECT_RATIO_16BY9) { + // scaninfor unchanged, configure it to -1 + AMP_RPC(ret, AMP_DISP_OUT_HDMI_SetVidInfo, disp_handle_, aspect, -1); + AVS_CHECK(ret, "AMP_DISP_OUT_HDMI_SetVidInfo"); + } + } + + // Reset HDR enable setting concern the new format support HDR + ResetHdrSettings(); + + if (notify) { + // Check if notify is required + // We have already notified observers if call from ApplySetting + value.setString(display_mode.ToString()); + key = AVSettingsHelper::GetFullKey(marvell::kVideoOutputSettingsPrefix, + marvell::kHDMIDisplayMode); + av_settings_handle_->NotifyValue(key.string(), value); + } + } + AVS_FUNC_LEAVE return android::OK;