summaryrefslogtreecommitdiffstats
path: root/libs/audioflinger
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix issue 2123668: Class scope typo in AudioFlinger.cpp.Eric Laurent2009-09-161-8/+8
|
* Fix issue 2118464: cannot play ring tones and notifications after ↵Eric Laurent2009-09-152-18/+14
| | | | | | | | | | disconnecting BT headset while in call. The problem comes from the fact that when the duplicated output is closed after BT headset disconnection, the OUTPUT_CLOSED notification is not sent to AudioSystem. Then the mapping between notification stream and duplicated output cached in AudioSystem is not cleared and next time a notification is played, the duplicated output is selected and the createTrack() request is refused by AudioFlinger as the selected output doesn't exist. The notification is ignored by AudioFlinger because when it is sent by the terminating playback thread, the thread has already been removed from the playback thread list. The fix consists in sending the notification in closeOutput() and not when exiting the playback thread. The same fix is applied to record threads.
* Fix issue 2115450: a2dp thread is started, even though we are only connected ↵Eric Laurent2009-09-141-2/+3
| | | | | | | to headset and not playing music. This is due to a regression introduced by change 24114: when no audio tracks are ready for mixing, 0s are written to audio hardware. However this should only happen if tracks have already been mixed since the audio flinger thread woke up. Also do not write 0s to audio hardware in direct output threads when audio format is not linear PCM.
* Fix issue 2107584: media server crash when AudioFlinger fails to allocate ↵Eric Laurent2009-09-091-22/+27
| | | | | | | | memory for track control block. AudioFlinger: verify that mCblk is not null before using it in Track and RecordTrack contructors. IAudioFlinger: check result of remote transaction before reading IAudioTrack and IAudioRecord. IAudioTrack and IAudioRecord: check result of remote transaction before reading IMemory.
* Fix issue 1992233: DTMF tones on Sholes is really long.Eric Laurent2009-09-081-55/+63
| | | | | Add a parameter to ToneGenerator.startTone() allowing the caller to specify the tone duration. This is used by the phone application to have a precise control on the DTMF tone duration which was not possible with the use of delayed messaged. Also modified AudioFlinger output threads so that 0s are written to the audio output stream when no more tracks are ready to mix instead of just sleeping. This avoids an issue where the end of a previous DTMF tone could stay in audio hardware buffers and be played just before the beginning of the next DTMF tone.
* fix issue 2096657: Sholes: residue shutter sound heard ONCE while taking a ↵Eric Laurent2009-09-031-6/+7
| | | | | | | picture AFTER the volume is turned off. Do not ramp volume if the first frame of a track is processed after the track was stopped. In the case of very short sounds, the track stop request can be received by AudioFlinger just after the start request before the first frame is mixed by AudioMixer. In this case, the track is already in stopped state and initial volume is applied with a ramp for the first frame processed which should not be the case: initial volume change is always applied immediatelly.
* Fix issue 2091594: music chirp after disconnecting A2DP.Eric Laurent2009-09-011-1/+4
| | | | | In AudioFlinger::MixerThread::putTracks(), change the mFillingUpStatus flag to FS_FILLING for active tracks so that mute request is executed without ramping volume down when the track is moved from A2DP to hardware output. Also modified AudioFlinger::setStreamOutput() so that the notification of the change is sent only once to AudioSystem.
* Fix issue 2085690: AudioFlinger must properly terminate the input and output ↵Eric Laurent2009-08-311-2/+11
| | | | | | threads when destroyed. Call closeInput() for all inputs and closeOutput() for all outputs before deleting audio hardware in AudioFlinger destructor.
* Fix issue 2045911: Camera Shutter tone does not play correctly while ↵Eric Laurent2009-08-272-75/+201
| | | | | | listening to music. Add the possibility to delay routing and volume commands in AudioPolicyClientInterface. The delay is not blocking for the caller.
* Workaround for issue 2046783.Eric Laurent2009-08-122-2/+13
| | | | | Apparently the problem is caused by the fact that A2dpAudioStreamOut::standby() calls a2dp_stop() after the headset has been powered down. The workaround consists in indicating to A2DP audio hardware that a close request is pending and that stanby() must be bypassed.
* Fix issue 2046140: master: media_server crash when powering down A2DP ↵Eric Laurent2009-08-112-25/+30
| | | | | | | | | | headset while a ringtone is playing. This is because the AudioFlinger duplicating thread is closed while the output tracks are still active. This cause the output tracks objects to be destroyed at a time where they can be in use by the destination output mixer. The fix consists in adding the OutputTrack to the track list (mTracks) of its destination thread so that a strong reference is help during the mixer processed and the track is detroyed only when safe by destination thread. Also added detection of problems when creating the output track (e.g. no more tracks in mixer). In this case the output track is not added to output track list of duplicating thread.
* Fix issue 2043314: Recorded audio is choppy.Eric Laurent2009-08-111-1/+1
| | | | Fixed cut/paste error causing constant reset of current frame index in input buffer.
* Limit AudioFlinger mixer track sampling rate.Eric Laurent2009-08-101-0/+4
| | | | When changing the audio output stream sampling rate with setParameters() make sure that all tracks have a sampling rate less or equal to 2 times the new output sampling rate.
* AudioService now differentiates BT headsets and car kits.Eric Laurent2009-08-072-4/+4
| | | | | The BT headset detection now makes the difference between car kits and headsets, which can be used by audio policy manager. The headset connection is also detected earlier, that is when the headset is connected and not when the SCO socket is connected as it was the case before. This allows the audio policy manager to suspend A2DP output while ringing if a SCO headset is connected.
* Fix problem in AudioFlinger closeOutput and closeInput.Eric Laurent2009-08-071-7/+12
| | | | | | | | There was no garanty that the corresponding thread destructor had been already called when exiting the closeOutput() or closeInput() functions. This contructor could be called by the thread after the exit condition is signalled. By way of consequence, closeOutputStream() could be called after we exited closeOutput() function. To solve the problem, the call to closeOutputStream() or closeInputStream() is moved to closeOutput() or closeInput().
* Improved unit test code for Audioflinger.Eric Laurent2009-08-074-37/+183
|
* Fix lockup in audio flinger threadbase setParameters.Eric Laurent2009-08-072-24/+47
| | | | | | | | | The function checkForNewParameters_l() is called with the ThreadBase mutex mLock locked. In the case where the parameter change implies an audio parameter modification (e.g. sampling rate) the function sendConfigEvent() is called which tries to lock mLock creating a deadlock. The fix consists in creating a function equivalent to sendConfigEvent() that must be called with mLock locked and does not lock mLock. Also added the possibility to have more than one set parameter request pending.
* Merge change 9660Android (Google) Code Review2009-08-071-1/+1
|\ | | | | | | | | * changes: Fix problem in A2DP interface closeOutputStream().
| * Fix problem in A2DP interface closeOutputStream().Eric Laurent2009-08-041-1/+1
| | | | | | | | If the output stream handler passed was not the A2DP output stream, the request was ignored instead of being forwarded downstream to hardware interface.
* | Merge change 9653Android (Google) Code Review2009-08-073-4/+16
|\ \ | | | | | | | | | | | | * changes: Fix getParameters() default implementation.
| * | Fix getParameters() default implementation.Eric Laurent2009-08-043-4/+16
| |/ | | | | | | Do not return empty string but key value pairs with empty values.
* | Fix issue 2001214: AudioFlinger and AudioPolicyService interfaces should not ↵Eric Laurent2009-08-075-150/+161
|/ | | | | | | use pointers as handles to inputs and outputs. Use integers instead of void* as input/output handles at IAudioFlinger and IAudioPolicyService interfaces. AudioFlinger maintains an always increasing count of opened inputs or outputs as unique ID.
* Merge change 8987Android (Google) Code Review2009-07-291-0/+1
|\ | | | | | | | | * changes: Fix firestone build
| * Fix firestone buildMarco Nelissen2009-07-291-0/+1
| |
* | Fix issue 2004229: DTMF tones play through earpiece (G1).Eric Laurent2009-07-281-1/+1
|/
* Fix the build for BOARD_USES_GENERIC_AUDIO optionEric Laurent2009-07-251-3/+2
|
* Fix issue 2001204: libaudiopolicy.so and libaudiopolicygeneric.so libraries ↵Eric Laurent2009-07-244-55/+20
| | | | must be pre-linked.
* Fix issue 1999585: audioflinger crash.Eric Laurent2009-07-231-1/+1
| | | | We were looping on the number of playback threads when dumping record threads.
* Fix the sim build.Eric Laurent2009-07-232-12/+22
|
* Fix issue 1795088 Improve audio routing codeEric Laurent2009-07-2318-1647/+5193
| | | | | | | Initial commit for review. Integrated comments after patch set 1 review. Fixed lockup in AudioFlinger::ThreadBase::exit() Fixed lockup when playing tone with AudioPlocyService startTone()
* Standby A2DP audio hardware interface when disabling A2DP.Nick Pelly2009-07-151-0/+1
| | | | | | | | | | | Patch supplied on advice of partner. This causes us to send suspend_sink to Bluez via socket interface, so we enter suspend on the A2DP link faster. This is especially important when switching to SCO so that we come closer to whitepaper recommendations to suspend A2DP before setting up SCO. We have another patch set to add DBUS A2DP suspend and resume calls to Bluez that will do a better job of following whitepaper recommendations for A2DP -> SCO -> A2DP, but this small patch is still an improvement.
* another attempt to fix the simMathias Agopian2009-07-141-0/+6
|
* am 3893da46: Merge change 6614 into donutAndroid (Google) Code Review2009-07-092-5/+10
|\ | | | | | | | | | | | | Merge commit '3893da46f0a97d59a7687ae2bd71ba855eb5ffe3' * commit '3893da46f0a97d59a7687ae2bd71ba855eb5ffe3': Fix issue 1970108: crash in AudioFlinger::isMusicActive()
| * Fix issue 1970108: crash in AudioFlinger::isMusicActive()Eric Laurent2009-07-092-5/+10
| | | | | | | | Protected calls to MixerThread::isMusicActive() by AudioFlinger::mLock
* | am a5188a09: Merge change 6367 into donutAndroid (Google) Code Review2009-07-071-0/+2
|\ \ | |/ | | | | | | | | | | Merge commit 'a5188a09bd20c376b4f0645b0df4c52f8e114e21' * commit 'a5188a09bd20c376b4f0645b0df4c52f8e114e21': Add virtual destructor.
| * Merge change 6367 into donutAndroid (Google) Code Review2009-07-071-0/+2
| |\ | | | | | | | | | | | | * changes: Add virtual destructor.
| | * Add virtual destructor.Marco Nelissen2009-07-071-0/+2
| | |
* | | am 88e209dc: Fix issue 1743700: AudioTrack: setPlaybackRate can not set the ↵Eric Laurent2009-07-071-12/+6
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | playback rate to twice of the ouputSR Merge commit '88e209dcf8c2ebddda5c272f46d1bd5478bc639c' * commit '88e209dcf8c2ebddda5c272f46d1bd5478bc639c': Fix issue 1743700: AudioTrack: setPlaybackRate can not set the playback rate to twice of the ouputSR
| * | Fix issue 1743700: AudioTrack: setPlaybackRate can not set the playback rate ↵Eric Laurent2009-07-071-12/+6
| |/ | | | | | | | | | | | | | | to twice of the ouputSR Store sample rate on 32 bits instead of 16 bits in audio_track_cblk_t. Removed sampleRate() methods from AudioTrack and AudioRecord: replaced by getSampleRate(). AudioTrack::setSampleRate() no returns a status.
* | am 2bbb80e1: Merge change 5994 into donutAndroid (Google) Code Review2009-07-031-2/+3
|\ \ | |/ | | | | | | | | | | Merge commit '2bbb80e183c6492689f8b10b2d0f5dfe9872a6ac' * commit '2bbb80e183c6492689f8b10b2d0f5dfe9872a6ac': Less logging in some places. More in others.
| * Less logging in some places. More in others.Joe Onorato2009-07-011-2/+3
| |
* | Framework changes for bluez4.Jaikumar Ganesh2009-06-091-2/+1
| | | | | | | | | | Changes in the Bluetooth JNI calls and framework functions for Bluez4.
* | am d9cc7659: Merge change 2706 into donutAndroid (Google) Code Review2009-05-291-11/+14
|\ \ | |/ | | | | | | | | | | Merge commit 'd9cc7659fa9b8544e2a3ca7b7040fbd79afdf7ea' * commit 'd9cc7659fa9b8544e2a3ca7b7040fbd79afdf7ea': Fix issue 1883666: Audio coming from the music player stopped suddenly
| * Fix issue 1883666: Audio coming from the music player stopped suddenlyEric Laurent2009-05-291-11/+14
| | | | | | | | | | | | | | The problem comes from the code handling the automatic change of audio routing to speaker when notifications are played. The music is also muted while the sound is forced to speaker. To avoid truncating the end of the notification, a delay is inserted between the end of the notification and the restoration of the audio routing. If a new notification starts during this delay, the current music mute state read and saved before muting music corresponds to the forced mute due to previous notification. When the new notification ends, the mute state restored is muted and music stream stays muted for ever. The fix consists in reading and saving music mute state only if the audio routing has been restored (check that mForcedRoute is back to 0).
* | am de8268d6: Merge change 2331 into donutAndroid (Google) Code Review2009-05-264-22/+24
|\ \ | |/ | | | | | | | | | | Merge commit 'de8268d6d1cd168510c490b17e93154d2eab767c' * commit 'de8268d6d1cd168510c490b17e93154d2eab767c': Fix issue 1846343 - part 1
| * Fix issue 1846343 - part 1Eric Laurent2009-05-264-22/+24
| | | | | | | | | | | | | | | | This change is the first part of a fix for issue 1846343, : - Added new enum values for input sources in AudioRecord and MediaRecorder for voice uplink, downlink and uplink+downlink sources. - renamed streamType to inputSource in all native functions handling audio record. A second change is required in opencore author driver and android audio input to completely fix the issue.
* | move libbinder's header files under includes/binderMathias Agopian2009-05-202-4/+4
| |
* | checkpoint: split libutils into libutils + libbinderMathias Agopian2009-05-201-0/+2
| |
* | am eb2c314b: Merge change 2042 into donutAndroid (Google) Code Review2009-05-206-47/+0
|\ \ | |/ | | | | | | | | | | Merge commit 'eb2c314b4d31c44af8a27ef51120b33290e65837' * commit 'eb2c314b4d31c44af8a27ef51120b33290e65837': Remove deprecated openInputStream factory method
| * Remove deprecated openInputStream factory methodDave Sparks2009-05-196-47/+0
| |