Audio services: Difference between revisions

 
(7 intermediate revisions by the same user not shown)
Line 341: Line 341:
|-
|-
| 6 || [6.0.0-16.1.0] GetDspUsage
| 6 || [6.0.0-16.1.0] GetDspUsage
|}
= (S2) auddev:s =
This is "nn::audio::sysdev::ISessionManager".
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 0 ||
|-
| 1 ||
|}
== Cmd0 ==
No input, returns an [[#IAdspShellSession|IAdspShellSession]].
== Cmd1 ==
No input, returns an [[#IClientManager|IClientManager]].
== IAdspShellSession ==
This is "nn::audio::adspshell::IAdspShellSession".
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 0 || SendKernelDebugCommand
|-
| 1 || SendFatalErrorCommand
|-
| 2 || SendReadMemoryCommand
|-
| 3 || SendStressTestCommand
|}
== IClientManager ==
This is "nn::audio::dpm::IClientManager".
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 0 ||
|}
=== Cmd0 ===
No input, returns an [[#IClientSession|IClientSession]].
=== IClientSession ===
This is "nn::audio::dpm::IClientSession".
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 0 || CreateProcess
|-
| 1 || WaitProcess
|-
| 2 || TerminateProcess
|}
|}


Line 371: Line 432:
! 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
Line 411: Line 472:
=== 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 417: Line 498:
=== 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 453: Line 539:
| 14 || [13.0.0+] ListAudioOutputDeviceName
| 14 || [13.0.0+] ListAudioOutputDeviceName
|-
|-
| 15 || [17.0.0+] AcquireAudioInputDeviceNotification
| 15 || [17.0.0+] [[#AcquireAudioInputDeviceNotification|AcquireAudioInputDeviceNotification]]
|-
|-
| 16 || [17.0.0+] ReleaseAudioInputDeviceNotification
| 16 || [17.0.0+] [[#ReleaseAudioInputDeviceNotification|ReleaseAudioInputDeviceNotification]]
|-
|-
| 17 || [17.0.0+] AcquireAudioOutputDeviceNotification
| 17 || [17.0.0+] [[#AcquireAudioOutputDeviceNotification|AcquireAudioOutputDeviceNotification]]
|-
|-
| 18 || [17.0.0+] ReleaseAudioOutputDeviceNotification
| 18 || [17.0.0+] [[#ReleaseAudioOutputDeviceNotification|ReleaseAudioOutputDeviceNotification]]
|-
|-
| 19 || [18.0.0+] SetAudioDeviceOutputVolumeAutoTuneEnabled
| 19 || [18.0.0+] SetAudioDeviceOutputVolumeAutoTuneEnabled
Line 491: Line 577:
=== GetActiveAudioOutputDeviceName ===
=== GetActiveAudioOutputDeviceName ===
Takes a type-0x6 output buffer, returns no output.
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 856: Line 962:
|-
|-
| 9 || [16.0.0+] GetWorkBufferSizeForMultiStreamExEx
| 9 || [16.0.0+] GetWorkBufferSizeForMultiStreamExEx
|-
| 100 || [S2]
|}
|}


Line 893: Line 1,001:


The input buffer is a [[#OpusMultiStreamParametersEx]] struct.
The input buffer is a [[#OpusMultiStreamParametersEx]] struct.
== Cmd100 ==
No input, returns an [[#IClientSession_2|IClientSession]].


== IHardwareOpusDecoder ==
== IHardwareOpusDecoder ==
Line 961: Line 1,072:


The bool flag indicates whether or not a reset of the decoder context is being requested.
The bool flag indicates whether or not a reset of the decoder context is being requested.
== IClientSession ==
This is "nn::codec::hwacod::IClientSession".
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 0 ||
|-
| 1 ||
|-
| 10 ||
|}
=== Cmd10 ===
Takes {...}, returns an [[#IHardwareAudioCodecManagerSession|IHardwareAudioCodecManagerSession]].
=== IHardwareAudioCodecManagerSession ===
This is "nn::codec::hwacod::IHardwareAudioCodecManagerSession".
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 0 ||
|-
| 1 ||
|-
| 10 ||
|}


= auddebug =
= auddebug =
Line 1,122: Line 1,264:
|-
|-
| 2301 ||  
| 2301 ||  
|}
= (S2) auddmg:s =
This is "nn::audio::devmgr::ISystemSessionManager".
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 0 ||
|}
== Cmd0 ==
Takes a PID, an u32, an u64 pid_reserved, returns an output [[#ISystemSession|ISystemSession]].
== ISystemSession ==
This is "nn::audio::devmgr::ISystemSession".
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 0 || ListPhysicalDeviceNames
|-
| 1 || EnableSoundDriver
|-
| 2 || DisableSoundDriver
|-
| 3 || IsSoundDriverEnabled
|-
| 4 || ListPhysicalDeviceIds
|-
| 5 || GetPhysicalDeviceId
|-
| 6 || GetPhysicalDeviceProfile
|-
| 7 || MapRawInputDevice
|-
| 8 || MapAndBindPhysicalDevice
|-
| 9 || UnmapPhysicalDevice
|-
| 10 || GetBoundPhysicalDeviceProfile
|-
| 11 || GetRawInputPhysicalDeviceProfile
|-
| 12 || SetVirtualDeviceGain
|-
| 13 || GetVirtualDeviceGain
|-
| 14 || SetAppletVirtualDeviceGain
|-
| 15 || GetAppletVirtualDeviceGain
|-
| 16 || SetAppletCaptureDeviceGain
|-
| 17 || GetAppletCaptureDeviceGain
|-
| 18 || SetAppletBiquadFilterMode
|-
| 19 || SetAppletBiquadFilterParameters
|-
| 20 || GetAppletBiquadFilterParameters
|-
| 21 || SuspendAppletVirtualDevice
|-
| 22 || ResumeAppletVirtualDevice
|-
| 23 || SetPhysicalDeviceGain
|-
| 24 || GetPhysicalDeviceGain
|-
| 25 || SetPhysicalDeviceFeature
|-
| 26 || GetPhysicalDeviceFeature
|-
| 27 || SetGlobalPhysicalDeviceFeature
|-
| 28 || GetGlobalPhysicalDeviceFeature
|-
| 29 || AcquireGlobalPhysicalDeviceEvent
|-
| 30 || ReleaseGlobalPhysicalDeviceEvent
|-
| 31 || BindPhysicalDevice
|-
| 32 || SetMonauralDownmixMode
|-
| 33 || SetControl
|-
| 34 || GetMonauralDownmixMode
|-
| 35 || GetControl
|-
| 36 || ShellCommand
|-
| 37 || SetAppletVirtualDeviceLoudnessNormalization
|-
| 38 || GetAppletVirtualDeviceLoudnessNormalization
|-
| 39 || SetLoudnessNormalizationParameters
|-
| 40 || GetLoudnessNormalizationParameters
|-
| 41 || GetLoudnessNormalizationStatistics
|-
| 42 || SetAppletVirtualDeviceLoudnessNormalizationBiasParameters
|-
| 43 || GetAppletVirtualDeviceLoudnessNormalizationBiasParameters
|-
| 44 || SetAppletVirtualDevicePostGain
|-
| 45 || GetAppletVirtualDevicePostGain
|-
| 46 || UnbindVirtualDevice
|}
|}


Line 1,136: Line 1,393:
== Cmd0 ==
== Cmd0 ==
Takes a PID, a Process handle, an u32, an u64 pid_reserved, returns an output [[#IUserSession_2|IUserSession]].
Takes a PID, a Process handle, an u32, an u64 pid_reserved, returns an output [[#IUserSession_2|IUserSession]].
Official sw uses hard-coded value 0x1 for the u32.
An error is returned when there's already an [[#IUserSession|IUserSession]] open with the same PID.


=== IUserSession ===
=== IUserSession ===
Line 1,633: Line 1,894:
| [1.0.0+]
| [1.0.0+]
| 0x31564552 (REV1)
| 0x31564552 (REV1)
|  
| IsAudioRenererProcessingTimeLimit70PercentSupported
|-
|-
| [2.0.0+]
| [2.0.0+]
| 0x32564552 (REV2)
| 0x32564552 (REV2)
|  
| IsAdpcmLoopContextBugFixed, IsSplitterSupported
|-
|-
| [3.0.0+]
| [3.0.0+]
| 0x33564552 (REV3)
| 0x33564552 (REV3)
|  
| IsLongSizePreDelaySupported
|-
|-
| [4.0.0+]
| [4.0.0+]
| 0x34564552 (REV4)
| 0x34564552 (REV4)
|  
| IsAudioRenererProcessingTimeLimit75PercentSupported
|-
|-
| [6.0.0+]
| [6.0.0+]
| 0x35564552 (REV5)
| 0x35564552 (REV5)
|  
|
* IsAudioRenererProcessingTimeLimit80PercentSupported
* IsCommandProcessingTimeEstimatorVersion2Supported
* IsVariadicCommandBufferSizeSupported
* IsFlushVoiceWaveBuffersSupported
* IsSplitterBugFixed
* IsElapsedFrameCountSupported
* IsPerformanceMetricsDataFormatVersion2Supported
* GetPerformanceMetricsDataFormat
* IsVoicePitchAndSrcSkippedSupported
* IsVoicePlayedSampleCountResetAtLoopPointSupported
|-
|-
| [6.1.0+]
| [6.1.0+]
| 0x36564552 (REV6)
| 0x36564552 (REV6)
|  
| IsBiquadFilterEffectStateClaerBugFixed
|-
|-
| [7.0.0+]
| [7.0.0+]
| 0x37564552 (REV7)
| 0x37564552 (REV7)
|  
|
* IsVolumeMixParameterPrecisionQ23Supported
* UseBiquadFilterFloatProcessing
* IsMixInParameterDirtyOnlyUpdateSupported
|-
|-
| [9.0.0+]
| [9.0.0+]
| 0x38564552 (REV8)
| 0x38564552 (REV8)
|  
|
* IsWaveBufferVer2Supported
* IsCommandProcessingTimeEstimatorVersion3Supported
|-
|-
| [12.0.0+]
| [12.0.0+]
| 0x39564552 (REV9)
| 0x39564552 (REV9)
|  
| IsEffectInfoVersion2Supported
|-
|-
| [13.0.0+]
| [13.0.0+]
| 0x3A564552
| 0x3A564552
|  
|
* UseMultiTapBiquadFilterProcessing
* IsCommandProcessingTimeEstimatorVersion4Supported
* IsDeviceApiVersion2Supported
|-
|-
| [14.0.0+]
| [14.0.0+]
| 0x3B564552
| 0x3B564552
|  
|
* IsDelayChannelMappingChanged
* IsReverbChannelMappingChanged
* IsI3dl2ReverbChannelMappingChanged
* IsCommandProcessingTimeEstimatorVersion5Supported
|-
|-
| [17.0.0+]
| [17.0.0+]
| 0x3C564552
| 0x3C564552
|  
| IsBiquadFilterParameterForSplitterEnabled
|-
|-
| [18.0.0+]
| [18.0.0+]
| 0x3D564552
| 0x3D564552
|  
| IsSplitterPrevVolumeResetSupported
|-
|-
|  
|  
| 0x3E564552
| 0x3E564552
|  
| IsSplitterDepopBugFixEnabled
|-
|-
| [19.0.0+]
| [19.0.0+]
| 0x3F564552
| 0x3F564552
|  
| IsBiquadFilterParameterFloatSupported
|}
|}