summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/AudioFlinger.h
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2012-08-28 14:26:53 -0700
committerEric Laurent <elaurent@google.com>2012-09-07 10:32:00 -0700
commitf1c04f952916cf70407051c9f824ab84fb2b6e09 (patch)
tree8dba2d679bf308d534c51ea5067ba6d8f4f81f25 /services/audioflinger/AudioFlinger.h
parent261fd2119c70fda3af64453881a6346dd48eb956 (diff)
downloadframeworks_av-f1c04f952916cf70407051c9f824ab84fb2b6e09.zip
frameworks_av-f1c04f952916cf70407051c9f824ab84fb2b6e09.tar.gz
frameworks_av-f1c04f952916cf70407051c9f824ab84fb2b6e09.tar.bz2
audioflinger: changes for new audio devices enums
The ThreadBase class now has a separate member for input and output devices (mInDevice, mOutDevice). Only query get_supported_devices() from audio HAL if the function is exposed and if the audio policy manager did not specify the audio module to open. Also fixed bug in AEC preprocessing that would reset to default output device when an input device was given. Change-Id: I19d4d06aeb920b068e3ef31e6e6be6345ce5d67a
Diffstat (limited to 'services/audioflinger/AudioFlinger.h')
-rw-r--r--services/audioflinger/AudioFlinger.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h
index 0fad7c7..5ffa5a6 100644
--- a/services/audioflinger/AudioFlinger.h
+++ b/services/audioflinger/AudioFlinger.h
@@ -353,7 +353,8 @@ private:
RECORD // Thread class is RecordThread
};
- ThreadBase (const sp<AudioFlinger>& audioFlinger, audio_io_handle_t id, audio_devices_t device, type_t type);
+ ThreadBase (const sp<AudioFlinger>& audioFlinger, audio_io_handle_t id,
+ audio_devices_t outDevice, audio_devices_t inDevice, type_t type);
virtual ~ThreadBase();
void dumpBase(int fd, const Vector<String16>& args);
@@ -519,9 +520,10 @@ private:
void sendConfigEvent_l(int event, int param = 0);
void processConfigEvents();
- // see note at declaration of mStandby and mDevice
+ // see note at declaration of mStandby, mOutDevice and mInDevice
bool standby() const { return mStandby; }
- audio_devices_t device() const { return mDevice; }
+ audio_devices_t outDevice() const { return mOutDevice; }
+ audio_devices_t inDevice() const { return mInDevice; }
virtual audio_stream_t* stream() const = 0;
@@ -667,13 +669,14 @@ private:
Vector<ConfigEvent> mConfigEvents;
// These fields are written and read by thread itself without lock or barrier,
- // and read by other threads without lock or barrier via standby() and device().
+ // and read by other threads without lock or barrier via standby() , outDevice()
+ // and inDevice().
// Because of the absence of a lock or barrier, any other thread that reads
// these fields must use the information in isolation, or be prepared to deal
// with possibility that it might be inconsistent with other information.
bool mStandby; // Whether thread is currently in standby.
- audio_devices_t mDevice; // output device for PlaybackThread
- // input + output devices for RecordThread
+ audio_devices_t mOutDevice; // output device
+ audio_devices_t mInDevice; // input device
audio_source_t mAudioSource; // (see audio.h, audio_source_t)
const audio_io_handle_t mId;