TVSetting HAL 0.2.0
 
Loading...
Searching...
No Matches
tvSettings.h File Reference
#include <stdbool.h>
#include <string>
#include "tvError.h"
#include "tvTypes.h"
#include <vector>
Include dependency graph for tvSettings.h:

Go to the source code of this file.

Data Structures

struct  pic_modes
 
struct  tvVideoFormatCallbackData
 
struct  tvVideoContentCallbackData
 
struct  getWBInfo
 
struct  bl_para_s
 
struct  tvBacklightInfo_s
 
struct  tvVideoResolutionCallbackData
 
struct  tvVideoFrameRateCallbackData
 

Macros

#define MAX_STRING_SIZE   (15)
 
#define CONTROL_COUNT   (2)
 
#define PIC_MODES_SUPPORTED_MAX   (15)
 
#define PIC_MODE_NAME_MAX   (25)
 
#define DIMMING_MODE_NAME_SIZE   (25)
 
#define DIMMING_MODE_MAX   (10)
 
#define GAIN_MIN   (0)
 
#define GAIN_MAX   (2047)
 
#define OFFSET_MIN   (-1024)
 
#define OFFSET_MAX   (1024)
 
#define BACKLIGHT_CURVE_MAX_INDEX   (101)
 
#define EXPECTED_FILE_SIZE   (512)
 
#define GENERIC_MODE_CONFIG_FILE   "/etc/tv/allmodes.conf"
 
#define __BL_PARA__
 

Typedefs

typedef void(* tvVideoFormatChangeCB) (tvVideoHDRFormat_t format, void *userData)
 
typedef void(* tvVideoContentChangeCB) (tvContentType_t mode, void *userData)
 
typedef struct pic_modes pic_modes_t
 
typedef enum input_source_offset_e input_source_offset_t
 
typedef struct getWBInfo getWBInfo_t
 
typedef struct bl_para_s bl_para_t
 
typedef struct tvBacklightInfo_s tvBacklightInfo_t
 
typedef void(* tvVideoResolutionChangeCB) (tvResolutionParam_t resolutionStruct, void *userData)
 tv Video Resolution ChangeCB
 
typedef void(* tvVideoFrameRateChangeCB) (tvVideoFrameRate_t frameRate, void *userData)
 tv Video FrameRate Change CB
 

Enumerations

enum  fp_mfrColorTemp_t {
  mfrColorTemp_STANDARD = 0 , mfrColorTemp_COLD , mfrColorTemp_WARM , mfrColorTemp_USER ,
  mfrColorTemp_MAX
}
 
enum  input_source_offset_e { HDMI_OFFSET_NEW = 0 , TV_OFFSET_NEW = 4 , AV_OFFSET_NEW = 8 , MAX_OFFSET_NEW }
 

Functions

tvError_t tvInit ()
 Initialises TV Settings HAL.
 
tvError_t tvSD3toCriSyncInit ()
 Sync the calibrated data to driver.
 
tvError_t tvTerm ()
 De-initialises TV Settings HAL.
 
tvError_t GetTVPictureMode (char *pictureMode)
 Gets the current selected picture Mode.
 
tvError_t SetTVPictureMode (const char *pictureMode)
 Sets the Picture Mode.
 
tvError_t GetBacklight (int *backlight)
 Gets the current backlight value.
 
tvError_t SetBacklight (int backlight)
 Sets the backlight value in the backlight hardware.
 
tvError_t SetBrightness (int brightness)
 Sets the brightness value to driver register(s)
 
tvError_t GetBrightness (int *brightness)
 Gets the current brightness value.
 
tvError_t SetContrast (int contrast)
 Sets the contrast value to driver register(s)
 
tvError_t GetContrast (int *contrast)
 Gets the current contrast value.
 
tvError_t SetSharpness (int sharpness)
 Sets the sharpness value to driver register(s)
 
tvError_t GetSharpness (int *sharpness)
 Gets the current sharpness value.
 
tvError_t SetSaturation (int saturation)
 Sets the saturation value to driver register(s)
 
tvError_t GetSaturation (int *saturation)
 Gets the current saturation value.
 
