Line 527: |
Line 527: |
| | | |
| This is used by [[BTM_services|btm]]. | | This is used by [[BTM_services|btm]]. |
| + | |
| + | [12.0.0+] If [[Settings_services#BluetoothDevicesSettings|TrustedServices]] is 0, value 0x100000 is used. When bit20 is set, HID is initialized for this device, otherwise when bitmask 0xC0000 is set (<code>if((TrustedServices & 0xC0000) != 0)</code>) [[#OpenAudioConnection|audio]] is initialized for this device. |
| | | |
| == GetPairedDeviceInfo == | | == GetPairedDeviceInfo == |
Line 962: |
Line 964: |
| | | |
| This is essentially the same as the other [12.0.0+] Get*EventInfo cmds, however in this case the output type is set to value 0 when no event is available. | | This is essentially the same as the other [12.0.0+] Get*EventInfo cmds, however in this case the output type is set to value 0 when no event is available. |
| + | |
| + | See [[#AudioEventInfo]]. |
| | | |
| == OpenAudioConnection == | | == OpenAudioConnection == |
Line 985: |
Line 989: |
| | | |
| == StartAudioOut == | | == StartAudioOut == |
− | Takes an input u32 [[#OpenAudioOut|audio_handle]], a [[#PcmParameter]], a nn::TimeSpan, returns an output nn::TimeSpan and u64. | + | Takes an input u32 [[#OpenAudioOut|audio_handle]], a [[#PcmParameter]], a nn::TimeSpan latency, returns an output nn::TimeSpan latency and u64. |
| | | |
| This eventually uses BSA to start an AV stream. The codec is "Raw PCM". Synchronous feeding mode is used. | | This eventually uses BSA to start an AV stream. The codec is "Raw PCM". Synchronous feeding mode is used. |
Line 1,004: |
Line 1,008: |
| | | |
| == AcquireAudioOutBufferAvailableEvent == | | == AcquireAudioOutBufferAvailableEvent == |
− | Takes an input u32, returns an output Event handle. | + | Takes an input u32 [[#OpenAudioOut|audio_handle]], returns an output Event handle. |
| | | |
| sdknso uses an user-specified EventClearMode. | | sdknso uses an user-specified EventClearMode. |
| + | |
| + | This gets an Event which was previously initialized. |
| | | |
| == SendAudioData == | | == SendAudioData == |
− | Takes an input u32, a type-0x9 input buffer, returns an output u64. | + | Takes an input u32 [[#OpenAudioOut|audio_handle]], a type-0x9 input buffer, returns an output u64 transferred_size. |
| + | |
| + | This eventually uses BSA to send the specified buffer to the required UIPC channel. If transferred_size doesn't match the buffer size, error 0x177A71 is returned. transferred_size is always either 0 (error occured) or the buffer size. |
| | | |
| == AcquireAudioControlInputStateChangedEvent == | | == AcquireAudioControlInputStateChangedEvent == |
Line 1,015: |
Line 1,023: |
| | | |
| sdknso uses an user-specified EventClearMode. | | sdknso uses an user-specified EventClearMode. |
| + | |
| + | This gets an Event which was previously initialized. |
| | | |
| == GetAudioControlInputState == | | == GetAudioControlInputState == |
− | Takes a type-0xA output buffer containing an array of [[#AudioControlButtonState]], returns an output s32. | + | Takes a type-0xA output buffer containing an array of [[#AudioControlButtonState]], returns an output s32 total_out. |
| + | |
| + | A maximum of 0xF entries can be returned. |
| | | |
| == AcquireAudioConnectionStateChangedEvent == | | == AcquireAudioConnectionStateChangedEvent == |
Line 1,023: |
Line 1,035: |
| | | |
| sdknso uses an user-specified EventClearMode. | | sdknso uses an user-specified EventClearMode. |
| + | |
| + | This gets an Event which was previously initialized. |
| | | |
| == GetConnectedAudioDevice == | | == GetConnectedAudioDevice == |
− | Takes a type-0xA output buffer containing an array of [[#Address]], returns an output s32. | + | Takes a type-0xA output buffer containing an array of [[#Address]], returns an output s32 total_out. |
| + | |
| + | A maximum of 0x8 entries can be returned. |
| | | |
| == IsManufacturingMode == | | == IsManufacturingMode == |
Line 1,495: |
Line 1,511: |
| |} | | |} |
| | | |
− | [1.0.0-11.0.1] [[#EventType|Type7]]: | + | [1.0.0-8.1.1] [[#EventType|Type7]]: |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Offset |
| + | ! Size |
| + | ! Description |
| + | |
| + | |- |
| + | | 0x0 || 0x6 || Device [[#Address|address]]. |
| + | |- |
| + | | 0x6 || 0x2 || Padding |
| + | |- |
| + | | 0x8 || 0x4 || Status, always 0 except with [[#ConnectionEventType|event0]]: 2 = ACL Link is now Resumed (BSA_SEC_RESUMED_EVT), 9 = connection failed (pairing/authentication failed, or opening the hid connection failed). |
| + | |- |
| + | | 0xC || 0x4 || [[#ConnectionEventType]] |
| + | |} |
| + | |
| + | [9.0.0-11.0.1] [[#EventType|Type7]]: |
| | | |
| {| class="wikitable" border="1" | | {| class="wikitable" border="1" |
Line 1,618: |
Line 1,652: |
| [[#HidEventType|Type0]], for [[#GetHidEventInfo]]: | | [[#HidEventType|Type0]], for [[#GetHidEventInfo]]: |
| | | |
| + | [1.0.0-11.0.1] |
| {| class="wikitable" border="1" | | {| class="wikitable" border="1" |
| |- | | |- |
Line 1,628: |
Line 1,663: |
| | 0x6 || 0x2 || Padding | | | 0x6 || 0x2 || Padding |
| |- | | |- |
− | | 0x8 || 0x4 || Status: | + | | 0x8 || 0x4 || Status: 0 = hid connection opened, 2 = hid connection closed, 8 = failed to open hid connection. |
− | [1.0.0-11.0.1] 0 = hid connection opened, 2 = hid connection closed, 8 = failed to open hid connection.
| + | |} |
− | | + | |
− | [12.0.0+] 0 = hid connection closed, 1 = hid connection opened, 2 = failed to open hid connection. | + | [12.0.0+] |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Offset |
| + | ! Size |
| + | ! Description |
| + | |- |
| + | | 0x0 || 0x4 || Status: 0 = hid connection closed, 1 = hid connection opened, 2 = failed to open hid connection. |
| + | |- |
| + | | 0x4 || 0x6 || Device [[#Address|address]]. |
| |} | | |} |
| | | |
Line 1,892: |
Line 1,936: |
| = AudioEventType = | | = AudioEventType = |
| This is "nn::bluetooth::hal::AudioEventType". This is an u32 enum. | | This is "nn::bluetooth::hal::AudioEventType". This is an u32 enum. |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Value |
| + | ! Name |
| + | ! Description |
| + | |- |
| + | | 0 || || None |
| + | |- |
| + | | 1 || || Connection |
| + | |} |
| + | |
| + | = AudioEventInfo = |
| + | This is the output buffer for [[#GetAudioEventInfo]]. The data stored here depends on the [[#AudioEventType]]. |
| + | |
| + | [[#AudioEventType|Type1]]: |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Offset |
| + | ! Size |
| + | ! Description |
| + | |- |
| + | | 0x0 || 0x4 || Status: 0 = AV connection closed, 1 = AV connection opened, 2 = failed to open AV connection. |
| + | |- |
| + | | 0x4 || 0x6 || Device [[#Address|address]]. |
| + | |- |
| + | | 0xA || 0x2 || Padding |
| + | |} |
| | | |
| = PcmParameter = | | = PcmParameter = |
Line 2,036: |
Line 2,109: |
| | CYW4356A3_001.004.009.0092.0095 | | | CYW4356A3_001.004.009.0092.0095 |
| |- | | |- |
− | | [12.0.0] | + | | [12.0.0-12.0.2] |
| | BSA0106_01.60.00_ | | | BSA0106_01.60.00_ |
| | Hayward_T3_RC_20210224 | | | Hayward_T3_RC_20210224 |