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)
Tue, Oct 22, 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
Unknown Object (File)
Sep 8 2024, 1:02 AM
Unknown Object (File)
Sep 5 2024, 3:08 PM
Unknown Object (File)
Jun 21 2024, 2:35 PM
Unknown Object (File)
May 22 2024, 10:32 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 56241
Build 53129: arc lint + arc unit

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.