summaryrefslogtreecommitdiffstats
path: root/libaudio/AudioHardware.h
diff options
context:
space:
mode:
Diffstat (limited to 'libaudio/AudioHardware.h')
-rw-r--r--libaudio/AudioHardware.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/libaudio/AudioHardware.h b/libaudio/AudioHardware.h
index a2c47bd..37a9a6e 100644
--- a/libaudio/AudioHardware.h
+++ b/libaudio/AudioHardware.h
@@ -24,6 +24,7 @@
#include <utils/SortedVector.h>
#include <hardware_legacy/AudioHardwareBase.h>
+#include <media/mediarecorder.h>
#include "secril-client.h"
@@ -66,7 +67,6 @@ namespace android {
// Default audio input buffer size in bytes (8kHz mono)
#define AUDIO_HW_IN_PERIOD_BYTES ((AUDIO_HW_IN_PERIOD_SZ*sizeof(int16_t))/8)
-#define INPUT_SOURCE_KEY "Input Source"
class AudioHardware : public AudioHardwareBase
{
@@ -74,6 +74,12 @@ class AudioHardware : public AudioHardwareBase
class AudioStreamInALSA;
public:
+ // input path names used to translate from input sources to driver paths
+ static const char *inputPathNameDefault;
+ static const char *inputPathNameCamcorder;
+ static const char *inputPathNameVoiceRecognition;
+ static const char *inputPathNameVoiceCommunication;
+
AudioHardware();
virtual ~AudioHardware();
virtual status_t initCheck();
@@ -111,7 +117,7 @@ public:
status_t setIncallPath_l(uint32_t device);
- status_t setInputSource_l(String8 source);
+ status_t setInputSource_l(audio_source source);
static uint32_t getInputSampleRate(uint32_t sampleRate);
sp <AudioStreamInALSA> getActiveInput_l();
@@ -142,7 +148,7 @@ private:
uint32_t mMixerOpenCnt;
bool mInCallAudioMode;
- String8 mInputSource;
+ audio_source mInputSource;
bool mBluetoothNrec;
void* mSecRilLibHandle;
HRilClient mRilClient;