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)
Wed, Nov 27, 8:55 PM
Unknown Object (File)
Mon, Nov 25, 11:24 AM
Unknown Object (File)
Mon, Nov 18, 9:21 AM
Unknown Object (File)
Thu, Nov 14, 12:55 AM
Unknown Object (File)
Oct 22 2024, 6:52 PM
Unknown Object (File)
Oct 2 2024, 8:07 PM
Unknown Object (File)
Sep 15 2024, 12:44 AM
Unknown Object (File)
Sep 11 2024, 9:56 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.Mar 31 2024, 7:21 PM
This revision was automatically updated to reflect the committed changes.