Page MenuHomeFreeBSD

sound: Fix vchanrate and vchanformat
Needs ReviewPublic

Authored by christos on Feb 12 2025, 12:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 17, 9:18 AM
Unknown Object (File)
Wed, Mar 5, 10:24 PM
Unknown Object (File)
Thu, Feb 27, 1:10 AM
Unknown Object (File)
Wed, Feb 26, 10:39 AM
Unknown Object (File)
Fri, Feb 21, 7:05 PM
Unknown Object (File)
Thu, Feb 20, 9:02 PM
Unknown Object (File)
Tue, Feb 18, 11:11 AM
Unknown Object (File)
Feb 16 2025, 6:10 PM
Subscribers

Details

Summary

Make vchanrate and vchanformat reflect the primary channel's software
buffer's rate and format respectively. Fix previous inconsistencies.

Get rid of the initializations in vchan_create() and move them to
chn_init().

Without the feeder_rate_round check in sysctl_dev_pcm_vchanrate(), we
can set the software rate to anything between feeder_rate_min and
feeder_rate_max. If we keep the check, however, the rate is limited to
whatever the driver's min/max is, which can be a problem if, for
example, the driver supports only a single rate, in which case we won't
be able to set anything other than the driver rate.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

Diff Detail

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

Event Timeline