These sysctls permit setting default mixer volumes for newly attached
snd(4) devices.
Details
Details
- Reviewers
christos
works on my machine
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 72327 Build 69210: arc lint + arc unit
Event Timeline
Comment Actions
Note that this won't have any effect after a device driver has initialized. snd_mixerdefaults is only used in mixer_init(), so any change with these sysctls will require a driver re-load for the new defaults to take effect. I suppose this is not really an issue if these defaults are set and "forgotten" in a config file, though.
To be fair though, thinking again about our conversation on IRC, I think this approach might not be the best. The reason is that currently we have the following ways of changing/setting mixer levels:
- mixer(8), and any other mixer application (mixertui, gtk-mixer, dsbmixer, ...), which may or may not be more complete in terms of functionality, so something like this might already be solved by some application.
- The mixer rc script.
- hint.pcm.%d.{mixercontrol}=%d. This actually is similar to what your patch does, but is device-specific. See mixer_init().
And this patch will introduce one more way to do level setting. I think having such a scattered way of doing just this thing is quite ugly. I'd prefer a single way to handle all this.
| sys/dev/sound/pcm/mixer.c | ||
|---|---|---|
| 1587 | Stray newline. | |