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
Unknown Object (File)
Thu, Sep 24, 5:42 AM
Unknown Object (File)
Thu, Sep 24, 4:38 AM
Unknown Object (File)
Wed, Sep 23, 8:15 AM
Unknown Object (File)
Thu, Sep 17, 3:52 AM
Unknown Object (File)
Wed, Sep 16, 1:16 AM
Unknown Object (File)
Sun, Sep 13, 10:33 AM
Unknown Object (File)
Sat, Sep 12, 2:59 PM
Unknown Object (File)
Sat, Sep 12, 4:52 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