tvError_t SetHue (int hue)
 Sets the hue value to driver register(s)
 
tvError_t GetHue (int *hue)
 Gets the current hue value.
 
tvError_t SetColorTemperature (tvColorTemp_t colorTemp)
 Sets the color temperature to driver register(s)
 
tvError_t GetColorTemperature (tvColorTemp_t *colorTemp)
 Gets the current color temperature.
 
tvError_t SetAspectRatio (tvDisplayMode_t dispMode)
 Sets the aspect ratio.
 
tvError_t GetAspectRatio (tvDisplayMode_t *dispMode)
 Gets the current aspect ratio.
 
tvError_t GetTint (int *tint)
 Gets the current tint value.
 
tvError_t SetTint (int tint)
 Sets the tint value to driver register(s)
 
tvError_t GetSupportedBacklightModes (int *blModes)
 Gets the supported backlight modes.
 
tvError_t GetCurrentBacklightMode (tvBacklightMode_t *blMode)
 Gets current blacklight mode.
 
tvError_t SetCurrentBacklightMode (tvBacklightMode_t blMode)
 Sets the backlight mode.
 
tvError_t GetCurrentVideoFormat (tvVideoHDRFormat_t *format)
 Gets current video format. To be deprecated soon.
 
tvError_t GetVideoResolution (tvResolutionParam_t *res)
 Gets the current video resolution.
 
tvError_t GetVideoFrameRate (tvVideoFrameRate_t *format)
 Gets current video framerate.
 
tvError_t setWakeupConfig (const tvWakeupSrcType_t src_type, const bool value)
 Sets wake-up configuration.
 
tvError_t SetRGBPattern (int r, int g, int b)
 Sets the RGB values of RGB pattern.
 
tvError_t GetRGBPattern (int *r, int *g, int *b)
 Gets the current RGB values of the RGB pattern.
 
tvError_t SetGrayPattern (int YUVValue)
 Sets the gray pattern value.
 
tvError_t GetGrayPattern (int *YUVValue)
 Gets the current gray pattern value.
 
tvError_t SetColorTemp_Rgain (tvColorTemp_t colorTemp, int rgain)
 Set the rgain value.
 
tvError_t GetColorTemp_Rgain (tvColorTemp_t colorTemp, int *rgain)
 Get the ggain value.
 
tvError_t SetColorTemp_Ggain (tvColorTemp_t colorTemp, int ggain)
 Set the ggain value.
 
tvError_t GetColorTemp_Ggain (tvColorTemp_t colorTemp, int *ggain)
 Get the ggain value.
 
tvError_t SetColorTemp_Bgain (tvColorTemp_t colorTemp, int bgain)
 Set the bgain value.
 
tvError_t GetColorTemp_Bgain (tvColorTemp_t colorTemp, int *bgain)
 Get the bgain value.
 
tvError_t SetColorTemp_R_post_offset (tvColorTemp_t colorTemp, int rpostoffset)
 Set the rpostoffset value.
 
tvError_t GetColorTemp_R_post_offset (tvColorTemp_t colorTemp, int *rpostoffset)
 Get the rpostoffset value.
 
tvError_t SetColorTemp_G_post_offset (tvColorTemp_t colorTemp, int gpostoffset)
 Set the gpostoffset value.
 
tvError_t GetColorTemp_G_post_offset (tvColorTemp_t colorTemp, int *gpostoffset)
 Get the gpostoffset value.
 
tvError_t SetColorTemp_B_post_offset (tvColorTemp_t colorTemp, int bpostoffset)
 Set the bpostoffset value.
 
tvError_t GetColorTemp_B_post_offset (tvColorTemp_t colorTemp, int *bpostoffset)
 Get the gpostoffset value.
 
tvError_t GetTVSupportedPictureModes (pic_modes_t *pictureModes[], unsigned short *count)
 Gets the supported picture modes and their count.
 
void RegisterVideoFormatChangeCB (tvVideoFormatCallbackData &cbData)
 Registers the video format change callback.
 
void RegisterVideoContentChangeCB (tvVideoContentCallbackData &cbData)
 Registers the VideoContent FMM change callback.
 
