diff options
Diffstat (limited to 'include/hardware_legacy/AudioPolicyInterface.h')
| -rw-r--r-- | include/hardware_legacy/AudioPolicyInterface.h | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/include/hardware_legacy/AudioPolicyInterface.h b/include/hardware_legacy/AudioPolicyInterface.h index 1ee0e20..d703485 100644 --- a/include/hardware_legacy/AudioPolicyInterface.h +++ b/include/hardware_legacy/AudioPolicyInterface.h @@ -69,16 +69,14 @@ public: virtual status_t setDeviceConnectionState(AudioSystem::audio_devices device, AudioSystem::device_connection_state state, const char *device_address) = 0; - // retreive a device connection status + // retrieve a device connection status virtual AudioSystem::device_connection_state getDeviceConnectionState(AudioSystem::audio_devices device, const char *device_address) = 0; // indicate a change in phone state. Valid phones states are defined by AudioSystem::audio_mode virtual void setPhoneState(int state) = 0; - // indicate a change in ringer mode - virtual void setRingerMode(uint32_t mode, uint32_t mask) = 0; // force using a specific device category for the specified usage virtual void setForceUse(AudioSystem::force_use usage, AudioSystem::forced_config config) = 0; - // retreive current device category forced for a given usage + // retrieve current device category forced for a given usage virtual AudioSystem::forced_config getForceUse(AudioSystem::force_use usage) = 0; // set a system property (e.g. camera sound always audible) virtual void setSystemProperty(const char* property, const char* value) = 0; @@ -89,7 +87,7 @@ public: // Audio routing query functions // - // request an output appriate for playback of the supplied stream type and parameters + // request an output appropriate for playback of the supplied stream type and parameters virtual audio_io_handle_t getOutput(AudioSystem::stream_type stream, uint32_t samplingRate = 0, uint32_t format = AudioSystem::FORMAT_DEFAULT, @@ -106,7 +104,7 @@ public: // releases the output. virtual void releaseOutput(audio_io_handle_t output) = 0; - // request an input appriate for record from the supplied device with supplied parameters. + // request an input appropriate for record from the supplied device with supplied parameters. virtual audio_io_handle_t getInput(int inputSource, uint32_t samplingRate = 0, uint32_t Format = AudioSystem::FORMAT_DEFAULT, @@ -128,16 +126,25 @@ public: int indexMin, int indexMax) = 0; - // sets the new stream volume at a level corresponding to the supplied index - virtual status_t setStreamVolumeIndex(AudioSystem::stream_type stream, int index) = 0; - // retreive current volume index for the specified stream - virtual status_t getStreamVolumeIndex(AudioSystem::stream_type stream, int *index) = 0; + // sets the new stream volume at a level corresponding to the supplied index for the + // supplied device. By convention, specifying AUDIO_DEVICE_OUT_DEFAULT means + // setting volume for all devices + virtual status_t setStreamVolumeIndex(AudioSystem::stream_type stream, + int index, + audio_devices_t device) = 0; + + // retrieve current volume index for the specified stream and the + // specified device. By convention, specifying AUDIO_DEVICE_OUT_DEFAULT means + // querying the volume of the active device. + virtual status_t getStreamVolumeIndex(AudioSystem::stream_type stream, + int *index, + audio_devices_t device) = 0; // return the strategy corresponding to a given stream type virtual uint32_t getStrategyForStream(AudioSystem::stream_type stream) = 0; // return the enabled output devices for the given stream type - virtual uint32_t getDevicesForStream(AudioSystem::stream_type stream) = 0; + virtual audio_devices_t getDevicesForStream(AudioSystem::stream_type stream) = 0; // Audio effect management virtual audio_io_handle_t getOutputForEffect(effect_descriptor_t *desc) = 0; @@ -196,7 +203,7 @@ public: uint32_t *pSamplingRate, uint32_t *pFormat, uint32_t *pChannels, - uint32_t acoustics) = 0; + audio_in_acoustics_t acoustics) = 0; // closes an audio input virtual status_t closeInput(audio_io_handle_t input) = 0; // |
