Skip to content

Commit

Permalink
ps5: fix audiod failure
Browse files Browse the repository at this point in the history
thanks ga2mer for investigation
  • Loading branch information
DHrpcs3 committed Nov 20, 2024
1 parent 20f8ff7 commit bb684f8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions orbis-kernel/src/sys/sys_sysctl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
9 changes: 5 additions & 4 deletions rpcsx/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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");
Expand Down

0 comments on commit bb684f8

Please sign in to comment.