59#define MAX_STRING_SIZE (15)
60#define CONTROL_COUNT (2)
61#define PIC_MODES_SUPPORTED_MAX (15)
62#define PIC_MODE_NAME_MAX (25)
63#define DIMMING_MODE_NAME_SIZE (25)
64#define DIMMING_MODE_MAX (10)
66#define GAIN_MAX (2047)
67#define OFFSET_MIN (-1024)
68#define OFFSET_MAX (1024)
69#define BACKLIGHT_CURVE_MAX_INDEX (101)
70#define EXPECTED_FILE_SIZE (512)
71#define GENERIC_MODE_CONFIG_FILE "/etc/tv/allmodes.conf"
2436tvError_t SaveCMS(
int sourceInput,
int pq_mode,
int hdr_type,
int tunnel_type,
int color_type,
int value);
3068tvError_t GetGammaTable(
int colortemp,
unsigned short *pData_R,
unsigned short *pData_G,
unsigned short *pData_B,
unsigned short size);
3091tvError_t SaveGammaTable(
int colortemp,
unsigned short *pData_R,
unsigned short *pData_G,
unsigned short *pData_B,
unsigned short size);
tvError_t
Definition tvError.h:57
tvError_t SetColorTemp_Bgain_onSource(tvColorTemp_t colorTemp, int bgain, int sourceId, int saveOnly)
Sets or saves the bgain value.
tvError_t GetCurrentComponentLuma(tvDataComponentColor_t blLumaColor, int *Luma)
Gets the current component luma.
tvError_t ResetBrightness(int defaultValue, bool resetForAllFormats)
Reset Brightness.
tvError_t SaveDolbyMode(int sourceInput, int pq_mode, int hdr_type, int value)
Saves the dolby mode value.
tvError_t ResetSaturation(int defaultValue, bool resetForAllFormats)
Reset Saturation.
tvError_t GetColorTemp_G_post_offset_onSource(tvColorTemp_t colorTemp, int *gpostoffset, int sourceId)
Gets the current gpostoffset value for a specfic color temperature and source.
tvError_t ResetComponentHue(int color, int defaultValue)
Reset Component hue.
tvError_t GetLocalDimmingLevel(int *localDimmingLevel)
Gets the current dimming level.
int GetWBRgbType(const char *color, const char *ctrl)
Get WB RGB type.
bool isWBUserDfault(tvDataColor_t wbvalue)
Check the given WB values are default or not.
tvError_t SetColorTemp_Ggain_onSource(tvColorTemp_t colorTemp, int ggain, int sourceId, int saveOnly)
Sets or saves the ggain value.
tvError_t SetBacklightFade(int from, int to, int duration)
Sets the backlight fade settings.
tvError_t setWakeupConfig(const tvWakeupSrcType_t src_type, const bool value)
Sets wake-up configuration.
input_source_offset_e
Definition tvSettings.h:102
tvError_t GetColorTemp_Bgain_onSource(tvColorTemp_t colorTemp, int *bgain, int sourceId)
Gets the current bgain value for a specfic color temperature and source.
tvError_t SetColorTemp_B_post_offset(tvColorTemp_t colorTemp, int bpostoffset)
Set the bpostoffset value.
int GetCMSDefault(tvCMS_tunel_t color_tunel_type)
Gets the current CMS default value. To be deprecated soon.
#define PIC_MODE_NAME_MAX
Definition tvSettings.h:62
void GetAllSupportedPicModeIndex(int pic_mode_index[])
Get All Supported PicMode Index.
tvError_t GetBrightness(int *brightness)
Gets the current brightness value.
tvError_t SetAspectRatio(tvDisplayMode_t dispMode)
Sets the aspect ratio.
tvError_t ResetComponentLuma(int color, int defaultValue)
Reset Component Luma.
tvError_t GetAspectRatio(tvDisplayMode_t *dispMode)
Gets the current aspect ratio.
tvError_t SaveBrightness(int sourceInput, int pq_mode, int hdr_type, int value)
Saves the brightness value.
struct pic_modes pic_modes_t
tvError_t SaveSharpness(int sourceInput, int pq_mode, int hdr_type, int value)
Saves the sharpness value.
tvError_t GetCurrentBacklightMode(tvBacklightMode_t *blMode)
Gets current blacklight mode.
tvError_t GetColorTemp_G_post_offset(tvColorTemp_t colorTemp, int *gpostoffset)
Get the gpostoffset value.
void SwitchEDID(int pqmode)
Switch EDID.
int GetHDR10ModeIndex(const char *hdr10Mode)
Get HDR10 mode index.
tvError_t SaveSaturation(int sourceInput, int pq_mode, int hdr_type, int value)
Saves the saturation value.
int GetHLGModeIndex(const char *hlgMode)
Get HLG mode Index.
tvError_t SetGammaMode(int mode)
Enable or disable gamma mode.
tvError_t GetVideoResolution(tvResolutionParam_t *res)
Gets the current video resolution.
#define MAX_STRING_SIZE
Definition tvSettings.h:59
tvError_t GetTVSupportedHDR10Modes(pic_modes_t *dvModes[], unsigned short *count)
Gets the supported HDR10 modes and their count. To be deprecated soon.
tvError_t tvSD3toCriSyncInit()
Sync the calibrated data to driver.
int GetPanelID(char *panelid)
Returns Panel ID information. To be deprecated soon.
tvError_t SetTVHLGMode(const char *hlgMode)
Sets the HLG mode. To be deprecated soon.
int GetCustomPQModeIndex(void)
Get Custom mode index.
tvError_t ResetColorTemperature(int defaultValue, bool resetForAllFormats)
Reset Color Tempearture.
tvError_t GetColorTemp_Rgain_onSource(tvColorTemp_t colorTemp, int *rgain, int sourceId)
Gets the current rgain value.
tvError_t SetBacklight(int backlight)
Sets the backlight value in the backlight hardware.
tvError_t getWbInfo(getWBInfo_t *params, std::vector< std::string > &selector, std::vector< std::string > &colorTmp, std::vector< std::string > &input)
Gets the current white balance info. To be deprecated soon.
tvError_t SetColorTemp_R_post_offset_onSource(tvColorTemp_t colorTemp, int rpostoffset, int sourceId, int saveOnly)
Sets or saves the rpostoffset value.
tvError_t GetColorTemp_R_post_offset_onSource(tvColorTemp_t colorTemp, int *rpostoffset, int sourceId)
Gets the current rpostoffset value.
tvError_t SetCurrentComponentHue(tvDataComponentColor_t blHueColor, int hue)
Sets current component hue.
tvError_t GetSaturation(int *saturation)
Gets the current saturation value.
tvVideoHDRFormat_t GetCurrentContentFormat(void)
Get Current Content Format.
tvError_t GetTVSupportedHLGModes(pic_modes_t *dvModes[], unsigned short *count)
Gets the supported HLG modes and their count. To be deprecated soon.
tvError_t SaveHue(int sourceInput, int pq_mode, int hdr_type, int value)
Saves the hue value.
tvError_t SaveDisplayMode(int sourceInput, int pq_mode, int hdr_type, int value)
Saves the DisplayMode value.
tvError_t GetTVSupportedPictureModes(pic_modes_t *pictureModes[], unsigned short *count)
Gets the supported picture modes and their count.
tvDataColor_t GetUSerWBValueOnInit(void)
Get WB values on init.
tvError_t SetColorTemp_Bgain(tvColorTemp_t colorTemp, int bgain)
Set the bgain value.
tvError_t ResetHue(int defaultValue, bool resetForAllFormats)
Reset Hue.
tvError_t SetColorTemp_G_post_offset(tvColorTemp_t colorTemp, int gpostoffset)
Set the gpostoffset value.
tvError_t ResetSharpness(int defaultValue, bool resetForAllFormats)
Reset Sharpness.
int GetDriverEquivalentBLForCurrentFmt(int backlight)
Get Driver BL value for current format.
tvError_t GetDynamicContrast(char *isDynamicContrastEnabled)
Gets the current Dynamic contrast mode.
int ConvertVideoFormatToHDRFormat(tvVideoHDRFormat_t videoFormat)
Returns tvhdr_type_t enum for given tvVideoHDRFormat_t enum. To be deprecated soon.
void RegisterVideoResolutionChangeCB(tvVideoResolutionCallbackData &cbData)
Registers the Video resolution change callback.
tvError_t SaveDynamicBacklight(int sourceInput, int pq_mode, int hdr_type, int value)
Saves the DynamicBacklight mode.
tvError_t tvInit()
Initialises TV Settings HAL.
tvError_t SetGammaTable(unsigned short *pData_R, unsigned short *pData_G, unsigned short *pData_B, unsigned short size)
Sets the gamma calibrated values to gamma HW for current selected colour temperature.
tvPictureMode_t GetTVPictureModeIndex(const char *pictureMode)
Get TV Picture Mode Index.
tvError_t SaveCMS(int sourceInput, int pq_mode, int hdr_type, int tunnel_type, int color_type, int value)
Save the CMS value.
tvError_t SetTVPictureMode(const char *pictureMode)
Sets the Picture Mode.
tvError_t GetCurrentComponentSaturation(tvDataComponentColor_t blSaturationColor, int *saturation)
Gets current component saturation.
tvError_t SaveBacklight(int sourceInput, int pq_mode, int hdr_type, int value)
Saves the backlight value.
tvError_t GetSupportedBacklightModes(int *blModes)
Gets the supported backlight modes.
void splitstringsfrombuffer(char *buffer, char *availableModes, unsigned short *totalcount)
Parse buffer and return string values & total count.
struct tvBacklightInfo_s tvBacklightInfo_t
tvError_t GetContrast(int *contrast)
Gets the current contrast value.
tvError_t SetBrightness(int brightness)
Sets the brightness value to driver register(s)
tvError_t GetRGBPattern(int *r, int *g, int *b)
Gets the current RGB values of the RGB pattern.
tvError_t GetGammaTable(int colortemp, unsigned short *pData_R, unsigned short *pData_G, unsigned short *pData_B, unsigned short size)
Gets the current gamma calibrated values from gamma HW for current selected colour temperature.
tvError_t GetCurrentVideoFormat(tvVideoHDRFormat_t *format)
Gets current video format. To be deprecated soon.
tvError_t GetColorTemp_Ggain_onSource(tvColorTemp_t colorTemp, int *ggain, int sourceId)
Gets the current ggain value for a specfic color temperature and source.
int ConvertTVColorToVendorColor(tvDataComponentColor_t blComponentColor)
Convert TV color to vendor color.
#define CONTROL_COUNT
Definition tvSettings.h:60
tvError_t GetColorTemperature(tvColorTemp_t *colorTemp)
Gets the current color temperature.
bool areEqual(tvDataColor_t wbvalueThis, tvDataColor_t wbvalueThat)
Check WB values are equal.
tvError_t enableWBmode(bool value)
Enable/disable WB mode.
struct getWBInfo getWBInfo_t
int ConvertHDRFormatToContentFormat(tvhdr_type_t hdrFormat)
Convert HDR to content format.
tvError_t setWBctrl(char *inputSrc, char *colorTemp, char *color, char *ctrl, int value)
Sets the white balance control. To be deprecated soon.
tvError_t SetLowLatencyState(int lowLatencyIndex)
Sets the low latency state to driver register(s)
tvError_t ResetBacklight(int defaultValue, bool resetForAllFormats)
Reset Backlight.
tvError_t GetBacklight(int *backlight)
Gets the current backlight value.
tvError_t GetTVSupportedDimmingModes(char **dimmingModes, unsigned short *count)
Gets supported backlight dimming modes of the system. To be deprecated soon.
tvError_t GetTVPictureMode(char *pictureMode)
Gets the current selected picture Mode.
int GetDolbyModeIndex(const char *dolbyMode)
Get Dolby Mode Index.
tvError_t GetCurrentComponentHue(tvDataComponentColor_t blHueColor, int *hue)
Gets current component hue.
tvError_t SetContrast(int contrast)
Sets the contrast value to driver register(s)
tvError_t ResetContrast(int defaultValue, bool resetForAllFormats)
Reset Contrast.
tvError_t ResetComponentSaturation(int color, int defaultValue)
Reset Component Saturation.
tvError_t GetTVSupportedDVModes(pic_modes_t *dvModes[], unsigned short *count)
Gets the supported DV modes and their count.
tvError_t GetLowLatencyState(int *lowlatencystate)
Gets the current low latency state.
tvError_t SetSaturation(int saturation)
Sets the saturation value to driver register(s)
tvError_t GetTVHLGMode(char *hlgMode)
Gets the current current HLG mode.
tvError_t SetBacklightInfo(tvBacklightInfo_t *backlightDefaults)
Set backlight info.
tvError_t SetColorTemperature(tvColorTemp_t colorTemp)
Sets the color temperature to driver register(s)
tvError_t SaveContrast(int sourceInput, int pq_mode, int hdr_type, int value)
Saves the contrast value.
tvError_t SetTVBacklightGlobalFactor(int value, int rangeMidPointValue)
Set TV Backlight Global Factor.
tvError_t SetColorTemp_G_post_offset_onSource(tvColorTemp_t colorTemp, int gpostoffset, int sourceId, int saveOnly)
Sets or saves the gpostoffset value.
tvError_t GetTVHDR10Mode(char *hdr10Mode)
Gets the current current HDR10 mode.
void RegisterVideoFrameRateChangeCB(tvVideoFrameRateCallbackData &cbData)
Registers the Video framerate change callback.
tvError_t SetTVDimmingMode(const char *dimmingMode)
Sets the backlight dimming mode.
tvError_t SetColorTemp_R_post_offset(tvColorTemp_t colorTemp, int rpostoffset)
Set the rpostoffset value.
tvError_t SetColorTemp_Ggain(tvColorTemp_t colorTemp, int ggain)
Set the ggain value.
struct bl_para_s bl_para_t
tvError_t SetCurrentComponentSaturation(tvDataComponentColor_t blSaturationColor, int saturation)
Sets current component saturation.
tvError_t GetHue(int *hue)
Gets the current hue value.
tvError_t SaveLocalDimmingLevel(int sourceInput, int pq_mode, int hdr_type, int value)
Saves local dimming level.
tvError_t ReadAllModeConfigfile(const char *file, char *cpybuffer, const char *searchstring)
Reads PQ capability information sections from the specified file. To be deprecated soon.
tvError_t SetColorTemp_Rgain(tvColorTemp_t colorTemp, int rgain)
Set the rgain value.
tvError_t tvTerm()
De-initialises TV Settings HAL.
tvError_t SetGammaPattern(int is_10_bit, int R_Value, int G_Value, int B_Value)
Sets the gamma pattern.
tvError_t SaveColorTemperatureUser(int rgbType, int value)
Saves the color temperature to driver cache. To be deprecated soon.
tvError_t GetColorTemp_B_post_offset(tvColorTemp_t colorTemp, int *bpostoffset)
Get the gpostoffset value.
tvError_t SetTint(int tint)
Sets the tint value to driver register(s)
tvError_t GetTVDolbyVisionMode(char *dolbyMode)
Gets the current current dolby vision mode.
tvError_t GetTint(int *tint)
Gets the current tint value.
tvError_t SetSharpness(int sharpness)
Sets the sharpness value to driver register(s)
tvError_t SaveGammaTable(int colortemp, unsigned short *pData_R, unsigned short *pData_G, unsigned short *pData_B, unsigned short size)
Saves the gamma calibrated values.s.
void RegisterVideoFormatChangeCB(tvVideoFormatCallbackData &cbData)
Registers the video format change callback.
#define BACKLIGHT_CURVE_MAX_INDEX
Definition tvSettings.h:69
enum input_source_offset_e input_source_offset_t
tvError_t SetCMSState(tvCMS_tunel_t tunelType, tvcomponent_color_type_t colorType, tvcomponent_state_t componentState)
Sets and save's the CMS state.
tvError_t GetColorTemp_Bgain(tvColorTemp_t colorTemp, int *bgain)
Get the bgain value.
tvError_t GetSupportedComponentColor(int *blComponentColor)
Gets the supported Component colors.
void(* tvVideoResolutionChangeCB)(tvResolutionParam_t resolutionStruct, void *userData)
tv Video Resolution ChangeCB
Definition tvSettings.h:1072
void(* tvVideoFormatChangeCB)(tvVideoHDRFormat_t format, void *userData)
Definition tvSettings.h:73
tvError_t GetTVBacklightGlobalFactor(int *value)
Get TV Backlight Global Factor.
tvError_t SetColorTemperatureUser(int rgbType, int value)
Set Color Temperature User.
tvError_t GetGrayPattern(int *YUVValue)
Gets the current gray pattern value.
int GetCurrentPQIndex(void)
Get current PQ Mode index.
tvError_t SetColorTemp_B_post_offset_onSource(tvColorTemp_t colorTemp, int bpostoffset, int sourceId, int saveOnly)
Sets or saves the bpostoffset value.
void RegisterVideoContentChangeCB(tvVideoContentCallbackData &cbData)
Registers the VideoContent FMM change callback.
tvError_t SetHue(int hue)
Sets the hue value to driver register(s)
void splitstringsandvaluefrombuffer(char *buffer, pic_modes_t *availableModes[], unsigned short *totalcount)
Parse buffer and return string values,index & total count.
tvError_t SetCurrentComponentLuma(tvDataComponentColor_t blLumaColor, int Luma)
Sets the current component luma value.
tvError_t SetDynamicContrast(const char *dynamicContrastEnable)
Sets the dynamic contrast.
tvError_t UpdateEDIDAndSetDimmingLevel(int dimmingLevel)
Set the EDID and dimming level.
tvError_t GetColorTemp_Ggain(tvColorTemp_t colorTemp, int *ggain)
Get the ggain value.
tvError_t SetGrayPattern(int YUVValue)
Sets the gray pattern value.
tvError_t SaveColorTemperature(int sourceInput, int pq_mode, int hdr_type, int value)
Saves the color temperature value.
tvError_t GetColorTemp_B_post_offset_onSource(tvColorTemp_t colorTemp, int *bpostoffset, int sourceId)
Gets the current bpostoffset value for a specfic color temperature and source.
tvError_t GetSharpness(int *sharpness)
Gets the current sharpness value.
bool isCurrentHDRTypeIsSDR(void)
Check if current format is SDR.
tvError_t SetColorTemp_Rgain_onSource(tvColorTemp_t colorTemp, int rgain, int sourceId, int saveOnly)
Sets or saves the rgain value.
tvError_t GetVideoFrameRate(tvVideoFrameRate_t *format)
Gets current video framerate.
tvError_t SaveLowLatencyState(int sourceInput, int pq_mode, int hdr_type, int value)
Saves the low latency index.
void(* tvVideoFrameRateChangeCB)(tvVideoFrameRate_t frameRate, void *userData)
tv Video FrameRate Change CB
Definition tvSettings.h:1098
tvError_t SetTVDolbyVisionMode(const char *dolbyMode)
Sets dolby vision mode. To be deprecated soon.
void GetDefaultPanelID(char *panelID)
Get the default panel ID.
tvError_t GetColorTemp_R_post_offset(tvColorTemp_t colorTemp, int *rpostoffset)
Get the rpostoffset value.
void GetLDIMAndEDIDLevel(int dimmingMode, int format, int *dimmingLevel, int *edidLevel)
Get LDIM and EDID level.
tvError_t SetCurrentBacklightMode(tvBacklightMode_t blMode)
Sets the backlight mode.
tvError_t GetSupportedContentFormats(unsigned int *contentFormats, unsigned short *numberOfFormats)
Get Supported Content Formats.
tvError_t SetRGBPattern(int r, int g, int b)
Sets the RGB values of RGB pattern.
tvError_t SetLocalDimmingLevel(int localDimmingLevel)
Sets the local dimming level.
fp_mfrColorTemp_t
Definition tvSettings.h:94
tvError_t GetColorTemp_Rgain(tvColorTemp_t colorTemp, int *rgain)
Get the ggain value.
int GetNumberOfModesupported(void)
GetNumberOfModesupported.
void(* tvVideoContentChangeCB)(tvContentType_t mode, void *userData)
Definition tvSettings.h:75
tvError_t SetTVHDR10Mode(const char *hdr10Mode)
Sets the HDR10 mode. To be deprecated soon.
tvError_t getWBctrl(char *inputSrc, char *colortemp, char *color, char *ctrl, int *value)
Gets the current white balance control.
@ TV_OFFSET_NEW
Definition tvSettings.h:104
@ AV_OFFSET_NEW
Definition tvSettings.h:105
@ HDMI_OFFSET_NEW
Definition tvSettings.h:103
@ MAX_OFFSET_NEW
Definition tvSettings.h:106
@ mfrColorTemp_USER
Definition tvSettings.h:98
@ mfrColorTemp_COLD
Definition tvSettings.h:96
@ mfrColorTemp_STANDARD
Definition tvSettings.h:95
@ mfrColorTemp_WARM
Definition tvSettings.h:97
@ mfrColorTemp_MAX
Definition tvSettings.h:99
enum tvcomponent_state_e tvcomponent_state_t
Enumeration defining the TV component state.
enum tvhdr_type_e tvhdr_type_t
Enumeration defining the TV hdr type.
tvVideoHDRFormat_t
Enumeration defining the TV video HDR format.
Definition tvTypes.h:83
tvVideoFrameRate_t
Enumeration defining supported types of frame rates.
Definition tvTypes.h:152
tvContentType_t
Enumeration defining the supported FMM modes.
Definition tvTypes.h:63
tvColorTemp_t
Enumeration defining supported color temperature.
Definition tvTypes.h:181
tvDisplayMode_t
Enumeration defining supported display modes.
Definition tvTypes.h:167
tvWakeupSrcType_t
Enumeration defining supported wakeup source types.
Definition tvTypes.h:192
tvDataComponentColor_t
Enumeration defining supported TV component colors.
Definition tvTypes.h:250
enum tvCMS_tunel_e tvCMS_tunel_t
Enumeration defining the TV CMS tunel.
tvBacklightMode_t
Enumeration defining the supported backlight modes.
Definition tvTypes.h:72
enum tvcomponent_color_type_e tvcomponent_color_type_t
Enumeration defining the TV component color type.
short int tvPictureMode_t
Definition tvTypes.h:55
Structure defining supported parameters in tv color.
Definition tvTypes.h:208
Definition tvSettings.h:117
int mBacklightHDR
Definition tvSettings.h:119
int mBacklightSDR
Definition tvSettings.h:118
Definition tvSettings.h:109
char wbGain[CONTROL_COUNT][MAX_STRING_SIZE]
Definition tvSettings.h:111
char wbControls[CONTROL_COUNT][MAX_STRING_SIZE]
Definition tvSettings.h:110
char wbOffset[CONTROL_COUNT][MAX_STRING_SIZE]
Definition tvSettings.h:112
Definition tvSettings.h:77
char name[PIC_MODE_NAME_MAX]
Definition tvSettings.h:78
short int value
Definition tvSettings.h:79
Definition tvSettings.h:123
int defaultBLHDR
Definition tvSettings.h:127
int defaultBLSDR
Definition tvSettings.h:126
int hdrBLCurve[BACKLIGHT_CURVE_MAX_INDEX]
Definition tvSettings.h:125
int sdrBLCurve[BACKLIGHT_CURVE_MAX_INDEX]
Definition tvSettings.h:124
Enumeration defining the TV resolution paramater.
Definition tvTypes.h:142
Definition tvSettings.h:89
tvVideoContentChangeCB cb
Definition tvSettings.h:91
void * userdata
Definition tvSettings.h:90
Definition tvSettings.h:1100
tvVideoFrameRateChangeCB cb
Definition tvSettings.h:1102
void * userdata
Definition tvSettings.h:1101
Definition tvSettings.h:1074
tvVideoResolutionChangeCB cb
Definition tvSettings.h:1076
void * userdata
Definition tvSettings.h:1075