SWRA769 august 2023 CC2564C
The following function is responsible for setting the Speaker Gain on Remote Device. This function returns zero on successful execution and a negative value on all errors. This function works if the remote audio volume control feature is supported in the HF device.
The command only requires an integer value for the Speaker Gain as a parameter.
HFRE_Set_Remote_Speaker_Gain(BluetoothStackID, CurrentClientPortID, TempParam->Params->intParam)
BTPSAPI_DECLARATION int BTPSAPI HFRE_Set_Remote_Speaker_Gain(unsigned int BluetoothStackID, unsigned int HFREPortID, unsigned int SpeakerGain)
This function is responsible for allowing synchronization and setting of the Remote Devices Speaker Gain. This function can only be performed if a valid Service Level Connection exists. When called by a Hands-Free unit this function is provided as a means to inform the Remote Audio Gateway of the current Speaker Gain value. When called by an Audio Gateway this function provides a means for the Audio Gateway to control the Speaker Gain of the Remote Hands-Free unit. This function accepts as its input parameters the Bluetooth Stack ID for which the HFRE Port ID is valid as well as the HFRE Port ID. The final parameter is the Speaker Gain to be sent to the Remote Device. The Speaker Gain Parameter *MUST* be between the values of HFRE_SPEAKER_GAIN_MINIMUM and HFRE_SPEAKER_GAIN_MAXIMUM. This function returns zero if successful or a negative return error code if there was an error.