summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/hardware_legacy/AudioHardwareInterface.h14
-rw-r--r--include/hardware_legacy/AudioPolicyManagerBase.h16
-rw-r--r--include/hardware_legacy/AudioSystemLegacy.h36
-rw-r--r--include/hardware_legacy/wifi.h5
4 files changed, 69 insertions, 2 deletions
diff --git a/include/hardware_legacy/AudioHardwareInterface.h b/include/hardware_legacy/AudioHardwareInterface.h
index b466000..82fc633 100644
--- a/include/hardware_legacy/AudioHardwareInterface.h
+++ b/include/hardware_legacy/AudioHardwareInterface.h
@@ -114,7 +114,21 @@ public:
* get the local time at which the next write to the audio driver will be
* presented
*/
+#ifndef ICS_AUDIO_BLOB
virtual status_t getNextWriteTimestamp(int64_t *timestamp);
+#ifdef QCOM_HARDWARE
+ virtual status_t start() {return INVALID_OPERATION;}
+ virtual status_t pause() {return INVALID_OPERATION;}
+ virtual status_t flush() {return INVALID_OPERATION;}
+ virtual status_t stop() {return INVALID_OPERATION;}
+ virtual int setObserver(void *observer) {return INVALID_OPERATION;}
+ virtual status_t getBufferInfo(buf_info **buf) {return INVALID_OPERATION;}
+ virtual status_t isBufferAvailable(int *isAvail) {
+ *isAvail = true;
+ return NO_ERROR;
+ }
+#endif
+#endif
};
diff --git a/include/hardware_legacy/AudioPolicyManagerBase.h b/include/hardware_legacy/AudioPolicyManagerBase.h
index b175670..16c3b16 100644
--- a/include/hardware_legacy/AudioPolicyManagerBase.h
+++ b/include/hardware_legacy/AudioPolicyManagerBase.h
@@ -340,7 +340,11 @@ protected:
// change the route of the specified output. Returns the number of ms we have slept to
// allow new routing to take effect in certain cases.
+#ifdef QCOM_HARDWARE
+ virtual uint32_t setOutputDevice(audio_io_handle_t output,
+#else
uint32_t setOutputDevice(audio_io_handle_t output,
+#endif
audio_devices_t device,
bool force = false,
int delayMs = 0);
@@ -361,7 +365,11 @@ protected:
virtual float computeVolume(int stream, int index, audio_io_handle_t output, audio_devices_t device);
// check that volume change is permitted, compute and send new volume to audio hardware
+#ifdef QCOM_HARDWARE
+ virtual status_t checkAndSetVolume(int stream, int index, audio_io_handle_t output, audio_devices_t device, int delayMs = 0, bool force = false);
+#else
status_t checkAndSetVolume(int stream, int index, audio_io_handle_t output, audio_devices_t device, int delayMs = 0, bool force = false);
+#endif
// apply all stream volumes to the specified output and device
void applyStreamVolumes(audio_io_handle_t output, audio_devices_t device, int delayMs = 0, bool force = false);
@@ -374,7 +382,11 @@ protected:
audio_devices_t device = (audio_devices_t)0);
// Mute or unmute the stream on the specified output
+#ifdef QCOM_HARDWARE
+ virtual void setStreamMute(int stream,
+#else
void setStreamMute(int stream,
+#endif
bool on,
audio_io_handle_t output,
int delayMs = 0,
@@ -477,7 +489,11 @@ protected:
uint32_t samplingRate,
uint32_t format,
uint32_t channelMask);
+#ifdef QCOM_HARDWARE
+ virtual IOProfile *getProfileForDirectOutput(audio_devices_t device,
+#else
IOProfile *getProfileForDirectOutput(audio_devices_t device,
+#endif
uint32_t samplingRate,
uint32_t format,
uint32_t channelMask,
diff --git a/include/hardware_legacy/AudioSystemLegacy.h b/include/hardware_legacy/AudioSystemLegacy.h
index 6296b8b..9832052 100644
--- a/include/hardware_legacy/AudioSystemLegacy.h
+++ b/include/hardware_legacy/AudioSystemLegacy.h
@@ -61,8 +61,12 @@ enum audio_source {
AUDIO_SOURCE_CAMCORDER = 5,
AUDIO_SOURCE_VOICE_RECOGNITION = 6,
AUDIO_SOURCE_VOICE_COMMUNICATION = 7,
+#if defined (STE_FM)
+ AUDIO_SOURCE_FM_RX = 8,
+ AUDIO_SOURCE_MAX = AUDIO_SOURCE_FM_RX,
+#else
AUDIO_SOURCE_MAX = AUDIO_SOURCE_VOICE_COMMUNICATION,
-
+#endif
AUDIO_SOURCE_LIST_END // must be last - used to validate audio source type
};
@@ -133,6 +137,8 @@ public:
HE_AAC_V1 = 0x05000000,
HE_AAC_V2 = 0x06000000,
VORBIS = 0x07000000,
+ EVRC = 0x08000000,
+ QCELP = 0x09000000,
MAIN_FORMAT_MASK = 0xFF000000,
SUB_FORMAT_MASK = 0x00FFFFFF,
// Aliases
@@ -243,12 +249,23 @@ public:
DEVICE_OUT_AUX_DIGITAL = 0x400,
DEVICE_OUT_ANLG_DOCK_HEADSET = 0x800,
DEVICE_OUT_DGTL_DOCK_HEADSET = 0x1000,
+#ifdef QCOM_HARDWARE
+ DEVICE_OUT_ANC_HEADSET = 0x2000,
+ DEVICE_OUT_ANC_HEADPHONE = 0x4000,
+ DEVICE_OUT_PROXY = 0x8000,
+ DEVICE_OUT_DEFAULT = DEVICE_OUT_SPEAKER,
+#else
DEVICE_OUT_DEFAULT = 0x8000,
+#endif
DEVICE_OUT_ALL = (DEVICE_OUT_EARPIECE | DEVICE_OUT_SPEAKER | DEVICE_OUT_WIRED_HEADSET |
DEVICE_OUT_WIRED_HEADPHONE | DEVICE_OUT_BLUETOOTH_SCO | DEVICE_OUT_BLUETOOTH_SCO_HEADSET |
DEVICE_OUT_BLUETOOTH_SCO_CARKIT | DEVICE_OUT_BLUETOOTH_A2DP | DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES |
DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER | DEVICE_OUT_AUX_DIGITAL |
DEVICE_OUT_ANLG_DOCK_HEADSET | DEVICE_OUT_DGTL_DOCK_HEADSET |
+#ifdef QCOM_HARDWARE
+ DEVICE_OUT_ANC_HEADSET | DEVICE_OUT_ANC_HEADPHONE |
+ DEVICE_OUT_PROXY |
+#endif
DEVICE_OUT_DEFAULT),
DEVICE_OUT_ALL_A2DP = (DEVICE_OUT_BLUETOOTH_A2DP | DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES |
DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER),
@@ -262,11 +279,26 @@ public:
DEVICE_IN_AUX_DIGITAL = 0x200000,
DEVICE_IN_VOICE_CALL = 0x400000,
DEVICE_IN_BACK_MIC = 0x800000,
+#ifdef QCOM_HARDWARE
+ DEVICE_IN_ANC_HEADSET = 0x10000000,
+ DEVICE_IN_PROXY = 0x20000000,
+ DEVICE_IN_ANLG_DOCK_HEADSET = 0x40000000,
+#endif
+#if defined (STE_FM)
+ DEVICE_IN_FM_RX = 0x1000000,
+#endif
DEVICE_IN_DEFAULT = 0x80000000,
DEVICE_IN_ALL = (DEVICE_IN_COMMUNICATION | DEVICE_IN_AMBIENT | DEVICE_IN_BUILTIN_MIC |
DEVICE_IN_BLUETOOTH_SCO_HEADSET | DEVICE_IN_WIRED_HEADSET | DEVICE_IN_AUX_DIGITAL |
- DEVICE_IN_VOICE_CALL | DEVICE_IN_BACK_MIC | DEVICE_IN_DEFAULT)
+ DEVICE_IN_VOICE_CALL | DEVICE_IN_BACK_MIC |
+#ifdef QCOM_HARDWARE
+ DEVICE_IN_ANC_HEADSET | DEVICE_IN_PROXY | DEVICE_IN_ANLG_DOCK_HEADSET |
+#endif
+#if defined (STE_FM)
+ DEVICE_IN_FM_RX |
+#endif
+ DEVICE_IN_DEFAULT)
};
// request to open a direct output with getOutput() (by opposition to sharing an output with other AudioTracks)
diff --git a/include/hardware_legacy/wifi.h b/include/hardware_legacy/wifi.h
index be6a83e..1233730 100644
--- a/include/hardware_legacy/wifi.h
+++ b/include/hardware_legacy/wifi.h
@@ -145,6 +145,11 @@ const char *wifi_get_fw_path(int fw_type);
int wifi_change_fw_path(const char *fwpath);
/**
+ * Set the wifi mode (0 = normal, 1 = ap)
+ */
+int wifi_set_mode(int mode);
+
+/**
* Check and create if necessary initial entropy file
*/
#define WIFI_ENTROPY_FILE "/data/misc/wifi/entropy.bin"