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, May 22, 10:32 AM
Unknown Object (File)
Tue, May 21, 4:56 AM
Unknown Object (File)
Sat, May 18, 6:55 AM
Unknown Object (File)
Sat, May 18, 6:54 AM
Unknown Object (File)
May 4 2024, 1:18 PM
Unknown Object (File)
Apr 28 2024, 10:53 PM
Unknown Object (File)
Apr 26 2024, 8:41 PM
Unknown Object (File)
Apr 22 2024, 7:42 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.