GUS driver status : multiple open of /dev/dsp ?
Hi,
I'm sorry to ask such a common question here, but I'd like to know if
it is possible to configure my (old) Gravis Ultrasound ISA PnP card in order to enable multiple open of /dev/dsp with alsa.
I know for sure that this card is able to perform hardware mixing: the
windows drivers I'm using just do it. I've seen numerous posts on that subject in the mailing-list archive, but couldn't find any real answer:
1) Is it supported by alsa (yet) ?
2) If so, how can I enable it ? Do I have to play tricks with my .asoundrc ? Should I try another driver (gusclassic/gusmax/gusextreme) instead of interwave ?
Thanks by advance for any answer,
Vincent
P.S.: my current drivers:
---------------------------------
diablo:~$ cat /proc/asound/pcm 00-00: CS4231 : AMD InterWave rev B (chip) : playback 1 : capture 1 00-01: AMD InterWave : AMD InterWave rev B (synth) : playback 1
diablo:~$ cat /proc/asound/cards
0 [card0 ]: AMD InterWave - AMD InterWave
AMD InterWave at 0x220, irq 5, dma 3&1diablo:~$ cat /proc/asound/version Advanced Linux Sound Architecture Driver Version 0.9.0rc1. Compiled on May 31 2002 for kernel 2.4.19-pre9.
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
Quoted 5 lines · Vincent Vanackere
Hi,
I'm sorry to ask such a common question here, but I'd like to know if it is possible to configure my (old) Gravis Ultrasound ISA PnP card in order to enable multiple open of
/dev/dspwith alsa.
Should be possible. With a GUS PnP you have to use the second pcm device. first one is the codec and second is the synth. That would be mapped to /dev/adsp for OSS emulation. You have to pass the snd-interwave module snd_pcm_channels=n parameter where n is from 2 to 16.
The problem with GUS synth is that it uses non-interleaved data layout so it's not relly useful for pcm stuff. alsa-lib doesn't want to do the required conversion for some reason. Interwave supports also interleaved DMA but the driver doesn't use this feature.
One way of using it currently is having multiple mono wavs. "aplay -D plughw:0,1 -c 1 -I mono.wav" will play one file. You can use that multiple times at the same time or you can specify all the files at once "aplay -D plughw:0,1 -c N -I mono1.wav mono2.wav ... monoN.wav".
OK. I just checked and it only works with one or two channels per aplay. So if you want more channels you'll have to run multiple aplays simultaneosly.
And the obligatory ad... :)
If you really want to use hardware mixing you can try the mikmod driver I wrote. It requires CVS version of alsa-lib or a patch. Both are at "http://www.saunalahti.fi/~syrjala/alsa/"
Great card BTW :) Well apart from the nasty hissing bug. I have one with 16 MB memory. A really nice card with Utopia soundbank. If only Jaroslav would have the time to add MIDI emulation to the driver...
Signature · 8 lines
Ville Syrjälä [email protected] http://www.sci.fi/~syrjala/ _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
Quoted 3 lines
The problem with GUS synth is that it uses non-interleaved data layout so it's not relly useful for pcm stuff. alsa-lib doesn't want to do the required conversion for some reason.
i find this very suprising and somewhat hard to believe. the hammerfall also uses a non-interleaved data layout (as all the best cards do :), and yet despite the fact that the driver contains no code to handle an interleaved stream, aplay via plughw:N,0 works just fine i.e. alsa-lib handles the conversion perfectly. what makes you think it doesn't work?
Quoted 1 line
Great card BTW :)
yeah, the only one that has ever existed AFAIK that provided a true MIDI data rate periodic interrupt. a sadly missing feature on all other cards.
--p
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 10 lines · Paul Davis
Quoted 3 lines
The problem with GUS synth is that it uses non-interleaved data layout so it's not relly useful for pcm stuff. alsa-lib doesn't want to do the required conversion for some reason.
i find this very suprising and somewhat hard to believe. the hammerfall also uses a non-interleaved data layout (as all the best cards do :), and yet despite the fact that the driver contains no code to handle an interleaved stream, aplay via plughw:N,0 works just fine i.e. alsa-lib handles the conversion perfectly. what makes you think it doesn't work?
# aplay -D plughw:0,1 stereo.wav aplay: set_params:754: Access type not available
There is a snd_pcm_plug_change_access() function in pcm_plug.c so I'm thinking it should work, but it doesn't.
Signature · 8 lines
Ville Syrjälä [email protected] http://www.sci.fi/~syrjala/ _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
Quoted 12 lines · Paul Davis
Quoted 10 lines
Quoted 3 lines
The problem with GUS synth is that it uses non-interleaved data layout so it's not relly useful for pcm stuff. alsa-lib doesn't want to do the required conversion for some reason.
i find this very suprising and somewhat hard to believe. the hammerfall also uses a non-interleaved data layout (as all the best cards do :), and yet despite the fact that the driver contains no code to handle an interleaved stream, aplay via plughw:N,0 works just fine i.e. alsa-lib handles the conversion perfectly. what makes you think it doesn't work?
Quoted 2 lines
# aplay -D plughw:0,1 stereo.wav aplay: set_params:754: Access type not available
can you try it with the -I option, and also the -m option (in all combinations)?
--p
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
Quoted 12 lines · Paul Davis
Quoted 12 lines · Paul Davis
Quoted 10 lines
Quoted 3 lines
The problem with GUS synth is that it uses non-interleaved data layout so it's not relly useful for pcm stuff. alsa-lib doesn't want to do the required conversion for some reason.
i find this very suprising and somewhat hard to believe. the hammerfall also uses a non-interleaved data layout (as all the best cards do :), and yet despite the fact that the driver contains no code to handle an interleaved stream, aplay via plughw:N,0 works just fine i.e. alsa-lib handles the conversion perfectly. what makes you think it doesn't work?
Quoted 5 lines
Quoted 2 lines
# aplay -D plughw:0,1 stereo.wav aplay: set_params:754: Access type not availablecan you try it with the -I option, and also the -m option (in all combinations)?
I wont be able to do any testing until next week. I know -I works but AFAIK only with mono files. As I said it only works with up tp two files. Due to channels_max being hardcoded to 2 in snd_pcm_hardware_t. -I sets the access type to noninterleaved so it's not really the problem here.
Did you mean -M as in mmap? It's not supported anymore. There used to be some ugly hack to make it work but Jaroslav threw it out. It's interesting to note that capture claims to support mmap (I haven't tested). I don't understand what the actual problem with mmap and playback is. You'd have to ask Jaroslav.
Signature · 8 lines
Ville Syrjälä [email protected] http://www.sci.fi/~syrjala/ _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
Quoted 12 lines · On Fri, 7 Jun 2002, [iso-8859-1] Ville Syrj�l� wrote:
Quoted 10 lines · Paul Davis
Quoted 3 lines
The problem with GUS synth is that it uses non-interleaved data layout so it's not relly useful for pcm stuff. alsa-lib doesn't want to do the required conversion for some reason.
i find this very suprising and somewhat hard to believe. the hammerfall also uses a non-interleaved data layout (as all the best cards do :), and yet despite the fact that the driver contains no code to handle an interleaved stream, aplay via plughw:N,0 works just fine i.e. alsa-lib handles the conversion perfectly. what makes you think it doesn't work?
Quoted 5 lines
# aplay -D plughw:0,1 stereo.wav aplay: set_params:754: Access type not availableThere is a
snd_pcm_plug_change_access()function inpcm_plug.cso I'm thinking it should work, but it doesn't.
Could you try alsa-lib from current CVS? The problem is, that GUS Synth PCM device doesn't support mmaped access at the time, so mmap emulation in alsa-lib should be turned on. I've added a GUS.conf file to /usr/share/alsa/cards with redefinition of pcm.hw (mmap_emulation is set to on).
Jaroslav
-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project http://www.alsa-project.org
SuSE Linux http://www.suse.com
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
Quoted 17 lines · Jaroslav Kysela
Quoted 15 lines · On Fri, 7 Jun 2002, [iso-8859-1] Ville Syrjälä wrote:
Quoted 10 lines · Paul Davis
Quoted 3 lines
The problem with GUS synth is that it uses non-interleaved data layout so it's not relly useful for pcm stuff. alsa-lib doesn't want to do the required conversion for some reason.
i find this very suprising and somewhat hard to believe. the hammerfall also uses a non-interleaved data layout (as all the best cards do :), and yet despite the fact that the driver contains no code to handle an interleaved stream, aplay via plughw:N,0 works just fine i.e. alsa-lib handles the conversion perfectly. what makes you think it doesn't work?
# aplay -D plughw:0,1 stereo.wav aplay: set_params:754: Access type not available
Quoted 8 lines
Quoted 2 lines
There is a
snd_pcm_plug_change_access()function inpcm_plug.cso I'm thinking it should work, but it doesn't.Could you try alsa-lib from current CVS? The problem is, that GUS Synth PCM device doesn't support mmaped access at the time, so mmap emulation in alsa-lib should be turned on. I've added a GUS.conf file to
/usr/share/alsa/cardswith redefinition of pcm.hw (mmap_emulationis set to on).
No help from this. With or without -M.
$ aplay -D plughwtu:0,1 foo.wav Playing WAVE 'foo.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo ALSA lib pcm_plug.c:657:(snd_pcm_plug_hw_refine_schange) Unable to find an usable access for 'plughw:0,1' aplay: set_params:754: Access type not available
BTW you forgot to add GUS.conf to Makefile.am.
Signature · 8 lines
Ville Syrjälä [email protected] http://www.sci.fi/~syrjala/ _______________________________________________________________ Sponsored by: ThinkGeek at http://www.ThinkGeek.com/
Quoted 10 lines · Ville Syrjälä
Quoted 2 lines · Vincent Vanackere
I'm sorry to ask such a common question here, but I'd like to know if
it is possible to configure my (old) Gravis Ultrasound ISA PnP card in order to enable multiple open of/dev/dspwith alsa.Should be possible. With a GUS PnP you have to use the second pcm device. first one is the codec and second is the synth. That would be mapped to
/dev/adspfor OSS emulation. You have to pass the snd-interwave module snd_pcm_channels=n parameter where n is from 2 to 16.
So in that case, does it mean that by simply replacing /dev/dsp with a symlink to /dev/sound/adsp, I can have 2 different (and up to 16...) oss applications transparently accessing the sound card ? However, that sounds too easy to be true... I can't test this right now - I'm at work - but I'll have a try tonight.
Quoted 4 lines
The problem with GUS synth is that it uses non-interleaved data layout so it's not relly useful for pcm stuff. alsa-lib doesn't want to do the required conversion for some reason. Interwave supports also interleaved DMA but the driver doesn't use this feature.
I'm a little confused with this: is it related to/does that explain the fact that xmms crashes systematically when I set the alsa output to GUS/synth ?
Many thanks for your help,
Vincent
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm