Page MenuHomeFreeBSD

sound: Defer macio codec volume writes to a task
Needs ReviewPublic

Authored by christos on Fri, Aug 21, 12:44 PM.
Tags
None
Referenced Files
F169864040: D59073.id184639.diff
Wed, Sep 2, 7:53 PM
F169569137: D59073.diff
Tue, Sep 1, 11:01 PM
Unknown Object (File)
Tue, Sep 1, 2:32 AM
Unknown Object (File)
Mon, Aug 31, 7:23 PM
Unknown Object (File)
Mon, Aug 31, 8:08 AM
Unknown Object (File)
Sun, Aug 30, 10:49 PM
Unknown Object (File)
Sat, Aug 29, 6:56 PM
Unknown Object (File)
Sat, Aug 29, 9:17 AM
Subscribers

Details

Reviewers
markj
emaste
kib
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 75938
Build 72821: arc lint + arc unit