From alsa-devel-owner@alsa.jcu.cz  Mon Oct  5 12:04:40 1998
Received: from entry.jcu.cz (IDENT:perex@entry.jcu.cz [160.217.1.111])
	by marvin.jcu.cz (8.9.1a/8.9.1) with SMTP id MAA12905;
	Mon, 5 Oct 1998 12:03:47 +0200
Date: Mon, 5 Oct 1998 12:03:43 +0200 (CEST)
From: Jaroslav Kysela <perex@jcu.cz>
To: Brion Vibber <brion@pobox.com>
cc: alsa-devel@alsa.jcu.cz
Subject: Re: Multiple sound cards
In-Reply-To: <Pine.LNX.4.03.9810050204180.4828-100000@rdaneel.dyn.ml.org>
Message-ID: <Pine.LNX.3.96.981005113530.4893F-100000@entry.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Reply-To: alsa-devel@alsa.jcu.cz
Sender: alsa-devel-owner@alsa.jcu.cz
Precedence: list

On Mon, 5 Oct 1998, Brion Vibber wrote:

> On Mon, 5 Oct 1998, Jaroslav Kysela wrote:
> 
> > On Sun, 4 Oct 1998, Brion Vibber wrote:
> > 
> > > BUT I'm having problems with OSS. :( The script to make the sound devices
> > > in the alsa-driver package clobbered the device numbers some of the dsp
> > > devices, so I had to fix dsp1 from 14,5 to 14,19. Also dsp8 was wrong but
> > > there doesn't seem to be anything on the corrected device, and dsp16
> > > shouldn't exist as far as I can tell.
> > 
> > /dev/dsp8 means 8-bit unsigned format and /dev/dsp16 means 16-bit signed
> > little endian format.. These names doesn't have anything with card number.
> 
> Just curious, where did this naming scheme came from? It's not consistent

This naming scheme comes from very old USS driver. Maybe it's now
obsolete, we should remove it.. Removed..

> with what the OSS drivers I've used seem to have so I'm a little confused
> about it... (I mean, this is supposed to be compatible with OSS, so why
> act quite differently from it?)
> 
> Under OSS/Linux on my machine /dev/dsp0 and /dev/dsp1 respectively were
> the first and second PCM devices on the AudioPCI, and several after that
> (2 to 10 I think) went to SoftOSS virtual devices which I briefly fiddled
> with but gave up on since OSS apps don't cooperate enough to actually make
> it useful for anything.
> 
> > pcm01 -> /dev/adsp (alternate DSP),
> 
> Hmm, maybe I'll just change my dsp1 to match adsp to keep things looking
> consistent on my end. Again, any reason for this apparent inconsistency
> with OSS?
> 
> > PCM devices 2-3 aren't mapped to OSS
> > space... This is due to another scheme (ALSA have soundcard and PCM
> > devices; OSS have only devices).
> 
> Umm, okay. Don't suppose it's that big a deal since most people don't have
> multiple soundcards anyway, but is there a real technical reason for this?
> The only one I can think of is that it'd be a pain to think up a
> consistent and convenient mapping to linearly-named OSS devices from
> two-dimensionally named ALSA devices, but you're not keeping with that
> convention anyway so that can't be it.

I simply don't know how remapping can be done. Here is example if we allow
OSS mapping scheme with use first free device:

soundcard1_module - index = 1 (first soundcard with one PCM device)
soundcard2_module - index = 2 (second soundcard with two PCM devices)
soundcard3_module - index = 3 (third soundcard with one PCM device)

modprobe soundcard2_module

** after this (using your scheme) will be active /dev/dsp0,/dev/dsp1 and
   native /dev/snd/pcm10,/dev/snd/pcm11

modprobe soundcard1_module

** after this:
   /dev/dsp0,/dev/dsp1,/dev/snd/pcm10,/dev/snd/pcm11 = 2. card
   /dev/dsp2,/dev/snd/pcm00 = 1. card

modprobe -r soundcard2_module

** after this:
   /dev/dsp2,/dev/snd/pcm00 = 1. card

modprobe soundcard3_module

** after this:
   /dev/dsp2,/dev/snd/pcm00 = 1. card
   /dev/dsp0,/dev/snd/pcm20 = 3. card

OK. As you see, this mapping is totaly bad (ALSA PCM is ok). User doesn't
know which OSS device is using. Current scheme (16 OSS minor numbers = one
soundcard) is working _ALWAYS_ and device isn't changed if even some other
soundcard module is loaded / removed.

							Jaroslav

-----
Jaroslav Kysela <perex@jcu.cz>
Academic Computer Centre, University of South Bohemia
Branisovska 31, C. Budejovice, CZ-370 05 Czech Republic




