summaryrefslogtreecommitdiffstats
path: root/media/libmedia/AudioSystem.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix potential deadlock between AudioPolicyService and AudioSystemAndy Hung2014-09-081-1/+5
| | | | | Bug: 17109761 Change-Id: I315c1c5066f62b05e1c13b04fae1272b5fbce977
* AudioSystem: add API to query audio HW sync sourceEric Laurent2014-08-061-0/+7
| | | | | | | | | | | 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
* Add sound trigger control by audio policyEric Laurent2014-08-051-0/+15
| | | | | | | | | | | | | | | | | Audio policy: - Added active capture indication to sound trigger service: recognition stops if concurrent capture is not supported. - Added generation of reserved I/O handle and session ID for utterance capture. Sound trigger service - Added sound model update callback handling. - Added service state callback - Simplified callback shared memory allocation. Bug: 12378680. Change-Id: Ib0292c2733e6df90fdae480633dd9953d0016ef1
* audio policy: pass session ID to capture activity methodsEric Laurent2014-07-281-6/+9
| | | | | | | | Indicate the audio session ID when calling getInput(), startInput(), stopInput(), releaseInput(). Bug: 12378680. Change-Id: I763793752f93e2f4e1445a5ab217c895af011038
* rename AudioSystem::newAudioSessionId()Eric Laurent2014-07-281-3/+3
| | | | | | | | | Rename AudioSystem::newAudioSessionId() to AudioSystem::newAudioUniqueId() as it can be used also for I/O handles. Bug: 12378680. Change-Id: I611ea3b5eb57a4b0774437f477ee87dc4ccc2cc2
* Add audio_input_flags_t to IAudioPolicyService::getInputGlenn Kasten2014-07-171-2/+3
| | | | Change-Id: I9f37be05f8dc7b85a8827a94e76ca0f45453e170
* libmedia: 64-bit compile warningsMark Salyzyn2014-06-201-3/+3
| | | | Change-Id: I600f062fa7148c01851023c1240c39939e648002
* AudioPolicyManager: return output for audio attributesJean-Michel Trivi2014-06-181-0/+26
| | | | | | | | | | In AudioPolicyManager, support querying an output or playback strategy for audio attributes, instead of a stream type, In AudioTrack creation, use the output returned for the track's attributes. Change-Id: I0fef05845ba676404775e2e338c10e6a96237268
* AudioSystem: remove unused stream typeJean-Michel Trivi2014-06-111-12/+6
| | | | | | | The audio stream type is not used in the getSampleRate() and getFrameCount() methods. Change-Id: I3d065ae272bd039204cd323cdab9b60460034f2d
* audio policy: add routing update client interfaceEric Laurent2014-05-291-1/+29
| | | | | | | | | | | | | Added IAudioPolicyServiceClient client binder interface for client process to receive notifications from AudioPolicyService when audio ports are added/removed or audio patches created/released. The audio patches owned by a given client are automatically released when this client binder dies. Bug: 14815883. Change-Id: I6013f6aec03b50565cffb1ad2cd1f0f8852032c5
* DO NOT MERGE - IAudioPolicyService interface extension for patch panelEric Laurent2014-05-281-0/+49
| | | | Change-Id: I0a62e5416edc41c3a0e816275085ab18a23066f1
* Merge "Use symbol AUDIO_IO_HANDLE_NONE from <system/audio.h>"Glenn Kasten2014-03-261-7/+7
|\
| * Use symbol AUDIO_IO_HANDLE_NONE from <system/audio.h>Glenn Kasten2014-03-261-7/+7
| | | | | | | | Change-Id: Id6b1aa17558eb73e17f22b8eab6cd02e00a96dff
* | Update commentsGlenn Kasten2014-03-261-1/+1
|/ | | | Change-Id: I5776313b9b49072cd666d28880f0d07cc73f827b
* Merge "Use symbol AUDIO_DEVICE_NONE from <system/audio.h>"Glenn Kasten2014-03-261-1/+1
|\
| * Use symbol AUDIO_DEVICE_NONE from <system/audio.h>Glenn Kasten2014-03-251-1/+1
| | | | | | | | Change-Id: I61f882c5e7c949bf00d3bfc745ebf3b5e1c42a58
* | Merge "Remove stream type from AudioSystem::getRenderPosition()"Glenn Kasten2014-03-261-9/+1
|\ \
| * | Remove stream type from AudioSystem::getRenderPosition()Glenn Kasten2014-03-261-9/+1
| |/ | | | | | | | | | | | | The I/O handle is never equal to AUDIO_IO_HANDLE_NONE, so the stream type is not needed. Change-Id: I1ab134a2fa379d6dd0b6167345a856a192d478f9
* | Merge "Fix uses of KeyedVector"Glenn Kasten2014-03-261-1/+1
|\ \
| * | Fix uses of KeyedVectorGlenn Kasten2014-03-251-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Constructor for AudioFlinger::mAudioHwDevs was missing, and so AudioFlinger::findSuitableHwDev_l() could return an undefined pointer if a non-0 module wasn't found. A KeyedVector of Plain Old Data (POD) element type must specify the default value in the constructor, or else the default will be undefined. Minor: - Parameter had wrong type in constructor for AudioSystem::gOutputs. - Remove obsolete AudioSystem::gStreamOutputMap. Change-Id: I9841493e018440e559d8b8b0e4e748ba2b2d365b
* | Merge "Remove streamType parameter from AudioSystem::getLatency()"Glenn Kasten2014-03-261-3/+2
|\ \
| * | Remove streamType parameter from AudioSystem::getLatency()Glenn Kasten2014-03-251-3/+2
| |/ | | | | | | Change-Id: Ie7346e93436ddc215cad7d16be555dcb6c277d54
* | Document AudioSystem::newAudioSessionId() failuresGlenn Kasten2014-03-251-1/+1
|/ | | | Change-Id: Iaa168722f362c36bdfa87fe20dc0a59b43cf1ca3
* Track pid for each sessionMarco Nelissen2014-02-111-4/+4
| | | | | | so they can be properly freed. Change-Id: I6f389035bc29e74e7c367c1c6d0252b180f666b3
* resolved conflicts for merge of 566be7c3 to masterNarayan Kamath2014-02-111-2/+2
|\ | | | | | | Change-Id: I7b1cc71057b2bd4f771e7bcf508a8c3abd6017ce
| * Make frameworks/av 64-bit compatibleKévin PETIT2014-02-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Contains the necessary changes to make frameworks/av build and work on a 64-bit machine. Signed-off-by: Craig Barber <craig.barber@arm.com> Signed-off-by: Kévin PETIT <kevin.petit@arm.com> Signed-off-by: Ashok Bhat <ashok.bhat@arm.com> Signed-off-by: Marcus Oakland <marcus.oakland@arm.com> Change-Id: I725feaae50ed8eee25ca2c947cf15aee1f395c43
* | Merge "Use printf format %#x for audio_format_t in logs"Glenn Kasten2014-02-101-3/+3
|\ \
| * | Use printf format %#x for audio_format_t in logsGlenn Kasten2014-02-071-3/+3
| | | | | | | | | | | | Change-Id: I1c611d1037685d52ccc84efe0fccd6413ec938e9
* | | Fix whitespaceGlenn Kasten2014-02-071-12/+24
|/ / | | | | | | Change-Id: I9add0872030a26933f6b6dad1be299154611cc56
* | Fix unused parameter warnings in audioGlenn Kasten2014-02-031-1/+1
| | | | | | | | Change-Id: I665ba3358dd9502f0adec70d486e7bf8a2e1b0fe
* | Merge "AudioRecord::getInputFramesLost() cleanup"Glenn Kasten2014-01-171-2/+2
|\ \
| * | AudioRecord::getInputFramesLost() cleanupGlenn Kasten2014-01-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug that if the binder call failed (for example if the IAudioFlinger binder is dead), then getInputFramesLost was returning garbage. Now it correctly returns zero, which is the error value for this method. The type declarations for getInputFramesLost were inconsistent: a mixture of unsigned int, size_t, and uint32_t. Now it returns uint32_t everywhere, which is what the underlying HAL API returns. Added a FIXME about the side effect behavior. This will need review for multi-client. Change-Id: Ifa2e117a87dbd0c1f2c892a31d1c3dd919bf1a0a
* | | Merge "Fix error handling in AudioSystem::getOutputForEffect"Glenn Kasten2014-01-151-1/+2
|\ \ \ | |/ / |/| |
| * | Fix error handling in AudioSystem::getOutputForEffectGlenn Kasten2014-01-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | and AudioPolicyService::getOutputForEffect. The conventional error value for audio_io_handle_t is 0, not a status_t cast to audio_io_handle_t. Change-Id: I34b3fd1a50f3fa1cbf39f32eea1911112a4e094a
* | | Merge "Cleanup AudioSystem::getInputBufferSize error handling and caching"Glenn Kasten2014-01-091-4/+10
|\ \ \
| * | | Cleanup AudioSystem::getInputBufferSize error handling and cachingGlenn Kasten2014-01-081-4/+10
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, if the IAudioFlinger::getInputBufferSize failed, it would return NO_ERROR but a zero buffer size value, which could confuse the caller. Now it returns BAD_VALUE in this case. Also it would still cache the zero buffer size. Now it does not cache on failure. Removed over-initialization of the cache globals. Change-Id: I6835fcb56fe52535e018fc8c0c242115221b5d85
* | | Cleanup error handling in AudioSystem get methodsGlenn Kasten2014-01-081-0/+10
|/ / | | | | | | | | | | Don't return zero sample rate or frame count without an error. Change-Id: I052d841080ed33e4f081ae9825a2f33dff444fb9
* | Merge "Fix some (but not all) unused parameter warnings"Glenn Kasten2013-12-201-2/+2
|\ \
| * | Fix some (but not all) unused parameter warningsGlenn Kasten2013-12-191-2/+2
| |/ | | | | | | Change-Id: Ia99e23a0b46db3f3e6aa46f9018e63c14f4af369
* | Add versions of get/SetParameters without I/O handleGlenn Kasten2013-12-191-0/+10
|/ | | | | | | This is a step towards hiding I/O handles from application level, as much as possible. Change-Id: I30f4171d5dcf77f8e8eb332ce2e9245b30f5f2e1
* AudioSystem: new audioflinger restart detectionEric Laurent2013-08-191-0/+8
| | | | | | | | | Add a specific method to AudioSystem for AudioService to poll for AudioFlinger service restart instead of relying on current callback mechanism which is flaky. Bug: 9693068. Change-Id: Ie88bc9d25033503bc5cd2fa9d8c754d0f8045b8f
* Use standard name and type for channel maskGlenn Kasten2013-07-241-4/+4
| | | | | | Former name 'channels' was ambiguous with respect to channel count. Change-Id: I716f792d95a7e0c787d27514ad6e93dbcef8a415
* Use AudioSystem::setLowRamDevice() to configure memoryGlenn Kasten2013-07-191-0/+7
| | | | | Bug: 9798886 Change-Id: I9321e3f369f1ed9429ae222e3926ebdeb012b8b0
* Merge "Add comments"Glenn Kasten2013-07-171-0/+2
|\
| * Add commentsGlenn Kasten2013-07-101-0/+2
| | | | | | | | Change-Id: Ifbf3a46a4183c8abc0feee1c588953ab10303cc1
* | Merge "Fix typo in logs"Glenn Kasten2013-07-171-2/+2
|\ \ | |/ |/|
| * Fix typo in logsGlenn Kasten2013-07-021-2/+2
| | | | | | | | Change-Id: I889e31ea3a45a3d8d34fdfb54ebc3947de51d2be
* | Include what is neededGlenn Kasten2013-07-021-0/+1
|/ | | | | | | Remove old includes. Header files only include other header files that they directly need themselves. Change-Id: Ic471386808d9f42ea19ccbd59cb50a5f83a89dd0
* Public API changes for audio offload support.Richard Fitzgerald2013-06-271-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NOTE: this does _not_ include all private member variables added to classes as part of offload support. Only public/protected functions and stubs functions/variables needed to make the changes buildable. - isOffloadSupported() added to audio policy service A stub implementation is required to build, this always returns false - setParameters() added to IAudioTrack A stub implementation is required to build, this always returns INVALID_OPERATION - CBlk flag for stream end - Change AudioSystem::getRenderPosition() to take an audio_output_t so caller can specify which output to query - Add AudioSystem::isOffloadSupported() This is fully implemented down to the AudioFlinger function AudioPolicyServer::isOffloadSupported() which is just a stub that always returns false. - Add EVENT_STREAM_END to AudioTrack interface. STREAM_END is used to signal when the hardware has actually finished playing all the data it was sent. - Add event type enumeration to media player interface AudioSink callbacks so that the same callback can be used to handle multiple types of event. For offloaded tracks we also have to handle STREAM_END and TEAR_DOWN events - Pass audio_offload_info_t to various functions used for opening outputs, tracks and audio players. This passes additional information about the compressed stream down to the HAL when using offload. For publicly-available APIs this is an optional parameter (for some of the internal and low-level APIs around the HAL interface it is mandatory) - Add getParameters() and setParameters() API to AudioTrack Currently dummy implementations. - Change AudioPlayer contructor so that it takes a set of bitflags defining what options are required. This replaces the original bool which only specified whether to use deep buffering. - Changes to StageFright class definition related to handling tearing-down of an offloaded track when we need to switch back to software decode - Define new StageFright utility functions used for offloaded tracks Currently dummy implementations. - AudioFlinger changes to use extended audio_config_t. Fills in audio_offload_info_t member if this info is passed in when opening an output. - libvideoeditor changes required to add the new event type parameter to AudioSink callback functions - libmediaplayerservice changes required to add the new event type parameter to AudioSink callback functions Change-Id: I3ab41138aa1083d81fe83b886a9b1021ec7320f1 Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Eric Laurent <elaurent@google.com>
* Add support for querying if a stream is active remotelyJean-Michel Trivi2013-02-111-0/+10
| | | | | | Bug 7485803 Change-Id: I0744374f130fd2dd0714102354cffed2fa915361