From 33be04bfe3a73ab44067d496110d1d252123428d Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 8 Jan 2012 00:51:01 +0100 Subject: [PATCH] libtriple: avoid audio noise when going to standby Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/9cc59bbd247da3b0b35d04ea8c864e95872d831c Author: Stefan Seyfried Date: 2012-01-08 (Sun, 08 Jan 2012) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libtriple/pwrmngr.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libtriple/pwrmngr.cpp b/libtriple/pwrmngr.cpp index fc55573..4788a4c 100644 --- a/libtriple/pwrmngr.cpp +++ b/libtriple/pwrmngr.cpp @@ -52,9 +52,15 @@ bool cCpuFreqManager::SetCpuFreq(unsigned long f) return false; } if (f) + { + ioctl(fd, IOC_AVS_SET_VOLUME, 31); /* mute AVS to avoid ugly noise */ ioctl(fd, IOC_AVS_STANDBY_ENTER); + } else + { ioctl(fd, IOC_AVS_STANDBY_LEAVE); + ioctl(fd, IOC_AVS_SET_VOLUME, 0); /* max gain */ + } close(fd); return true;