service/audio: Update function tables

Updates function tables based off information provided by SwitchBrew.
This commit is contained in:
Lioncash 2019-01-29 22:23:44 -05:00
parent c3affdd162
commit 0db8918947
4 changed files with 23 additions and 8 deletions

View File

@ -12,6 +12,7 @@ namespace Service::Audio {
class IAudioIn final : public ServiceFramework<IAudioIn> { class IAudioIn final : public ServiceFramework<IAudioIn> {
public: public:
IAudioIn() : ServiceFramework("IAudioIn") { IAudioIn() : ServiceFramework("IAudioIn") {
// clang-format off
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, nullptr, "GetAudioInState"}, {0, nullptr, "GetAudioInState"},
{1, nullptr, "StartAudioIn"}, {1, nullptr, "StartAudioIn"},
@ -28,16 +29,24 @@ public:
{12, nullptr, "SetAudioInDeviceGain"}, {12, nullptr, "SetAudioInDeviceGain"},
{13, nullptr, "GetAudioInDeviceGain"}, {13, nullptr, "GetAudioInDeviceGain"},
}; };
// clang-format on
RegisterHandlers(functions); RegisterHandlers(functions);
} }
~IAudioIn() = default; ~IAudioIn() = default;
}; };
AudInU::AudInU() : ServiceFramework("audin:u") { AudInU::AudInU() : ServiceFramework("audin:u") {
// clang-format off
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, nullptr, "ListAudioIns"}, {1, nullptr, "OpenAudioIn"}, {2, nullptr, "Unknown"}, {0, nullptr, "ListAudioIns"},
{3, nullptr, "OpenAudioInAuto"}, {4, nullptr, "ListAudioInsAuto"}, {1, nullptr, "OpenAudioIn"},
{2, nullptr, "Unknown"},
{3, nullptr, "OpenAudioInAuto"},
{4, nullptr, "ListAudioInsAuto"},
}; };
// clang-format on
RegisterHandlers(functions); RegisterHandlers(functions);
} }

View File

@ -12,6 +12,7 @@ namespace Service::Audio {
class IFinalOutputRecorder final : public ServiceFramework<IFinalOutputRecorder> { class IFinalOutputRecorder final : public ServiceFramework<IFinalOutputRecorder> {
public: public:
IFinalOutputRecorder() : ServiceFramework("IFinalOutputRecorder") { IFinalOutputRecorder() : ServiceFramework("IFinalOutputRecorder") {
// clang-format off
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, nullptr, "GetFinalOutputRecorderState"}, {0, nullptr, "GetFinalOutputRecorderState"},
{1, nullptr, "StartFinalOutputRecorder"}, {1, nullptr, "StartFinalOutputRecorder"},
@ -20,10 +21,13 @@ public:
{4, nullptr, "RegisterBufferEvent"}, {4, nullptr, "RegisterBufferEvent"},
{5, nullptr, "GetReleasedFinalOutputRecorderBuffer"}, {5, nullptr, "GetReleasedFinalOutputRecorderBuffer"},
{6, nullptr, "ContainsFinalOutputRecorderBuffer"}, {6, nullptr, "ContainsFinalOutputRecorderBuffer"},
{7, nullptr, "Unknown"}, {7, nullptr, "GetFinalOutputRecorderBufferEndTime"},
{8, nullptr, "AppendFinalOutputRecorderBufferAuto"}, {8, nullptr, "AppendFinalOutputRecorderBufferAuto"},
{9, nullptr, "GetReleasedFinalOutputRecorderBufferAuto"}, {9, nullptr, "GetReleasedFinalOutputRecorderBufferAuto"},
{10, nullptr, "FlushFinalOutputRecorderBuffers"},
}; };
// clang-format on
RegisterHandlers(functions); RegisterHandlers(functions);
} }
~IFinalOutputRecorder() = default; ~IFinalOutputRecorder() = default;

View File

@ -229,14 +229,16 @@ private:
}; // namespace Audio }; // namespace Audio
AudRenU::AudRenU() : ServiceFramework("audren:u") { AudRenU::AudRenU() : ServiceFramework("audren:u") {
// clang-format off
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, &AudRenU::OpenAudioRenderer, "OpenAudioRenderer"}, {0, &AudRenU::OpenAudioRenderer, "OpenAudioRenderer"},
{1, &AudRenU::GetAudioRendererWorkBufferSize, "GetAudioRendererWorkBufferSize"}, {1, &AudRenU::GetAudioRendererWorkBufferSize, "GetAudioRendererWorkBufferSize"},
{2, &AudRenU::GetAudioDevice, "GetAudioDevice"}, {2, &AudRenU::GetAudioDeviceService, "GetAudioDeviceService"},
{3, nullptr, "OpenAudioRendererAuto"}, {3, nullptr, "OpenAudioRendererAuto"},
{4, &AudRenU::GetAudioDeviceServiceWithRevisionInfo, {4, &AudRenU::GetAudioDeviceServiceWithRevisionInfo, "GetAudioDeviceServiceWithRevisionInfo"},
"GetAudioDeviceServiceWithRevisionInfo"},
}; };
// clang-format on
RegisterHandlers(functions); RegisterHandlers(functions);
} }
@ -313,7 +315,7 @@ void AudRenU::GetAudioRendererWorkBufferSize(Kernel::HLERequestContext& ctx) {
LOG_DEBUG(Service_Audio, "buffer_size=0x{:X}", output_sz); LOG_DEBUG(Service_Audio, "buffer_size=0x{:X}", output_sz);
} }
void AudRenU::GetAudioDevice(Kernel::HLERequestContext& ctx) { void AudRenU::GetAudioDeviceService(Kernel::HLERequestContext& ctx) {
LOG_DEBUG(Service_Audio, "called"); LOG_DEBUG(Service_Audio, "called");
IPC::ResponseBuilder rb{ctx, 2, 0, 1}; IPC::ResponseBuilder rb{ctx, 2, 0, 1};

View File

@ -20,7 +20,7 @@ public:
private: private:
void OpenAudioRenderer(Kernel::HLERequestContext& ctx); void OpenAudioRenderer(Kernel::HLERequestContext& ctx);
void GetAudioRendererWorkBufferSize(Kernel::HLERequestContext& ctx); void GetAudioRendererWorkBufferSize(Kernel::HLERequestContext& ctx);
void GetAudioDevice(Kernel::HLERequestContext& ctx); void GetAudioDeviceService(Kernel::HLERequestContext& ctx);
void GetAudioDeviceServiceWithRevisionInfo(Kernel::HLERequestContext& ctx); void GetAudioDeviceServiceWithRevisionInfo(Kernel::HLERequestContext& ctx);
enum class AudioFeatures : u32 { enum class AudioFeatures : u32 {