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
F167741190: D59071.id184637.diff
Mon, Aug 24, 5:04 AM
Unknown Object (File)
Sat, Aug 22, 2:50 AM
Unknown Object (File)
Sat, Aug 22, 2:37 AM
Unknown Object (File)
Sat, Aug 22, 1:53 AM
Unknown Object (File)
Fri, Aug 21, 5:45 PM
Unknown Object (File)
Fri, Aug 21, 1:33 PM
Unknown Object (File)
Fri, Aug 21, 1:28 PM
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.