Device Settings HAL 0.2.0
 
Loading...
Searching...
No Matches
dsAudio.h File Reference

Device Settings HAL Audio Public APIs. These APIs define the HAL for the Device Settings Audio interface. More...

#include <sys/types.h>
#include "dsError.h"
#include "dsTypes.h"
Include dependency graph for dsAudio.h:

Go to the source code of this file.

Typedefs

typedef void(* dsAudioOutPortConnectCB_t) (dsAudioPortType_t portType, unsigned int uiPortNo, bool isPortCon)
 Callback function used to notify the Audio port connection status change to the caller.
 
typedef void(* dsAudioFormatUpdateCB_t) (dsAudioFormat_t audioFormat)
 Callback function used to notify Audio Format change to the caller.
 
typedef void(* dsAtmosCapsChangeCB_t) (dsATMOSCapability_t atmosCaps, bool status)
 Call back function used to notify audio sink Atmos capability change.
 

Functions

dsError_t dsAudioPortInit ()
 Initializes the audio port sub-system of Device Settings HAL.
 
dsError_t dsGetAudioPort (dsAudioPortType_t type, int index, intptr_t *handle)
 Gets the audio port handle.
 
dsError_t dsGetAudioEncoding (intptr_t handle, dsAudioEncoding_t *encoding)
 Gets the encoding type of an audio port.
 
dsError_t dsGetAudioFormat (intptr_t handle, dsAudioFormat_t *audioFormat)
 Gets the current audio format.
 
dsError_t dsGetAudioCompression (intptr_t handle, int *compression)
 Gets the audio compression of the specified audio port.
 
dsError_t dsGetDialogEnhancement (intptr_t handle, int *level)
 Gets the Dialog Enhancement level of the audio port.
 
dsError_t dsGetDolbyVolumeMode (intptr_t handle, bool *mode)
 Gets the dolby audio mode status of an audio port.
 
dsError_t dsGetIntelligentEqualizerMode (intptr_t handle, int *mode)
 Gets the Intelligent Equalizer Mode.
 
dsError_t dsGetVolumeLeveller (intptr_t handle, dsVolumeLeveller_t *volLeveller)
 Gets the Dolby volume leveller settings.
 
dsError_t dsGetBassEnhancer (intptr_t handle, int *boost)
 Gets the audio Bass.
 
dsError_t dsIsSurroundDecoderEnabled (intptr_t handle, bool *enabled)
 Gets the audio Surround Decoder enabled/disabled status.
 
dsError_t dsGetDRCMode (intptr_t handle, int *mode)
 Gets the DRC Mode of the specified Audio Port.
 
dsError_t dsGetSurroundVirtualizer (intptr_t handle, dsSurroundVirtualizer_t *virtualizer)
 Gets the audio Surround Virtualizer level.
 
dsError_t dsGetMISteering (intptr_t handle, bool *enabled)
 Gets the Media Intelligent Steering of the audio port.
 
dsError_t dsGetGraphicEqualizerMode (intptr_t handle, int *mode)
 Gets the Graphic Equalizer Mode.
 
dsError_t dsGetMS12AudioProfileList (intptr_t handle, dsMS12AudioProfileList_t *profiles)
 Gets the supported MS12 audio profiles.
 
dsError_t dsGetMS12AudioProfile (intptr_t handle, char *profile)
 Gets current audio profile selection.
 
dsError_t dsGetSupportedARCTypes (intptr_t handle, int *types)
 Gets the supported ARC types of the connected ARC/eARC device.
 
dsError_t dsAudioSetSAD (intptr_t handle, dsAudioSADList_t sad_list)
 Sets Short Audio Descriptor retrieved from CEC for the connected ARC device.
 
dsError_t dsAudioEnableARC (intptr_t handle, dsAudioARCStatus_t arcStatus)
 Enable/Disable ARC/EARC and route audio to connected device.
 
dsError_t dsGetStereoMode (intptr_t handle, dsAudioStereoMode_t *stereoMode)
 Gets the stereo mode of an audio port.
 
dsError_t dsGetStereoAuto (intptr_t handle, int *autoMode)
 Checks if auto mode is enabled or not for the current audio port.
 
dsError_t dsGetAudioGain (intptr_t handle, float *gain)
 Gets the audio gain of an audio port.
 
dsError_t dsGetAudioDB (intptr_t handle, float *db)
 Gets the current audio dB level of an audio port.
 
dsError_t dsGetAudioLevel (intptr_t handle, float *level)
 Gets the current audio volume level of an audio port.
 
dsError_t dsGetAudioMaxDB (intptr_t handle, float *maxDb)
 Gets the maximum audio dB level of an audio port.
 
dsError_t dsGetAudioMinDB (intptr_t handle, float *minDb)
 Gets the minimum audio dB level of an audio port.
 
