Audio services: Difference between revisions
| (40 intermediate revisions by 5 users not shown) | |||
| Line 332: | Line 332: | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| 0 || EnableDspUsageMeasurement | | 0 || [17.0.0+] GetDspStatistics ([6.0.0-16.1.0] EnableDspUsageMeasurement) | ||
|- | |- | ||
| 1 || DisableDspUsageMeasurement | | 1 || [20.0.0+] GetAppletStateSummaries ([6.0.0-16.1.0] DisableDspUsageMeasurement) | ||
|- | |- | ||
| 6 || GetDspUsage | | 2 || [20.0.0+] SetDspStatisticsParameter | ||
|- | |||
| 3 || [20.0.0+] GetDspStatisticsParameter | |||
|- | |||
| 6 || [6.0.0-16.1.0] GetDspUsage | |||
|} | |} | ||
| Line 367: | Line 371: | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| 0 || [[#GetSampleRate]] | | 0 || [[#GetSampleRate|GetSampleRate]] | ||
|- | |- | ||
| 1 || [[#GetSampleCount]] | | 1 || [[#GetSampleCount|GetSampleCount]] | ||
|- | |- | ||
| 2 || [[#GetMixBufferCount]] | | 2 || [[#GetMixBufferCount|GetMixBufferCount]] | ||
|- | |- | ||
| 3 || [[#GetState]] | | 3 || [[#GetState|GetState]] | ||
|- | |- | ||
| 4 || RequestUpdate | | 4 || [[#RequestUpdate|RequestUpdate]] | ||
|- | |- | ||
| 5 || Start | | 5 || [[#Start|Start]] | ||
|- | |- | ||
| 6 || Stop | | 6 || [[#Stop|Stop]] | ||
|- | |- | ||
| 7 || QuerySystemEvent | | 7 || [[#QuerySystemEvent|QuerySystemEvent]] | ||
|- | |- | ||
| 8 || [[#SetRenderingTimeLimit]] | | 8 || [[#SetRenderingTimeLimit|SetRenderingTimeLimit]] | ||
|- | |- | ||
| 9 || [[#GetRenderingTimeLimit]] | | 9 || [[#GetRenderingTimeLimit|GetRenderingTimeLimit]] | ||
|- | |- | ||
| 10 || [3.0.0+] RequestUpdateAuto | | 10 || [3.0.0+] [[#RequestUpdateAuto|RequestUpdateAuto]] | ||
|- | |- | ||
| 11 || [3.0.0+] ExecuteAudioRendererRendering | | 11 || [3.0.0+] ExecuteAudioRendererRendering | ||
|- | |||
| 12 || [15.0.0+] SetVoiceDropParameter | |||
|- | |||
| 13 || [15.0.0+] GetVoiceDropParameter | |||
|} | |} | ||
| Line 403: | Line 411: | ||
=== GetState === | === GetState === | ||
No input. Returns an u32 '''State''' (0=Started, 1=Stopped). | No input. Returns an u32 '''State''' (0=Started, 1=Stopped). | ||
The output is determined using the flag updated by [[#Start|Start]]/[[#Stop|Stop]]. | |||
=== RequestUpdate === | |||
Takes two type-0x6 output buffers and a type-0x5 input buffer. | |||
=== Start === | |||
No input/output. | |||
Besides logging, this calls a func which essentially clears a state field and sets a flag, and also calls a func. | |||
The thread which handles generating/sending ADSP commands will only do so when the above flag indicates the state is Started. | |||
=== Stop === | |||
No input/output. | |||
After logging, this calls a func which essentially returns when the flag from [[#Start|Start]] is not set. Various funcs are called, then the flag is cleared. If needed, this waits on an event, then this returns. | |||
=== QuerySystemEvent === | |||
No input, returns an output Event handle. | |||
=== SetRenderingTimeLimit === | === SetRenderingTimeLimit === | ||
| Line 409: | Line 437: | ||
=== GetRenderingTimeLimit === | === GetRenderingTimeLimit === | ||
No input. Returns an u32 '''RenderingTimeLimit'''. | No input. Returns an u32 '''RenderingTimeLimit'''. | ||
=== RequestUpdateAuto === | |||
Takes two type-0x22 output buffers and a type-0x21 input buffer. | |||
This is identical to [[#RequestUpdate|RequestUpdate]] besides the buffer-types. | |||
== IAudioDevice == | == IAudioDevice == | ||
| Line 441: | Line 474: | ||
| 12 || [3.0.0+] QueryAudioDeviceOutputEvent | | 12 || [3.0.0+] QueryAudioDeviceOutputEvent | ||
|- | |- | ||
| 13 || [5.0.0+] | | 13 || [13.0.0+] [[#GetActiveAudioOutputDeviceName]] ([5.0.0-12.1.0] [[#GetAudioSystemMasterVolumeSetting]]) | ||
|- | |||
| 14 || [13.0.0+] ListAudioOutputDeviceName | |||
|- | |||
| 15 || [17.0.0+] [[#AcquireAudioInputDeviceNotification|AcquireAudioInputDeviceNotification]] | |||
|- | |||
| 16 || [17.0.0+] [[#ReleaseAudioInputDeviceNotification|ReleaseAudioInputDeviceNotification]] | |||
|- | |||
| 17 || [17.0.0+] [[#AcquireAudioOutputDeviceNotification|AcquireAudioOutputDeviceNotification]] | |||
|- | |||
| 18 || [17.0.0+] [[#ReleaseAudioOutputDeviceNotification|ReleaseAudioOutputDeviceNotification]] | |||
|- | |||
| 19 || [18.0.0+] SetAudioDeviceOutputVolumeAutoTuneEnabled | |||
|- | |||
| 20 || [18.0.0+] IsAudioDeviceOutputVolumeAutoTuneEnabled | |||
|- | |||
| 21 || [21.0.0+] IsActiveOutputDeviceEstimatedLowLatency | |||
|} | |} | ||
| Line 461: | Line 510: | ||
=== GetAudioDeviceOutputVolumeAuto === | === GetAudioDeviceOutputVolumeAuto === | ||
Takes a type-0x21 input buffer containing the '''DeviceName'''. Returns an output float. | Takes a type-0x21 input buffer containing the '''DeviceName'''. Returns an output float. | ||
=== GetAudioSystemMasterVolumeSetting === | |||
Takes a type-0x5 input buffer, returns 4-bytes of output. | |||
=== GetActiveAudioOutputDeviceName === | |||
Takes a type-0x6 output buffer, returns no output. | |||
=== AcquireAudioInputDeviceNotification === | |||
Takes an input u64, returns an output handle. | |||
On NX this just returns an error. | |||
=== ReleaseAudioInputDeviceNotification === | |||
Takes an input u64, no output. | |||
On NX this just returns an error. | |||
=== AcquireAudioOutputDeviceNotification === | |||
Takes an input u64, returns an output handle. | |||
On NX this just returns an error. | |||
=== ReleaseAudioOutputDeviceNotification === | |||
Takes an input u64, no output. | |||
On NX this just returns an error. | |||
= audout:a = | = audout:a = | ||
| Line 587: | Line 662: | ||
| 5 || SetTargetMute | | 5 || SetTargetMute | ||
|- | |- | ||
| 6 || IsTargetConnected | | 6 || [20.0.0+] ([1.0.0-17.0.1] IsTargetConnected) | ||
|- | |- | ||
| 7 || SetDefaultTarget | | 7 || SetDefaultTarget | ||
| Line 597: | Line 672: | ||
| 10 || SetAudioOutputMode | | 10 || SetAudioOutputMode | ||
|- | |- | ||
| 11 || SetForceMutePolicy | | 11 || [1.0.0-13.2.1] SetForceMutePolicy | ||
|- | |- | ||
| 12 || GetForceMutePolicy | | 12 || [1.0.0-13.2.1] GetForceMutePolicy | ||
|- | |- | ||
| 13 || GetOutputModeSetting | | 13 || GetOutputModeSetting | ||
| Line 613: | Line 688: | ||
| 18 || [3.0.0+] GetHeadphoneOutputLevelMode | | 18 || [3.0.0+] GetHeadphoneOutputLevelMode | ||
|- | |- | ||
| 19 || [3.0.0 | | 19 || [17.0.0+] SetForceMonauralOutputModeEnabled ([3.0.0-13.2.1] AcquireAudioVolumeUpdateEventForPlayReport) | ||
|- | |- | ||
| 20 || [3.0.0 | | 20 || [17.0.0+] IsForceMonauralOutputModeEnabled ([3.0.0-13.2.1] AcquireAudioOutputDeviceUpdateEventForPlayReport) | ||
|- | |- | ||
| 21 || [3.0.0 | | 21 || [3.0.0-13.2.1] GetAudioOutputTargetForPlayReport | ||
|- | |- | ||
| 22 || [3.0.0+] NotifyHeadphoneVolumeWarningDisplayedEvent | | 22 || [3.0.0+] NotifyHeadphoneVolumeWarningDisplayedEvent | ||
|- | |- | ||
| 23 || [4.0.0+] SetSystemOutputMasterVolume | | 23 || [4.0.0+] [[#SetSystemOutputMasterVolume]] | ||
|- | |||
| 24 || [4.0.0+] [[#GetSystemOutputMasterVolume]] | |||
|- | |||
| 25 || [20.0.0+] ([4.0.0-13.2.1] [[#GetAudioVolumeDataForPlayReport]]) | |||
|- | |||
| 26 || [4.0.0-14.1.2] [[#UpdateHeadphoneSettings]] | |||
|- | |||
| 27 || [7.0.0-16.1.0] SetVolumeMappingTableForDev | |||
|- | |||
| 28 || [10.0.0-13.2.1] GetAudioOutputChannelCountForPlayReport | |||
|- | |||
| 29 || [10.0.0-13.2.1] BindAudioOutputChannelCountUpdateEventForPlayReport | |||
|- | |||
| 30 || [13.0.0+] SetSpeakerAutoMuteEnabled | |||
|- | |||
| 31 || [13.0.0+] IsSpeakerAutoMuteEnabled | |||
|- | |||
| 32 || [13.0.0+] GetActiveOutputTarget | |||
|- | |||
| 33 || [13.0.0+] GetTargetDeviceInfo | |||
|- | |||
| 34 || [13.0.0+] AcquireTargetNotification | |||
|- | |||
| 35 || [14.0.0-14.1.2] SetHearingProtectionSafeguardTimerRemainingTimeForDebug | |||
|- | |||
| 36 || [14.0.0-14.1.2] GetHearingProtectionSafeguardTimerRemainingTimeForDebug | |||
|- | |||
| 37 || [14.0.0-14.1.2] SetHearingProtectionSafeguardEnabled | |||
|- | |||
| 38 || [14.0.0-14.1.2] IsHearingProtectionSafeguardEnabled | |||
|- | |||
| 39 || [14.0.0-14.1.2] IsHearingProtectionSafeguardMonitoringOutputForDebug | |||
|- | |||
| 40 || [14.0.0+] [[#GetSystemInformationForDebug]] | |||
|- | |||
| 41 || [15.0.0-19.0.1] SetVolumeButtonLongPressTime | |||
|- | |||
| 42 || [15.0.0+] SetNativeVolumeForDebug | |||
|- | |||
| 43 || [21.0.0+] | |||
|- | |||
| 5000 || [19.0.0+] | |||
|- | |||
| 10000 || [13.0.0-19.0.1] NotifyAudioOutputTargetForPlayReport | |||
|- | |||
| 10001 || [13.0.0-19.0.1] NotifyAudioOutputChannelCountForPlayReport | |||
|- | |||
| 10002 || [13.0.0-19.0.1] NotifyUnsupportedUsbOutputDeviceAttachedForPlayReport | |||
|- | |||
| 10100 || [14.0.0+] [[#GetAudioVolumeDataForPlayReport]] | |||
|- | |||
| 10101 || [14.0.0+] BindAudioVolumeUpdateEventForPlayReport | |||
|- | |||
| 10102 || [14.0.0-19.0.1] BindAudioOutputTargetUpdateEventForPlayReport | |||
|- | |||
| 10103 || [14.0.0-19.0.1] GetAudioOutputTargetForPlayReport | |||
|- | |||
| 10104 || [14.0.0-19.0.1] GetAudioOutputChannelCountForPlayReport | |||
|- | |||
| 10105 || [14.0.0-19.0.1] BindAudioOutputChannelCountUpdateEventForPlayReport | |||
|- | |- | ||
| | | 10106 || [14.0.0-19.0.1] GetDefaultAudioOutputTargetForPlayReport | ||
|- | |- | ||
| | | 10200 || [20.0.0+] | ||
|- | |- | ||
| | | 50000 || [15.0.0-18.1.0] SetAnalogInputBoostGainForPrototyping | ||
|- | |- | ||
| | | 50001 || [19.0.0-19.0.1] OverrideDefaultTargetForDebug | ||
|- | |- | ||
| | | 50003 || [19.0.0+] SetForceOverrideExternalDeviceNameForDebug | ||
|- | |- | ||
| | | 50004 || [19.0.0+] ClearForceOverrideExternalDeviceNameForDebug | ||
|} | |} | ||
=== UpdateHeadphoneSettings | == SetSystemOutputMasterVolume == | ||
Takes an input float '''SystemOutputMasterVolume'''. No output. | |||
[20.0.0+] Originally any input was accepted, now input must be in range 0.0-1.0 otherwise it's replaced by nearest accepted value. | |||
== GetSystemOutputMasterVolume == | |||
No input. Returns an output float '''SystemOutputMasterVolume'''. | |||
== GetAudioVolumeDataForPlayReport == | |||
No input, returns a total of 7-bytes of output. | |||
[13.0.0+] No input, returns a total of 9-bytes of output. | |||
[20.0.0+] Now takes a 0x400-bytes type-0x16 output buffer and no longer returns any output. | |||
== UpdateHeadphoneSettings == | |||
Takes one input bool. No output. | Takes one input bool. No output. | ||
NS calls this with the result of IParentalControlService::IsRestrictionEnabled[ | |||
NS calls this with the result of [[Parental_Control_services#IParentalControlService|IParentalControlService::IsRestrictionEnabled]]. | |||
== GetSystemInformationForDebug == | |||
Takes a type-0x1A output buffer. No output. | |||
[15.0.0+] Now takes a type-0x16 output buffer. | |||
[18.0.0+] Originally the output buffer was a binary structure, now it's just a string. | |||
[20.0.0+] Now takes a total of 0x40-bytes of input and the type-0x16 output buffer is now 0x2000-bytes instead of 0x1000-bytes. | |||
= codecctl = | = codecctl = | ||
| Line 730: | Line 890: | ||
| 3 || [3.0.0+] [[#GetWorkBufferSizeForMultiStream]] | | 3 || [3.0.0+] [[#GetWorkBufferSizeForMultiStream]] | ||
|- | |- | ||
| 4 || [12.0.0+] | | 4 || [12.0.0+] OpenHardwareOpusDecoderEx | ||
|- | |||
| 5 || [12.0.0+] GetWorkBufferSizeEx | |||
|- | |||
| 6 || [12.0.0+] OpenHardwareOpusDecoderForMultiStreamEx | |||
|- | |- | ||
| | | 7 || [12.0.0+] GetWorkBufferSizeForMultiStreamEx | ||
|- | |- | ||
| | | 8 || [16.0.0+] GetWorkBufferSizeExEx | ||
|- | |- | ||
| | | 9 || [16.0.0+] GetWorkBufferSizeForMultiStreamExEx | ||
|} | |} | ||
Official sw can use either software libopus, or hwopus via "nn::codec::HardwareOpus*" (separate from the former). | Official sw can use either software libopus, or hwopus (libopus running on the ADSP) via "nn::codec::HardwareOpus*" (separate from the former). | ||
== OpenHardwareOpusDecoder == | == OpenHardwareOpusDecoder == | ||
| Line 750: | Line 914: | ||
Takes a type-0x19 input buffer, an u32 '''WorkBufferSize''' and a TransferMemory handle for '''WorkBuffer'''. Returns an [[#IHardwareOpusDecoder]] object. The TransferMemory is created by the user-process with permissions=0. | Takes a type-0x19 input buffer, an u32 '''WorkBufferSize''' and a TransferMemory handle for '''WorkBuffer'''. Returns an [[#IHardwareOpusDecoder]] object. The TransferMemory is created by the user-process with permissions=0. | ||
The input buffer is a [[# | The input buffer is a [[#OpusMultiStreamParameters]] struct. The user-process initializes this struct the same way as [[#GetWorkBufferSizeForMultiStream]], except that an u8-array specified by the user is copied to +0x10 with size '''ChannelCount''', when '''ChannelCount''' above 0. | ||
== GetWorkBufferSizeForMultiStream == | == GetWorkBufferSizeForMultiStream == | ||
Takes a type-0x19 input buffer. Returns the u32 required size for the decoder's work buffer. Official user-processes align the output size to page-alignment. | Takes a type-0x19 input buffer. Returns the u32 required size for the decoder's work buffer. Official user-processes align the output size to page-alignment. | ||
The input buffer is a [[# | The input buffer is a [[#OpusMultiStreamParameters]] struct. | ||
== OpenHardwareOpusDecoderEx == | |||
Takes a struct [[#OpusParametersEx]] and a u32 '''WorkBufferSize''' and a TransferMemory handle for '''WorkBuffer'''. Returns an [[#IHardwareOpusDecoder]] object. The TransferMemory is created by the user-process with permissions=0. | |||
When ''UseLargeFrameSize'' in the parameter struct is 1 a larger output buffer that can store 120ms opus frames is used vs the default of 40ms. | |||
== GetWorkBufferSizeEx == | |||
Takes a struct [[#OpusParametersEx]]. Returns the u32 required size for the decoder's work buffer. Official user-processes align the output size to page-alignment. | |||
== OpenHardwareOpusDecoderForMultiStreamEx == | |||
Takes a type-0x19 input buffer, an u32 '''WorkBufferSize''' and a TransferMemory handle for '''WorkBuffer'''. Returns an [[#IHardwareOpusDecoder]] object. The TransferMemory is created by the user-process with permissions=0. | |||
The input buffer is a [[#OpusMultiStreamParametersEx]] struct. When ''UseLargeFrameSize'' is 1 a larger output buffer that can store 120ms opus frames is used vs the default of 40ms. | |||
== GetWorkBufferSizeForMultiStreamEx == | |||
Takes a type-0x19 input buffer. Returns the u32 required size for the decoder's work buffer. Official user-processes align the output size to page-alignment. | |||
The input buffer is a [[#OpusMultiStreamParametersEx]] struct. | |||
== IHardwareOpusDecoder == | == IHardwareOpusDecoder == | ||
| Line 871: | Line 1,053: | ||
|- | |- | ||
| 9 || SetAudioOutputProcessRecordVolume | | 9 || SetAudioOutputProcessRecordVolume | ||
|- | |||
| 10 || [18.0.0-19.0.1] GetAppletStateSummaries | |||
|} | |} | ||
| Line 885: | Line 1,069: | ||
|- | |- | ||
| 1 || RequestResumeAudioForDebug | | 1 || RequestResumeAudioForDebug | ||
|} | |||
= (S2) aud:u = | |||
This is "nn::audio::IUserClientSession". | |||
{| class="wikitable" border="1" | |||
|- | |||
! Cmd || Name | |||
|- | |||
| 0 || | |||
|- | |||
| 1 || | |||
|- | |||
| 2 || | |||
|- | |||
| 3 || | |||
|} | |||
== Cmd0 == | |||
No input, returns an output [[#audin:u|IAudioInManager]]. | |||
== Cmd1 == | |||
No input, returns an output [[#audout:u|IAudioOutManager]]. | |||
== Cmd2 == | |||
No input, returns an output [[#audren:u|IAudioRendererManager]]. | |||
== Cmd3 == | |||
No input, returns an output [[#ISpatialDownmixOutputModeManager|ISpatialDownmixOutputModeManager]]. | |||
=== ISpatialDownmixOutputModeManager === | |||
This is "nn::audio::detail::ISpatialDownmixOutputModeManager". | |||
{| class="wikitable" border="1" | |||
|- | |||
! Cmd || Name | |||
|- | |||
| 0 || | |||
|} | |||
==== Cmd0 ==== | |||
Takes a PID, an u32, u64, no output. | |||
= (S2) auddmg:u = | |||
This is "nn::audio::devmgr::IUserSessionManager". | |||
{| class="wikitable" border="1" | |||
|- | |||
! Cmd || Name | |||
|- | |||
| 0 || | |||
|} | |||
== Cmd0 == | |||
Takes a PID, an u32, an u64 pid_reserved, returns an output [[#IUserSession|IUserSession]]. | |||
=== IUserSession === | |||
This is "nn::audio::devmgr::IUserSession". | |||
{| class="wikitable" border="1" | |||
|- | |||
! Cmd || Name | |||
|- | |||
| 0 || | |||
|- | |||
| 100 || | |||
|- | |||
| 200 || | |||
|- | |||
| 300 || | |||
|- | |||
| 401 || | |||
|- | |||
| 500 || | |||
|- | |||
| 600 || | |||
|- | |||
| 700 || | |||
|- | |||
| 800 || | |||
|- | |||
| 900 || | |||
|- | |||
| 1000 || | |||
|- | |||
| 1500 || | |||
|- | |||
| 1550 || | |||
|- | |||
| 1600 || | |||
|- | |||
| 2000 || | |||
|- | |||
| 2100 || | |||
|- | |||
| 2200 || | |||
|- | |||
| 2301 || | |||
|} | |||
= (S2) audsmx:u = | |||
This is "nn::audio::sysmix::IUserSessionManager". | |||
{| class="wikitable" border="1" | |||
|- | |||
! Cmd || Name | |||
|- | |||
| 0 || | |||
|} | |||
== Cmd0 == | |||
Takes a PID, a Process handle, an u32, an u64 pid_reserved, returns an output [[#IUserSession_2|IUserSession]]. | |||
=== IUserSession === | |||
This is "nn::audio::sysmix::IUserSession". | |||
{| class="wikitable" border="1" | |||
|- | |||
! Cmd || Name | |||
|- | |||
| 1 || | |||
|- | |||
| 2 || | |||
|- | |||
| 3 || | |||
|} | |||
==== Cmd1 ==== | |||
Takes a type-0x5 input buffer, two input u32s, 3 u64s, returns an output [[#IExternalStreamSession|IExternalStreamSession]]. | |||
==== Cmd2 ==== | |||
Takes a type-0x5 input buffer, no output. | |||
==== Cmd3 ==== | |||
Takes a type-0x5 input buffer, no output. | |||
==== IExternalStreamSession ==== | |||
This is "nn::audio::sysmix::IExternalStreamSession". | |||
{| class="wikitable" border="1" | |||
|- | |||
! Cmd || Name | |||
|- | |||
| 0 || | |||
|- | |||
| 1 || | |||
|- | |||
| 2 || | |||
|- | |||
| 3 || | |||
|- | |||
| 4 || | |||
|- | |||
| 5 || | |||
|- | |||
| 6 || | |||
|- | |||
| 7 || | |||
|- | |||
| 8 || | |||
|- | |||
| 9 || | |||
|- | |||
| 10 || | |||
|- | |||
| 11 || | |||
|- | |||
| 12 || | |||
|} | |} | ||
| Line 1,225: | Line 1,577: | ||
|} | |} | ||
= | = OpusParametersEx = | ||
{| class="wikitable" border="1" | |||
|- | |||
! Offset | |||
! Size | |||
! Description | |||
|- | |||
| 0x0 | |||
| 0x4 | |||
| SampleRate | |||
|- | |||
| 0x4 | |||
| 0x4 | |||
| ChannelCount | |||
|- | |||
| 0x8 | |||
| 0x4 | |||
| UseLargeFrameSize | |||
|- | |||
| 0xC | |||
| 0x4 | |||
| Padding | |||
|} | |||
= OpusMultiStreamParameters = | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
| Line 1,252: | Line 1,628: | ||
| u8 array of channel mappings | | u8 array of channel mappings | ||
|} | |} | ||
= OpusMultiStreamParametersEx = | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset | |||
! Size | |||
! Description | |||
|- | |||
| 0x0 | |||
| 0x4 | |||
| SampleRate | |||
|- | |||
| 0x4 | |||
| 0x4 | |||
| ChannelCount | |||
|- | |||
| 0x8 | |||
| 0x4 | |||
| Number of streams | |||
|- | |||
| 0xC | |||
| 0x4 | |||
| Number of stereo streams | |||
|- | |||
| 0x10 | |||
| 0x4 | |||
| UseLargeFrameSize | |||
|- | |||
| 0x14 | |||
| 0x4 | |||
| Padding | |||
|- | |||
| 0x18 | |||
| 0x100 | |||
| u8 array of channel mappings | |||
|} | |||
= BehaviorInfo Revision = | |||
This is the revision field used with audren. This controls which format is used for the data used with [[#IAudioRenderer|IAudioRenderer]] RequestUpdate*, etc. | |||
Bitmask 0xFFFFFF == 0x564552 (REV) is used for determining whether the user-process is using NX-platform. On Ounce, the revision value is identical except that bitmask 0xFFFFFF is 0x764552 (REv). | |||
{| class="wikitable" border="1" | |||
|- | |||
! System Version | |||
! Value | |||
! Required by | |||
|- | |||
| [1.0.0+] | |||
| 0x31564552 (REV1) | |||
| IsAudioRenererProcessingTimeLimit70PercentSupported | |||
|- | |||
| [2.0.0+] | |||
| 0x32564552 (REV2) | |||
| IsAdpcmLoopContextBugFixed, IsSplitterSupported | |||
|- | |||
| [3.0.0+] | |||
| 0x33564552 (REV3) | |||
| IsLongSizePreDelaySupported | |||
|- | |||
| [4.0.0+] | |||
| 0x34564552 (REV4) | |||
| IsAudioRenererProcessingTimeLimit75PercentSupported | |||
|- | |||
| [6.0.0+] | |||
| 0x35564552 (REV5) | |||
| | |||
* IsAudioRenererProcessingTimeLimit80PercentSupported | |||
* IsCommandProcessingTimeEstimatorVersion2Supported | |||
* IsVariadicCommandBufferSizeSupported | |||
* IsFlushVoiceWaveBuffersSupported | |||
* IsSplitterBugFixed | |||
* IsElapsedFrameCountSupported | |||
* IsPerformanceMetricsDataFormatVersion2Supported | |||
* GetPerformanceMetricsDataFormat | |||
* IsVoicePitchAndSrcSkippedSupported | |||
* IsVoicePlayedSampleCountResetAtLoopPointSupported | |||
|- | |||
| [6.1.0+] | |||
| 0x36564552 (REV6) | |||
| IsBiquadFilterEffectStateClaerBugFixed | |||
|- | |||
| [7.0.0+] | |||
| 0x37564552 (REV7) | |||
| | |||
* IsVolumeMixParameterPrecisionQ23Supported | |||
* UseBiquadFilterFloatProcessing | |||
* IsMixInParameterDirtyOnlyUpdateSupported | |||
|- | |||
| [9.0.0+] | |||
| 0x38564552 (REV8) | |||
| | |||
* IsWaveBufferVer2Supported | |||
* IsCommandProcessingTimeEstimatorVersion3Supported | |||
|- | |||
| [12.0.0+] | |||
| 0x39564552 (REV9) | |||
| IsEffectInfoVersion2Supported | |||
|- | |||
| [13.0.0+] | |||
| 0x3A564552 | |||
| | |||
* UseMultiTapBiquadFilterProcessing | |||
* IsCommandProcessingTimeEstimatorVersion4Supported | |||
* IsDeviceApiVersion2Supported | |||
|- | |||
| [14.0.0+] | |||
| 0x3B564552 | |||
| | |||
* IsDelayChannelMappingChanged | |||
* IsReverbChannelMappingChanged | |||
* IsI3dl2ReverbChannelMappingChanged | |||
* IsCommandProcessingTimeEstimatorVersion5Supported | |||
|- | |||
| [17.0.0+] | |||
| 0x3C564552 | |||
| IsBiquadFilterParameterForSplitterEnabled | |||
|- | |||
| [18.0.0+] | |||
| 0x3D564552 | |||
| IsSplitterPrevVolumeResetSupported | |||
|- | |||
| | |||
| 0x3E564552 | |||
| IsSplitterDepopBugFixEnabled | |||
|- | |||
| [19.0.0+] | |||
| 0x3F564552 | |||
| IsBiquadFilterParameterFloatSupported | |||
|} | |||
= Notes = | |||
Once nnMain finishes running, it calls a func which handles ADSP Aborts. This waits on an event, calls a func, then Aborts with Result 0xC0899. | |||
That func just calls another func, which: | |||
* Calls various AGIC funcs for this IRQ, etc. | |||
* Copies data from devicemem+0x608C (the 0x7000-byte devicemem "shared memory segment") to a stack struct. | |||
* A funcptr is called if set with the above struct, then this returns. | |||
That funcptr, besides other func-calls, will log an [[Error_Report_services|erpt]] using the input struct when set with the "AdspException*" fields. | |||
This is triggered by AGIC IRQ adsp_wdresetreq, "ADSP Watchdog Timer Reset Request". The ADSP updates the watchdog from a thread, so normally the watchdog only expires when the ADSP configures it to trigger immediately. | |||
When handling an assert/exception, the ADSP: | |||
* Logs exception info in text form into devicemem. | |||
* Logs the binary form of the exception into devicemem (offset above). | |||
* Eventually configures the watchdog to trigger immediately, prints "HALT: spinning forever...\n", then enters a loop using instruction "wfe". | |||
[[Category:Services]] | [[Category:Services]] | ||