diff options
Diffstat (limited to '')
| -rw-r--r-- | src/core/hle/service/audio/audctl.cpp | 46 | ||||
| -rw-r--r-- | src/core/hle/service/audio/audctl.h | 22 |
2 files changed, 64 insertions, 4 deletions
diff --git a/src/core/hle/service/audio/audctl.cpp b/src/core/hle/service/audio/audctl.cpp index 7ad93be6b..66dd64fd1 100644 --- a/src/core/hle/service/audio/audctl.cpp +++ b/src/core/hle/service/audio/audctl.cpp | |||
| @@ -22,13 +22,13 @@ AudCtl::AudCtl(Core::System& system_) : ServiceFramework{system_, "audctl"} { | |||
| 22 | {9, nullptr, "GetAudioOutputMode"}, | 22 | {9, nullptr, "GetAudioOutputMode"}, |
| 23 | {10, nullptr, "SetAudioOutputMode"}, | 23 | {10, nullptr, "SetAudioOutputMode"}, |
| 24 | {11, nullptr, "SetForceMutePolicy"}, | 24 | {11, nullptr, "SetForceMutePolicy"}, |
| 25 | {12, nullptr, "GetForceMutePolicy"}, | 25 | {12, &AudCtl::GetForceMutePolicy, "GetForceMutePolicy"}, |
| 26 | {13, nullptr, "GetOutputModeSetting"}, | 26 | {13, &AudCtl::GetOutputModeSetting, "GetOutputModeSetting"}, |
| 27 | {14, nullptr, "SetOutputModeSetting"}, | 27 | {14, nullptr, "SetOutputModeSetting"}, |
| 28 | {15, nullptr, "SetOutputTarget"}, | 28 | {15, nullptr, "SetOutputTarget"}, |
| 29 | {16, nullptr, "SetInputTargetForceEnabled"}, | 29 | {16, nullptr, "SetInputTargetForceEnabled"}, |
| 30 | {17, nullptr, "SetHeadphoneOutputLevelMode"}, | 30 | {17, nullptr, "SetHeadphoneOutputLevelMode"}, |
| 31 | {18, nullptr, "GetHeadphoneOutputLevelMode"}, | 31 | {18, &AudCtl::GetHeadphoneOutputLevelMode, "GetHeadphoneOutputLevelMode"}, |
| 32 | {19, nullptr, "AcquireAudioVolumeUpdateEventForPlayReport"}, | 32 | {19, nullptr, "AcquireAudioVolumeUpdateEventForPlayReport"}, |
| 33 | {20, nullptr, "AcquireAudioOutputDeviceUpdateEventForPlayReport"}, | 33 | {20, nullptr, "AcquireAudioOutputDeviceUpdateEventForPlayReport"}, |
| 34 | {21, nullptr, "GetAudioOutputTargetForPlayReport"}, | 34 | {21, nullptr, "GetAudioOutputTargetForPlayReport"}, |
| @@ -41,7 +41,7 @@ AudCtl::AudCtl(Core::System& system_) : ServiceFramework{system_, "audctl"} { | |||
| 41 | {28, nullptr, "GetAudioOutputChannelCountForPlayReport"}, | 41 | {28, nullptr, "GetAudioOutputChannelCountForPlayReport"}, |
| 42 | {29, nullptr, "BindAudioOutputChannelCountUpdateEventForPlayReport"}, | 42 | {29, nullptr, "BindAudioOutputChannelCountUpdateEventForPlayReport"}, |
| 43 | {30, nullptr, "SetSpeakerAutoMuteEnabled"}, | 43 | {30, nullptr, "SetSpeakerAutoMuteEnabled"}, |
| 44 | {31, nullptr, "IsSpeakerAutoMuteEnabled"}, | 44 | {31, &AudCtl::IsSpeakerAutoMuteEnabled, "IsSpeakerAutoMuteEnabled"}, |
| 45 | {32, nullptr, "GetActiveOutputTarget"}, | 45 | {32, nullptr, "GetActiveOutputTarget"}, |
| 46 | {33, nullptr, "GetTargetDeviceInfo"}, | 46 | {33, nullptr, "GetTargetDeviceInfo"}, |
| 47 | {34, nullptr, "AcquireTargetNotification"}, | 47 | {34, nullptr, "AcquireTargetNotification"}, |
| @@ -96,4 +96,42 @@ void AudCtl::GetTargetVolumeMax(HLERequestContext& ctx) { | |||
| 96 | rb.Push(target_max_volume); | 96 | rb.Push(target_max_volume); |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | void AudCtl::GetForceMutePolicy(HLERequestContext& ctx) { | ||
| 100 | LOG_WARNING(Audio, "(STUBBED) called"); | ||
| 101 | |||
| 102 | IPC::ResponseBuilder rb{ctx, 3}; | ||
| 103 | rb.Push(ResultSuccess); | ||
| 104 | rb.PushEnum(ForceMutePolicy::Disable); | ||
| 105 | } | ||
| 106 | |||
| 107 | void AudCtl::GetOutputModeSetting(HLERequestContext& ctx) { | ||
| 108 | IPC::RequestParser rp{ctx}; | ||
| 109 | const auto value = rp.Pop<u32>(); | ||
| 110 | |||
| 111 | LOG_WARNING(Audio, "(STUBBED) called, value={}", value); | ||
| 112 | |||
| 113 | IPC::ResponseBuilder rb{ctx, 3}; | ||
| 114 | rb.Push(ResultSuccess); | ||
| 115 | rb.PushEnum(AudioOutputMode::PcmAuto); | ||
| 116 | } | ||
| 117 | |||
| 118 | void AudCtl::GetHeadphoneOutputLevelMode(HLERequestContext& ctx) { | ||
| 119 | LOG_WARNING(Audio, "(STUBBED) called"); | ||
| 120 | |||
| 121 | IPC::ResponseBuilder rb{ctx, 3}; | ||
| 122 | rb.Push(ResultSuccess); | ||
| 123 | rb.PushEnum(HeadphoneOutputLevelMode::Normal); | ||
| 124 | } | ||
| 125 | |||
| 126 | void AudCtl::IsSpeakerAutoMuteEnabled(HLERequestContext& ctx) { | ||
| 127 | const bool is_speaker_auto_mute_enabled = false; | ||
| 128 | |||
| 129 | LOG_WARNING(Audio, "(STUBBED) called, is_speaker_auto_mute_enabled={}", | ||
| 130 | is_speaker_auto_mute_enabled); | ||
| 131 | |||
| 132 | IPC::ResponseBuilder rb{ctx, 3}; | ||
| 133 | rb.Push(ResultSuccess); | ||
| 134 | rb.Push<u8>(is_speaker_auto_mute_enabled); | ||
| 135 | } | ||
| 136 | |||
| 99 | } // namespace Service::Audio | 137 | } // namespace Service::Audio |
diff --git a/src/core/hle/service/audio/audctl.h b/src/core/hle/service/audio/audctl.h index 8e31ac237..d57abb383 100644 --- a/src/core/hle/service/audio/audctl.h +++ b/src/core/hle/service/audio/audctl.h | |||
| @@ -17,8 +17,30 @@ public: | |||
| 17 | ~AudCtl() override; | 17 | ~AudCtl() override; |
| 18 | 18 | ||
| 19 | private: | 19 | private: |
| 20 | enum class AudioOutputMode { | ||
| 21 | Invalid, | ||
| 22 | Pcm1ch, | ||
| 23 | Pcm2ch, | ||
| 24 | Pcm6ch, | ||
| 25 | PcmAuto, | ||
| 26 | }; | ||
| 27 | |||
| 28 | enum class ForceMutePolicy { | ||
| 29 | Disable, | ||
| 30 | SpeakerMuteOnHeadphoneUnplugged, | ||
| 31 | }; | ||
| 32 | |||
| 33 | enum class HeadphoneOutputLevelMode { | ||
| 34 | Normal, | ||
| 35 | HighPower, | ||
| 36 | }; | ||
| 37 | |||
| 20 | void GetTargetVolumeMin(HLERequestContext& ctx); | 38 | void GetTargetVolumeMin(HLERequestContext& ctx); |
| 21 | void GetTargetVolumeMax(HLERequestContext& ctx); | 39 | void GetTargetVolumeMax(HLERequestContext& ctx); |
| 40 | void GetForceMutePolicy(HLERequestContext& ctx); | ||
| 41 | void GetOutputModeSetting(HLERequestContext& ctx); | ||
| 42 | void GetHeadphoneOutputLevelMode(HLERequestContext& ctx); | ||
| 43 | void IsSpeakerAutoMuteEnabled(HLERequestContext& ctx); | ||
| 22 | }; | 44 | }; |
| 23 | 45 | ||
| 24 | } // namespace Service::Audio | 46 | } // namespace Service::Audio |