Get the current master mute status for the HAL, if the HAL supports master mute control. AudioFlinger will query this value from the primary audio HAL when the service starts and use the value for setting the initial master mute across all HALs. HALs which do not support this method may leave it set to NULL.
Get the current master volume value for the HAL, if the HAL supports master volume control. AudioFlinger will query this value from the primary audio HAL when the service starts and use the value for setting the initial master volume across all HALs. HALs which do not support this method may leave it set to NULL.
used by audio flinger to enumerate what devices are supported by each
audio_hw_device
implementation.
Return value is a bitmask of 1 or more values of audio_devices_t
NOTE: audio HAL implementations starting with AUDIO_DEVICE_API_VERSION_2_0 do not implement this function. All supported devices should be listed in audio_policy.conf file and the audio policy manager must choose the appropriate audio module based on information in this file.
This method creates and opens the audio hardware output stream. The "address" parameter qualifies the "devices" audio device type if needed. The format format depends on the device type:
Bluetooth devices use the MAC address of the device in the form "00:11:22:AA:BB:CC"
USB devices use the ALSA card and device numbers in the form "card=X;device=Y"
Other devices may use a number or any other string.
set the audio volume for all audio activities other than voice call. Range between 0.0 and 1.0. If any value other than 0 is returned, the software mixer will emulate this capability.
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.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2019-10-02 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]