Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/L2-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ jobs:
/tmp/persistent
/tmp/persistent/rdkservicestore
/opt/logs
/opt/panel
/lib/rdk
/run/media/sda1/logs/PreviousLogs
/run/media/sda2/logs/PreviousLogs
Expand All @@ -485,6 +486,7 @@ jobs:
/opt/tmtryoptout
/opt/fwdnldstatus.txt
/opt/dcm.properties
/opt/panel/AVOutput.ini
/etc/device.properties
/etc/dcm.properties
/etc/authService.conf
Expand Down Expand Up @@ -515,6 +517,7 @@ jobs:
/opt/tmtryoptout
/opt/fwdnldstatus.txt
/opt/dcm.properties
/opt/panel/AVOutput.ini
/etc/device.properties
/etc/dcm.properties
/etc/authService.conf
Expand Down
60 changes: 59 additions & 1 deletion AVOutput/AVOutputTVHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,7 @@ namespace Plugin {
{
tvError_t ret = tvERROR_NONE;
std::string key;
printf("1.updateAVoutputTVParamToHAL: key = %s, forParam = %s, value = %d, setNotDelete = %d\n", key.c_str(), forParam.c_str(), value, setNotDelete);

if( forParam.compare("CMS") == 0 )
generateStorageIdentifierCMS(key,forParam,indexInfo);
Expand All @@ -912,6 +913,8 @@ namespace Plugin {
else
generateStorageIdentifier(key,forParam,indexInfo);

printf("2.updateAVoutputTVParamToHAL: key = %s, forParam = %s, value = %d, setNotDelete = %d\n", key.c_str(), forParam.c_str(), value, setNotDelete);

if(key.empty()) {
LOGERR("generateStorageIdentifierDirty failed\n");
ret = tvERROR_GENERAL;
Expand All @@ -922,14 +925,22 @@ namespace Plugin {
std::string toStore = std::to_string(value);
if (forParam.compare("ColorTemp") == 0) {
getColorTempStringFromEnum(value, toStore);
printf("ColorTemp enum: %d, string: %s\n", value, toStore.c_str());
// printf("Saving Color Temperature for source %d, pqmode %d, format %d with level %d\n", indexInfo.sourceIndex, indexInfo.pqmodeIndex, indexInfo.formatIndex, value);
}
else if(forParam.compare("DimmingMode") == 0 ) {
getDimmingModeStringFromEnum(value, toStore);
printf("DimmingMode enum: %d, string: %s\n", value, toStore.c_str());
// printf("Saving Dimming Mode for source %d, pqmode %d, format %d with level %d\n", indexInfo.sourceIndex, indexInfo.pqmodeIndex, indexInfo.formatIndex, value);
}
else if (forParam.compare("DolbyVisionMode") == 0 || forParam.compare("HDRMode") == 0 ) {
toStore = getDolbyModeStringFromEnum((tvDolbyMode_t)value);
printf("DolbyMode enum: %d, string: %s\n", (tvDolbyMode_t)value, toStore.c_str());
// printf("Saving Dolby Vision Mode for source %d, pqmode %d, format %d with level %s\n", indexInfo.sourceIndex, indexInfo.pqmodeIndex, indexInfo.formatIndex, toStore.c_str());
}
err = setLocalParam(rfc_caller_id, key.c_str(),toStore.c_str());
printf("3.updateAVoutputTVParamToHAL: key = %s, forParam = %s, toStore = %s\n", key.c_str(), forParam.c_str(), toStore.c_str());
printf("Saving %s for %s with value %s\n", key.c_str(), forParam.c_str(), toStore.c_str());

}
else {
Expand Down Expand Up @@ -960,12 +971,29 @@ namespace Plugin {
LOGINFO("%s: Entry param : %s Action : %s pqmode : %s source :%s format :%s color:%s component:%s control:%s\n",__FUNCTION__,tr181ParamName.c_str(),action.c_str(),info.pqmode.c_str(),info.source.c_str(),info.format.c_str(),info.color.c_str(),info.component.c_str(),info.control.c_str() );
ret = getSaveConfig(tr181ParamName,info, values);
if( 0 == ret ) {
// Print tr181ParamName, info, and values as requested
printf("| tr181ParamName: %s\n", tr181ParamName.c_str());
printf("| info.pqmode: %s, info.source: %s, info.format: %s\n", info.pqmode.c_str(), info.source.c_str(), info.format.c_str());
for (const auto& v : values.pqmodeValues) {
printf("| values.pqmodeValues: %d\n", v);
}
printf("tr181ParamName: %s\n", tr181ParamName.c_str());
// For info and values, print relevant fields, e.g.:
printf("info.pqmode: %s, info.source: %s, info.format: %s\n", info.pqmode.c_str(), info.source.c_str(), info.format.c_str());
// For values, if it has vectors:
for (const auto& v : values.pqmodeValues) {
printf("values.pqmodeValues: %d\n", v);
}
printf("info.source: %s, info.format: %s\n", info.source.c_str(), info.format.c_str());
for( int sourceType: values.sourceValues ) {
paramIndex.sourceIndex = sourceType;
printf("values.sourceValues: %d\n", sourceType);
for( int modeType : values.pqmodeValues ) {
paramIndex.pqmodeIndex = modeType;
printf("values.pqmodeValues: %d\n", modeType);
for( int formatType : values.formatValues ) {
paramIndex.formatIndex = formatType;
printf("values.formatValues: %d\n", formatType);
switch(pqParamIndex) {
case PQ_PARAM_BRIGHTNESS:
case PQ_PARAM_CONTRAST:
Expand All @@ -978,56 +1006,84 @@ namespace Plugin {
case PQ_PARAM_LOWLATENCY_STATE:
case PQ_PARAM_DOLBY_MODE:
if(reset) {
printf("1049:Before updateAVoutputTVParamToHAL\n");
ret |= updateAVoutputTVParamToHAL(tr181ParamName,paramIndex,0,false);
printf("Resetting %s to 0\n", tr181ParamName.c_str());
}
if(sync || reset) {
int value=0;
printf("1015:Before getLocalparam\n");
if(getLocalparam(tr181ParamName,paramIndex,value,pqParamIndex,sync)) {
printf("Failed to get local param for %s\n", tr181ParamName.c_str());
continue;
}
level=value;
}
if(set) {
printf("1023:Before updateAVoutputTVParamToHAL\n");
ret |= updateAVoutputTVParamToHAL(tr181ParamName,paramIndex,level,true);
printf("Setting %s to %d\n", tr181ParamName.c_str(), level);
}
break;
default:
break;
}
switch(pqParamIndex) {
case PQ_PARAM_BRIGHTNESS:
printf("1033:Before SaveBrightness_PQ_PARAM_BRIGHTNESS\n");
ret |= SaveBrightness((tvVideoSrcType_t)paramIndex.sourceIndex, paramIndex.pqmodeIndex,(tvVideoFormatType_t)paramIndex.formatIndex,level);
printf("Saving Brightness for source %d, pqmode %d, format %d with level %d\n", paramIndex.sourceIndex, paramIndex.pqmodeIndex, paramIndex.formatIndex, level);
break;
case PQ_PARAM_CONTRAST:
printf("1038:Before SaveContrast_PQ_PARAM_CONTRAST\n");
ret |= SaveContrast((tvVideoSrcType_t)paramIndex.sourceIndex, paramIndex.pqmodeIndex,(tvVideoFormatType_t)paramIndex.formatIndex,level);
printf("Saving Contrast for source %d, pqmode %d, format %d with level %d\n", paramIndex.sourceIndex, paramIndex.pqmodeIndex, paramIndex.formatIndex, level);
break;
case PQ_PARAM_SHARPNESS:
printf("1043:Before SaveSharpness_PQ_PARAM_SHARPNESS\n");
ret |= SaveSharpness((tvVideoSrcType_t)paramIndex.sourceIndex, paramIndex.pqmodeIndex,(tvVideoFormatType_t)paramIndex.formatIndex,level);
printf("Saving Sharpness for source %d, pqmode %d, format %d with level %d\n", paramIndex.sourceIndex, paramIndex.pqmodeIndex, paramIndex.formatIndex, level);
break;
case PQ_PARAM_HUE:
printf("1048:Before SaveHue_PQ_PARAM_HUE\n");
ret |= SaveHue((tvVideoSrcType_t)paramIndex.sourceIndex, paramIndex.pqmodeIndex,(tvVideoFormatType_t)paramIndex.formatIndex,level);
printf("Saving Hue for source %d, pqmode %d, format %d with level %d\n", paramIndex.sourceIndex, paramIndex.pqmodeIndex, paramIndex.formatIndex, level);
break;
case PQ_PARAM_SATURATION:
printf("1053:Before SaveSaturation_PQ_PARAM_SATURATION\n");
ret |= SaveSaturation((tvVideoSrcType_t)paramIndex.sourceIndex, paramIndex.pqmodeIndex,(tvVideoFormatType_t)paramIndex.formatIndex,level);
printf("Saving Saturation for source %d, pqmode %d, format %d with level %d\n", paramIndex.sourceIndex, paramIndex.pqmodeIndex, paramIndex.formatIndex, level);
break;
case PQ_PARAM_COLOR_TEMPERATURE:
printf("1058:Before SaveColorTemperature_PQ_PARAM_COLOR_TEMPERATURE\n");
ret |= SaveColorTemperature((tvVideoSrcType_t)paramIndex.sourceIndex, paramIndex.pqmodeIndex,(tvVideoFormatType_t)paramIndex.formatIndex,(tvColorTemp_t)level);
printf("Saving Color Temperature for source %d, pqmode %d, format %d with level %d\n", paramIndex.sourceIndex, paramIndex.pqmodeIndex, paramIndex.formatIndex, level);
break;
case PQ_PARAM_BACKLIGHT:
printf("1058:Before SaveBacklight_PQ_PARAM_BACKLIGHT\n");
ret |= SaveBacklight((tvVideoSrcType_t)paramIndex.sourceIndex, paramIndex.pqmodeIndex,(tvVideoFormatType_t)paramIndex.formatIndex,level);
printf("Saving Backlight for source %d, pqmode %d, format %d with level %d\n", paramIndex.sourceIndex, paramIndex.pqmodeIndex, paramIndex.formatIndex, level);
break;
case PQ_PARAM_DIMMINGMODE:
printf("1068:Before SaveTVDimmingMode_PQ_PARAM_DIMMINGMODE\n");
ret |= SaveTVDimmingMode((tvVideoSrcType_t)paramIndex.sourceIndex, paramIndex.pqmodeIndex,(tvVideoFormatType_t)paramIndex.formatIndex,(tvDimmingMode_t)level);
printf("Saving Dimming Mode for source %d, pqmode %d, format %d with level %d\n", paramIndex.sourceIndex, paramIndex.pqmodeIndex, paramIndex.formatIndex, level);
break;
case PQ_PARAM_LOWLATENCY_STATE:
printf("1068:Before SaveLowLatencyState_PQ_PARAM_LOWLATENCY_STATE\n");
ret |= SaveLowLatencyState((tvVideoSrcType_t)paramIndex.sourceIndex, paramIndex.pqmodeIndex,(tvVideoFormatType_t)paramIndex.formatIndex,level);
printf("Saving Low Latency State for source %d, pqmode %d, format %d with level %d\n", paramIndex.sourceIndex, paramIndex.pqmodeIndex, paramIndex.formatIndex, level);
break;
case PQ_PARAM_DOLBY_MODE:
printf("1078:Before SaveTVDolbyVisionMode_PQ_PARAM_DOLBY_MODE\n");
ret |= SaveTVDolbyVisionMode((tvVideoSrcType_t)paramIndex.sourceIndex, paramIndex.pqmodeIndex,(tvVideoFormatType_t)paramIndex.formatIndex,(tvDolbyMode_t)level);
printf("Saving Dolby Vision Mode for source %d, pqmode %d, format %d with level %d\n", paramIndex.sourceIndex, paramIndex.pqmodeIndex, paramIndex.formatIndex, level);
break;

case PQ_PARAM_ASPECT_RATIO:
printf("1084:Before SaveAspectRatio_PQ_PARAM_ASPECT_RATIO\n");
ret |= SaveAspectRatio((tvVideoSrcType_t)paramIndex.sourceIndex, paramIndex.pqmodeIndex,(tvVideoFormatType_t)paramIndex.formatIndex,(tvDisplayMode_t)level);
printf("Saving Aspect Ratio for source %d, pqmode %d, format %d with level %d\n", paramIndex.sourceIndex, paramIndex.pqmodeIndex, paramIndex.formatIndex, level);
break;

case PQ_PARAM_CMS_SATURATION_RED:
Expand All @@ -1051,8 +1107,10 @@ namespace Plugin {
{
for( int componentType : values.componentValues ) {
paramIndex.componentIndex = componentType;
printf("values.componentValues: %d\n", componentType);
for( int colorType : values.colorValues ) {
paramIndex.colorIndex = colorType;
paramIndex.colorIndex = colorType;
printf("values.colorValues: %d\n", colorType);
if(reset) {
ret |= updateAVoutputTVParamToHAL(tr181ParamName,paramIndex,0,false);
}
Expand Down
5 changes: 5 additions & 0 deletions AVOutput/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ set(PLUGIN_AVOUTPUT_AUTOSTART "true" CACHE STRING "Automatically start AVOutput
find_package(WPEFramework)
find_package(${NAMESPACE}Plugins REQUIRED)

find_package(Boost COMPONENTS system filesystem REQUIRED)

set (CMAKE_CXX_STANDARD 11)

find_path (STAGING_INCDIR glib-2.0)
Expand Down Expand Up @@ -88,6 +90,9 @@ target_link_libraries(${MODULE_NAME}
PRIVATE
${NAMESPACE}Plugins::${NAMESPACE}Plugins)

target_link_libraries(${MODULE_NAME} PRIVATE ${Boost_SYSTEM_LIBRARY})
target_link_libraries(${MODULE_NAME} PRIVATE ${Boost_FILESYSTEM_LIBRARY})


install(TARGETS ${MODULE_NAME}
DESTINATION lib/wpeframework/plugins)
Expand Down
Loading