From 0746b83edf49d1fd668dd337264e942f361b675c Mon Sep 17 00:00:00 2001 From: Mary Date: Wed, 14 Apr 2021 00:01:24 +0200 Subject: Initial support for the new 12.x IPC system (#2182) * Rename CommandAttribute as CommandHIpcAttribute to prepare for 12.x changes * Implement inital support for TIPC and adds SM command ids * *Ipc to *ipc * Missed a ref in last commit... * CommandAttributeTIpc to CommandAttributeTipc * Addresses comment and fixes some bugs around TIPC doesn't have any padding requirements as buffer C isn't a thing Fix for RegisterService inverting two argument only on TIPC --- .../Audio/AudioRenderer/AudioDeviceServer.cs | 26 +++++++++++----------- .../Audio/AudioRenderer/AudioRendererServer.cs | 22 +++++++++--------- 2 files changed, 24 insertions(+), 24 deletions(-) (limited to 'Ryujinx.HLE/HOS/Services/Audio/AudioRenderer') diff --git a/Ryujinx.HLE/HOS/Services/Audio/AudioRenderer/AudioDeviceServer.cs b/Ryujinx.HLE/HOS/Services/Audio/AudioRenderer/AudioDeviceServer.cs index 1cf6741e..437b8745 100644 --- a/Ryujinx.HLE/HOS/Services/Audio/AudioRenderer/AudioDeviceServer.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/AudioRenderer/AudioDeviceServer.cs @@ -19,7 +19,7 @@ namespace Ryujinx.HLE.HOS.Services.Audio.AudioRenderer _impl = impl; } - [Command(0)] + [CommandHipc(0)] // ListAudioDeviceName() -> (u32, buffer) public ResultCode ListAudioDeviceName(ServiceCtx context) { @@ -55,7 +55,7 @@ namespace Ryujinx.HLE.HOS.Services.Audio.AudioRenderer return ResultCode.Success; } - [Command(1)] + [CommandHipc(1)] // SetAudioDeviceOutputVolume(f32 volume, buffer name) public ResultCode SetAudioDeviceOutputVolume(ServiceCtx context) { @@ -69,7 +69,7 @@ namespace Ryujinx.HLE.HOS.Services.Audio.AudioRenderer return _impl.SetAudioDeviceOutputVolume(deviceName, volume); } - [Command(2)] + [CommandHipc(2)] // GetAudioDeviceOutputVolume(buffer name) -> f32 volume public ResultCode GetAudioDeviceOutputVolume(ServiceCtx context) { @@ -88,7 +88,7 @@ namespace Ryujinx.HLE.HOS.Services.Audio.AudioRenderer return result; } - [Command(3)] + [CommandHipc(3)] // GetActiveAudioDeviceName() -> buffer public ResultCode GetActiveAudioDeviceName(ServiceCtx context) { @@ -111,7 +111,7 @@ namespace Ryujinx.HLE.HOS.Services.Audio.AudioRenderer return ResultCode.Success; } - [Command(4)] + [CommandHipc(4)] // QueryAudioDeviceSystemEvent() -> handle public ResultCode QueryAudioDeviceSystemEvent(ServiceCtx context) { @@ -129,7 +129,7 @@ namespace Ryujinx.HLE.HOS.Services.Audio.AudioRenderer return ResultCode.Success; } - [Command(5)] + [CommandHipc(5)] // GetActiveChannelCount() -> u32 public ResultCode GetActiveChannelCount(ServiceCtx context) { @@ -140,7 +140,7 @@ namespace Ryujinx.HLE.HOS.Services.Audio.AudioRenderer return ResultCode.Success; } - [Command(6)] // 3.0.0+ + [CommandHipc(6)] // 3.0.0+ // ListAudioDeviceNameAuto() -> (u32, buffer) public ResultCode ListAudioDeviceNameAuto(ServiceCtx context) { @@ -175,7 +175,7 @@ namespace Ryujinx.HLE.HOS.Services.Audio.AudioRenderer return ResultCode.Success; } - [Command(7)] // 3.0.0+ + [CommandHipc(7)] // 3.0.0+ // SetAudioDeviceOutputVolumeAuto(f32 volume, buffer name) public ResultCode SetAudioDeviceOutputVolumeAuto(ServiceCtx context) { @@ -188,7 +188,7 @@ namespace Ryujinx.HLE.HOS.Services.Audio.AudioRenderer return _impl.SetAudioDeviceOutputVolume(deviceName, volume); } - [Command(8)] // 3.0.0+ + [CommandHipc(8)] // 3.0.0+ // GetAudioDeviceOutputVolumeAuto(buffer name) -> f32 public ResultCode GetAudioDeviceOutputVolumeAuto(ServiceCtx context) { @@ -206,7 +206,7 @@ namespace Ryujinx.HLE.HOS.Services.Audio.AudioRenderer return ResultCode.Success; } - [Command(10)] // 3.0.0+ + [CommandHipc(10)] // 3.0.0+ // GetActiveAudioDeviceNameAuto() -> buffer public ResultCode GetActiveAudioDeviceNameAuto(ServiceCtx context) { @@ -228,7 +228,7 @@ namespace Ryujinx.HLE.HOS.Services.Audio.AudioRenderer return ResultCode.Success; } - [Command(11)] // 3.0.0+ + [CommandHipc(11)] // 3.0.0+ // QueryAudioDeviceInputEvent() -> handle public ResultCode QueryAudioDeviceInputEvent(ServiceCtx context) { @@ -246,7 +246,7 @@ namespace Ryujinx.HLE.HOS.Services.Audio.AudioRenderer return ResultCode.Success; } - [Command(12)] // 3.0.0+ + [CommandHipc(12)] // 3.0.0+ // QueryAudioDeviceOutputEvent() -> handle public ResultCode QueryAudioDeviceOutputEvent(ServiceCtx context) { @@ -264,7 +264,7 @@ namespace Ryujinx.HLE.HOS.Services.Audio.AudioRenderer return ResultCode.Success; } - [Command(13)] + [CommandHipc(13)] // GetAudioSystemMasterVolumeSetting(buffer name) -> f32 public ResultCode GetAudioSystemMasterVolumeSetting(ServiceCtx context) { diff --git a/Ryujinx.HLE/HOS/Services/Audio/AudioRenderer/AudioRendererServer.cs b/Ryujinx.HLE/HOS/Services/Audio/AudioRenderer/AudioRendererServer.cs index 5ff5ddb3..56eb173d 100644 --- a/Ryujinx.HLE/HOS/Services/Audio/AudioRenderer/AudioRendererServer.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/AudioRenderer/AudioRendererServer.cs @@ -16,7 +16,7 @@ namespace Ryujinx.HLE.HOS.Services.Audio.AudioRenderer _impl = impl; } - [Command(0)] + [CommandHipc(0)] // GetSampleRate() -> u32 public ResultCode GetSampleRate(ServiceCtx context) { @@ -25,7 +25,7 @@ namespace Ryujinx.HLE.HOS.Services.Audio.AudioRenderer return ResultCode.Success; } - [Command(1)] + [CommandHipc(1)] // GetSampleCount() -> u32 public ResultCode GetSampleCount(ServiceCtx context) { @@ -34,7 +34,7 @@ namespace Ryujinx.HLE.HOS.Services.Audio.AudioRenderer return ResultCode.Success; } - [Command(2)] + [CommandHipc(2)] // GetMixBufferCount() -> u32 public ResultCode GetMixBufferCount(ServiceCtx context) { @@ -43,7 +43,7 @@ namespace Ryujinx.HLE.HOS.Services.Audio.AudioRenderer return ResultCode.Success; } - [Command(3)] + [CommandHipc(3)] // GetState() -> u32 public ResultCode GetState(ServiceCtx context) { @@ -52,7 +52,7 @@ namespace Ryujinx.HLE.HOS.Services.Audio.AudioRenderer return ResultCode.Success; } - [Command(4)] + [CommandHipc(4)] // RequestUpdate(buffer input) // -> (buffer output, buffer performanceOutput) public ResultCode RequestUpdate(ServiceCtx context) @@ -89,21 +89,21 @@ namespace Ryujinx.HLE.HOS.Services.Audio.AudioRenderer return result; } - [Command(5)] + [CommandHipc(5)] // Start() public ResultCode Start(ServiceCtx context) { return _impl.Start(); } - [Command(6)] + [CommandHipc(6)] // Stop() public ResultCode Stop(ServiceCtx context) { return _impl.Stop(); } - [Command(7)] + [CommandHipc(7)] // QuerySystemEvent() -> handle public ResultCode QuerySystemEvent(ServiceCtx context) { @@ -122,7 +122,7 @@ namespace Ryujinx.HLE.HOS.Services.Audio.AudioRenderer return result; } - [Command(8)] + [CommandHipc(8)] // SetAudioRendererRenderingTimeLimit(u32 limit) public ResultCode SetAudioRendererRenderingTimeLimit(ServiceCtx context) { @@ -133,7 +133,7 @@ namespace Ryujinx.HLE.HOS.Services.Audio.AudioRenderer return ResultCode.Success; } - [Command(9)] + [CommandHipc(9)] // GetAudioRendererRenderingTimeLimit() -> u32 limit public ResultCode GetAudioRendererRenderingTimeLimit(ServiceCtx context) { @@ -144,7 +144,7 @@ namespace Ryujinx.HLE.HOS.Services.Audio.AudioRenderer return ResultCode.Success; } - [Command(10)] // 3.0.0+ + [CommandHipc(10)] // 3.0.0+ // RequestUpdateAuto(buffer input) // -> (buffer output, buffer performanceOutput) public ResultCode RequestUpdateAuto(ServiceCtx context) -- cgit v1.2.3