void RegisterVideoResolutionChangeCB (tvVideoResolutionCallbackData &cbData)
 Registers the Video resolution change callback.
 
void RegisterVideoFrameRateChangeCB (tvVideoFrameRateCallbackData &cbData)
 Registers the Video framerate change callback.
 
tvError_t GetTVSupportedDVModes (pic_modes_t *dvModes[], unsigned short *count)
 Gets the supported DV modes and their count.
 
tvError_t SetTVDolbyVisionMode (const char *dolbyMode)
 Sets dolby vision mode. To be deprecated soon.
 
tvError_t GetTVDolbyVisionMode (char *dolbyMode)
 Gets the current current dolby vision mode.
 
tvError_t SetTVHLGMode (const char *hlgMode)
 Sets the HLG mode. To be deprecated soon.
 
tvError_t SetTVHDR10Mode (const char *hdr10Mode)
 Sets the HDR10 mode. To be deprecated soon.
 
tvError_t GetTVHLGMode (char *hlgMode)
 Gets the current current HLG mode.
 
tvError_t GetTVHDR10Mode (char *hdr10Mode)
 Gets the current current HDR10 mode.
 
tvError_t GetTVSupportedHLGModes (pic_modes_t *dvModes[], unsigned short *count)
 Gets the supported HLG modes and their count. To be deprecated soon.
 
tvError_t GetTVSupportedHDR10Modes (pic_modes_t *dvModes[], unsigned short *count)
 Gets the supported HDR10 modes and their count. To be deprecated soon.
 
tvError_t SetDynamicContrast (const char *dynamicContrastEnable)
 Sets the dynamic contrast.
 
tvError_t GetDynamicContrast (char *isDynamicContrastEnabled)
 Gets the current Dynamic contrast mode.
 
tvError_t SetColorTemp_Rgain_onSource (tvColorTemp_t colorTemp, int rgain, int sourceId, int saveOnly)
 Sets or saves the rgain value.
 
tvError_t GetColorTemp_Rgain_onSource (tvColorTemp_t colorTemp, int *rgain, int sourceId)
 Gets the current rgain value.
 
tvError_t SetColorTemp_Ggain_onSource (tvColorTemp_t colorTemp, int ggain, int sourceId, int saveOnly)
 Sets or saves the ggain value.
 
tvError_t GetColorTemp_Ggain_onSource (tvColorTemp_t colorTemp, int *ggain, int sourceId)
 Gets the current ggain value for a specfic color temperature and source.
 
tvError_t SetColorTemp_Bgain_onSource (tvColorTemp_t colorTemp, int bgain, int sourceId, int saveOnly)
 Sets or saves the bgain value.
 
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_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 SetColorTemp_G_post_offset_onSource (tvColorTemp_t colorTemp, int gpostoffset, int sourceId, int saveOnly)
 Sets or saves the gpostoffset value.
 
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 SetColorTemp_B_post_offset_onSource (tvColorTemp_t colorTemp, int bpostoffset, int sourceId, int saveOnly)
 Sets or saves the bpostoffset 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 setWBctrl (char *inputSrc, char *colorTemp, char *color, char *ctrl, int value)
 Sets the white balance control. To be deprecated soon.
 
tvError_t getWBctrl (char *inputSrc, char *colortemp, char *color, char *ctrl, int *value)
 Gets the current white balance control.
 
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 enableWBmode (bool value)
 Enable/disable WB mode.
 
tvError_t GetSupportedComponentColor (int *blComponentColor)
 Gets the supported Component colors.
 
tvError_t SetCurrentComponentSaturation (tvDataComponentColor_t blSaturationColor, int saturation)
 Sets current component saturation.
 
tvError_t GetCurrentComponentSaturation (tvDataComponentColor_t blSaturationColor, int *saturation)
 Gets current component saturation.
 
tvError_t SetCurrentComponentHue (tvDataComponentColor_t blHueColor, int hue)
 Sets current component hue.
 
tvError_t GetCurrentComponentHue (tvDataComponentColor_t blHueColor, int *hue)
 Gets current component hue.
 
