Page MenuHomeFreeBSD

sound: Defer macio codec volume writes to a task
ClosedPublic

Authored by christos on Aug 21 2026, 12:44 PM.
Tags
None
Referenced Files
F174410744: D59073.id187126.diff
Sat, Oct 3, 12:20 AM
F174405236: D59073.id187126.diff
Fri, Oct 2, 11:27 PM
Unknown Object (File)
Thu, Oct 1, 6:13 AM
Unknown Object (File)
Tue, Sep 29, 5:24 PM
Unknown Object (File)
Tue, Sep 29, 5:23 PM
Unknown Object (File)
Tue, Sep 29, 3:39 PM
Unknown Object (File)
Thu, Sep 24, 5:42 AM
Unknown Object (File)
Thu, Sep 24, 4:38 AM
Subscribers

Details

Summary

tumbler(4), snapper(4) and onyx(4) write the volume over I2C, and
iicbus_transfer() sleeps. This is why mixer_set() drops the mixer lock
around MIXER_SET() for non-MPSAFE drivers, relying on Giant to keep them
serialized.

Store the volume in the softc and let a task do the I2C write with no
lock held, so that the mixer method does not sleep at all. The lock
dropping for non-MPSAFE drivers will be removed in a follow-up patch.

Sponsored by: The FreeBSD Foundation
MFC after: 1 month

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable