Fixed SPU code on real hardware#1990
Conversation
…e robust free channel detection, other various fixes
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughSingle-file update to SPU audio driver adjusting voice sample rate values, output volume registers, hardware register operation sequencing during initialization, and key on/off register write behavior from bitwise OR operations to direct assignment. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…channel detection
nicolasnoble
left a comment
There was a problem hiding this comment.
Changes look correct. The init sequence now properly disables the SPU first, configures registers, then enables before DMA - fixing the DMA-with-SPU-off issue while preserving the clean-slate guarantee for unknown power-on state. KEY_ON/KEY_OFF plain writes are correct per hardware behavior (registers are consumed by the SPU and don't retain readable state, so OR-ing with the read was meaningless). Sample rate 0x1000 for silenced voices makes sense to let them process the dummy sample.
SPU fixes