fix(libSceVoice): report inactive input voice activity #9656

Merged
MarcZX10 merged 2 commits from upstream-pr/9656 into main 2026-11-02 07:54:31 +00:00
MarcZX10 commented 2026-10-22 06:35:02 +00:00 (Migrated from github.com)

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_VAD by 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 libSceVoice debt entry accordingly.

Tested

Linux x86-64, GCC 12.2.0, Release, BUILD_TESTING=ON:

  • guest_voice_port_attr_tests builds 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/main passes; git diff --check passes.
  • Independent contributor-reported PPSA34502 run on Linux with an RTX 4070 Ti / NVIDIA 615.71.09 / GCC 15.2: main stopped at this call at about 10 seconds; main plus head 540f5d14b0 reached the Zombies intro and ran to the 300-second limit. This is a host title result, not a measurement of console behavior (report).

Checklist

  • Based on current main; no open PR implements this behavior
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths still throw; this attribute is modeled for an input port with no capture source
  • No notes, investigation files or images added to the repository
  • No third-party code added
  • Generic behavior, evidenced by PPSA34502
  • Depends on: none
  • Fixes: #9601
  • Unblocks: PPSA34502 #9601
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4963175678 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9656). Originally posted by [MarcZX10](https://github.com/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_VAD` by [RPCS3](https://github.com/RPCS3/rpcs3/blob/master/rpcs3/Emu/Cell/Modules/cellVoice.h), 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 `libSceVoice` debt entry accordingly. ### Tested Linux x86-64, GCC 12.2.0, Release, `BUILD_TESTING=ON`: - `guest_voice_port_attr_tests` builds 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/main` passes; `git diff --check` passes. - Independent contributor-reported PPSA34502 run on Linux with an RTX 4070 Ti / NVIDIA 615.71.09 / GCC 15.2: `main` stopped at this call at about 10 seconds; `main` plus head `540f5d14b0` reached the Zombies intro and ran to the 300-second limit. This is a host title result, not a measurement of console behavior ([report](https://github.com/boykopovar/AnyPS5/pull/9656#issuecomment-6337161131)). ### Checklist - [x] Based on current `main`; no open PR implements this behavior - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths still throw; this attribute is modeled for an input port with no capture source - [x] No notes, investigation files or images added to the repository - [x] No third-party code added - [x] Generic behavior, evidenced by PPSA34502 - [x] Depends on: none - [x] Fixes: #9601 - [x] Unblocks: PPSA34502 #9601 - [x] GPUs tested: n/a - [x] AI-assisted: yes
jotitadev commented 2026-10-22 07:09:22 +00:00 (Migrated from github.com)

Imported 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. Head 540f5d14b merged --no-commit onto main d6eafa54d (clean).

  • With the PR: guest_voice_port_attr passes, as do guest_voice, guest_voice_chat, guest_voice_qos and guest_voice_qos_app_type_0x10000000, 3 of 3 runs.
  • With base Export.cpp and the new test, it aborts with sceVoiceGetPortAttr: 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.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5610450793 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9656#pullrequestreview-5610450793). Originally posted by [jotitadev](https://github.com/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`. Head `540f5d14b` merged `--no-commit` onto `main` `d6eafa54d` (clean). - With the PR: `guest_voice_port_attr` passes, as do `guest_voice`, `guest_voice_chat`, `guest_voice_qos` and `guest_voice_qos_app_type_0x10000000`, 3 of 3 runs. - With base `Export.cpp` and the new test, it aborts with `sceVoiceGetPortAttr: 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.
fogydes commented 2026-10-22 08:34:02 +00:00 (Migrated from github.com)

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:

  1. Main's 241fa44094 (fix(voice): restore resource layout and port validation, Oct 20) explicitly removed the constant-zero fallback for sceVoiceGetPortAttr attr 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-241fa44094 entry 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_VAD follows 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.

  2. 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 241fa44094 needs an explicit resolution (maintainer ack or an argument in the PR body) before this merges.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6336418360 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9656#issuecomment-6336418360). Originally posted by [fogydes](https://github.com/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: 1. Main's `241fa44094` (`fix(voice): restore resource layout and port validation`, Oct 20) explicitly removed the constant-zero fallback for `sceVoiceGetPortAttr` attr 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-`241fa44094` entry 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_VAD` follows [RPCS3's cellVoice.h](https://github.com/RPCS3/rpcs3/blob/master/rpcs3/Emu/Cell/Modules/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. 2. 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 `241fa44094` needs an explicit resolution (maintainer ack or an argument in the PR body) before this merges.
milescoviello commented 2026-10-22 09:14:16 +00:00 (Migrated from github.com)

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 main d6eafa54d0, and on main + this PR's head 540f5d14b0 (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.

Build Result
main aborts at 10 s: sceVoiceGetPortAttr: device attribute backend is not implemented (the #9601 stop)
main + this PR runs to the 300 s limit, no refusal and no sceVoice error

With 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 two storage image ... destroyed with GPU results pending lines and the texture cache budget lines.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6337161131 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9656#issuecomment-6337161131). Originally posted by [milescoviello](https://github.com/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 `main` `d6eafa54d0`, and on `main` + this PR's head `540f5d14b0` (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. | Build | Result | |---|---| | `main` | aborts at 10 s: `sceVoiceGetPortAttr: device attribute backend is not implemented` (the #9601 stop) | | `main` + this PR | runs to the 300 s limit, no refusal and no `sceVoice` error | With 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 two `storage image ... destroyed with GPU results pending` lines and the texture cache budget lines. AI-assisted: yes (Claude Code)
tkcm01 commented 2026-10-22 12:13:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by tkcm01 on 2026-10-22T12:13:48Z.


Windows data point for 540f5d14b0, merged onto main d6eafa54d (clean merge). GitHub Actions windows-latest running this repo's Build workflow (full Windows build, WinLibs GCC, Release, BUILD_TESTING=ON) on my fork.

  • With the PR: 252 tests, all pass, guest_voice_port_attr included (run).
  • Negative control, main plus only this PR's core/libs/tests/GuestVoicePortAttr.cpp: guest_voice_port_attr fails (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

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6340459350 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9656#issuecomment-6340459350). Originally posted by [tkcm01](https://github.com/tkcm01) on 2026-10-22T12:13:48Z. --- Windows data point for `540f5d14b0`, merged onto `main` `d6eafa54d` (clean merge). GitHub Actions `windows-latest` running this repo's Build workflow (full Windows build, WinLibs GCC, Release, `BUILD_TESTING=ON`) on my fork. - With the PR: 252 tests, all pass, `guest_voice_port_attr` included ([run](https://github.com/tkcm01/AnyPS5/actions/runs/39746288137)). - Negative control, `main` plus only this PR's `core/libs/tests/GuestVoicePortAttr.cpp`: `guest_voice_port_attr` fails (`0xc0000409`), the other 249 pass ([run](https://github.com/tkcm01/AnyPS5/actions/runs/39746294628)). 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
adriadam10 commented 2026-10-22 19:01:03 +00:00 (Migrated from github.com)

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:

  • This reverses a deliberate change on 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_VAD in 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.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5619405787 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9656#pullrequestreview-5619405787). Originally posted by [adriadam10](https://github.com/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: - This reverses a deliberate change on `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_VAD` in [RPCS3's cellVoice.h](https://github.com/RPCS3/rpcs3/blob/master/rpcs3/Emu/Cell/Modules/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.
MarcZX10 commented 2026-11-02 04:57:07 +00:00 (Migrated from github.com)

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 view and gh api GET for comments and reviews, gh pr view 5956 body, git show 241fa44094, git merge-base --is-ancestor, git grep and git show at the head. Nothing was built or run.

Results

Check Result Note
Hosted checks 4 success, none failing mergeStateStatus CLEAN
#5956 PR body Lists Unblocks: PPSA34501 Merged 2026-10-16
Commit 241fa44094 (in #9137) Removes the attribute 1001 zero branch On main
PR body Unblocks line PPSA34502 #9601 only Head PR body

Findings

  • alexpournaras (2026-10-31 14:05Z) asks to add PPSA34501 to Unblocks. Checked: #5956 says "Unblocks: PPSA34501" and describes the one-byte zero fallback for attribute 1001. Commit 241fa44094 removes the attr == PortAttrVoiceActivity branch and adds the "device attribute backend is not implemented" throw, which matches the error quoted in the thread. At head the branch is back at Export.cpp:317-321. Whether to add the title to the list is your call; the history supports the claim.
  • alexpournaras (2026-11-01 19:52Z) reports PPSA34501 playing past the intro with this PR on Windows. That is an external run; not verified here.
  • oneandonlydean (2026-11-01 09:15Z) reports 120 s runs of both titles, base aborting and PR running. Local runs; not reproduced here.
  • No failing check to explain.

Sources

Not verified

  • The PPSA34501 and PPSA34502 runs (not run here).
  • Console behavior of attribute 1001; the debt note itself says it is unmeasured.
  • Any title log claims in the thread.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5732247452 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9656#pullrequestreview-5732247452). Originally posted by [MarcZX10](https://github.com/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 view` and `gh api` GET for comments and reviews, `gh pr view 5956` body, `git show 241fa44094`, `git merge-base --is-ancestor`, `git grep` and `git show` at the head. Nothing was built or run. ## Results | Check | Result | Note | |---|---|---| | Hosted checks | 4 success, none failing | mergeStateStatus CLEAN | | #5956 PR body | Lists Unblocks: PPSA34501 | Merged 2026-10-16 | | Commit 241fa44094 (in #9137) | Removes the attribute 1001 zero branch | On main | | PR body Unblocks line | PPSA34502 #9601 only | Head PR body | ## Findings - alexpournaras (2026-10-31 14:05Z) asks to add PPSA34501 to Unblocks. Checked: #5956 says "Unblocks: PPSA34501" and describes the one-byte zero fallback for attribute 1001. Commit 241fa44094 removes the `attr == PortAttrVoiceActivity` branch and adds the "device attribute backend is not implemented" throw, which matches the error quoted in the thread. At head the branch is back at `Export.cpp:317-321`. Whether to add the title to the list is your call; the history supports the claim. - alexpournaras (2026-11-01 19:52Z) reports PPSA34501 playing past the intro with this PR on Windows. That is an external run; not verified here. - oneandonlydean (2026-11-01 09:15Z) reports 120 s runs of both titles, base aborting and PR running. Local runs; not reproduced here. - No failing check to explain. ## Sources - https://github.com/boykopovar/AnyPS5/blob/a1d33614a0474f6c4d592cce73a559059af8b2ed/core/libs/prx/libSceVoice/Export.cpp#L317-L321 - https://github.com/boykopovar/AnyPS5/blob/a1d33614a0474f6c4d592cce73a559059af8b2ed/docs/dev/debt/libSceVoice.md#L6 ## Not verified - The PPSA34501 and PPSA34502 runs (not run here). - Console behavior of attribute 1001; the debt note itself says it is unmeasured. - Any title log claims in the thread.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!9656
No description provided.