dsError_t dsGetAudioOptimalLevel (intptr_t handle, float *optimalLevel)
 Gets the optimal audio level of an audio port.
 
dsError_t dsGetAudioDelay (intptr_t handle, uint32_t *audioDelayMs)
 Gets the audio delay (in ms) of an audio port.
 
dsError_t dsGetAudioDelayOffset (intptr_t handle, uint32_t *audioDelayOffsetMs)
 Gets the audio delay offset (in ms) of an audio port.
 
dsError_t dsSetAudioAtmosOutputMode (intptr_t handle, bool enable)
 Sets the audio ATMOS output mode.
 
dsError_t dsGetSinkDeviceAtmosCapability (intptr_t handle, dsATMOSCapability_t *capability)
 Gets the ATMOS capability of the sink device.
 
dsError_t dsIsAudioLoopThru (intptr_t handle, bool *loopThru)
 Gets the loop-through mode of an audio port.
 
dsError_t dsIsAudioMute (intptr_t handle, bool *muted)
 Gets the audio mute status of an audio port corresponding to the specified port handle.
 
dsError_t dsIsAudioPortEnabled (intptr_t handle, bool *enabled)
 Indicates whether the specified Audio port is enabled or not.
 
dsError_t dsEnableAudioPort (intptr_t handle, bool enabled)
 Enables or Disables the Audio port corresponding to the specified port handle.
 
dsError_t dsEnableMS12Config (intptr_t handle, dsMS12FEATURE_t feature, const bool enable)
 Enables or Disables MS12 DAPV2 and DE feature.
 
dsError_t dsEnableLEConfig (intptr_t handle, const bool enable)
 Enables or Disables Loudness Equivalence feature.
 
dsError_t dsGetLEConfig (intptr_t handle, bool *enable)
 Gets the LE (Loudness Equivalence) configuration.
 
dsError_t dsSetAudioEncoding (intptr_t handle, dsAudioEncoding_t encoding)
 Sets the encoding type of an audio port.
 
dsError_t dsSetAudioCompression (intptr_t handle, int compression)
 Sets the audio compression of an audio port.
 
dsError_t dsSetDialogEnhancement (intptr_t handle, int level)
 Sets the Dialog Enhancement level of an audio port.
 
dsError_t dsSetDolbyVolumeMode (intptr_t handle, bool mode)
 To enable/disable Dolby Volume Mode.
 
dsError_t dsSetIntelligentEqualizerMode (intptr_t handle, int mode)
 Sets the Intelligent Equalizer Mode.
 
dsError_t dsSetVolumeLeveller (intptr_t handle, dsVolumeLeveller_t volLeveller)
 Sets the Dolby volume leveller settings.
 
dsError_t dsSetBassEnhancer (intptr_t handle, int boost)
 Sets the audio Bass.
 
dsError_t dsEnableSurroundDecoder (intptr_t handle, bool enabled)
 Enables / Disables the audio Surround Decoder.
 
dsError_t dsSetDRCMode (intptr_t handle, int mode)
 Sets the DRC Mode of specified audio port.
 
dsError_t dsSetSurroundVirtualizer (intptr_t handle, dsSurroundVirtualizer_t virtualizer)
 Sets the audio Surround Virtualizer level.
 
dsError_t dsSetMISteering (intptr_t handle, bool enabled)
 Set the Media Intelligent Steering of the audio port.
 
dsError_t dsSetGraphicEqualizerMode (intptr_t handle, int mode)
 Sets the Graphic Equalizer Mode.
 
dsError_t dsSetMS12AudioProfile (intptr_t handle, const char *profile)
 Sets the MS12 audio profile.
 
dsError_t dsSetStereoMode (intptr_t handle, dsAudioStereoMode_t mode)
 Sets the stereo mode of an audio port.
 
dsError_t dsSetStereoAuto (intptr_t handle, int autoMode)
 Sets the Auto Mode to be used on the audio port.
 
dsError_t dsSetAudioGain (intptr_t handle, float gain)
 Sets the audio gain of an audio port.
 
dsError_t dsSetAudioDB (intptr_t handle, float db)
 Sets the current audio dB level of an audio port.
 
dsError_t dsSetAudioLevel (intptr_t handle, float level)
 Sets the audio volume level of an audio port.
 
dsError_t dsSetAudioDucking (intptr_t handle, dsAudioDuckingAction_t action, dsAudioDuckingType_t type, const unsigned char level)
 Sets the audio ducking level of an audio port.
 
dsError_t dsEnableLoopThru (intptr_t handle, bool loopThru)
 Sets loop-through mode of an audio port.
 
dsError_t dsSetAudioMute (intptr_t handle, bool mute)
 Mutes or un-mutes an audio port.
 
