[PATCH] sound(4) related manpages 5.3 TODO item

cg cg at ijcg.net
Wed Sep 1 12:16:28 PDT 2004

> I agree that renaming the "pcm" devclass to "snd" or "sound" is a good
> idea, and I like the "snd" more for a couple of reasons (please see
> below).  Let me now check if I got you right.  Assuming it will be
> renamed to "snd", what about the /dev entries, will they be still
> /dev/pcm{unit}, /dev/mixer{unit}, and /dev/midi{unit}?  If, for example,
> I have two sound cards installed, first without MIDI, and second with
> MIDI, what will I have in /dev?  pcm0, mixer0, *no* midi0, pcm1, mixer1,
> and midi1?  And these devices ("pcm", "mixer", and "midi") will be all
> children of the "snd" device.  And for the ISA sound card with MIDI
> support, the following device hints and corresponding /dev entries?

the /dev entries are /dev/dsp* and /dev/audio*, /dev/sndstat, /dev/mixer*,  
plus the midi ones: /dev/midi* and /dev/sequencer.  all of these names are  
mandated by the oss spec.

i'm not sure about midi device numbering; i believe some cards can  
implement multiple midi devices, eg an fm synth, io port and a wavetable  
synth simultaneously.

pcm won't be a separate device as such; it won't appear in dmesg.  this  
probably applies to midi too.

> So, to summarize, I'd have liked to see the following happen:
> - "snd" is the generic sound device (module snd.ko)
> - "snd_foo" is the sound driver for foo (module snd_foo.ko)
> - "pcm" devclass renamed to "snd"
> - "pcm", "mixer", and "midi" devices are created as children of "snd"

no.  pcm and midi will effectively be part of snd.  making them separate  
newbus drivers would be tricky and require every driver to be modified.

> - ISA device hints become snd.<unit>.{at,irq,drq,flags,...}
> - the hw.snd. sysctl tree stays unmodified, including the following
>   convention: PCM-related sysctls will have the hw.snd.pcm<unit>
>   prefix, and MIDI-related sysctls (should there be any) will have the
>   hw.snd.midi<unit> prefix.
> And one final question: if the plan is as described here, it probably
> makes sense to do it now, before 5.3, or postpone the "manpage and
> handbook" sound related TODO items until it's actually done and merged
> into RELENG_5.  I'd like to avoid repo-copying the pcm(4) manpage to
> sound(4) now, only to repo-copy it later to snd(4).  If this doesn't
> happen in time for 5.3, I suggest the following emergency plan for
> now:
> - repo-copy (and tweak as necessary) all bridge drivers manpages,
>   as shown in my patch;
> - do *not* repo-copy pcm(4) to sound(4) yet, just link it, possibly
>   mentioning in the manpage that the generic driver will soon be
>   renamed from "sound" to "snd",
> - fix hints in NOTES (as in my patch) to match reality.

this sounds ok to me.

> When "sound" -> "snd" conversion is actually done, repo-copy
> pcm(4) to sound(4), tweak as necessary, documenting what the
> "sound" device really is, mentioning "pcm", "mixer", and "midi"
> sub-devices, link sound(4) to pcm(4), mixer(4), and midi(4).
> Please let me know how to proceed...

i don't think i can cope with the pressure of getting it into 5.3, so it'd  
be better to postpone it until 5.4 i think.


More information about the freebsd-current mailing list