Audio services: Difference between revisions
No edit summary |
|||
(6 intermediate revisions by 2 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 || [6.0.0-16.1.0] DisableDspUsageMeasurement | ||
|- | |- | ||
| 6 || GetDspUsage | | 6 || [6.0.0-16.1.0] GetDspUsage | ||
|} | |} | ||
Line 448: | Line 448: | ||
|- | |- | ||
| 14 || [13.0.0+] ListAudioOutputDeviceName | | 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 | |||
|} | |} | ||
Line 599: | Line 611: | ||
| 5 || SetTargetMute | | 5 || SetTargetMute | ||
|- | |- | ||
| 6 || IsTargetConnected | | 6 || [1.0.0-17.0.1] IsTargetConnected | ||
|- | |- | ||
| 7 || SetDefaultTarget | | 7 || SetDefaultTarget | ||
Line 625: | Line 637: | ||
| 18 || [3.0.0+] GetHeadphoneOutputLevelMode | | 18 || [3.0.0+] GetHeadphoneOutputLevelMode | ||
|- | |- | ||
| 19 || [3.0.0-13.2.1] AcquireAudioVolumeUpdateEventForPlayReport | | 19 || [17.0.0+] SetForceMonauralOutputModeEnabled ([3.0.0-13.2.1] AcquireAudioVolumeUpdateEventForPlayReport) | ||
|- | |- | ||
| 20 || [3.0.0-13.2.1] AcquireAudioOutputDeviceUpdateEventForPlayReport | | 20 || [17.0.0+] IsForceMonauralOutputModeEnabled ([3.0.0-13.2.1] AcquireAudioOutputDeviceUpdateEventForPlayReport) | ||
|- | |- | ||
| 21 || [3.0.0-13.2.1] GetAudioOutputTargetForPlayReport | | 21 || [3.0.0-13.2.1] GetAudioOutputTargetForPlayReport | ||
Line 641: | Line 653: | ||
| 26 || [4.0.0-14.1.2] [[#UpdateHeadphoneSettings]] | | 26 || [4.0.0-14.1.2] [[#UpdateHeadphoneSettings]] | ||
|- | |- | ||
| 27 || [7.0.0 | | 27 || [7.0.0-16.1.0] SetVolumeMappingTableForDev | ||
|- | |- | ||
| 28 || [10.0.0-13.2.1] GetAudioOutputChannelCountForPlayReport | | 28 || [10.0.0-13.2.1] GetAudioOutputChannelCountForPlayReport | ||
Line 703: | Line 715: | ||
== UpdateHeadphoneSettings == | == 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 == | == GetSystemInformationForDebug == | ||
Line 709: | Line 721: | ||
[15.0.0+] Now takes a type-0x16 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 963: | Line 977: | ||
|- | |- | ||
| 9 || SetAudioOutputProcessRecordVolume | | 9 || SetAudioOutputProcessRecordVolume | ||
|- | |||
| 10 || [18.0.0+] GetAppletStateSummaries | |||
|} | |} | ||
Line 1,404: | Line 1,420: | ||
| u8 array of channel mappings | | 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]] |