dsError_t dsIsAudioMSDecode (intptr_t handle, bool *HasMS11Decode)
 Checks whether the audio port supports Dolby MS11 Multistream Decode.
 
dsError_t dsIsAudioMS12Decode (intptr_t handle, bool *HasMS12Decode)
 Checks whether the audio port supports Dolby MS12 Multistream Decode.
 
dsError_t dsSetAudioDelay (intptr_t handle, const uint32_t audioDelayMs)
 Sets the audio delay (in ms) of an audio port.
 
dsError_t dsSetAudioDelayOffset (intptr_t handle, const uint32_t audioDelayOffsetMs)
 Sets the audio delay offset (in ms) of an audio port.
 
dsError_t dsAudioPortTerm ()
 Terminate the Audio Port sub-system of Device Settings HAL.
 
dsError_t dsAudioOutIsConnected (intptr_t handle, bool *pisCon)
 Checks if the audio output port is connected or not.
 
dsError_t dsAudioOutRegisterConnectCB (dsAudioOutPortConnectCB_t CBFunc)
 Registers for the Audio Output Connect Event.
 
dsError_t dsAudioFormatUpdateRegisterCB (dsAudioFormatUpdateCB_t cbFun)
 Registers for the Audio Format Update Event.
 
dsError_t dsAudioAtmosCapsChangeRegisterCB (dsAtmosCapsChangeCB_t cbFun)
 Register for the Atmos capability change event of the sink device.
 
dsError_t dsGetAudioCapabilities (intptr_t handle, int *capabilities)
 Gets the Audio Format capabilities .
 
dsError_t dsGetMS12Capabilities (intptr_t handle, int *capabilities)
 Gets the MS12 capabilities of audio port supported by the platform.
 
dsError_t dsResetDialogEnhancement (intptr_t handle)
 Resets the Dialog Enhancement of audio port to default value.
 
dsError_t dsResetBassEnhancer (intptr_t handle)
 Resets the audio bass enhancer to its default value.
 
dsError_t dsResetSurroundVirtualizer (intptr_t handle)
 Resets the audio surround virtualizer level to its default value.
 
dsError_t dsResetVolumeLeveller (intptr_t handle)
 Resets the Dolby volume leveller of the audio port to its default volume level.
 
dsError_t dsSetMS12AudioProfileSetttingsOverride (intptr_t handle, const char *profileState, const char *profileName, const char *profileSettingsName, const char *profileSettingValue)
 To Set/override a specific audio setting in a specific profile.
 
dsError_t dsSetAssociatedAudioMixing (intptr_t handle, bool mixing)
 Enables/Disables associated audio mixing feature.
 
dsError_t dsGetAssociatedAudioMixing (intptr_t handle, bool *mixing)
 Gets the Associated Audio Mixing status - enabled/disabled.
 
dsError_t dsSetFaderControl (intptr_t handle, int mixerbalance)
 Sets the mixerbalance between main and associated audio.
 
dsError_t dsGetFaderControl (intptr_t handle, int *mixerbalance)
 To get the mixer balance between main and associated audio.
 
dsError_t dsSetPrimaryLanguage (intptr_t handle, const char *pLang)
 Sets AC4 Primary language.
 
dsError_t dsGetPrimaryLanguage (intptr_t handle, char *pLang)
 To get AC4 Primary language.
 
dsError_t dsSetSecondaryLanguage (intptr_t handle, const char *sLang)
 To set AC4 Secondary language.
 
dsError_t dsGetSecondaryLanguage (intptr_t handle, char *sLang)
 Gets the AC4 Secondary language.
 
dsError_t dsGetHDMIARCPortId (int *portId)
 Gets the audio HDMI ARC port ID for each platform.
 

Detailed Description

Device Settings HAL Audio Public APIs. These APIs define the HAL for the Device Settings Audio interface.

Document
Document reference.
Open Issues (in no particular order)
  1. None
Assumptions
  1. None
Abbreviations
  • DS - Device Settings
  • HAL - Hardware Abstraction Layer
  • API - Application Programming Interface
  • Caller - Any user of the interface via the APIs
  • CB - Callback function (suffix)
  • ARC - Audio Return Channel
  • eARC - Enhanced Audio Return Channel
  • HDMI - High-Definition Multimedia Interface
  • LE - Loudness Equivalence
  • DRC - Dynamic Range Control
  • MI - Media Intelligent
  • RF - Radio Frequency
  • dB - Decibel
  • MS12 - MultiStream 12
  • AC4 - Audio Compression 4
  • ms - milliseconds
  • CPU - Central Processing Unit
  • SAD - Short Audio Descriptor
  • DAPV2 - Dolby Audio Processing Version 2
  • DE - Dialog Enhacement
Implementation Notes
  1. None