On Sun, Aug 29, 2004 at 03:08:33PM -0400, Mathew Kanner wrote: > On Aug 28, Ruslan Ermilov wrote: > > Hello Ruslan, > > > One and most important thing I'm not sure I understand, and > > that's causing a lot of confusion, is why "device pcm" was > > renamed to "device sound" in the first place? I believe the > > reason is that "device sound" is a generic sound driver, > > which has support for PCM playback, mixer, /dev/sndstat, > > eventually MIDI, sequencer, and so on. Individual sound > > drivers are free to implement either of these interfaces. > > Most of them implement "pcm" nowadays, so saying that > > "pcm was renamed to sound" is not quite correct. In other > > words, the sound.ko module provides the infrastructure for > > more than just PCM, and the sound(4) manpage should eventually > > document more than just PCM. Does that sound correct? > > Sounds correct on all accounts. Also, the synopsis should > indicate that the preferred method to load sound is to set > sound_load="YES" in loader.conf and barely mention kernel options, and > otherwise ignore ISA and PNP. > Um, what's wrong with ISA and PnP hints, and what's wrong with "device sound"? OK, I've briefly read your midi2-patch-aug22.diff patch, and I see that it implements "device midi" and the midi.ko module, and they are not part of "device sound", as I thought they would be. So I wonder, if it's correct to rename the pcm(4) manpage to sound(4), or will the sound(4) manpage be updated to document midi(4) as well? Also, the pcm(4) manpage (whether it's renamed to sound(4) or not) is seriously outdated. First, it talks only about pcm(4), and unless there are plans to update it with more than PCM, it should probably stay pcm(4). Its SYNOPSIS still assumes that "device pcm" provides all sound drivers (like it does in 4.x). The whole manpage needs to be revised and updated. Are you willing to help? > > 3. After repo-copies and deletes, the attached patch should be > > applied. It's mostly mechanical (foo -> snd_foo, pcm -> sound), > > with the following notable exceptions: > > > > - Note that non-PnP ISA cards, such as those handled by snd_mss(4) > > and snd_ad1816(4), still require hints of the form > > > > hint.pcm.0.at="isa" > > hint.pcm.0.irq="5" > > hint.pcm.0.drq="1" > > hint.pcm.0.flags="0x0" > > > > because they implement device "pcm". Granted, the difference > > between module and driver name is confusing enough that Seigo > > misspelled hints names in sys/conf/NOTES, and Simon misspelled > > them in the new snd_ad1816(4) manpage. The patch corrects the > > hints names in the snd_ad1816(4) manpage and NOTES. The patch > > removes the "hint.snd_mss" from NOTES because (like was said) > > the snd_mss(4) module implements the "pcm" device, hence the > > hints start with "hint.pcm", and this is already documented > > in the sound(4) manpage. Module snd_sbc(4) and snd_gusc(4) > > are special in that they implement PCM support through the > > bridge device ("sbc" and "gusc", respectively), with "pcm" > > device as a child. For them, ISA hints should be spelled > > "hint.sbc" and "hint.gusc", respectively. This is also fixed > > in NOTES. > > This is a very good catch, I never noticed this. > I wish there would be more consistency in naming. Previously, we had the csa(4) manpage, "device csa", and /dev/csa* entries. Now we will have the snd_csa(4) manpage, "device snd_csa", but still /dev/csaX entry. Also, in the old world, "midi" devices were created as children of "pcm" devices, so "hint.pcm.0" hints for non-PnP ISA devices looked correct. In new world with your updated midi(4), what will be the hints for the ISA device that implements PCM and MIDI? hint.pcm.0 and hint.midi.0? ;) All is so plain in the old good 4.x world: /sys/i386/isa/sound/sb_card.c /sys/i386/isa/sound/sb_dsp.c /sys/i386/isa/sound/sb_midi.c /sys/i386/isa/sound/sb_mixer.c Cheers, -- Ruslan Ermilov ru_at_FreeBSD.org FreeBSD committer
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:09 UTC