summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/AudioFlinger.h
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-02-10 15:31:07 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-02-10 15:31:07 -0800
commit0d9302d7830b46542821b3e5f3e4f96942bd3cb3 (patch)
treef14d8a8e3a243dc6fa7d63d48017132814ff3b86 /services/audioflinger/AudioFlinger.h
parent858df80948ee64f478782a6a6c06533ba1651ef1 (diff)
parent2f732eb768004c6362fae8a02c60b69c9400b032 (diff)
downloadframeworks_av-0d9302d7830b46542821b3e5f3e4f96942bd3cb3.zip
frameworks_av-0d9302d7830b46542821b3e5f3e4f96942bd3cb3.tar.gz
frameworks_av-0d9302d7830b46542821b3e5f3e4f96942bd3cb3.tar.bz2
Merge "Move header declarations around for clarity"
Diffstat (limited to 'services/audioflinger/AudioFlinger.h')
-rw-r--r--services/audioflinger/AudioFlinger.h72
1 files changed, 37 insertions, 35 deletions
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h
index 170709d..45df893 100644
--- a/services/audioflinger/AudioFlinger.h
+++ b/services/audioflinger/AudioFlinger.h
@@ -67,7 +67,7 @@ public:
virtual status_t dump(int fd, const Vector<String16>& args);
- // IAudioFlinger interface
+ // IAudioFlinger interface, in binder opcode order
virtual sp<IAudioTrack> createTrack(
pid_t pid,
audio_stream_type_t streamType,
@@ -81,6 +81,17 @@ public:
int *sessionId,
status_t *status);
+ virtual sp<IAudioRecord> openRecord(
+ pid_t pid,
+ audio_io_handle_t input,
+ uint32_t sampleRate,
+ audio_format_t format,
+ uint32_t channelMask,
+ int frameCount,
+ uint32_t flags,
+ int *sessionId,
+ status_t *status);
+
virtual uint32_t sampleRate(audio_io_handle_t output) const;
virtual int channelCount(audio_io_handle_t output) const;
virtual audio_format_t format(audio_io_handle_t output) const;
@@ -112,7 +123,6 @@ public:
virtual void registerClient(const sp<IAudioFlingerClient>& client);
virtual size_t getInputBufferSize(uint32_t sampleRate, audio_format_t format, int channelCount) const;
- virtual unsigned int getInputFramesLost(audio_io_handle_t ioHandle) const;
virtual audio_io_handle_t openOutput(uint32_t *pDevices,
uint32_t *pSamplingRate,
@@ -145,6 +155,8 @@ public:
virtual status_t getRenderPosition(uint32_t *halFrames, uint32_t *dspFrames,
audio_io_handle_t output) const;
+ virtual unsigned int getInputFramesLost(audio_io_handle_t ioHandle) const;
+
virtual int newAudioSessionId();
virtual void acquireAudioSessionId(int audioSession);
@@ -171,49 +183,19 @@ public:
virtual status_t moveEffects(int sessionId, audio_io_handle_t srcOutput,
audio_io_handle_t dstOutput);
- enum hardware_call_state {
- AUDIO_HW_IDLE = 0,
- AUDIO_HW_INIT,
- AUDIO_HW_OUTPUT_OPEN,
- AUDIO_HW_OUTPUT_CLOSE,
- AUDIO_HW_INPUT_OPEN,
- AUDIO_HW_INPUT_CLOSE,
- AUDIO_HW_STANDBY,
- AUDIO_HW_SET_MASTER_VOLUME,
- AUDIO_HW_GET_ROUTING,
- AUDIO_HW_SET_ROUTING,
- AUDIO_HW_GET_MODE,
- AUDIO_HW_SET_MODE,
- AUDIO_HW_GET_MIC_MUTE,
- AUDIO_HW_SET_MIC_MUTE,
- AUDIO_SET_VOICE_VOLUME,
- AUDIO_SET_PARAMETER,
- };
-
- // record interface
- virtual sp<IAudioRecord> openRecord(
- pid_t pid,
- audio_io_handle_t input,
- uint32_t sampleRate,
- audio_format_t format,
- uint32_t channelMask,
- int frameCount,
- uint32_t flags,
- int *sessionId,
- status_t *status);
-
virtual status_t onTransact(
uint32_t code,
const Parcel& data,
Parcel* reply,
uint32_t flags);
+ // end of IAudioFlinger interface
+
+private:
audio_mode_t getMode() const { return mMode; }
bool btNrecIsOff() const { return mBtNrecIsOff; }
-private:
-
AudioFlinger();
virtual ~AudioFlinger();
@@ -1410,6 +1392,26 @@ mutable Mutex mLock; // mutex for process, commands and handl
mutable Mutex mHardwareLock;
audio_hw_device_t* mPrimaryHardwareDev;
Vector<audio_hw_device_t*> mAudioHwDevs;
+
+ enum hardware_call_state {
+ AUDIO_HW_IDLE = 0,
+ AUDIO_HW_INIT,
+ AUDIO_HW_OUTPUT_OPEN,
+ AUDIO_HW_OUTPUT_CLOSE,
+ AUDIO_HW_INPUT_OPEN,
+ AUDIO_HW_INPUT_CLOSE,
+ AUDIO_HW_STANDBY,
+ AUDIO_HW_SET_MASTER_VOLUME,
+ AUDIO_HW_GET_ROUTING,
+ AUDIO_HW_SET_ROUTING,
+ AUDIO_HW_GET_MODE,
+ AUDIO_HW_SET_MODE,
+ AUDIO_HW_GET_MIC_MUTE,
+ AUDIO_HW_SET_MIC_MUTE,
+ AUDIO_SET_VOICE_VOLUME,
+ AUDIO_SET_PARAMETER,
+ };
+
mutable hardware_call_state mHardwareStatus; // for dump only