summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMingming Yin <mingming@codeaurora.org>2013-01-10 18:42:38 -0800
committerSteve Kondik <shade@chemlab.org>2013-02-06 00:31:01 -0800
commit12170a107e7c96170a38dbe43e98447c87624bd7 (patch)
tree1f93126eab9e0cace115ad89dbba41594defca7b /include
parent4b47852b1b4de2f87ec1c1d7b44b41821a19eb35 (diff)
downloadframeworks_av-12170a107e7c96170a38dbe43e98447c87624bd7.zip
frameworks_av-12170a107e7c96170a38dbe43e98447c87624bd7.tar.gz
frameworks_av-12170a107e7c96170a38dbe43e98447c87624bd7.tar.bz2
Squashed commit of updates from CodeAurora
auido: Add amr-wb+ codec to ACodec. -Add an entry for amr-wb+ decoder in ACodec. -amr-wb+ non tunnel will be enabled by default. Change-Id: Ied8902eb83da29a3164eb99e88630570a43f681e libstagefright: Create MP3 decoder libraries without OMX layer - With the current MP3 OMX SW decoders, the decoding time is increased w.r.t the libraries without OMX layer that are present in GB. This increase in decoding time results reduction in power savings in LPA mode. - This commit is to remove OMX layer for MP3 to reduce the power consumption in LPA mode Change-Id: I835ab6d013a326f111e513586f884bacd5f7106a audioflinger: EffectModules are updated with device change Issue: Effects modules are not updated with the device change information Fix: 1) Add setDevice information to mLPAEffectChain 2) Remove the return after sending the device route information to Direct track so that mixer thread is also aware of the device change for EffectsChain Change-Id: I82936cd47290946a5e4772e448669d81e0e4d6f5 libmedia : Add a NULL pointer check - Print frame count in AudioTrack::dump() only if the control block is valid Change-Id: Icf594eb721b48795c43d7bd165f6086031ce6efd CRs-Fixed: 435050 libstagefright: Query AudioSystem for suggested record mute duration - AudioSource mutes a pre-defined duration (defined by kAutoRampStartUs) at the beginning of a recording. - Instead, query the audio system for any ongoing playback streams and use its output latency to calculate the duration to mute the incoming PCM stream. - This assumes all current playback threads will be paused once recording is started. Change-Id: Ie9b1d62e7be803ef1d8a59127b95c73e03fa5ce6 CRs-Fixed: 438149 libstagefright: Convert mono to stereo for LPA clips - Sound effects are not supported for mono clips - Repetative calling of effects_configure and effect_process for mono clips is resulting in crash in the sound effects library. - So, Mono clips are now converted to stereo by copying the left sample to right. - This is same as what Resampler does in Non-LPA Playback. This commit is a port of fcc0647fab20ceaf1c07bc10bb243f14c48b114c CRs-Fixed: 421639 Change-Id: Ie579c8d11afe3db8d42a35956e8bf23eeb88cfe6 audioflinger: Fix to set volume from MediaPlayer in Tunnel mode Issue: MediaPlayer.setVolume does not have effect on Playback volume in TunnelPlayer mode Fix: the left and right volume parameters of setVolume are hardcoded and defaulted in DirectAudioTrack. Updating the parameters from the input arguments fixes the issue Change-Id: I8a107ce57284b225b17d95fed0f69e3adc5fb131 CRs-Fixed: 441849 libstagefright: Enable Tunnel Decode for select formats - Enable tunnel mode decode only if the audio mime type matches a supported list. Change-Id: I32afd83e5fda1e90cb671dd747f17cb83bb84fc1 CRs-Fixed:437651 framework/av:: Add support to decode mp3 data in mp4 container - Added support to decode mp3 data in mp4 container packed as mp4a atom and .mp3 atom as well. Port of 8fa3774adf9259b33ee721cfaeff26da42c29928 Change-Id: I1a04022f30a9f6516575440aba7652986ab7dc58 CRs-Fixed: 439897 audiomixer: Use High Quality resampler Use very high quality resampler to upsample to 48KHz sample rate. Change-Id: I1ba5b839f1e74ae71b405538d970e6a966bd1d47 CRs-fixed: 416730 audioflinger: Fix a deadlock - A deadlock will happen if the obit recipient registered by the DirectAudioTrack is called. - Fix this by moving the lock acquisition in DirectAudioTrack::clearPowerManager() to after DirectAudioTrack::releaseWakeLock() is called. - Also synchronize use of mPowerManager in the DirectAudioTrack destructor with DirectAudioTrack::clearPowerManager() Change-Id: Ib127db1406c4a61a4054ca0cf30f4c7347a5c92a CRs-Fixed: 444093 libstagefright: TunnelPlayer: update condition to send SEEK_COMPLETE - If the client tries to seek to 0 (e.g as a result of LOOPING) without ever calling getPosition(), we will always sent an immediate seek notification without seeking. Change-Id: Id2b9d00c611278d0521cb6fd402710f0ec37bbdd CRs-Fixed: 441411 libstagefright: Remove unnecessary code from TunnelPlayer - TunnelPlayer tries to mimick AudioPlayer when trying to delete the extractor source. - It is needed for AudioPlayer as the OMXCodec object is referenced by the CallbackDispatcher as well as AudioPlayer. - This condition is not true for TunnelPlayer, so why do it. Change-Id: I79c4e17d01910e73ad01c5640ef374626313a18e CRs-Fixed: 442365 Add MediaDebug header from CAF Change-Id: I68dbe72f86a49685b82b64927d1aa80231647a7a
Diffstat (limited to 'include')
-rw-r--r--include/media/stagefright/AudioSource.h1
-rwxr-xr-xinclude/media/stagefright/LPAPlayer.h5
-rw-r--r--include/media/stagefright/MediaDebug.h40
3 files changed, 45 insertions, 1 deletions
diff --git a/include/media/stagefright/AudioSource.h b/include/media/stagefright/AudioSource.h
index 99f3c3b..4489254 100644
--- a/include/media/stagefright/AudioSource.h
+++ b/include/media/stagefright/AudioSource.h
@@ -85,6 +85,7 @@ private:
int64_t mInitialReadTimeUs;
int64_t mNumFramesReceived;
int64_t mNumClientOwnedBuffers;
+ int64_t mAutoRampStartUs;
List<MediaBuffer * > mBuffersReceived;
diff --git a/include/media/stagefright/LPAPlayer.h b/include/media/stagefright/LPAPlayer.h
index b0e1d31..c3c5cac 100755
--- a/include/media/stagefright/LPAPlayer.h
+++ b/include/media/stagefright/LPAPlayer.h
@@ -92,7 +92,8 @@ private:
bool mPaused;
bool mA2DPEnabled;
int32_t mChannelMask;
- int32_t numChannels;
+ int32_t mNumOutputChannels;
+ int32_t mNumInputChannels;
int32_t mSampleRate;
int64_t mLatencyUs;
size_t mFrameSize;
@@ -259,6 +260,8 @@ private:
void *buffer, size_t size, void *cookie);
size_t AudioCallback(void *cookie, void *data, size_t size);
+ void convertMonoToStereo(int16_t *data, size_t size);
+
LPAPlayer(const LPAPlayer &);
LPAPlayer &operator=(const LPAPlayer &);
};
diff --git a/include/media/stagefright/MediaDebug.h b/include/media/stagefright/MediaDebug.h
new file mode 100644
index 0000000..bcaeeba
--- /dev/null
+++ b/include/media/stagefright/MediaDebug.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
+ *
+ * Not a Contribution, Apache license notifications and license are retained
+ * for attribution purposes only
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef MEDIA_DEBUG_H_
+
+#define MEDIA_DEBUG_H_
+
+#include <cutils/log.h>
+
+#define LITERAL_TO_STRING_INTERNAL(x) #x
+#define LITERAL_TO_STRING(x) LITERAL_TO_STRING_INTERNAL(x)
+
+#define CHECK_EQ(x,y) \
+ LOG_ALWAYS_FATAL_IF( \
+ (x) != (y), \
+ __FILE__ ":" LITERAL_TO_STRING(__LINE__) " " #x " != " #y)
+
+#define CHECK(x) \
+ LOG_ALWAYS_FATAL_IF( \
+ !(x), \
+ __FILE__ ":" LITERAL_TO_STRING(__LINE__) " " #x)
+
+#endif // MEDIA_DEBUG_H_