Skip to content

Commit

Permalink
AMLCodec: Use amvecm to handle contrast/brightness
Browse files Browse the repository at this point in the history
The contrast/brightness controls under /sys/class/video/ don't work on the
newer devices so switch to using the ones under /sys/class/amvecm/ instead
  • Loading branch information
cdu13a committed Jun 5, 2020
1 parent 438ca0c commit 214bd0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2269,14 +2269,14 @@ void CAMLCodec::SetVideoContrast(const int contrast)
// input contrast range is 0 to 100 with default of 50.
// output contrast range is -127 to 127 with default of 0.
int aml_contrast = (127 * (contrast - 50)) / 50;
SysfsUtils::SetInt("/sys/class/video/contrast", aml_contrast);
SysfsUtils::SetInt("/sys/class/amvecm/contrast1", aml_contrast);
}
void CAMLCodec::SetVideoBrightness(const int brightness)
{
// input brightness range is 0 to 100 with default of 50.
// output brightness range is -127 to 127 with default of 0.
int aml_brightness = (127 * (brightness - 50)) / 50;
SysfsUtils::SetInt("/sys/class/video/brightness", aml_brightness);
SysfsUtils::SetInt("/sys/class/amvecm/brightness1", aml_brightness);
}
void CAMLCodec::SetVideoSaturation(const int saturation)
{
Expand Down

0 comments on commit 214bd0f

Please sign in to comment.