Changes

no edit summary
Line 329: Line 329:  
[12.0.0+] The Enable vfunc called above for Audio does the following:
 
[12.0.0+] The Enable vfunc called above for Audio does the following:
 
* Calls a func which does the following:
 
* Calls a func which does the following:
** Uses BSA to enable AV. Besides the callback, the only field in the passed struct which is set is <code>features</code>. This is ORRed to set the bit for "remote control target", which with [13.0.0+] is only done if [[System_Settings|system-setting]] <code>bluetooth_debug!is_av_rc_tg</code> is set to true.
+
** Uses BSA to enable AV. Besides the callback, the only field in the passed struct which is set is <code>features</code>. This is ORRed to set bit0 for "remote control target", which with [13.0.0+] is only done if [[System_Settings|system-setting]] <code>bluetooth_debug!is_av_rc_tg</code> is set to true.
 
** Error handling + state setup is done.
 
** Error handling + state setup is done.
 
** Uses BSA to register AV twice, with the default input struct.
 
** Uses BSA to register AV twice, with the default input struct.
Line 1,053: Line 1,053:  
== CloseAudioControlInput ==
 
== CloseAudioControlInput ==
 
Takes an input [[#Address]], no output.
 
Takes an input [[#Address]], no output.
 +
 +
This uses the BSA AV API to close the AVRCP connection.
    
== RegisterAudioControlNotification ==
 
== RegisterAudioControlNotification ==
 
Takes an input [[#Address]] and an u32 [[#AvrcEventType]], no output.
 
Takes an input [[#Address]] and an u32 [[#AvrcEventType]], no output.
 +
 +
This uses the BSA AV API to send a vendor control command: ctype=0x3, label={counter which is incremented}, length=0x9, data=[0x31, 0x00, 0x00, 0x05, {u8 [[#AvrcEventType]]}, {rest is zeros}].
 +
 +
This does nothing since BSA requires [[#EnableBluetooth|features]] bit1 and bit3 to be set in order to use this.
    
== SendAudioControlPassthroughCommand ==
 
== SendAudioControlPassthroughCommand ==
 
Takes an input [[#Address]], an u32 [[#AvrcOperationId]], an u32 [[#AvrcStateType]], no output.
 
Takes an input [[#Address]], an u32 [[#AvrcOperationId]], an u32 [[#AvrcStateType]], no output.
 +
 +
This uses the BSA AV API to send a remote control command: label={counter which is incremented}, rc_id=[[#AvrcOperationId]], key_state=[[#AvrcStateType]].
 +
 +
This does nothing since BSA requires [[#EnableBluetooth|features]] bit1 to be set in order to use this.
    
== SendAudioControlSetAbsoluteVolumeCommand ==
 
== SendAudioControlSetAbsoluteVolumeCommand ==
 
Takes an input [[#Address]] and a s32, no output.
 
Takes an input [[#Address]] and a s32, no output.
 +
 +
This uses the BSA AV API to send a vendor control command: ctype=0x0, label={counter which is incremented}, length=0x5, data=[0x50, 0x00, 0x00, 0x01, {input s32 value written as an u8}].
 +
 +
See [[#RegisterAudioControlNotification]] regarding the usage requirement.
    
== IsManufacturingMode ==
 
== IsManufacturingMode ==
Line 2,035: Line 2,049:     
= AvrcOperationId =
 
= AvrcOperationId =
This is "nn::bluetooth::hal::AvrcOperationId".
+
This is "nn::bluetooth::hal::AvrcOperationId". This is the same as tBSA_AV_RC.
    
= AvrcStateType =
 
= AvrcStateType =
This is "nn::bluetooth::hal::AvrcStateType".
+
This is "nn::bluetooth::hal::AvrcStateType". This is the same as tBSA_AV_STATE.
    
= Notes =
 
= Notes =