Line 6: |
Line 6: |
| ! Cmd || Name | | ! Cmd || Name |
| |- | | |- |
− | | 0 || [[#ListAudioOuts]] | + | | 0 || [[#ListAudioOuts|ListAudioOuts]] |
| |- | | |- |
− | | 1 || [[#OpenAudioOut]] | + | | 1 || [[#OpenAudioOut|OpenAudioOut]] |
| |- | | |- |
− | | 2 || [3.0.0+] [[#ListAudioOutsAuto]] | + | | 2 || [3.0.0+] [[#ListAudioOutsAuto|ListAudioOutsAuto]] |
| |- | | |- |
− | | 3 || [3.0.0+] [[#OpenAudioOutAuto]] | + | | 3 || [3.0.0+] [[#OpenAudioOutAuto|OpenAudioOutAuto]] |
| |} | | |} |
| | | |
| == ListAudioOuts == | | == ListAudioOuts == |
− | Takes a type-6 output buffer. | + | Takes a type-0x6 output buffer containing an array of [[#AudioOutInfo]]. Returns an u32 '''Count'''. |
− | Populates the output buffer with the available audio output devices' names and returns an u32 with the number of device names written.
| |
| | | |
| == OpenAudioOut == | | == OpenAudioOut == |
− | Takes a type-5 input buffer ('''DeviceNameIn'''), a type-6 output buffer ('''DeviceNameOut'''), two u32s '''SampleRate''' (must be 48000) and '''ChannelCount''' (only the higher u16 is used), one u64 '''ClientPID''', a PID and a copy-handle. | + | Takes a PID-descriptor, a type-0x5 input buffer '''NameIn''', a type-0x6 output buffer '''NameOut''', an input [[#AudioOutParameter]], an input Process handle and an input [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]]. Returns an [[#IAudioOut]] and an output [[#AudioOutParameterInternal]]. |
− | Returns an [[#IAudioOut]] object and four u32s: the sample rate, channel count, [[#PCM_format|PCM format]], and the initial AudioOutState. | |
− | | |
− | === PCM format ===
| |
− | {| class="wikitable" border="1"
| |
− | |-
| |
− | ! Value || Name
| |
− | |-
| |
− | | 0 || Invalid
| |
− | |-
| |
− | | 1 || INT8
| |
− | |-
| |
− | | 2 || INT16
| |
− | |-
| |
− | | 3 || INT24
| |
− | |-
| |
− | | 4 || INT32
| |
− | |-
| |
− | | 5 || PCM Float
| |
− | |-
| |
− | | 6 || ADPCM
| |
− | |}
| |
| | | |
| == ListAudioOutsAuto == | | == ListAudioOutsAuto == |
Line 47: |
Line 25: |
| | | |
| == OpenAudioOutAuto == | | == OpenAudioOutAuto == |
− | Same as [[#OpenAudioOut]], but takes a type-0x21 input buffer instead. | + | Same as [[#OpenAudioOut]], but takes a type-0x21 input buffer and a type-0x22 output buffer instead. |
| | | |
| == IAudioOut == | | == IAudioOut == |
Line 56: |
Line 34: |
| ! Cmd || Name | | ! Cmd || Name |
| |- | | |- |
− | | 0 || [[#GetAudioOutState]] | + | | 0 || [[#GetAudioOutState|GetAudioOutState]] |
| |- | | |- |
− | | 1 || [[#StartAudioOut]] | + | | 1 || [[#Start|Start]] |
| |- | | |- |
− | | 2 || [[#StopAudioOut]] | + | | 2 || [[#Stop|Stop]] |
| |- | | |- |
− | | 3 || [[#AppendAudioOutBuffer]] | + | | 3 || [[#AppendAudioOutBuffer|AppendAudioOutBuffer]] |
| |- | | |- |
− | | 4 || [[#RegisterBufferEvent]] | + | | 4 || [[#RegisterBufferEvent|RegisterBufferEvent]] |
| |- | | |- |
− | | 5 || [[#GetReleasedAudioOutBuffer]] | + | | 5 || [[#GetReleasedAudioOutBuffers|GetReleasedAudioOutBuffers]] |
| |- | | |- |
− | | 6 || [[#ContainsAudioOutBuffer]] | + | | 6 || [[#ContainsAudioOutBuffer|ContainsAudioOutBuffer]] |
| |- | | |- |
− | | 7 || [3.0.0+] [[#AppendAudioOutBufferAuto]] | + | | 7 || [3.0.0+] [[#AppendAudioOutBufferAuto|AppendAudioOutBufferAuto]] |
| |- | | |- |
− | | 8 || [3.0.0+] [[#GetReleasedAudioOutBufferAuto]] | + | | 8 || [3.0.0+] [[#GetReleasedAudioOutBuffersAuto|GetReleasedAudioOutBuffersAuto]] |
| |- | | |- |
− | | 9 || [4.0.0+] GetAudioOutBufferCount | + | | 9 || [4.0.0+] [[#GetAudioOutBufferCount|GetAudioOutBufferCount]] |
| |- | | |- |
− | | 10 || [4.0.0+] GetAudioOutPlayedSampleCount | + | | 10 || [4.0.0+] [[#GetAudioOutPlayedSampleCount|GetAudioOutPlayedSampleCount]] |
| |- | | |- |
− | | 11 || [4.0.0+] FlushAudioOutBuffers | + | | 11 || [4.0.0+] [[#FlushAudioOutBuffers|FlushAudioOutBuffers]] |
| |- | | |- |
− | | 12 || [6.0.0+] SetAudioOutVolume | + | | 12 || [6.0.0+] [[#SetAudioOutVolume|SetAudioOutVolume]] |
| |- | | |- |
− | | 13 || [6.0.0+] GetAudioOutVolume | + | | 13 || [6.0.0+] [[#GetAudioOutVolume|GetAudioOutVolume]] |
| |} | | |} |
| | | |
| === GetAudioOutState === | | === GetAudioOutState === |
− | Returns an u32 '''AudioOutState''' (0x00=Started, 0x01=Stopped). | + | No input. Returns an output [[#AudioOutState]]. |
| + | |
| + | === Start === |
| + | No input/output. |
| | | |
− | === StartAudioOut ===
| |
| Starts audio playback using data from appended buffers. | | Starts audio playback using data from appended buffers. |
| | | |
− | === StopAudioOut === | + | === Stop === |
| + | No input/output. |
| + | |
| Stops audio playback. This waits for audio playback to finish before returning. | | Stops audio playback. This waits for audio playback to finish before returning. |
| | | |
| === AppendAudioOutBuffer === | | === AppendAudioOutBuffer === |
− | Takes a type-5 input buffer for sample data and a u64 which acts as a tag for the supplied buffer (official apps use the buffer's address). | + | Takes a type-0x5 input buffer containing an [[#AudioOutBuffer]] and an input u64 '''BufferClientPtr'''. No output. |
| + | |
| + | === RegisterBufferEvent === |
| + | No input. Returns an output Event handle. |
| | | |
− | The format of the input buffer is as follows: | + | The event is signalled when a buffer is released. |
− | {| class="wikitable" border="1"
| |
− | |-
| |
− | ! Offset || Size || Description
| |
− | |-
| |
− | | 0x00 || 8 || Pointer to next buffer (unused)
| |
− | |-
| |
− | | 0x08 || 8 || Pointer to sample buffer
| |
− | |-
| |
− | | 0x10 || 8 || Capacity of sample buffer
| |
− | |-
| |
− | | 0x18 || 8 || Size of data in the sample buffer
| |
− | |-
| |
− | | 0x20 || 8 || Offset of data in the sample buffer (unused/ignored?)
| |
− | |}
| |
| | | |
− | === RegisterBufferEvent === | + | === GetReleasedAudioOutBuffers === |
− | Returns an event handle that is signalled when a buffer is released. | + | Takes a type-0x6 output buffer '''AudioBuffer'''. Returns an output u32 '''Count'''. |
| | | |
− | === GetReleasedAudioOutBuffer ===
| + | '''AudioBuffer''' will be filled with the identifiers from [[#AppendAudioOutBuffer]] of audio buffers that have been released. |
− | Takes a type-6 output buffer which will be filled with the identifiers from [[#AppendAudioOutBuffer]] of audio buffers that have been released.
| |
− | Returns an u32 '''ReleasedBuffersCount'''.
| |
| | | |
| === ContainsAudioOutBuffer === | | === ContainsAudioOutBuffer === |
− | Takes an u64 '''tag''' for the desired buffer. Returns 1 if the buffer was appended and not yet released. | + | Takes an input u64 '''AudioBufferPointer'''. Returns an output bool '''Contains'''. |
| | | |
| === AppendAudioOutBufferAuto === | | === AppendAudioOutBufferAuto === |
− | Same as [[#AppendAudioOutBuffer]] but takes a type-0x21 buffer instead. | + | Same as [[#AppendAudioOutBuffer]], but takes a type-0x21 buffer instead. |
| + | |
| + | === GetReleasedAudioOutBuffersAuto === |
| + | Same as [[#GetReleasedAudioOutBuffer]], but takes a type-0x22 buffer instead. |
| + | |
| + | === GetAudioOutBufferCount === |
| + | No input. Returns an output u32 '''AudioOutBufferCount'''. |
| + | |
| + | === GetAudioOutPlayedSampleCount === |
| + | No input. Returns an output u64 '''AudioOutPlayedSampleCount'''. |
| + | |
| + | === FlushAudioOutBuffers === |
| + | No input. Returns an output bool '''Pending'''. |
| + | |
| + | === SetAudioOutVolume === |
| + | Takes an input float '''AudioOutVolume'''. No output. |
| | | |
− | === GetReleasedAudioOutBufferAuto === | + | === GetAudioOutVolume === |
− | Same as [[#GetReleasedAudioOutBuffer]] but takes a type-0x22 buffer instead.
| + | No input. Returns an output float '''AudioOutVolume'''. |
| | | |
| = audin:u = | | = audin:u = |
Line 136: |
Line 120: |
| ! Cmd || Name | | ! Cmd || Name |
| |- | | |- |
− | | 0 || ListAudioIns | + | | 0 || [[#ListAudioIns|ListAudioIns]] |
| + | |- |
| + | | 1 || [[#OpenAudioIn|OpenAudioIn]] |
| |- | | |- |
− | | 1 || OpenAudioIn | + | | 2 || [3.0.0+] [[#ListAudioInsAuto|ListAudioInsAuto]] |
| |- | | |- |
− | | 2 || [3.0.0+] ListAudioInsAuto | + | | 3 || [3.0.0+] [[#OpenAudioInAuto|OpenAudioInAuto]] |
| |- | | |- |
− | | 3 || [3.0.0+] OpenAudioInAuto | + | | 4 || [3.0.0+] [[#ListAudioInsAutoFiltered|ListAudioInsAutoFiltered]] |
| |- | | |- |
− | | 4 || [3.0.0+] ListAudioInsAutoFiltered | + | | 5 || [5.0.0+] [[#OpenAudioInProtocolSpecified|OpenAudioInProtocolSpecified]] |
| |} | | |} |
| + | |
| + | == ListAudioIns == |
| + | Takes a type-0x6 output buffer containing an array of [[#AudioInInfo]]. Returns an u32 '''Count'''. |
| + | |
| + | == OpenAudioIn == |
| + | Takes a PID-descriptor, a type-0x5 input buffer '''NameIn''', a type-0x6 output buffer '''NameOut''', an input [[#AudioInParameter]], an input Process handle and an input [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]]. Returns an [[#IAudioIn]] and an an output [[#AudioInParameterInternal]]. |
| + | |
| + | == ListAudioInsAuto == |
| + | Same as [[#ListAudioIns]], but takes a type-0x22 output buffer instead. |
| + | |
| + | == OpenAudioInAuto == |
| + | Same as [[#OpenAudioIn]], but takes a type-0x21 input buffer and a type-0x22 output buffer instead. |
| + | |
| + | == ListAudioInsAutoFiltered == |
| + | Same as [[#ListAudioInsAuto]]. |
| + | |
| + | == OpenAudioInProtocolSpecified == |
| + | Same as [[#OpenAudioIn]], but takes an additional input u64 '''Protocol'''. |
| | | |
| == IAudioIn == | | == IAudioIn == |
Line 154: |
Line 158: |
| ! Cmd || Name | | ! Cmd || Name |
| |- | | |- |
− | | 0 || [[#GetAudioInState]] | + | | 0 || [[#GetAudioInState|GetAudioInState]] |
| |- | | |- |
− | | 1 || StartAudioIn | + | | 1 || [[#Start_2|Start]] |
| |- | | |- |
− | | 2 || StopAudioIn | + | | 2 || [[#Stop_2|Stop]] |
| |- | | |- |
− | | 3 || AppendAudioInBuffer | + | | 3 || [[#AppendAudioInBuffer|AppendAudioInBuffer]] |
| |- | | |- |
− | | 4 || RegisterBufferEvent | + | | 4 || [[#RegisterBufferEvent_2|RegisterBufferEvent]] |
| |- | | |- |
− | | 5 || GetReleasedAudioInBuffer | + | | 5 || [[#GetReleasedAudioInBuffers|GetReleasedAudioInBuffers]] |
| |- | | |- |
− | | 6 || ContainsAudioInBuffer | + | | 6 || [[#ContainsAudioInBuffer|ContainsAudioInBuffer]] |
| |- | | |- |
− | | 7 || [3.0.0+] AppendAudioInBufferWithUserEvent | + | | 7 || [3.0.0+] [[#AppendUacInBuffer|AppendUacInBuffer]] |
| |- | | |- |
− | | 8 || [3.0.0+] AppendAudioInBufferAuto | + | | 8 || [3.0.0+] [[#AppendAudioInBufferAuto|AppendAudioInBufferAuto]] |
| |- | | |- |
− | | 9 || [3.0.0+] GetReleasedAudioInBufferAuto | + | | 9 || [3.0.0+] [[#GetReleasedAudioInBuffersAuto|GetReleasedAudioInBuffersAuto]] |
| |- | | |- |
− | | 10 || [3.0.0+] AppendAudioInBufferWithUserEventAuto | + | | 10 || [3.0.0+] [[#AppendUacInBufferAuto|AppendUacInBufferAuto]] |
| |- | | |- |
− | | 11 || [4.0.0+] GetAudioInBufferCount | + | | 11 || [4.0.0+] [[#GetAudioInBufferCount|GetAudioInBufferCount]] |
| |- | | |- |
− | | 12 || [4.0.0+] SetAudioInDeviceGain | + | | 12 || [4.0.0+] [[#SetDeviceGain|SetDeviceGain]] |
| |- | | |- |
− | | 13 || [4.0.0+] GetAudioInDeviceGain | + | | 13 || [4.0.0+] [[#GetDeviceGain|GetDeviceGain]] |
| |- | | |- |
− | | 14 || [6.0.0+] FlushAudioInBuffers | + | | 14 || [6.0.0+] [[#FlushAudioInBuffers|FlushAudioInBuffers]] |
| |} | | |} |
| | | |
| === GetAudioInState === | | === GetAudioInState === |
− | Returns an u32 '''AudioInState''' (0x00=Started, 0x01=Stopped). | + | No input. Returns an output [[#AudioInState]]. |
| + | |
| + | === Start === |
| + | No input/output. |
| + | |
| + | === Stop === |
| + | No input/output. |
| + | |
| + | === AppendAudioInBuffer === |
| + | Takes a type-0x5 input buffer containing an [[#AudioInBuffer]] and an input u64 '''BufferClientPtr'''. No output. |
| + | |
| + | === RegisterBufferEvent === |
| + | No input. Returns an output Event handle. |
| + | |
| + | The event is signalled when a buffer is released. |
| + | |
| + | === GetReleasedAudioInBuffers === |
| + | Takes a type-0x6 output buffer '''AudioBuffer'''. Returns an output u32 '''Count'''. |
| + | |
| + | '''AudioBuffer''' will be filled with the identifiers from [[#AppendAudioInBuffer]] of audio buffers that have been released. |
| + | |
| + | === ContainsAudioInBuffer === |
| + | Takes an input u64 '''AudioBufferPointer'''. Returns an output bool '''Contains'''. |
| + | |
| + | === AppendUacInBuffer === |
| + | Takes a type-0x5 input buffer containing an '''UacInBuffer''', an input u64 '''BufferClientPtr''' and an input Event handle. No output. |
| + | |
| + | === AppendAudioInBufferAuto === |
| + | Same as [[#AppendAudioInBuffer]], but takes a type-0x21 buffer instead. |
| + | |
| + | === GetReleasedAudioInBuffersAuto === |
| + | Same as [[#GetReleasedAudioInBuffer]], but takes a type-0x22 buffer instead. |
| + | |
| + | === AppendUacInBufferAuto === |
| + | Same as [[#AppendUacInBuffer]], but takes a type-0x21 buffer instead. |
| + | |
| + | === GetAudioInBufferCount === |
| + | No input. Returns an output u32 '''AudioInBufferCount'''. |
| + | |
| + | === SetDeviceGain === |
| + | Takes an input float '''DeviceGain'''. No output. |
| + | |
| + | === GetDeviceGain === |
| + | No input. Returns an output float '''DeviceGain'''. |
| + | |
| + | === FlushAudioInBuffers === |
| + | No input. Returns an output bool '''Pending'''. |
| | | |
| = audrec:u = | | = audrec:u = |
Line 195: |
Line 245: |
| ! Cmd || Name | | ! Cmd || Name |
| |- | | |- |
− | | 0 || OpenFinalOutputRecorder | + | | 0 || [[#OpenFinalOutputRecorder]] |
| |} | | |} |
| + | |
| + | == OpenFinalOutputRecorder == |
| + | Takes an input [[#FinalOutputRecorderParameter]], an input Process handle and an input [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]]. Returns an [[#IFinalOutputRecorder]] and an output [[#FinalOutputRecorderParameterInternal]]. |
| | | |
| == IFinalOutputRecorder == | | == IFinalOutputRecorder == |
Line 205: |
Line 258: |
| ! Cmd || Name | | ! Cmd || Name |
| |- | | |- |
− | | 0 || GetFinalOutputRecorderState | + | | 0 || [[#GetFinalOutputRecorderState|GetFinalOutputRecorderState]] |
| + | |- |
| + | | 1 || [[#Start_3|Start]] |
| |- | | |- |
− | | 1 || StartFinalOutputRecorder | + | | 2 || [[#Stop_3|Stop]] |
| |- | | |- |
− | | 2 || StopFinalOutputRecorder | + | | 3 || [[#AppendFinalOutputRecorderBuffer|AppendFinalOutputRecorderBuffer]] |
| |- | | |- |
− | | 3 || AppendFinalOutputRecorderBuffer | + | | 4 || [[#RegisterBufferEvent_3|RegisterBufferEvent]] |
| |- | | |- |
− | | 4 || RegisterBufferEvent | + | | 5 || [[#GetReleasedFinalOutputRecorderBuffers|GetReleasedFinalOutputRecorderBuffers]] |
| |- | | |- |
− | | 5 || GetReleasedFinalOutputRecorderBuffer | + | | 6 || [[#ContainsFinalOutputRecorderBuffer|ContainsFinalOutputRecorderBuffer]] |
| |- | | |- |
− | | 6 || ContainsFinalOutputRecorderBuffer | + | | 7 || [[#GetFinalOutputRecorderBufferEndTime|GetFinalOutputRecorderBufferEndTime]] |
| |- | | |- |
− | | 7 || GetFinalOutputRecorderBufferEndTime | + | | 8 || [3.0.0+] [[#AppendFinalOutputRecorderBufferAuto|AppendFinalOutputRecorderBufferAuto]] |
| |- | | |- |
− | | 8 || [3.0.0+] AppendFinalOutputRecorderBufferAuto | + | | 9 || [3.0.0+] [[#GetReleasedFinalOutputRecorderBuffersAuto|GetReleasedFinalOutputRecorderBuffersAuto]] |
| |- | | |- |
− | | 9 || [3.0.0+] GetReleasedFinalOutputRecorderBufferAuto | + | | 10 || [6.0.0+] [[#FlushFinalOutputRecorderBuffers|FlushFinalOutputRecorderBuffers]] |
| |- | | |- |
− | | 10 || [6.0.0+] FlushFinalOutputRecorderBuffers | + | | 11 || [9.0.0+] [[#AttachWorkBuffer|AttachWorkBuffer]] |
| |} | | |} |
| | | |
− | = IAudioSnoopManager = | + | === GetFinalOutputRecorderState === |
| + | No input. Returns an output [[#FinalOutputRecorderState]]. |
| + | |
| + | === Start === |
| + | No input/output. |
| + | |
| + | === Stop === |
| + | No input/output. |
| + | |
| + | === AppendFinalOutputRecorderBuffer === |
| + | Takes a type-0x5 input buffer containing an [[#FinalOutputRecorderBuffer]] and an input u64 '''BufferClientPtr'''. No output. |
| + | |
| + | === RegisterBufferEvent === |
| + | No input. Returns an output Event handle. |
| + | |
| + | The event is signalled when a buffer is released. |
| + | |
| + | === GetReleasedFinalOutputRecorderBuffers === |
| + | Takes a type-0x6 output buffer '''FinalOutputRecorderBuffer'''. Returns two output u64s '''Count''' and '''Released'''. |
| + | |
| + | '''FinalOutputRecorderBuffer''' will be filled with the identifiers from [[#AppendFinalOutputRecorderBuffer]] of recorder buffers that have been released. |
| + | |
| + | === ContainsFinalOutputRecorderBuffer === |
| + | Takes an input u64 '''FinalOutputRecorderBufferPointer'''. Returns an output bool '''Contains'''. |
| + | |
| + | === GetFinalOutputRecorderBufferEndTime === |
| + | Takes an input u64 '''FinalOutputRecorderBufferPointer'''. Returns an output u64 '''Released'''. |
| + | |
| + | === AppendFinalOutputRecorderBufferAuto === |
| + | Same as [[#AppendFinalOutputRecorderBuffer]], but takes a type-0x21 buffer instead. |
| + | |
| + | === GetReleasedFinalOutputRecorderBuffersAuto === |
| + | Same as [[#GetReleasedFinalOutputRecorderBuffers]], but takes a type-0x22 buffer instead. |
| + | |
| + | === FlushFinalOutputRecorderBuffers === |
| + | No input. Returns an output bool '''Pending'''. |
| + | |
| + | === AttachWorkBuffer === |
| + | Takes an input [[#FinalOutputRecorderWorkBufferParameterInternal]]. No output. |
| + | |
| + | = auddev = |
| This is "nn::audio::detail::IAudioSnoopManager". | | This is "nn::audio::detail::IAudioSnoopManager". |
| | | |
Line 237: |
Line 332: |
| ! Cmd || Name | | ! Cmd || Name |
| |- | | |- |
− | | 0 || | + | | 0 || [17.0.0+] GetDspStatistics ([6.0.0-16.1.0] EnableDspUsageMeasurement) |
| |- | | |- |
− | | 1 || | + | | 1 || [6.0.0-16.1.0] DisableDspUsageMeasurement |
| |- | | |- |
− | | 6 || | + | | 6 || [6.0.0-16.1.0] GetDspUsage |
| |} | | |} |
| | | |
Line 295: |
Line 390: |
| |- | | |- |
| | 11 || [3.0.0+] ExecuteAudioRendererRendering | | | 11 || [3.0.0+] ExecuteAudioRendererRendering |
| + | |- |
| + | | 12 || [15.0.0+] SetVoiceDropParameter |
| + | |- |
| + | | 13 || [15.0.0+] GetVoiceDropParameter |
| |} | | |} |
| | | |
| === GetSampleRate === | | === GetSampleRate === |
− | Returns the Sample Rate. (u32) | + | No input. Returns an u32 '''SampleRate'''. |
| | | |
| === GetSampleCount === | | === GetSampleCount === |
− | Returns the Sample Count. (u32) | + | No input. Returns an u32 '''SampleCount'''. |
| | | |
| === GetMixBufferCount === | | === GetMixBufferCount === |
− | Returns the number of Mix Buffers. (u32) | + | No input. Returns an u32 '''MixBufferCount'''. |
| | | |
− | === GetAudioRendererState === | + | === GetState === |
− | Returns an AudioRenderState, 0x00=Started 0x01=Stopped (u32) | + | No input. Returns an u32 '''State''' (0=Started, 1=Stopped). |
| | | |
| === SetRenderingTimeLimit === | | === SetRenderingTimeLimit === |
− | Takes a upper limit of the rendering time in percent. (u32) | + | Takes an u32 '''RenderingTimeLimit'''. No output. |
| | | |
| === GetRenderingTimeLimit === | | === GetRenderingTimeLimit === |
− | Returns the upper limit of the rendering time in percent. (u32) | + | No input. Returns an u32 '''RenderingTimeLimit'''. |
| | | |
| == IAudioDevice == | | == IAudioDevice == |
Line 346: |
Line 445: |
| | 12 || [3.0.0+] QueryAudioDeviceOutputEvent | | | 12 || [3.0.0+] QueryAudioDeviceOutputEvent |
| |- | | |- |
− | | 13 || [5.0.0+] GetAudioSystemMasterVolumeSetting | + | | 13 || [13.0.0+] [[#GetActiveAudioOutputDeviceName]] ([5.0.0-12.1.0] [[#GetAudioSystemMasterVolumeSetting]]) |
| + | |- |
| + | | 14 || [13.0.0+] ListAudioOutputDeviceName |
| + | |- |
| + | | 15 || [17.0.0+] AcquireAudioInputDeviceNotification |
| + | |- |
| + | | 16 || [17.0.0+] ReleaseAudioInputDeviceNotification |
| + | |- |
| + | | 17 || [17.0.0+] AcquireAudioOutputDeviceNotification |
| + | |- |
| + | | 18 || [17.0.0+] ReleaseAudioOutputDeviceNotification |
| + | |- |
| + | | 19 || [18.0.0+] SetAudioDeviceOutputVolumeAutoTuneEnabled |
| + | |- |
| + | | 20 || [18.0.0+] IsAudioDeviceOutputVolumeAutoTuneEnabled |
| |} | | |} |
| | | |
| === ListAudioDeviceName === | | === ListAudioDeviceName === |
− | Takes a type-0x6 output buffer containing an array of '''DeviceName''', returns an output s32 for total number of output entries. | + | Takes a type-0x6 output buffer containing an array of '''DeviceName'''. Returns an output s32 for total number of output entries. |
| | | |
| === SetAudioDeviceOutputVolume === | | === SetAudioDeviceOutputVolume === |
Line 359: |
Line 472: |
| | | |
| === ListAudioDeviceNameAuto === | | === ListAudioDeviceNameAuto === |
− | Takes a type-0x22 output buffer containing an array of '''DeviceName''', returns an output s32 for total number of output entries. | + | Takes a type-0x22 output buffer containing an array of '''DeviceName'''. Returns an output s32 for total number of output entries. |
| | | |
| === SetAudioDeviceOutputVolumeAuto === | | === SetAudioDeviceOutputVolumeAuto === |
Line 366: |
Line 479: |
| === 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. |
| | | |
| = audout:a = | | = audout:a = |
| This is "nn::audio::detail::IAudioOutManagerForApplet". | | This is "nn::audio::detail::IAudioOutManagerForApplet". |
| + | |
| + | This was removed with [11.0.0+]. |
| | | |
| {| class="wikitable" border="1" | | {| class="wikitable" border="1" |
Line 374: |
Line 495: |
| ! Cmd || Name | | ! Cmd || Name |
| |- | | |- |
− | | 0 || RequestSuspendAudioOuts | + | | 0 || RequestSuspend |
| |- | | |- |
− | | 1 || RequestResumeAudioOuts | + | | 1 || RequestResume |
| |- | | |- |
− | | 2 || GetAudioOutsProcessMasterVolume | + | | 2 || GetProcessMasterVolume |
| |- | | |- |
− | | 3 || SetAudioOutsProcessMasterVolume | + | | 3 || SetProcessMasterVolume |
| |- | | |- |
− | | 4 || [4.0.0+] GetAudioOutsProcessRecordVolume | + | | 4 || [4.0.0+] GetProcessRecordVolume |
| |- | | |- |
− | | 5 || [4.0.0+] SetAudioOutsProcessRecordVolume | + | | 5 || [4.0.0+] SetProcessRecordVolume |
| |} | | |} |
| + | |
| + | [4.0.0+] RequestSuspend/RequestResume no longer returns an output handle. |
| | | |
| = audin:a = | | = audin:a = |
| This is "nn::audio::detail::IAudioInManagerForApplet". | | This is "nn::audio::detail::IAudioInManagerForApplet". |
| + | |
| + | This was removed with [11.0.0+]. |
| | | |
| {| class="wikitable" border="1" | | {| class="wikitable" border="1" |
Line 394: |
Line 519: |
| ! Cmd || Name | | ! Cmd || Name |
| |- | | |- |
− | | 0 || RequestSuspendAudioIns | + | | 0 || RequestSuspend |
| |- | | |- |
− | | 1 || RequestResumeAudioIns | + | | 1 || RequestResume |
| |- | | |- |
− | | 2 || GetAudioInsProcessMasterVolume | + | | 2 || GetProcessMasterVolume |
| |- | | |- |
− | | 3 || SetAudioInsProcessMasterVolume | + | | 3 || SetProcessMasterVolume |
| |} | | |} |
| + | |
| + | [4.0.0+] RequestSuspend/RequestResume no longer returns an output handle. |
| | | |
| = audrec:a = | | = audrec:a = |
Line 410: |
Line 537: |
| ! Cmd || Name | | ! Cmd || Name |
| |- | | |- |
− | | 0 || RequestSuspendFinalOutputRecorders | + | | 0 || RequestSuspend |
| |- | | |- |
− | | 1 || RequestResumeFinalOutputRecorders | + | | 1 || RequestResume |
| |} | | |} |
| + | |
| + | [4.0.0+] RequestSuspend/RequestResume no longer returns an output handle. |
| | | |
| = audren:a = | | = audren:a = |
| This is "nn::audio::detail::IAudioRendererManagerForApplet". | | This is "nn::audio::detail::IAudioRendererManagerForApplet". |
| + | |
| + | This was removed with [11.0.0+]. |
| | | |
| {| class="wikitable" border="1" | | {| class="wikitable" border="1" |
Line 422: |
Line 553: |
| ! Cmd || Name | | ! Cmd || Name |
| |- | | |- |
− | | 0 || RequestSuspendAudioRenderers | + | | 0 || RequestSuspend |
| |- | | |- |
− | | 1 || RequestResumeAudioRenderers | + | | 1 || RequestResume |
| |- | | |- |
− | | 2 || GetAudioRenderersProcessMasterVolume | + | | 2 || GetProcessMasterVolume |
| |- | | |- |
− | | 3 || SetAudioRenderersProcessMasterVolume | + | | 3 || SetProcessMasterVolume |
| |- | | |- |
| | 4 || RegisterAppletResourceUserId | | | 4 || RegisterAppletResourceUserId |
Line 434: |
Line 565: |
| | 5 || UnregisterAppletResourceUserId | | | 5 || UnregisterAppletResourceUserId |
| |- | | |- |
− | | 6 || [4.0.0+] GetAudioRenderersProcessRecordVolume | + | | 6 || [4.0.0+] GetProcessRecordVolume |
| |- | | |- |
− | | 7 || [4.0.0+] SetAudioRenderersProcessRecordVolume | + | | 7 || [4.0.0+] SetProcessRecordVolume |
| |} | | |} |
| + | |
| + | [4.0.0+] RequestSuspend/RequestResume no longer returns an output handle. |
| | | |
| = audout:d, audin:d, audrec:d, audren:d = | | = audout:d, audin:d, audrec:d, audren:d = |
| This is "nn::audio::detail::IAudioOutManagerForDebugger", "nn::audio::detail::IAudioInManagerForDebugger", "nn::audio::detail::IFinalOutputRecorderManagerForDebugger", "nn::audio::detail::IAudioRendererManagerForDebugger". | | This is "nn::audio::detail::IAudioOutManagerForDebugger", "nn::audio::detail::IAudioInManagerForDebugger", "nn::audio::detail::IFinalOutputRecorderManagerForDebugger", "nn::audio::detail::IAudioRendererManagerForDebugger". |
| + | |
| + | These were removed with [11.0.0+]. |
| | | |
| {| class="wikitable" border="1" | | {| class="wikitable" border="1" |
Line 446: |
Line 581: |
| ! Cmd || Name | | ! Cmd || Name |
| |- | | |- |
− | | 0 || [[#RequestSuspendForDebug]] | + | | 0 || [[#RequestSuspend]] |
| |- | | |- |
− | | 1 || [[#RequestResumeForDebug]] | + | | 1 || [[#RequestResume]] |
| |} | | |} |
| | | |
− | == RequestSuspendForDebug == | + | == RequestSuspend == |
| Takes an u64 [[AM_services#AppletResourceUserId|AppletResourceUserId]]. | | Takes an u64 [[AM_services#AppletResourceUserId|AppletResourceUserId]]. |
| | | |
− | == RequestResumeForDebug == | + | == RequestResume == |
| Takes an u64 [[AM_services#AppletResourceUserId|AppletResourceUserId]]. | | Takes an u64 [[AM_services#AppletResourceUserId|AppletResourceUserId]]. |
| | | |
Line 476: |
Line 611: |
| | 5 || SetTargetMute | | | 5 || SetTargetMute |
| |- | | |- |
− | | 6 || IsTargetConnected | + | | 6 || [1.0.0-17.0.1] IsTargetConnected |
| |- | | |- |
| | 7 || SetDefaultTarget | | | 7 || SetDefaultTarget |
Line 486: |
Line 621: |
| | 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 502: |
Line 637: |
| | 18 || [3.0.0+] GetHeadphoneOutputLevelMode | | | 18 || [3.0.0+] GetHeadphoneOutputLevelMode |
| |- | | |- |
− | | 19 || [3.0.0+] AcquireAudioVolumeUpdateEventForPlayReport | + | | 19 || [17.0.0+] SetForceMonauralOutputModeEnabled ([3.0.0-13.2.1] AcquireAudioVolumeUpdateEventForPlayReport) |
| |- | | |- |
− | | 20 || [3.0.0+] AcquireAudioOutputDeviceUpdateEventForPlayReport | + | | 20 || [17.0.0+] IsForceMonauralOutputModeEnabled ([3.0.0-13.2.1] AcquireAudioOutputDeviceUpdateEventForPlayReport) |
| |- | | |- |
− | | 21 || [3.0.0+] GetAudioOutputTargetForPlayReport | + | | 21 || [3.0.0-13.2.1] GetAudioOutputTargetForPlayReport |
| |- | | |- |
| | 22 || [3.0.0+] NotifyHeadphoneVolumeWarningDisplayedEvent | | | 22 || [3.0.0+] NotifyHeadphoneVolumeWarningDisplayedEvent |
Line 514: |
Line 649: |
| | 24 || [4.0.0+] GetSystemOutputMasterVolume | | | 24 || [4.0.0+] GetSystemOutputMasterVolume |
| |- | | |- |
− | | 25 || [4.0.0+] GetAudioVolumeDataForPlayReport | + | | 25 || [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+] SetVolumeButtonLongPressTime |
| + | |- |
| + | | 42 || [15.0.0+] SetNativeVolumeForDebug |
| + | |- |
| + | | 5000 || [19.0.0+] |
| + | |- |
| + | | 10000 || [13.0.0+] NotifyAudioOutputTargetForPlayReport |
| + | |- |
| + | | 10001 || [13.0.0+] NotifyAudioOutputChannelCountForPlayReport |
| + | |- |
| + | | 10002 || [13.0.0+] NotifyUnsupportedUsbOutputDeviceAttachedForPlayReport |
| + | |- |
| + | | 10100 || [14.0.0+] GetAudioVolumeDataForPlayReport |
| + | |- |
| + | | 10101 || [14.0.0+] BindAudioVolumeUpdateEventForPlayReport |
| + | |- |
| + | | 10102 || [14.0.0+] BindAudioOutputTargetUpdateEventForPlayReport |
| + | |- |
| + | | 10103 || [14.0.0+] GetAudioOutputTargetForPlayReport |
| + | |- |
| + | | 10104 || [14.0.0+] GetAudioOutputChannelCountForPlayReport |
| + | |- |
| + | | 10105 || [14.0.0+] BindAudioOutputChannelCountUpdateEventForPlayReport |
| + | |- |
| + | | 10106 || [14.0.0+] GetDefaultAudioOutputTargetForPlayReport |
| + | |- |
| + | | 50000 || [15.0.0-18.1.0] SetAnalogInputBoostGainForPrototyping |
| + | |- |
| + | | 50001 || [19.0.0+] OverrideDefaultTargetForDebug |
| |- | | |- |
− | | 26 || [4.0.0+] UpdateHeadphoneSettings | + | | 50003 || [19.0.0+] SetForceOverrideExternalDeviceNameForDebug |
| |- | | |- |
− | | 27 || [7.0.0+] | + | | 50004 || [19.0.0+] ClearForceOverrideExternalDeviceNameForDebug |
| |} | | |} |
| + | |
| + | == GetAudioVolumeDataForPlayReport == |
| + | No input, returns a total of 7-bytes of output. |
| + | |
| + | [13.0.0+] No input, returns a total of 9-bytes of output. |
| + | |
| + | == UpdateHeadphoneSettings == |
| + | Takes one input bool. No output. |
| + | NS calls this with the result of [[Parental_Control_services#IParentalControlService|IParentalControlService::IsRestrictionEnabled]]. |
| + | |
| + | == GetSystemInformationForDebug == |
| + | Takes a type-0x1A output buffer. |
| + | |
| + | [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. |
| | | |
| = codecctl = | | = codecctl = |
Line 530: |
Line 741: |
| ! Cmd || Name | | ! Cmd || Name |
| |- | | |- |
− | | 0 || [[#InitializeCodecController]] | + | | 0 || [[#Initialize]] |
| |- | | |- |
− | | 1 || [[#FinalizeCodecController]] | + | | 1 || [[#Finalize]] |
| |- | | |- |
− | | 2 || [[#SleepCodecController]] | + | | 2 || [[#Sleep]] |
| |- | | |- |
− | | 3 || [[#WakeCodecController]] | + | | 3 || [[#Wake]] |
| |- | | |- |
− | | 4 || [[#SetCodecVolume]] | + | | 4 || [[#SetVolume]] |
| |- | | |- |
− | | 5 || [[#GetCodecVolumeMax]] | + | | 5 || [[#GetVolumeMax]] |
| |- | | |- |
− | | 6 || [[#GetCodecVolumeMin]] | + | | 6 || [[#GetVolumeMin]] |
| |- | | |- |
− | | 7 || [[#SetCodecActiveTarget]] | + | | 7 || [[#SetActiveTarget]] |
| |- | | |- |
− | | 8 || [[#GetCodecActiveTarget]] | + | | 8 || [[#GetActiveTarget]] |
| |- | | |- |
− | | 9 || [[#BindCodecHeadphoneMicJackInterrupt]] | + | | 9 || [[#BindHeadphoneMicJackInterrupt]] |
| |- | | |- |
− | | 10 || [[#IsCodecHeadphoneMicJackInserted]] | + | | 10 || [[#IsHeadphoneMicJackInserted]] |
| |- | | |- |
− | | 11 || [[#ClearCodecHeadphoneMicJackInterrupt]] | + | | 11 || [[#ClearHeadphoneMicJackInterrupt]] |
| |- | | |- |
− | | 12 || [[#IsCodecDeviceRequested]] | + | | 12 || [[#IsRequested]] |
| |} | | |} |
| | | |
− | == InitializeCodecController == | + | == Initialize == |
− | Takes no input.
| + | No input/output. |
| | | |
− | == FinalizeCodecController == | + | == Finalize == |
− | Takes no input.
| + | No input/output. |
| | | |
− | == SleepCodecController == | + | == Sleep == |
− | Takes no input.
| + | No input/output. |
| | | |
− | == WakeCodecController == | + | == Wake == |
− | Takes no input.
| + | No input/output. |
| | | |
− | == SetCodecVolume == | + | == SetVolume == |
− | Takes an u32 '''Volume'''. | + | Takes an u32 '''Volume'''. No output. |
| | | |
− | == GetCodecVolumeMax == | + | == GetVolumeMax == |
− | Returns an u32 '''VolumeMax'''. | + | No input. Returns an u32 '''VolumeMax'''. |
| | | |
− | == GetCodecVolumeMin == | + | == GetVolumeMin == |
− | Returns an u32 '''VolumeMin'''. | + | No input. Returns an u32 '''VolumeMin'''. |
| | | |
− | == SetCodecActiveTarget == | + | == SetActiveTarget == |
− | Takes an u32 '''Target'''. | + | Takes an u32 '''Target'''. No output. |
| | | |
− | == GetCodecActiveTarget == | + | == GetActiveTarget == |
− | Returns an u32 '''Target'''. | + | No input. Returns an u32 '''Target'''. |
| | | |
− | == BindCodecHeadphoneMicJackInterrupt == | + | == BindHeadphoneMicJackInterrupt == |
− | Returns an event handle. | + | No input. Returns an event handle. |
| | | |
− | == IsCodecHeadphoneMicJackInserted == | + | == IsHeadphoneMicJackInserted == |
− | Returns a bool. | + | No input. Returns a bool. |
| | | |
− | == ClearCodecHeadphoneMicJackInterrupt == | + | == ClearHeadphoneMicJackInterrupt == |
− | Takes no input.
| + | No input/output. |
| | | |
− | == IsCodecDeviceRequested == | + | == IsRequested == |
− | Returns a bool. | + | No input. Returns a bool. |
| | | |
| = hwopus = | | = hwopus = |
Line 603: |
Line 814: |
| ! Cmd || Name | | ! Cmd || Name |
| |- | | |- |
− | | 0 || [[#Initialize]] | + | | 0 || [[#OpenHardwareOpusDecoder]] |
| |- | | |- |
| | 1 || [[#GetWorkBufferSize]] | | | 1 || [[#GetWorkBufferSize]] |
Line 610: |
Line 821: |
| |- | | |- |
| | 3 || [3.0.0+] [[#GetWorkBufferSizeForMultiStream]] | | | 3 || [3.0.0+] [[#GetWorkBufferSizeForMultiStream]] |
| + | |- |
| + | | 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). |
| | | |
− | == Initialize == | + | == OpenHardwareOpusDecoder == |
| Takes two s32s '''SampleRate''' and '''ChannelCount''' packed as an u64, 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 two s32s '''SampleRate''' and '''ChannelCount''' packed as an u64, an u32 '''WorkBufferSize''' and a TransferMemory handle for '''WorkBuffer'''. Returns an [[#IHardwareOpusDecoder]] object. The TransferMemory is created by the user-process with permissions=0. |
| | | |
− | == GetWorkBufferSize== | + | == GetWorkBufferSize == |
| Takes two s32s '''SampleRate''' and '''ChannelCount''' packed as an u64. Returns the u32 required size for the decoder's work buffer. Official user-processes align the output size to page-alignment. | | Takes two s32s '''SampleRate''' and '''ChannelCount''' packed as an u64. Returns the u32 required size for the decoder's work buffer. Official user-processes align the output size to page-alignment. |
| | | |
Line 623: |
Line 846: |
| 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 [[#MultiStreamParameters]] 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. | + | 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 [[#MultiStreamParameters]] struct. | + | The input buffer is a [[#OpusMultiStreamParameters]] struct. |
| | | |
− | == MultiStreamParameters == | + | == OpenHardwareOpusDecoderEx == |
− | {| class="wikitable" border="1"
| + | 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. |
− | |-
| + | |
− | ! Offset
| + | 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. |
− | ! Size
| + | |
− | ! Description
| + | == 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. |
− | | 0x0
| + | |
− | | 0x4
| + | == OpenHardwareOpusDecoderForMultiStreamEx == |
− | | Sample rate (Hz)
| + | 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. |
− | |-
| + | |
− | | 0x4
| + | 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. |
− | | 0x4
| + | |
− | | Number of channels
| + | == 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. |
− | | 0x8
| + | |
− | | 0x4
| + | The input buffer is a [[#OpusMultiStreamParametersEx]] struct. |
− | | Number of streams
| |
− | |-
| |
− | | 0xC
| |
− | | 0x4
| |
− | | Number of stereo streams
| |
− | |-
| |
− | | 0x10
| |
− | | 0x100
| |
− | | u8 array of channel mappings
| |
− | |}
| |
| | | |
| == IHardwareOpusDecoder == | | == IHardwareOpusDecoder == |
Line 665: |
Line 878: |
| ! Cmd || Name | | ! Cmd || Name |
| |- | | |- |
− | | 0 || [4.0.0+] [[#DecodeInterleavedOld]] ([1.0.0-3.0.2] [[#DecodeInterleavedOld|#DecodeInterleaved]]) | + | | 0 || [4.0.0+] [[#DecodeInterleavedOld]] ([1.0.0-3.0.2] DecodeInterleaved) |
| |- | | |- |
| | 1 || [[#SetContext]] | | | 1 || [[#SetContext]] |
Line 677: |
Line 890: |
| | 5 || [6.0.0+] [[#DecodeInterleavedForMultiStreamWithPerfOld]] ([4.0.0-5.1.0] DecodeInterleavedForMultiStreamWithPerf) | | | 5 || [6.0.0+] [[#DecodeInterleavedForMultiStreamWithPerfOld]] ([4.0.0-5.1.0] DecodeInterleavedForMultiStreamWithPerf) |
| |- | | |- |
− | | 6 || [6.0.0+] [[#DecodeInterleaved]] | + | | 6 || [6.0.0+] DecodeInterleavedWithPerfAndResetOld ([6.0.0-6.2.0] DecodeInterleaved) |
| |- | | |- |
− | | 7 || [6.0.0+] [[#DecodeInterleavedForMultiStream]] | + | | 7 || [6.0.0+] DecodeInterleavedForMultiStreamWithPerfAndResetOld ([6.0.0-6.2.0] DecodeInterleavedForMultiStream) |
| |- | | |- |
− | | 8 || [7.0.0+] | + | | 8 || [7.0.0+] [[#DecodeInterleaved]] |
| |- | | |- |
− | | 9 || [7.0.0+] | + | | 9 || [7.0.0+] [[#DecodeInterleavedForMultiStream]] |
| |} | | |} |
| | | |
| === DecodeInterleavedOld === | | === DecodeInterleavedOld === |
− | Takes a type-5 input buffer ('''OpusDataIn''') and a type-6 output buffer ('''PcmDataOut'''). Decodes the Opus source data to PCM and returns output s32 '''DecodedDataSize''' and s32 '''DecodedSampleCount'''. | + | Takes a type-0x5 input buffer ('''OpusDataIn''') and a type-0x6 output buffer ('''PcmDataOut'''). Decodes the Opus source data to PCM and returns output s32 '''DecodedDataSize''' and s32 '''DecodedSampleCount'''. |
| | | |
| Calls the same func as [[#DecodeInterleaved]] internally with flag=0 and out_u64_ptr=NULL. | | Calls the same func as [[#DecodeInterleaved]] internally with flag=0 and out_u64_ptr=NULL. |
| | | |
| === SetContext === | | === SetContext === |
− | Takes a type-5 input buffer ('''DecoderContextIn'''). Sends the unknown context data to the hardware decoder. The input buffer is unused. | + | Takes a type-0x5 input buffer ('''DecoderContextIn'''). Sends the unknown context data to the hardware decoder. The input buffer is unused. |
| | | |
| === DecodeInterleavedForMultiStreamOld === | | === DecodeInterleavedForMultiStreamOld === |
− | Takes a type-5 input buffer ('''OpusDataIn''') and a type-6 output buffer ('''PcmDataOut'''). Decodes the Opus source data to PCM and returns output s32 '''DecodedDataSize''' and s32 '''DecodedSampleCount'''. | + | Takes a type-0x5 input buffer ('''OpusDataIn''') and a type-0x6 output buffer ('''PcmDataOut'''). Decodes the Opus source data to PCM and returns output s32 '''DecodedDataSize''' and s32 '''DecodedSampleCount'''. |
| | | |
| Calls the same func as [[#DecodeInterleavedForMultiStream]] internally with flag=0 and out_u64_ptr=NULL. | | Calls the same func as [[#DecodeInterleavedForMultiStream]] internally with flag=0 and out_u64_ptr=NULL. |
| | | |
| === SetContextForMultiStream === | | === SetContextForMultiStream === |
− | Takes a type-5 input buffer ('''DecoderContextIn'''). Sends the unknown context data to the hardware decoder. | + | Takes a type-0x5 input buffer ('''DecoderContextIn'''). Sends the unknown context data to the hardware decoder. |
| | | |
| === DecodeInterleavedWithPerfOld === | | === DecodeInterleavedWithPerfOld === |
Line 735: |
Line 948: |
| ! Cmd || Name | | ! Cmd || Name |
| |- | | |- |
− | | 0 || StartDspProfiler | + | | 0 || ProfilerStart |
| + | |- |
| + | | 1 || ProfilerStop |
| + | |- |
| + | | 2 || CpuProfilerStart |
| + | |- |
| + | | 3 || CpuProfilerStop |
| + | |} |
| + | |
| + | = aud:a = |
| + | This is "nn::audio::detail::IAudioSystemManagerForApplet". |
| + | |
| + | This was added with [11.0.0+]. |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Cmd || Name |
| + | |- |
| + | | 0 || RegisterAppletResourceUserId |
| + | |- |
| + | | 1 || UnregisterAppletResourceUserId |
| + | |- |
| + | | 2 || RequestSuspendAudio |
| + | |- |
| + | | 3 || RequestResumeAudio |
| + | |- |
| + | | 4 || GetAudioOutputProcessMasterVolume |
| + | |- |
| + | | 5 || SetAudioOutputProcessMasterVolume |
| + | |- |
| + | | 6 || GetAudioInputProcessMasterVolume |
| + | |- |
| + | | 7 || SetAudioInputProcessMasterVolume |
| |- | | |- |
− | | 1 || StopDspProfiler | + | | 8 || GetAudioOutputProcessRecordVolume |
| |- | | |- |
− | | 2 || StartCpuProfiler | + | | 9 || SetAudioOutputProcessRecordVolume |
| |- | | |- |
− | | 3 || StopCpuProfiler | + | | 10 || [18.0.0+] GetAppletStateSummaries |
| |} | | |} |
| + | |
| + | = aud:d = |
| + | This is "nn::audio::detail::IAudioSystemManagerForDebugger". |
| + | |
| + | This was added with [11.0.0+]. |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Cmd || Name |
| + | |- |
| + | | 0 || RequestSuspendAudioForDebug |
| + | |- |
| + | | 1 || RequestResumeAudioForDebug |
| + | |} |
| + | |
| + | = SampleFormat = |
| + | This is "nn::audio::SampleFormat". |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Value || Name |
| + | |- |
| + | | 0 || Invalid |
| + | |- |
| + | | 1 || PcmInt8 |
| + | |- |
| + | | 2 || PcmInt16 |
| + | |- |
| + | | 3 || PcmInt24 |
| + | |- |
| + | | 4 || PcmInt32 |
| + | |- |
| + | | 5 || PcmFloat |
| + | |- |
| + | | 6 || Adpcm |
| + | |} |
| + | |
| + | = AudioOutState = |
| + | This is "nn::audio::AudioOutState". |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Value || Name |
| + | |- |
| + | | 0 || Started |
| + | |- |
| + | | 1 || Stopped |
| + | |} |
| + | |
| + | = AudioInState = |
| + | This is "nn::audio::AudioInState". |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Value || Name |
| + | |- |
| + | | 0 || Started |
| + | |- |
| + | | 1 || Stopped |
| + | |} |
| + | |
| + | = FinalOutputRecorderState = |
| + | This is "nn::audio::FinalOutputRecorderState". |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Value || Name |
| + | |- |
| + | | 0 || Started |
| + | |- |
| + | | 1 || Stopped |
| + | |} |
| + | |
| + | = AudioOutInfo = |
| + | This is "nn::audio::AudioOutInfo". |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Offset |
| + | ! Size |
| + | ! Description |
| + | |- |
| + | | 0x0 |
| + | | 0x100 |
| + | | Name |
| + | |} |
| + | |
| + | = AudioInInfo = |
| + | This is "nn::audio::AudioInInfo". |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Offset |
| + | ! Size |
| + | ! Description |
| + | |- |
| + | | 0x0 |
| + | | 0x100 |
| + | | Name |
| + | |} |
| + | |
| + | = AudioOutParameter = |
| + | This is "nn::audio::AudioOutParameter". |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Offset |
| + | ! Size |
| + | ! Description |
| + | |- |
| + | | 0x0 |
| + | | 0x4 |
| + | | SampleRate |
| + | |- |
| + | | 0x4 |
| + | | 0x2 |
| + | | ChannelCount |
| + | |- |
| + | | 0x6 |
| + | | 0x2 |
| + | | Reserved |
| + | |} |
| + | |
| + | = AudioInParameter = |
| + | This is "nn::audio::AudioInParameter". |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Offset |
| + | ! Size |
| + | ! Description |
| + | |- |
| + | | 0x0 |
| + | | 0x4 |
| + | | SampleRate |
| + | |- |
| + | | 0x4 |
| + | | 0x2 |
| + | | ChannelCount |
| + | |- |
| + | | 0x6 |
| + | | 0x2 |
| + | | Reserved |
| + | |} |
| + | |
| + | = AudioOutParameterInternal = |
| + | This is "nn::audio::detail::AudioOutParameterInternal". |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Offset |
| + | ! Size |
| + | ! Description |
| + | |- |
| + | | 0x0 |
| + | | 0x4 |
| + | | SampleRate |
| + | |- |
| + | | 0x4 |
| + | | 0x4 |
| + | | ChannelCount |
| + | |- |
| + | | 0x8 |
| + | | 0x4 |
| + | | SampleFormat |
| + | |- |
| + | | 0xC |
| + | | 0x4 |
| + | | State |
| + | |} |
| + | |
| + | = AudioInParameterInternal = |
| + | This is "nn::audio::detail::AudioInParameterInternal". |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Offset |
| + | ! Size |
| + | ! Description |
| + | |- |
| + | | 0x0 |
| + | | 0x4 |
| + | | SampleRate |
| + | |- |
| + | | 0x4 |
| + | | 0x4 |
| + | | ChannelCount |
| + | |- |
| + | | 0x8 |
| + | | 0x4 |
| + | | SampleFormat |
| + | |- |
| + | | 0xC |
| + | | 0x4 |
| + | | State |
| + | |} |
| + | |
| + | = AudioOutBuffer = |
| + | This is "nn::audio::AudioOutBuffer". |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Offset |
| + | ! Size |
| + | ! Description |
| + | |- |
| + | | 0x0 |
| + | | 0x8 |
| + | | Pointer to next buffer (unused) |
| + | |- |
| + | | 0x8 |
| + | | 0x8 |
| + | | Pointer to sample buffer |
| + | |- |
| + | | 0x10 |
| + | | 0x8 |
| + | | Capacity of sample buffer |
| + | |- |
| + | | 0x18 |
| + | | 0x8 |
| + | | Size of data in the sample buffer |
| + | |- |
| + | | 0x20 |
| + | | 0x8 |
| + | | Offset of data in the sample buffer (unused/ignored?) |
| + | |} |
| + | |
| + | = AudioInBuffer = |
| + | This is "nn::audio::AudioInBuffer". |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Offset |
| + | ! Size |
| + | ! Description |
| + | |- |
| + | | 0x0 |
| + | | 0x8 |
| + | | Pointer to next buffer (unused) |
| + | |- |
| + | | 0x8 |
| + | | 0x8 |
| + | | Pointer to sample buffer |
| + | |- |
| + | | 0x10 |
| + | | 0x8 |
| + | | Capacity of sample buffer |
| + | |- |
| + | | 0x18 |
| + | | 0x8 |
| + | | Size of data in the sample buffer |
| + | |- |
| + | | 0x20 |
| + | | 0x8 |
| + | | Offset of data in the sample buffer (unused/ignored?) |
| + | |} |
| + | |
| + | = FinalOutputRecorderBuffer = |
| + | This is "nn::audio::FinalOutputRecorderBuffer". |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Offset |
| + | ! Size |
| + | ! Description |
| + | |- |
| + | | 0x0 |
| + | | 0x8 |
| + | | Released |
| + | |- |
| + | | 0x8 |
| + | | 0x8 |
| + | | Pointer to next buffer (unused) |
| + | |- |
| + | | 0x10 |
| + | | 0x8 |
| + | | Pointer to sample buffer |
| + | |- |
| + | | 0x18 |
| + | | 0x8 |
| + | | Capacity of sample buffer |
| + | |- |
| + | | 0x20 |
| + | | 0x8 |
| + | | Size of data in the sample buffer |
| + | |- |
| + | | 0x28 |
| + | | 0x8 |
| + | | Offset of data in the sample buffer (unused/ignored?) |
| + | |} |
| + | |
| + | = FinalOutputRecorderParameter = |
| + | This is "nn::audio::FinalOutputRecorderParameter". |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Offset |
| + | ! Size |
| + | ! Description |
| + | |- |
| + | | 0x0 |
| + | | 0x4 |
| + | | SampleRate |
| + | |} |
| + | |
| + | = FinalOutputRecorderParameterInternal = |
| + | This is "nn::audio::detail::FinalOutputRecorderParameterInternal". |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Offset |
| + | ! Size |
| + | ! Description |
| + | |- |
| + | | 0x0 |
| + | | 0x4 |
| + | | SampleRate |
| + | |- |
| + | | 0x4 |
| + | | 0x4 |
| + | | ChannelCount |
| + | |- |
| + | | 0x8 |
| + | | 0x4 |
| + | | SampleFormat |
| + | |- |
| + | | 0xC |
| + | | 0x4 |
| + | | State |
| + | |} |
| + | |
| + | = FinalOutputRecorderWorkBufferParameterInternal = |
| + | This is "nn::audio::detail::FinalOutputRecorderWorkBufferParameterInternal". |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Offset |
| + | ! Size |
| + | ! Description |
| + | |- |
| + | | 0x0 |
| + | | 0x8 |
| + | | |
| + | |- |
| + | | 0x8 |
| + | | 0x8 |
| + | | |
| + | |- |
| + | | 0x10 |
| + | | 0x8 |
| + | | |
| + | |} |
| + | |
| + | = 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" |
| + | |- |
| + | ! Offset |
| + | ! Size |
| + | ! Description |
| + | |- |
| + | | 0x0 |
| + | | 0x4 |
| + | | SampleRate |
| + | |- |
| + | | 0x4 |
| + | | 0x4 |
| + | | ChannelCount |
| + | |- |
| + | | 0x8 |
| + | | 0x4 |
| + | | Number of streams |
| + | |- |
| + | | 0xC |
| + | | 0x4 |
| + | | Number of stereo streams |
| + | |- |
| + | | 0x10 |
| + | | 0x100 |
| + | | 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 |
| + | |} |
| + | |
| + | = 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]] |