summaryrefslogtreecommitdiffstats
path: root/media/libavextensions/media
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2015-12-09 20:44:26 -0800
committerSteve Kondik <steve@cyngn.com>2015-12-13 13:16:01 -0800
commit6dde130280d6ead297170211b005cc809e7f7bde (patch)
treea2053b10d736cadc85ce1adfe18d6256875da325 /media/libavextensions/media
parentfb9765480b10aaf39ac82149abe28d1805e1fe92 (diff)
downloadframeworks_av-6dde130280d6ead297170211b005cc809e7f7bde.zip
frameworks_av-6dde130280d6ead297170211b005cc809e7f7bde.tar.gz
frameworks_av-6dde130280d6ead297170211b005cc809e7f7bde.tar.bz2
stagefright: Resurrect PCM offload
* Forward-port the open-source code from L which was moved to closed-source in M. This is being done out of necessity- the architecture chosen by Qualcomm is not optimal and doesn't work well with a singular codebase which attempts to service a large number of devices. * This patch brings in the code to support PCM offload (AudioFlinger bypass). This allows for playback of high resolution clips without decimation stages, and enables reduced power consumption for audio pipelines which take advantage of the Hexagon DSP (effects). Change-Id: I0ef15fc3df538ab723f3c12ce0ed71d0e607c99e
Diffstat (limited to 'media/libavextensions/media')
-rw-r--r--media/libavextensions/media/AVMediaExtensions.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/media/libavextensions/media/AVMediaExtensions.h b/media/libavextensions/media/AVMediaExtensions.h
index 9161fae..d48feec 100644
--- a/media/libavextensions/media/AVMediaExtensions.h
+++ b/media/libavextensions/media/AVMediaExtensions.h
@@ -33,6 +33,7 @@
#include <common/AVExtensionsCommon.h>
#include <hardware/audio.h>
#include <media/AudioTrack.h>
+#include <audio_utils/format.h>
namespace android {
@@ -43,8 +44,8 @@ class Parcel;
*/
struct AVMediaUtils {
- virtual bool AudioTrackIsPcmOffloaded(const audio_format_t /*format*/) {
- return false;
+ virtual bool AudioTrackIsPcmOffloaded(const audio_format_t format) {
+ return audio_is_offload_pcm(format);
}
virtual status_t AudioTrackGetPosition(AudioTrack* /*track*/,
uint32_t* /*position*/) {