Page MenuHomeFreeBSD

sound: Prefer idle primary channels when allocating
Needs ReviewPublic

Authored by christos on Fri, Aug 21, 3:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Aug 22, 4:55 PM
Unknown Object (File)
Sat, Aug 22, 7:49 AM
Unknown Object (File)
Sat, Aug 22, 6:35 AM
Unknown Object (File)
Sat, Aug 22, 5:01 AM
Unknown Object (File)
Fri, Aug 21, 8:20 PM
Unknown Object (File)
Fri, Aug 21, 8:19 PM
Unknown Object (File)
Fri, Aug 21, 4:26 PM
Subscribers

Details

Reviewers
markj
emaste
Summary

dsp_chn_alloc() stopped at the first primary channel that was either
idle or already had vchans. Since the list is walked in order, the first
channel matched both conditions once it had been used, so every client
after the first was stacked onto it as a vchan and the remaining primary
channels were never allocated at all.

This is invisible on devices with a single primary channel, but not on
those which provide several. snd_emu10kx(4), for instance, registers
four primary channels for its front device, each able to run with its
own rate.

Look for an idle primary channel first, and only fall back to sharing
one that already has vchans when there is none left.

PR: 287687
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 75947
Build 72830: arc lint + arc unit