fix(libSceVoice): report inactive input voice activity #9656
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9656"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T06:35:02Z.
What
This restores the host-side zero result for voice activity attribute 1001 on an input device port with no capture backend. It reverses the deliberate removal in #9137: no host capture samples reach this port, so zero is the host model for inactive input, not a claim about the PS5 result. Attribute 1001 is identified as
CELLVOICE_ATTR_VADby RPCS3, but that mapping and the eligible conditions are not confirmed for PS5. On PPSA34502, the prior zero result let the title reach its war-room menu; after the fallback was removed it stopped on this call, and an independent run with this PR reached the Zombies intro. Other supported device attributes continue to throw because their host state is not modeled.Adds regression coverage for success, the zero byte, untouched surrounding bytes, and preservation of the existing validation/throw behavior. Narrows the
libSceVoicedebt entry accordingly.Tested
Linux x86-64, GCC 12.2.0, Release,
BUILD_TESTING=ON:guest_voice_port_attr_testsbuilds successfully.ctest -R '^guest_voice_port_attr$'was attempted but aborted before assertions at the project CPU guard: this Xeon E5-1620 v2 lacks LZCNT, BMI1, BMI2, MOVBE, AVX2 and FMA.python3 tools/check_conventions.py --base upstream/mainpasses;git diff --checkpasses.mainstopped at this call at about 10 seconds;mainplus head540f5d14b0reached the Zombies intro and ran to the 300-second limit. This is a host title result, not a measurement of console behavior (report).Checklist
main; no open PR implements this behaviorImported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-22T07:09:22Z.
Review: COMMENTED
The description says the test could not run on the Xeon E5-1620 v2 (CPU guard), so here is a run on a CPU that passes it.
Machine: Linux x86_64, i7-8700 (has LZCNT/BMI1/BMI2/MOVBE/AVX2/FMA), Ubuntu 26.04, GCC 15.2, Release,
BUILD_TESTING=ON. Head540f5d14bmerged--no-commitontomaind6eafa54d(clean).guest_voice_port_attrpasses, as doguest_voice,guest_voice_chat,guest_voice_qosandguest_voice_qos_app_type_0x10000000, 3 of 3 runs.Export.cppand the new test, it aborts withsceVoiceGetPortAttr: device attribute backend is not implemented. So the new 1001 case does run and fails without the change.One thing to check against history:
241fa4409(#9137, two days ago) removed a constant-zero voice-activity fallback for this attribute. Its debt line read "The former constant-zero voice-activity fallback is removed". This PR brings that zero back for input ports. The rationale here (no capture backend feeds the port) may be enough, but it might be worth saying why it differs from the fallback that was dropped.Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
Imported from boykopovar/AnyPS5. Originally posted by fogydes on 2026-10-22T08:34:02Z.
The state machine itself is internally consistent (the attr-1001 write is gated by the same initialization/port/type/validation chain as the throwing branches, and the test pins it byte-for-byte), but this re-adds a behavior the maintainer deliberately removed two days ago, and the debt rewrite presents it as settled:
Main's
241fa44094(fix(voice): restore resource layout and port validation, Oct 20) explicitly removed the constant-zero fallback forsceVoiceGetPortAttrattr 1001 and changed the debt entry to say "The former constant-zero voice-activity fallback is removed; failed calls leave output untouched" — that decision text is still on main. This PR reverses it with no new measurement, and reverses it silently: nothing in the PR body or diff acknowledges that main deliberately chose the opposite behavior the day before yesterday. The original pre-241fa44094entry also carried the reasoning for the fallback (PPSA34501 reads one byte on success and otherwise hits a startup exception) plus the caveat that attr 1001 =CELLVOICE_ATTR_VADfollows RPCS3's cellVoice.h and is "not confirmed for the PS5"; the rewritten entry keeps neither the provenance nor the not-confirmed caveat and now asserts "Input-device voice activity returns zero" as established.If the reversal is intended — e.g. the modeling position is that no capture backend can ever feed the port, so zero is the honest answer for this host rather than a guess about the console — then the debt entry should say that explicitly and cite the PPSA34501/PPSA34502 evidence (like the sibling entries in this file do), keep the RPCS3/CELLVOICE_ATTR_VAD provenance, and restore the "correct console behavior is unknown" gap sentence rather than deleting it. As written, a reader would conclude the console's answer for attr 1001 is known to be zero, which is exactly the kind of unverified-behavior-as-settled the debt rules exist to prevent. Either way the conflict with
241fa44094needs an explicit resolution (maintainer ack or an argument in the PR body) before this merges.Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-22T09:14:16Z.
@MarcZX10 a title run for the "Not tested in Call of Duty: Black Ops II" line: PPSA34502 on
maind6eafa54d0, and onmain+ this PR's head540f5d14b0(clean merge). Linux, RTX 4070 Ti, NVIDIA 615.71.09, GCC 15.2, release libs and relinker built at each commit, warm shader cache, 300 s, a pad script cycling through the menu buttons, one run each.mainsceVoiceGetPortAttr: device attribute backend is not implemented(the #9601 stop)main+ this PRsceVoiceerrorWith the PR, the title gets past the voice setup, launches its Zombies executable (
codzm.elf), and is showing that mode's intro scene at the end of the run. The only[gpu]warnings are twostorage image ... destroyed with GPU results pendinglines and the texture cache budget lines.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by tkcm01 on 2026-10-22T12:13:48Z.
Windows data point for
540f5d14b0, merged ontomaind6eafa54d(clean merge). GitHub Actionswindows-latestrunning this repo's Build workflow (full Windows build, WinLibs GCC, Release,BUILD_TESTING=ON) on my fork.guest_voice_port_attrincluded (run).mainplus only this PR'score/libs/tests/GuestVoicePortAttr.cpp:guest_voice_port_attrfails (0xc0000409), the other 249 pass (run).This only checks the test on Windows; it says nothing about the attr 1001 question raised above.
Not tested: Linux, macOS, a title.
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-22T19:01:03Z.
Review: CHANGES_REQUESTED
Thanks for the fix and for the title/CI data from the other testers. Two things block the merge:
main:241fa44094(fix(voice): restore resource layout and port validation) removed the constant-zero attr 1001 fallback and made it throw. The PR body doesn't mention that. Please state in the body why returning zero is now right (e.g. the host has no capture backend, so "inactive" is the true answer for this host) and cite the PPSA34501/PPSA34502 evidence.docs/dev/debt/libSceVoice.md:22: the rewritten entry says "Input-device voice activity returns zero" as if it were known. Please keep the provenance (attribute 1001 =CELLVOICE_ATTR_VADin RPCS3's cellVoice.h, not confirmed for the PS5) and the sentence that the console's result and eligible conditions are unknown, and say the zero is the host's model, not a measured console value. The line should also sit under the section it belongs to (it is a modelled-by-assumption result, not "Unknown function info").The code and test themselves look right: the write is behind the same init/port/type/size checks, and the test pins the written byte and the untouched neighbours.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-02T04:57:07Z.
Review: COMMENTED
Reviewed — Unblocks request checked against history, one list item open
The history supports adding PPSA34501 to Unblocks, but the PR body still lists only PPSA34502.
What I ran
Head
a1d33614a0474f6c4d592cce73a559059af8b2ed(live, OPEN). Read-only:gh pr viewandgh apiGET for comments and reviews,gh pr view 5956body,git show 241fa44094,git merge-base --is-ancestor,git grepandgit showat the head. Nothing was built or run.Results
241fa44094(in #9137)Findings
241fa44094removes theattr == PortAttrVoiceActivitybranch and adds the "device attribute backend is not implemented" throw, which matches the error quoted in the thread. At head the branch is back atExport.cpp:317-321. Whether to add the title to the list is your call; the history supports the claim.Sources
github.com/boykopovar/AnyPS5@a1d33614a0/core/libs/prx/libSceVoice/Export.cpp (L317-L321)github.com/boykopovar/AnyPS5@a1d33614a0/docs/dev/debt/libSceVoice.md (L6)Not verified