From e5d1f0a0d797db29a6f579e677bb174a372fe1ed 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: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/367fe4749b051d11852f3d1b286df9d07bc579dd 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 --- lib/libtriple/pwrmngr.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/libtriple/pwrmngr.cpp b/lib/libtriple/pwrmngr.cpp index fc55573c3..4788a4cd7 100644 --- a/lib/libtriple/pwrmngr.cpp +++ b/lib/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;