Page MenuHomeFreeBSD

snd_hdspe(4): Only buffer_copy() audio data once.
ClosedPublic

Authored by dev_submerge.ch on Feb 26 2024, 12:49 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 22, 7:42 AM
Unknown Object (File)
Sun, Apr 14, 5:42 PM
Unknown Object (File)
Sun, Apr 14, 5:42 PM
Unknown Object (File)
Mon, Apr 8, 10:41 PM
Unknown Object (File)
Sun, Mar 31, 7:11 PM
Unknown Object (File)
Mar 1 2024, 9:23 PM
Unknown Object (File)
Feb 28 2024, 10:27 AM
Subscribers

Details

Summary

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.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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.

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.

looks ok to me, I have been testing this for about a week -- no issues

In D44084#1010276, @br wrote:

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.

looks ok to me, I have been testing this for about a week -- no issues

Did some more testing, no problems so far - I think you can commit this, thanks again!

This revision was not accepted when it landed; it landed in state Needs Review.Sun, Mar 31, 7:21 PM
This revision was automatically updated to reflect the committed changes.