summaryrefslogtreecommitdiffstats
path: root/media/libmedia/AudioSystem.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | 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
* Use size_t for frame countsGlenn Kasten2012-11-151-6/+6
| | | | | | Also fix typo: bufferCount should be frameCount. Change-Id: Ibed539504db75ef99dc21c8ff1bf2987122063a5
* Use uint32_t for sample rateGlenn Kasten2012-11-141-6/+6
| | | | Change-Id: Ie240b48fb54b08359f69ecd4e5f8bda3d15cbe80
* Remove deprecated AudioSystem methodsGlenn Kasten2012-11-131-10/+0
| | | | Change-Id: I952d504e03af9a1d3e1e0aa379c82dfb00197d9f
* Line length 100Glenn Kasten2012-11-011-6/+12
| | | | Change-Id: Ib28fd7b9ce951a6933f006e7f8812ba617625530
* Fix typoGlenn Kasten2012-10-261-1/+1
| | | | Change-Id: I8cc2969eb329a830ee866622a8633adcb4e967cc
* Support querying active record sourcesJean-Michel Trivi2012-10-101-0/+9
| | | | | | | | | Add support for querying whether there is currently a recording underway from the specified audio source. Bug 7314859 Change-Id: I986b231a10ffd368b08ec2f9c7f348d28eaeb892
* Implement android.media.AudioManager.getProperty()Glenn Kasten2012-09-251-0/+13
| | | | | Bug: 6635041 Change-Id: I3386a4a6c226bc4eceaf65556119e4fb15f73224
* effect_descriptor_t const correctnessGlenn Kasten2012-07-251-2/+2
| | | | Change-Id: Iad008f20d35a18acf500f773900164552fd0c19e
* Use audio_channel_mask_t more placesGlenn Kasten2012-07-101-6/+6
| | | | | | | | | | Use it in AudioSystem::getOutput(), AudioSystem::getInput(), IAudioPolicyService::getOutput(), IAudioPolicyService::getInput(), and various other places in AudioFlinger. Not done: AudioTrack and OutputDescriptor. Change-Id: I70e83455820bd8f05dafd30c63d636c6a47cd172
* Use audio_channel_mask_t more consistentlyGlenn Kasten2012-07-031-6/+6
| | | | | | | | | | | | | | | In IAudioFlinger::createTrack() and IAudioFlinger::openRecord(), declare input parameter to use correct type audio_channel_mask_t. In IAudioFlinger::getInputBufferSize(), input parameter is now channel mask instead of channel count. Remove unused IAudioFlinger::channelCount(audio_io_handle_t). In AudioRecord::getMinFrameCount() and AudioSystem::getInputBufferSize(), input parameter is channel mask instead of channel count. Change-Id: Ib2f1c29bea70f016b3cfce83942ba292190ac965
* Remove acoustics from AudioSystem::getInput()Glenn Kasten2012-06-251-2/+1
| | | | Change-Id: I29fb3ee5664c1f0ee0409c1bb2be087ecca637db
* rename audio policy output flagsEric Laurent2012-04-181-1/+1
| | | | Change-Id: I27c46bd1d1b2b5f96b87af7d05b951fef18a1312
* audio policy: add configuration fileEric Laurent2012-04-031-47/+33
| | | | | | | | | | | removed outputs to stream mapping cache in audio system: the output for a given stream type must always be queried from audio policy manager as the cache is not always updated fast enough by audioflinger callback. removed AudioFlinger::PlaybackThread::setStreamValid() not used anymore if stream to output mapping is not cached. Change-Id: Ieca720c0b292181f81247259c8a44359bc74c66b
* Whitespace and indentationGlenn Kasten2012-03-131-5/+4
| | | | | | | | | | | | | | Fix indentation to be multiple of 4. Make it easier to search: sp< not sp < to "switch (...)" instead of "switch(...)" (also "if" and "while") Remove redundant blank line at start or EOF. Remove whitespace at end of line. Remove extra blank lines where they don't add value. Use git diff -b or -w to verify. Change-Id: I966b7ba852faa5474be6907fb212f5e267c2874e
* Merge "audio policy: use audio_devices_t when appropriate"Eric Laurent2012-03-081-2/+2
|\
| * audio policy: use audio_devices_t when appropriateEric Laurent2012-03-081-2/+2
| | | | | | | | Change-Id: I1b3a5879e81c789fb53d356af3d3a1ee2dca955f