tvError_t SetCurrentComponentLuma (tvDataComponentColor_t blLumaColor, int Luma)
 Sets the current component luma value.
 
tvError_t GetCurrentComponentLuma (tvDataComponentColor_t blLumaColor, int *Luma)
 Gets the current component luma.
 
tvError_t GetTVSupportedDimmingModes (char **dimmingModes, unsigned short *count)
 Gets supported backlight dimming modes of the system. To be deprecated soon.
 
tvError_t SetTVDimmingMode (const char *dimmingMode)
 Sets the backlight dimming mode.
 
tvError_t GetTVBacklightGlobalFactor (int *value)
 Get TV Backlight Global Factor.
 
tvError_t SetTVBacklightGlobalFactor (int value, int rangeMidPointValue)
 Set TV Backlight Global Factor.
 
tvPictureMode_t GetTVPictureModeIndex (const char *pictureMode)
 Get TV Picture Mode Index.
 
tvVideoHDRFormat_t GetCurrentContentFormat (void)
 Get Current Content Format.
 
tvError_t GetSupportedContentFormats (unsigned int *contentFormats, unsigned short *numberOfFormats)
 Get Supported Content Formats.
 
tvError_t ResetBrightness (int defaultValue, bool resetForAllFormats)
 Reset Brightness.
 
tvError_t ResetContrast (int defaultValue, bool resetForAllFormats)
 Reset Contrast.
 
tvError_t ResetSharpness (int defaultValue, bool resetForAllFormats)
 Reset Sharpness.
 
tvError_t ResetSaturation (int defaultValue, bool resetForAllFormats)
 Reset Saturation.
 
tvError_t ResetHue (int defaultValue, bool resetForAllFormats)
 Reset Hue.
 
tvError_t ResetBacklight (int defaultValue, bool resetForAllFormats)
 Reset Backlight.
 
tvError_t ResetColorTemperature (int defaultValue, bool resetForAllFormats)
 Reset Color Tempearture.
 
tvError_t ResetComponentSaturation (int color, int defaultValue)
 Reset Component Saturation.
 
tvError_t ResetComponentLuma (int color, int defaultValue)
 Reset Component Luma.
 
tvError_t ResetComponentHue (int color, int defaultValue)
 Reset Component hue.
 
bool isCurrentHDRTypeIsSDR (void)
 Check if current format is SDR.
 
int GetPanelID (char *panelid)
 Returns Panel ID information. To be deprecated soon.
 
void GetDefaultPanelID (char *panelID)
 Get the default panel ID.
 
tvError_t SaveColorTemperature (int sourceInput, int pq_mode, int hdr_type, int value)
 Saves the color temperature value.
 
tvError_t SaveBacklight (int sourceInput, int pq_mode, int hdr_type, int value)
 Saves the backlight value.
 
tvError_t SaveContrast (int sourceInput, int pq_mode, int hdr_type, int value)
 Saves the contrast value.
 
tvError_t SaveSaturation (int sourceInput, int pq_mode, int hdr_type, int value)
 Saves the saturation value.
 
tvError_t SaveSharpness (int sourceInput, int pq_mode, int hdr_type, int value)
 Saves the sharpness value.
 
tvError_t SaveBrightness (int sourceInput, int pq_mode, int hdr_type, int value)
 Saves the brightness value.
 
tvError_t SaveHue (int sourceInput, int pq_mode, int hdr_type, int value)
 Saves the hue value.
 
tvError_t SaveDynamicBacklight (int sourceInput, int pq_mode, int hdr_type, int value)
 Saves the DynamicBacklight mode.
 
tvError_t SaveDisplayMode (int sourceInput, int pq_mode, int hdr_type, int value)
 Saves the DisplayMode value.
 
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 SaveDolbyMode (int sourceInput, int pq_mode, int hdr_type, int value)
 Saves the dolby mode value.
 
int GetNumberOfModesupported (void)
 GetNumberOfModesupported.
 
int GetCurrentPQIndex (void)
 Get current PQ Mode index.
 
void GetAllSupportedPicModeIndex (int pic_mode_index[])
 Get All Supported PicMode Index.
 
