The dev.pcm.N.mode sysctl lets us know the playback/recording mode of a sound device (none, play, rec, play+rec).
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Are there other options for naming.
Status is usually something that can change. But this is more like a property.
True. "status" does match with "playback/recording status" but it does also imply variability. I cannot come up with a better name for it at the moment though.
It's more consistent _both_ with the rest of the flag values in the file
(e.g SD_F_*) and with how flags are handled in userland; now we
can AND the value of mode with any of the flags. If PCM_MODE_NONE's
value is 0x00, we have to specifically check if mode == 0 too see if
PCM_MODE_NONE is set, which makes things a bit more messy --
at least in my opinion.
Should we even have that flag in this case? If it's MIDI, is there a chance it would show up under PCM in the first place?
Yes, MIDI devices are also PCM devices, but there is no /dev/dspX device.
Let me have a look. Do you have a USB MIDI device at hand?
--HPS