mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-14 14:55:41 +00:00
fix minor numbers for multi-channel devices
Submitted by: Alexander Matey <matey@cis.ohio-state.edu>
This commit is contained in:
parent
eeb5db2946
commit
dd1863690a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=59660
@ -59,14 +59,15 @@ static struct cdevsw snd_cdevsw = {
|
||||
/* bmaj */ -1
|
||||
};
|
||||
|
||||
/* PROPOSAL:
|
||||
/*
|
||||
PROPOSAL:
|
||||
each unit needs:
|
||||
status, mixer, dsp, dspW, audio, sequencer, midi-in, seq2, sndproc = 9 devices
|
||||
dspW and audio are deprecated.
|
||||
dsp needs min 64 channels, will give it 256
|
||||
|
||||
minor = (unit << 12) + (dev << 8) + channel
|
||||
currently minor = (channel << 8) + (unit << 4) + dev
|
||||
minor = (unit << 20) + (dev << 16) + channel
|
||||
currently minor = (channel << 16) + (unit << 4) + dev
|
||||
|
||||
nomenclature:
|
||||
/dev/pcmX/dsp.(0..255)
|
||||
@ -75,16 +76,13 @@ currently minor = (channel << 8) + (unit << 4) + dev
|
||||
/dev/pcmX/status
|
||||
/dev/pcmX/mixer
|
||||
[etc.]
|
||||
|
||||
currently:
|
||||
minor = (channel << 8) + (unit << 4) + dev
|
||||
*/
|
||||
|
||||
#define PCMMINOR(x) (minor(x))
|
||||
#define PCMCHAN(x) ((PCMMINOR(x) & 0x0000ff00) >> 8)
|
||||
#define PCMCHAN(x) ((PCMMINOR(x) & 0x0000ff00) >> 16)
|
||||
#define PCMUNIT(x) ((PCMMINOR(x) & 0x000000f0) >> 4)
|
||||
#define PCMDEV(x) (PCMMINOR(x) & 0x0000000f)
|
||||
#define PCMMKMINOR(u, d, c) ((((c) & 0xff) << 8) | (((u) & 0x0f) << 4) | ((d) & 0x0f))
|
||||
#define PCMMKMINOR(u, d, c) ((((c) & 0xff) << 16) | (((u) & 0x0f) << 4) | ((d) & 0x0f))
|
||||
|
||||
static devclass_t pcm_devclass;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user