ps5: fix audiod failure
Some checks are pending
Formatting check / formatting-check (push) Waiting to run
Build RPCSX / build-rpcsx (push) Waiting to run

thanks ga2mer for investigation
This commit is contained in:
DH 2024-11-21 02:52:21 +03:00
parent 20f8ff7881
commit bb684f87b1
2 changed files with 8 additions and 6 deletions

View File

@ -751,8 +751,9 @@ SysResult kern_sysctl(Thread *thread, ptr<sint> name, uint namelen,
return ErrorCode::INVAL;
}
if (std::string_view((char *)thread->tproc->appInfo.titleId) ==
"NPXS20973") {
if (g_context.fwType != FwType::Ps5 &&
std::string_view((char *)thread->tproc->appInfo.titleId.data()) ==
"NPXS20973") {
ORBIS_LOG_ERROR("get tsc freq: returning patched value");
*(uint64_t *)old = 1000000;
} else {

View File

@ -1162,7 +1162,7 @@ int main(int argc, const char *argv[]) {
ipmi::createGnmCompositorObjects(initProcess);
ipmi::createShellCoreObjects(initProcess);
if (enableAudioIpmi || orbis::g_context.fwType == orbis::FwType::Ps5) {
if (enableAudioIpmi) {
ipmi::createAudioSystemObjects(initProcess);
}
@ -1179,16 +1179,17 @@ int main(int argc, const char *argv[]) {
initProcess->cwd = "/app0/";
if (orbis::g_context.fwType != orbis::FwType::Ps5 && !enableAudioIpmi) {
if (!enableAudioIpmi) {
launchDaemon(mainThread, "/system/sys/orbis_audiod.elf",
{"/system/sys/orbis_audiod.elf"}, {},
{
.titleId = "NPXS20973",
.titleId = {"NPXS20973"},
.unk4 = orbis::slong(0x80000000'00000000),
});
// confirmed to work and known method of initialization since 5.05
// version
if (orbis::g_context.fwSdkVersion >= 0x5050000) {
if (orbis::g_context.fwType != orbis::FwType::Ps5 &&
orbis::g_context.fwSdkVersion >= 0x5050000) {
auto fakeIpmiThread = createGuestThread();
ipmi::audioIpmiClient =
ipmi::createIpmiClient(fakeIpmiThread, "SceSysAudioSystemIpc");