summaryrefslogtreecommitdiffstats
path: root/services/audioflinger
Commit message (Collapse)AuthorAgeFilesLines
* Extend downsampling ratios greater than 2:1Andy Hung2014-08-112-4/+4
| | | | | | | | | Also improve robustness to choice of sampling rate or buffer size such that increasing either by 10x does not cause overflow. Bug: 12979141 Bug: 15933066 Change-Id: If7989bd745d1bee3bdf811b8b7c978543ccafb65
* audio policy: enable more than one sink per audio patch.Eric Laurent2014-08-081-29/+35
| | | | | | | | | | | | Allow creation of audio patches with more than one sink. More than one sink is enabled when: - Connecting an input device to output devices on the same audio HW module. - Connecting an output mix to output devices on the same audio HA module. All other patches are limited to one sink. Bug: 16879363. Change-Id: I95be6948ef29df64e51e5b8ace38c2db7f3e89f2
* Merge "Fix effect and mono sink handling." into lmp-devAndy Hung2014-08-072-5/+6
|\
| * Fix effect and mono sink handling.Andy Hung2014-08-082-5/+6
| | | | | | | | | | | | | | | | Do not permit mixing to mono sink in AudioFlinger. Allow effects on mono sink if not Mixer thread (e.g. Record). Bug: 16863095 Change-Id: I8b232fc1fb3f07bf017020c5d4f9ace644dec6d8
* | Merge "audio policy: add support for USB devices for voice call" into lmp-devEric Laurent2014-08-061-2/+2
|\ \
| * | audio policy: add support for USB devices for voice callEric Laurent2014-08-061-2/+2
| |/ | | | | | | | | | | | | | | | | Add possibility to use sink and source devices not on the primary HW module for voice calls (e.g. USB headsets). Bug: 15520724. Change-Id: Ib27db4ba759b6d91ea1104dc2e35c87733517b30
* | Merge "AudioSystem: add API to query audio HW sync source" into lmp-devEric Laurent2014-08-062-0/+22
|\ \
| * | AudioSystem: add API to query audio HW sync sourceEric Laurent2014-08-062-0/+22
| |/ | | | | | | | | | | | | | | | | | | | | Add a method to query from the audio HAL the HW sync source used for a given audio session. Modify audio policy to select a direct output with HW sync when requested. Bug: 16132368. Change-Id: I03038f9188f2d389f8a5fd76a671854013a4513e
* | Merge "MediaServer crashing and audio effects not applied to TTS." into lmp-devRicardo Garcia2014-08-061-1/+6
|\ \ | |/ |/|
| * MediaServer crashing and audio effects not applied to TTS.Ricardo Garcia2014-08-061-1/+6
| | | | | | | | | | | | | | | | | | A memclear in the EffectChain was out of bounds. Bug 15432115 Bug 16845751 Change-Id: Ib0adc7fa730d630bb71fb87d51163a26149b16e2
* | audio: fix crashes upon USB device connectionEric Laurent2014-08-051-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Audio policy: Replace unknown device assertion by debug log in setDeviceConnectionState(). It is possible that some kernels indicate connection of a legacy device type when a USB audio device is connected. We should just ignore this device. - Audio flinger: Make sure FastMixer thread is idle before exiting the normal mixer thread and closing the output stream. Change-Id: Ia10a20176a60a8aa56765538093a555fc998508a
* | Merge "Remove unused TwoTrack process mode from AudioMixer" into lmp-devAndy Hung2014-08-052-107/+0
|\ \
| * | Remove unused TwoTrack process mode from AudioMixerAndy Hung2014-08-042-107/+0
| |/ | | | | | | | | | | Legacy code that has not been hooked up. Change-Id: Ic01a4eddfa1020089d5bc42f58b6a4697698c27a
* | audio flinger: fix service fuzz test crashEric Laurent2014-08-041-0/+6
| | | | | | | | | | Bug: 13744704. Change-Id: I572c89f88dcab2b8b612ec6860983306f9f159ab
* | Remove 64-bit android_atomic uses from StateQueue.Hans Boehm2014-07-312-12/+8
|/ | | | | | | | | | Use stdatomic.h instead. We're trying to remove android_atomic use wherever possible. The 64-bit uses seem easiest to remove first. This cleans up the code, though not as much as C++ <atomic> would, if it worked everywhere. (cherry picked from commit f39b560952d3706a7ff47ef0d82c1a836daeea42) Change-Id: I3c29bdbd5915cb9d47118834a3a742fe296cf87f
* Merge "Enable multichannel in AudioFlinger" into lmp-devAndy Hung2014-07-291-1/+1
|\
| * Enable multichannel in AudioFlingerAndy Hung2014-07-281-1/+1
| | | | | | | | Change-Id: Ibdbdc6ea0b87cdcd15432257a3455b11b3ce14b7
* | Fix build warningsGlenn Kasten2014-07-296-15/+15
| | | | | | | | Change-Id: Ife5e40264f43fb3ccb40830228701003fe106bf5
* | audio policy: pass session ID to capture activity methodsEric Laurent2014-07-282-5/+5
| | | | | | | | | | | | | | | | Indicate the audio session ID when calling getInput(), startInput(), stopInput(), releaseInput(). Bug: 12378680. Change-Id: I763793752f93e2f4e1445a5ab217c895af011038
* | Merge "Fix rounding in RecordThread resampler buffer computation" into lmp-devGlenn Kasten2014-07-281-10/+12
|\ \
| * | Fix rounding in RecordThread resampler buffer computationAndy Hung2014-07-281-10/+12
| |/ | | | | | | | | Bug: 16525305 Change-Id: Ie010822b0fa9dec74adde1d1b091ee44c183fc94
* | rename AudioSystem::newAudioSessionId()Eric Laurent2014-07-282-2/+2
| | | | | | | | | | | | | | | | | | Rename AudioSystem::newAudioSessionId() to AudioSystem::newAudioUniqueId() as it can be used also for I/O handles. Bug: 12378680. Change-Id: I611ea3b5eb57a4b0774437f477ee87dc4ccc2cc2
* | Merge "AudioFlinger: update openInput() and openOutput()" into lmp-devEric Laurent2014-07-253-151/+148
|\ \ | |/ |/|
| * AudioFlinger: update openInput() and openOutput()Eric Laurent2014-07-283-151/+148
| | | | | | | | | | | | | | | | | | | | Add parameters to openInput() and openOutput(): device address, input source. Allow caller to specify a given I/O handle Group parameters in a struct audio_config. Bug: 12378680. Change-Id: I7e9af74c0d996561cc13cbee7d9012d2daf33025
* | Enable lower latency audio capture on more devicesGlenn Kasten2014-07-271-3/+3
|/ | | | | Bug: 16601366 Change-Id: I573b98631f81b7768f7cc00aa09e560008dea587
* Add multichannel capability to AudioFlingerAndy Hung2014-07-247-34/+111
| | | | | | But not enabled (kEnableExtendedChannels == false). Change-Id: I62f7e31fbd29ad703a9a02f5d1a280b6972dd423
* Add multichannel capability to AudioMixerAndy Hung2014-07-246-175/+420
| | | | | | | | tests/test-mixer updated to handle multichannel. New mixer path is still disabled (kUseNewMixer = false). Subsequent CL will enable multichannel capability. Change-Id: I71dafa94cc1d9af567c285e0ded7c5c94e3ff926
* audio flinger: add patch connection between hw modulesEric Laurent2014-07-2410-216/+855
| | | | | | | | | | | | | | | | | | Add support for audio device connections between different audio hw modules. The patch is performed by creating a bridge between the playback thread connected to the sink device and the record thread connected to the source device using a pair of specialized PlaybackTrack and RecordTrack. - Added PatchTrack and PatchRecord classes. - Added TrackBase type to indicate more clearly the track behavior. - A TrackBase can allocate the buffer or reuse an existing one. - Factored some code in openOutput() and openInput() for internal use by PatchPanel. Bug: 14815883. Change-Id: Ib9515fcda864610458a4bc81fa8f59096ff4d7db
* Merge "Fix multichannel integer resampling and add tests" into lmp-devAndy Hung2014-07-232-35/+111
|\
| * Fix multichannel integer resampling and add testsAndy Hung2014-07-212-35/+111
| | | | | | | | Change-Id: I384bf8317d4f03616bf9f2b458a8700965d5cf56
* | Remove execute bitGlenn Kasten2014-07-211-0/+0
|/ | | | Change-Id: I1cf0c0d9375779b3074af12f4cbf9c1ec07bf4ff
* Merge "Add RemixBufferProvider to AudioMixer" into lmp-devAndy Hung2014-07-172-2/+53
|\
| * Add RemixBufferProvider to AudioMixerAndy Hung2014-07-182-2/+53
| | | | | | | | | | | | | | This is used to convert between channel masks for input AudioTrack data. Change-Id: Iedffaeccb99c7053992152e7b1cb6b2d33b12eef
* | Merge "Update DownmixerBufferProvider to use CopyBufferProvider" into lmp-devAndy Hung2014-07-182-158/+166
|\ \ | |/
| * Update DownmixerBufferProvider to use CopyBufferProviderAndy Hung2014-07-182-158/+166
| | | | | | | | Change-Id: I6b1a8755a1e6c29b916662fd376e9509cda5df55
* | Merge "Add CopyBufferProvider class for AudioMixer" into lmp-devAndy Hung2014-07-172-114/+172
|\ \ | |/
| * Add CopyBufferProvider class for AudioMixerAndy Hung2014-07-182-114/+172
| | | | | | | | | | | | | | | | AudioMixer::ReformatBufferProvider now uses it as a base class. Fix ReformatBufferProvider object leak. Change-Id: If196f844eaaa124a173ffa27afe88098023c2ff9
* | Fix copy/paste bugGlenn Kasten2014-07-181-3/+2
|/ | | | | | introduced by Change-Id: I4e9b7fa99858b488ac98a441fa70e31dbba1b865 Change-Id: I9a0c8800f5cf3767cc259776f95c96cad972e392
* Merge "Move AudioRecord frame count calculations to server" into lmp-devGlenn Kasten2014-07-171-35/+31
|\
| * Move AudioRecord frame count calculations to serverGlenn Kasten2014-07-171-35/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Buffer frame count and notification frame count are now calculated by server instead of by client. The server has more information and can do a better job. Also fix a few bugs: - If a fast track was re-created, even with same pipe depth, it would fail. Now it can correctly re-create a fast track provided the pipe depth is same. - Notification frame count for fast tracks was calculated by client as 1/2 of the total frame count, which is a large value due to the pipe. Now the notification frame count is set by server to the HAL frame count. This should reduce latency for fast tracks. - EVENT_OVERRUN were happening frequently when there was sample rate conversion, because the client didn't know about the sample rate conversion, and under-estimated the necessary buffer size. Now since server calculates the buffer sizes, EVENT_OVERRUN is unlikely. - RecordThread::createRecordTrack_l was checking for mono and stereo for fast tracks. This is not necessary, and now we can handle a multi-channel fast track. Bug: 7498763 Change-Id: I0c581618e8db33084d5ff9ed50a592990c9749e8
* | Merge "Fix initial audio glitch on startup" into lmp-devAndy Hung2014-07-171-1/+1
|\ \ | |/ |/|
| * Fix initial audio glitch on startupAndy Hung2014-07-171-1/+1
| | | | | | | | | | | | | | Also happens when restarting AudioFlinger. Bug: 16322824 Change-Id: I382b20174cb0639e04316130141f2094d7dd0cb3
* | Add audio_input_flags_t to IAudioFlinger::openInputGlenn Kasten2014-07-172-4/+6
| | | | | | | | | | | | | | For backward compatibility, until flags are correctly calculated, we will assume that the request is for a low latency input stream. Change-Id: I76746834e870df00833dc77cbdaa2edd2ffeec95
* | Improve dumpsys for capture threadsGlenn Kasten2014-07-172-4/+6
|/ | | | | | Show per-track sample rate, and whether there is a fast capture thread Change-Id: If6a08a40d1eeba0690aa8da3c541f845ec101b7f
* Add audio_input_flags_t to HAL open_input_streamGlenn Kasten2014-07-151-2/+3
| | | | | | | For backward compatibility, until flags are added to openInput(), we will assume that the request is for a low latency input stream. Change-Id: I5e6f7e574418917ff1b41b0a47199203c69cb40f
* const correctness on downmix and upmixGlenn Kasten2014-07-151-3/+3
| | | | Change-Id: I0f51470a6d58a22310ce7cda80afc55e9d6df1dc
* stagefright: Pass audio aac sub formats in offloadinfoaarti jadhav-gaikwad2014-07-111-7/+16
| | | | | | | | Pass audio aac sub formats in offloadinfo according to aac profile. Audio HAL can take decision about offload using DSP capabilities Change-Id: If269a3654b5d2b09c183212b0646ef03e06f2d8f
* Return negotiated format with HAL in AudioFlingerAndy Hung2014-07-102-5/+11
| | | | | | | | Fixes an issue caused by extended precision and the FastMixer when the format to the FastMixer was returned instead of the HAL format. Change-Id: I2be9d55d5c87d82e46b5200b07fcdd986ebde08a
* Merge "Add floating point volume handling to AudioMixer"Andy Hung2014-07-0813-114/+291
|\
| * Add floating point volume handling to AudioMixerAndy Hung2014-07-0813-114/+291
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use floating point volume in AudioMixer mixing when floating point input is used with the new mixer engine. AudioResampler is updated to take floating point volume to match. Both legacy integer and floating point mixer engines work. For now, integer volume is used when the new mixer engine runs in integer input mode, for backward compatibility with the legacy mixer. The new mixer engine will generally run in floating point input mode. When the legacy path is removed, the integer volumes will be removed. Change-Id: I79e80c292ae7c8b8bdd0aa371a1b2c3a1b618290