summaryrefslogtreecommitdiffstats
path: root/include/media/IAudioFlinger.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/media/IAudioFlinger.h')
-rw-r--r--include/media/IAudioFlinger.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/include/media/IAudioFlinger.h b/include/media/IAudioFlinger.h
index 9c3067e..eaf7780 100644
--- a/include/media/IAudioFlinger.h
+++ b/include/media/IAudioFlinger.h
@@ -49,9 +49,13 @@ public:
TRACK_DEFAULT = 0, // client requests a default AudioTrack
TRACK_TIMED = 1, // client requests a TimedAudioTrack
TRACK_FAST = 2, // client requests a fast AudioTrack or AudioRecord
+ TRACK_OFFLOAD = 4, // client requests offload to hw codec
};
typedef uint32_t track_flags_t;
+ // invariant on exit for all APIs that return an sp<>:
+ // (return value != 0) == (*status == NO_ERROR)
+
/* create an audio track and registers it with AudioFlinger.
* return null if the track cannot be created.
*/
@@ -66,6 +70,10 @@ public:
audio_io_handle_t output,
pid_t tid, // -1 means unused, otherwise must be valid non-0
int *sessionId,
+ // input: ignored
+ // output: server's description of IAudioTrack for display in logs.
+ // Don't attempt to parse, as the format could change.
+ String8& name,
status_t *status) = 0;
virtual sp<IAudioRecord> openRecord(
@@ -74,7 +82,7 @@ public:
audio_format_t format,
audio_channel_mask_t channelMask,
size_t frameCount,
- track_flags_t flags,
+ track_flags_t *flags,
pid_t tid, // -1 means unused, otherwise must be valid non-0
int *sessionId,
status_t *status) = 0;
@@ -124,7 +132,9 @@ public:
virtual String8 getParameters(audio_io_handle_t ioHandle, const String8& keys)
const = 0;
- // register a current process for audio output change notifications
+ // Register an object to receive audio input/output change and track notifications.
+ // For a given calling pid, AudioFlinger disregards any registrations after the first.
+ // Thus the IAudioFlingerClient must be a singleton per process.
virtual void registerClient(const sp<IAudioFlingerClient>& client) = 0;
// retrieve the audio recording buffer size
@@ -137,7 +147,8 @@ public:
audio_format_t *pFormat,
audio_channel_mask_t *pChannelMask,
uint32_t *pLatencyMs,
- audio_output_flags_t flags) = 0;
+ audio_output_flags_t flags,
+ const audio_offload_info_t *offloadInfo = NULL) = 0;
virtual audio_io_handle_t openDuplicateOutput(audio_io_handle_t output1,
audio_io_handle_t output2) = 0;
virtual status_t closeOutput(audio_io_handle_t output) = 0;
@@ -193,6 +204,10 @@ public:
virtual uint32_t getPrimaryOutputSamplingRate() = 0;
virtual size_t getPrimaryOutputFrameCount() = 0;
+ // Intended for AudioService to inform AudioFlinger of device's low RAM attribute,
+ // and should be called at most once. For a definition of what "low RAM" means, see
+ // android.app.ActivityManager.isLowRamDevice().
+ virtual status_t setLowRamDevice(bool isLowRamDevice) = 0;
};