Page MenuHomeFreeBSD

sound: Embed mixer cdev in snd_mixer
Needs ReviewPublic

Authored by christos on Fri, Aug 21, 12:42 PM.
Tags
None
Referenced Files
F171449261: D59071.id184637.diff
Fri, Sep 11, 4:30 AM
Unknown Object (File)
Wed, Sep 9, 10:48 AM
Unknown Object (File)
Wed, Sep 9, 2:27 AM
Unknown Object (File)
Wed, Sep 9, 12:07 AM
Unknown Object (File)
Tue, Sep 8, 1:41 PM
Unknown Object (File)
Tue, Sep 8, 4:40 AM
Unknown Object (File)
Sun, Sep 6, 9:19 PM
Unknown Object (File)
Sat, Sep 5, 9:42 AM
Subscribers

Details

Reviewers
markj
emaste
kib
Summary

The mixer cdev belongs to the mixer, not to the PCM device, so move it
from snddev_info->mixer_dev into a new snd_mixer->cdev field. snd_mixer
itself is now included in snddev_info.

Also add a MIXER_REGISTERED() macro similar to PCM_REGISTERED().

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 75936
Build 72819: arc lint + arc unit

Event Timeline

sys/dev/sound/pcm/mixer.c
719

Do you need to clear m->cdev? What is the lifetime for struct snd_mixer?

sys/dev/sound/pcm/mixer.c
719

snd_mixer gets freed in this function here, which is called by pcm_unregister() during detach. I think we should be fine and not NULL it.