From e33e00e931d1381d402484aa5cde67e540e3c82c Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Mon, 5 Oct 2009 20:29:18 -0700 Subject: Fix issue 2139634: DTMF tones on Sholes popping, hissing (audio latency too high). This change is a complement to the main fix in kernel driver for the same issue (partner change #1250). It removes clicks sometimes heard after the end of the tones while audio flinger is sending 0s to the audio output stream. The problem was that the sleep time between two writes was more than the duration of one audio output stream buffer which could cause some underrun. Also fixed a recent regression in ToneGenerator that made that the end of previous tone was repeated at the beginning of current one under certain timing circumstances when the maximum tone duration was specified. --- include/media/ToneGenerator.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/media/ToneGenerator.h b/include/media/ToneGenerator.h index e8df08e..c884c2c 100644 --- a/include/media/ToneGenerator.h +++ b/include/media/ToneGenerator.h @@ -248,6 +248,7 @@ private: // only if tone duration is less than about 27 Hours(@44100Hz sampling rate). If this time is exceeded, // no crash will occur but tone sequence will show a glitch. unsigned int mMaxSmp; // Maximum number of audio samples played (maximun tone duration) + int mDurationMs; // Maximum tone duration in ms unsigned short mCurSegment; // Current segment index in ToneDescriptor segments[] unsigned short mCurCount; // Current sequence repeat count -- cgit v1.1