[alsa-devel] gusclassic alsa configuration
Hi,
I have given another go to fix Gravis Ultrasound configuration for ALSA and I have found a working configuration. The Gravis Classic card uses non-mmap and non-interleaved sound format so aplay fails with standard configuration. Even worse, no default pcm device is defined so someone who wants just install Linux on old computer won't get any sound.
I have modified the GUS.conf from the /usr/share/alsa/cards and the GUS card now works with alsa and oss. My changes to the GUS.conf are below (as a diff).
Does anybody know how to upload MIDI instruments into the GUS card under ALSA? (like with awesfx for SB AWE)
Regards, Krzysztof
--- /usr/src/alsa/alsa-lib-1.0.18/src/conf/cards/GUS.conf 2008-10-29 13:42:10.000000000 +0100 +++ GUS.conf 2009-01-21 20:42:42.675215220 +0100 @@ -19,10 +19,12 @@ }
# -# It's a temporary solution. +# First route two channels to two other channels +# to drop mmap requirement. Then, use the mmap_emul +# plugin to allow using noninterleaved channels. #
-!pcm.hw { +!pcm.default { @args [ CARD DEV SUBDEV ] @args.CARD { type string @@ -58,9 +60,16 @@ name defaults.pcm.subdevice } } - type hw - card $CARD - device $DEV - subdevice $SUBDEV - mmap_emulation on + type route + slave.pcm { + type mmap_emul + slave.pcm { + type hw + card $CARD + device $DEV + subdevice $SUBDEV + } + } + ttable.0.0 1 + ttable.1.1 1 }
---------------------------------------------------------------------- Speak Up. Angielski szybko i skutecznie. 3 miesiace nauki gratis. Sprawdz. >> http://link.interia.pl/f2019
On Wed, Jan 21, 2009 at 10:35:07PM +0100, Krzysztof Helt wrote:
Hi,
I have given another go to fix Gravis Ultrasound configuration for ALSA and I have found a working configuration. The Gravis Classic card uses non-mmap and non-interleaved sound format so aplay fails with standard configuration. Even worse, no default pcm device is defined so someone who wants just install Linux on old computer won't get any sound.
I have modified the GUS.conf from the /usr/share/alsa/cards and the GUS card now works with alsa and oss. My changes to the GUS.conf are below (as a diff).
Does anybody know how to upload MIDI instruments into the GUS card under ALSA? (like with awesfx for SB AWE)
I think some of the related code was never brought over from the ultra sound project driver. MIDI emulation is at least missing. There was/is some support for loading at least simple instruments (eg. mod samples). I was trying to get mikmod to work with ALSA sequencer + GUS PNP at some point. I managed to get decent playback but I never got the timing related stuff working correctly. That was many years ago though. At the moment all of my GUS cards are gathering dust on the shelf but if you're going to hack around with this stuff I can at least volunteer as a tester.
My mikmod patch is still @ http://www.sci.fi/~syrjala/alsa/
At Wed, 21 Jan 2009 23:50:37 +0200, Ville Syrjälä wrote:
On Wed, Jan 21, 2009 at 10:35:07PM +0100, Krzysztof Helt wrote:
Hi,
I have given another go to fix Gravis Ultrasound configuration for ALSA and I have found a working configuration. The Gravis Classic card uses non-mmap and non-interleaved sound format so aplay fails with standard configuration. Even worse, no default pcm device is defined so someone who wants just install Linux on old computer won't get any sound.
I have modified the GUS.conf from the /usr/share/alsa/cards and the GUS card now works with alsa and oss. My changes to the GUS.conf are below (as a diff).
Does anybody know how to upload MIDI instruments into the GUS card under ALSA? (like with awesfx for SB AWE)
I think some of the related code was never brought over from the ultra sound project driver. MIDI emulation is at least missing. There was/is some support for loading at least simple instruments (eg. mod samples). I was trying to get mikmod to work with ALSA sequencer + GUS PNP at some point. I managed to get decent playback but I never got the timing related stuff working correctly. That was many years ago though. At the moment all of my GUS cards are gathering dust on the shelf but if you're going to hack around with this stuff I can at least volunteer as a tester.
The instrument layer was obsoleted, so you'll need to implement the sample uploader in a different way, e.g. via hwdep.
Takashi
Hi Takashi,
Any chance that this GUS.conf get into the alsa-lib so a non-ALSA-savvy Linux user would have at least working stereo playback "out of the box"?
Regards, Krzysztof
---------------------------------------------------------------------- Kochanka - kobieta drugiej kategorii? sprawdz >>>http://link.interia.pl/f2026
At Thu, 22 Jan 2009 17:33:32 +0100, Krzysztof Helt wrote:
Hi Takashi,
Any chance that this GUS.conf get into the alsa-lib so a non-ALSA-savvy Linux user would have at least working stereo playback "out of the box"?
Yes, sure, it should be fixed. But before applying it -- I wonder whether you can simply use "type plug" instead of route plugin. Could you check it?
Or, can't you simply remove these pcm.hw and pcm.default definitions and use the system-default one?
thanks,
Takashi
On Thu, 22 Jan 2009 17:34:30 +0100 Takashi Iwai tiwai@suse.de wrote:
At Thu, 22 Jan 2009 17:33:32 +0100, Krzysztof Helt wrote:
Hi Takashi,
Any chance that this GUS.conf get into the alsa-lib so a non-ALSA-savvy Linux user would have at least working stereo playback "out of the box"?
Yes, sure, it should be fixed. But before applying it -- I wonder whether you can simply use "type plug" instead of route plugin. Could you check it?
It works. The "plug" is even better as it allows conversion for u-law PCM and does not require to define the ttable.
Or, can't you simply remove these pcm.hw and pcm.default definitions and use the system-default one?
aplay returns error: "unable to install hw params".
Regards, Krzysztof
---------------------------------------------------------------------- Speak Up. Angielski szybko i skutecznie. 3 miesiace nauki gratis. Sprawdz. >> http://link.interia.pl/f2019
At Thu, 22 Jan 2009 23:11:05 +0100, Krzysztof Helt wrote:
On Thu, 22 Jan 2009 17:34:30 +0100 Takashi Iwai tiwai@suse.de wrote:
At Thu, 22 Jan 2009 17:33:32 +0100, Krzysztof Helt wrote:
Hi Takashi,
Any chance that this GUS.conf get into the alsa-lib so a non-ALSA-savvy Linux user would have at least working stereo playback "out of the box"?
Yes, sure, it should be fixed. But before applying it -- I wonder whether you can simply use "type plug" instead of route plugin. Could you check it?
It works. The "plug" is even better as it allows conversion for u-law PCM and does not require to define the ttable.
Or, can't you simply remove these pcm.hw and pcm.default definitions and use the system-default one?
aplay returns error: "unable to install hw params".
Hm. What about removing GUS.conf completely? Doesn't it work?
Takashi
On Fri, 23 Jan 2009 07:43:30 +0100 Takashi Iwai tiwai@suse.de wrote:
At Thu, 22 Jan 2009 23:11:05 +0100, Krzysztof Helt wrote:
On Thu, 22 Jan 2009 17:34:30 +0100 Takashi Iwai tiwai@suse.de wrote:
Or, can't you simply remove these pcm.hw and pcm.default definitions and use the system-default one?
aplay returns error: "unable to install hw params".
Hm. What about removing GUS.conf completely? Doesn't it work?
It gives the same error message: "unable to install hw params".
Regards, Krzysztof
At Fri, 23 Jan 2009 13:09:22 +0100, Krzysztof Helt wrote:
On Fri, 23 Jan 2009 07:43:30 +0100 Takashi Iwai tiwai@suse.de wrote:
At Thu, 22 Jan 2009 23:11:05 +0100, Krzysztof Helt wrote:
On Thu, 22 Jan 2009 17:34:30 +0100 Takashi Iwai tiwai@suse.de wrote:
Or, can't you simply remove these pcm.hw and pcm.default definitions and use the system-default one?
aplay returns error: "unable to install hw params".
Hm. What about removing GUS.conf completely? Doesn't it work?
It gives the same error message: "unable to install hw params".
OK, then let's define the default config for GUS at first, then fix the system-wide default making somehow better.
Could you post the latest patch?
thanks,
Takashi
On Fri, 23 Jan 2009 14:42:45 +0100 Takashi Iwai tiwai@suse.de wrote:
OK, then let's define the default config for GUS at first, then fix the system-wide default making somehow better.
Could you post the latest patch?
The latest version of the GUS.conf is below. I have found that the issue is probably the same as the ALSA bug #1770 so it should be closed/fixed if the change is applied to ALSA.
Regards, Krzysztof
--- /usr/src/alsa/alsa-lib-1.0.18/src/conf/cards/GUS.conf 2008-10-29 13:42:10.000000000 +0100 +++ alsa/cards/GUS.conf 2009-01-25 09:03:56.738474703 +0100 @@ -19,10 +19,12 @@ GUS.pcm.front.0 { }
# -# It's a temporary solution. +# First route with plug to drop mmap requirement. +# Then, use the mmap_emul plugin to allow using +# noninterleaved channels. #
-!pcm.hw { +!pcm.default { @args [ CARD DEV SUBDEV ] @args.CARD { type string @@ -58,9 +60,14 @@ GUS.pcm.front.0 { name defaults.pcm.subdevice } } - type hw - card $CARD - device $DEV - subdevice $SUBDEV - mmap_emulation on + type plug + slave.pcm { + type mmap_emul + slave.pcm { + type hw + card $CARD + device $DEV + subdevice $SUBDEV + } + } }
---------------------------------------------------------------------- Promocja w Speak Up. 3 miesiace angielskiego gratis. Sprawdz teraz i wypelnij formularz! >> http://link.interia.pl/f2019
On Sun, Jan 25, 2009 at 09:19:23AM +0100, Krzysztof Helt wrote:
@@ -58,9 +60,14 @@ GUS.pcm.front.0 { name defaults.pcm.subdevice } }
- type hw
- card $CARD
- device $DEV
- subdevice $SUBDEV
- mmap_emulation on
- type plug
- slave.pcm {
type mmap_emul
slave.pcm {
type hw
card $CARD
device $DEV
subdevice $SUBDEV
}
- }
}
BTW are these settings also applied to the cs4231/es1688 pcm device on gus max, gus exterme and interwave cards?
At Sun, 25 Jan 2009 11:50:58 +0200, Ville Syrjälä wrote:
On Sun, Jan 25, 2009 at 09:19:23AM +0100, Krzysztof Helt wrote:
@@ -58,9 +60,14 @@ GUS.pcm.front.0 { name defaults.pcm.subdevice } }
- type hw
- card $CARD
- device $DEV
- subdevice $SUBDEV
- mmap_emulation on
- type plug
- slave.pcm {
type mmap_emul
slave.pcm {
type hw
card $CARD
device $DEV
subdevice $SUBDEV
}
- }
}
BTW are these settings also applied to the cs4231/es1688 pcm device on gus max, gus exterme and interwave cards?
Now the system-wide default config works, so it should be OK no matter which model is.
Takashi
At Sun, 25 Jan 2009 09:19:23 +0100, Krzysztof Helt wrote:
On Fri, 23 Jan 2009 14:42:45 +0100 Takashi Iwai tiwai@suse.de wrote:
OK, then let's define the default config for GUS at first, then fix the system-wide default making somehow better.
Could you post the latest patch?
The latest version of the GUS.conf is below. I have found that the issue is probably the same as the ALSA bug #1770 so it should be closed/fixed if the change is applied to ALSA.
Thanks, applied now.
BTW, I fixed the plug issue right now on GIT tree. Could you try it and check whether it works even without GUS.conf file?
Takashi
On Tue, 27 Jan 2009 17:30:59 +0100 Takashi Iwai tiwai@suse.de wrote:
BTW, I fixed the plug issue right now on GIT tree. Could you try it and check whether it works even without GUS.conf file?
Now it works without the GUS.conf file.
Regards, Krzysztof
---------------------------------------------------------------------- Konkurs Walentynkowy! Wybierz nagrode i wygraj! Sprawdz >> http://link.interia.pl/f2039
At Tue, 27 Jan 2009 21:41:31 +0100, Krzysztof Helt wrote:
On Tue, 27 Jan 2009 17:30:59 +0100 Takashi Iwai tiwai@suse.de wrote:
BTW, I fixed the plug issue right now on GIT tree. Could you try it and check whether it works even without GUS.conf file?
Now it works without the GUS.conf file.
Great. Then let's rip off the hackish default config in GUS.conf.
thanks,
Takashi
participants (3)
-
Krzysztof Helt
-
Takashi Iwai
-
Ville Syrjälä