int GetCMSDefault (tvCMS_tunel_t color_tunel_type)
 Gets the current CMS default value. To be deprecated soon.
 
int GetDolbyModeIndex (const char *dolbyMode)
 Get Dolby Mode Index.
 
int ConvertVideoFormatToHDRFormat (tvVideoHDRFormat_t videoFormat)
 Returns tvhdr_type_t enum for given tvVideoHDRFormat_t enum. To be deprecated soon.
 
int ConvertTVColorToVendorColor (tvDataComponentColor_t blComponentColor)
 Convert TV color to vendor color.
 
int ConvertHDRFormatToContentFormat (tvhdr_type_t hdrFormat)
 Convert HDR to content format.
 
int GetCustomPQModeIndex (void)
 Get Custom mode index.
 
tvError_t SetCMSState (tvCMS_tunel_t tunelType, tvcomponent_color_type_t colorType, tvcomponent_state_t componentState)
 Sets and save's the CMS state.
 
bool isWBUserDfault (tvDataColor_t wbvalue)
 Check the given WB values are default or not.
 
int GetWBRgbType (const char *color, const char *ctrl)
 Get WB RGB type.
 
tvDataColor_t GetUSerWBValueOnInit (void)
 Get WB values on init.
 
bool areEqual (tvDataColor_t wbvalueThis, tvDataColor_t wbvalueThat)
 Check WB values are equal.
 
tvError_t SetColorTemperatureUser (int rgbType, int value)
 Set Color Temperature User.
 
tvError_t SaveColorTemperatureUser (int rgbType, int value)
 Saves the color temperature to driver cache. To be deprecated soon.
 
tvError_t SetBacklightInfo (tvBacklightInfo_t *backlightDefaults)
 Set backlight info.
 
int GetDriverEquivalentBLForCurrentFmt (int backlight)
 Get Driver BL value for current format.
 
int GetHLGModeIndex (const char *hlgMode)
 Get HLG mode Index.
 
int GetHDR10ModeIndex (const char *hdr10Mode)
 Get HDR10 mode index.
 
tvError_t SetBacklightFade (int from, int to, int duration)
 Sets the backlight fade settings.
 
tvError_t ReadAllModeConfigfile (const char *file, char *cpybuffer, const char *searchstring)
 Reads PQ capability information sections from the specified file. To be deprecated soon.
 
void splitstringsfrombuffer (char *buffer, char *availableModes, unsigned short *totalcount)
 Parse buffer and return string values & total count.
 
void splitstringsandvaluefrombuffer (char *buffer, pic_modes_t *availableModes[], unsigned short *totalcount)
 Parse buffer and return string values,index & total count.
 
tvError_t SetGammaMode (int mode)
 Enable or disable gamma mode.
 
tvError_t SetLocalDimmingLevel (int localDimmingLevel)
 Sets the local dimming level.
 
tvError_t GetLocalDimmingLevel (int *localDimmingLevel)
 Gets the current dimming level.
 
tvError_t SaveLocalDimmingLevel (int sourceInput, int pq_mode, int hdr_type, int value)
 Saves local dimming level.
 
void SwitchEDID (int pqmode)
 Switch EDID.
 
tvError_t UpdateEDIDAndSetDimmingLevel (int dimmingLevel)
 Set the EDID and dimming level.
 
void GetLDIMAndEDIDLevel (int dimmingMode, int format, int *dimmingLevel, int *edidLevel)
 Get LDIM and EDID level.
 
tvError_t SaveLowLatencyState (int sourceInput, int pq_mode, int hdr_type, int value)
 Saves the low latency index.
 
tvError_t SetLowLatencyState (int lowLatencyIndex)
 Sets the low latency state to driver register(s)
 
tvError_t GetLowLatencyState (int *lowlatencystate)
 Gets the current low latency state.
 
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.
 
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 SaveGammaTable (int colortemp, unsigned short *pData_R, unsigned short *pData_G, unsigned short *pData_B, unsigned short size)
 Saves the gamma calibrated values.s.
 
tvError_t SetGammaPattern (int is_10_bit, int R_Value, int G_Value, int B_Value)
 Sets the gamma pattern.