OSDN Git Service

Fix issue 2139634: DTMF tones on Sholes popping, hissing (audio latency too high).
authorEric Laurent <elaurent@google.com>
Tue, 6 Oct 2009 03:29:18 +0000 (20:29 -0700)
committerEric Laurent <elaurent@google.com>
Wed, 7 Oct 2009 01:59:35 +0000 (18:59 -0700)
commit62443f5f4517ba17d911975e695f1ab75bfdbf77
tree449644bbac50efbe048b25eea7275b5ea74aab2e
parentc404ed2be5d29c8932a3d69b53fea4653c9b868b
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
libs/audioflinger/AudioFlinger.cpp
libs/audioflinger/AudioFlinger.h
media/libmedia/ToneGenerator.cpp