OSDN Git Service

set_mode and set_phone_state now take audio_mode_t
[android-x86/hardware-libhardware.git] / include / hardware / audio.h
index 36ff399..16250fa 100644 (file)
@@ -43,13 +43,38 @@ __BEGIN_DECLS
 
 /**************************************/
 
-/* standard audio parameters that the HAL may need to handle */
+/**
+ *  standard audio parameters that the HAL may need to handle
+ */
+
+/**
+ *  audio device parameters
+ */
+
+/* BT SCO Noise Reduction + Echo Cancellation parameters */
+#define AUDIO_PARAMETER_KEY_BT_NREC "bt_headset_nrec"
+#define AUDIO_PARAMETER_VALUE_ON "on"
+#define AUDIO_PARAMETER_VALUE_OFF "off"
+
+/* TTY mode selection */
+#define AUDIO_PARAMETER_KEY_TTY_MODE "tty_mode"
+#define AUDIO_PARAMETER_VALUE_TTY_OFF "tty_off"
+#define AUDIO_PARAMETER_VALUE_TTY_VCO "tty_vco"
+#define AUDIO_PARAMETER_VALUE_TTY_HCO "tty_hco"
+#define AUDIO_PARAMETER_VALUE_TTY_FULL "tty_full"
+
+/**
+ *  audio stream parameters
+ */
+
 #define AUDIO_PARAMETER_STREAM_ROUTING "routing"
 #define AUDIO_PARAMETER_STREAM_FORMAT "format"
 #define AUDIO_PARAMETER_STREAM_CHANNELS "channels"
 #define AUDIO_PARAMETER_STREAM_FRAME_COUNT "frame_count"
 #define AUDIO_PARAMETER_STREAM_INPUT_SOURCE "input_source"
 
+/**************************************/
+
 /* common audio stream parameters and operations */
 struct audio_stream {
 
@@ -247,11 +272,11 @@ struct audio_hw_device {
     int (*set_master_volume)(struct audio_hw_device *dev, float volume);
 
     /**
-     * setMode is called when the audio mode changes. AUDIO_MODE_NORMAL mode
+     * set_mode is called when the audio mode changes. AUDIO_MODE_NORMAL mode
      * is for standard audio playback, AUDIO_MODE_RINGTONE when a ringtone is
      * playing, and AUDIO_MODE_IN_CALL when a call is in progress.
      */
-    int (*set_mode)(struct audio_hw_device *dev, int mode);
+    int (*set_mode)(struct audio_hw_device *dev, audio_mode_t mode);
 
     /* mic mute */
     int (*set_mic_mute)(struct audio_hw_device *dev, bool state);