Instead of blindly copying two periods of audio data to and from DMA
buffers, keep track of the writing position and derive the actual
part of audio data that needs to be copied.
This approximately halves the number of samples copied in total.
Details
Details
- Reviewers
br - Commits
- rGee36e7faceaf: snd_hdspe(4): Only buffer_copy() audio data once.
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 56241 Build 53129: arc lint + arc unit
Event Timeline
Comment Actions
I'm still testing this, but I haven't found any problems in the last few days. It's hard to tell whether this approach is robust against missed interrupts, because I never encountered any.
Ruslan, does the calculation of position and length look reasonable to you? We have to store the playback writing position extra because we don't set it in the sndbuf structure.
Comment Actions
Did some more testing, no problems so far - I think you can commit this, thanks again!