* Can someone verify support for "AzTech Sound Galaxy Nova 16 Extra II-3D - using AZT-2316/R Chipset - FCC-ID:I38-MMSN846" ?
@ 2007-05-07 5:46 ramkromberg
2007-05-07 20:51 ` Rene Herman
0 siblings, 1 reply; 27+ messages in thread
From: ramkromberg @ 2007-05-07 5:46 UTC (permalink / raw)
To: alsa-devel
Hello alsa devs,
I have an old "AzTech Sound Galaxy Nova 16 Extra II-3D - using AZT-2316/R
Chipset - FCC-ID:I38-MMSN846" which I know to work on windows 2000
natively and on other windows using drivers from
http://www.aztech.com/support_download_soundcard01.html, however, I was
unsuccessful in using it in linux ( I tried many dists, but my most
recent failure was with xubuntu 7.04 which have the most recent alsa).
I believe the card is unsupported in alsa and I was hoping someone might
be free to help me with this legacy card ?
Since the card is unsupported I figured this should go the devs.
* Their is this piece of code which might be relevant:
http://www.gelato.unsw.edu.au/lxr/source/sound/isa/azt2320.c
21 This driver should provide support for most Aztech AZT2320 based
cards.
22 Several AZT2316 chips are also supported/tested, but autoprobe
doesn't
23 work: all module option have to be set.
* I'm unsure of what it means to configure manually or how to do so...
I do however have the card working currently with windows 2000 so if its
a question of IRQ and DMA, I can find those with relative ease.
* I obviously tried modprobeing the snd-sgalaxy driver/module, with no
success - possibly related ?
Thanks
Ram Kromberg
ramkromberg@mail.com
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Can someone verify support for "AzTech Sound Galaxy Nova 16 Extra II-3D - using AZT-2316/R Chipset - FCC-ID:I38-MMSN846" ?
2007-05-07 5:46 ramkromberg
@ 2007-05-07 20:51 ` Rene Herman
2007-05-10 14:56 ` Rene Herman
0 siblings, 1 reply; 27+ messages in thread
From: Rene Herman @ 2007-05-07 20:51 UTC (permalink / raw)
To: ramkromberg; +Cc: alsa-devel
On 05/07/2007 07:46 AM, ramkromberg@mail.com wrote:
> I have an old "AzTech Sound Galaxy Nova 16 Extra II-3D - using AZT-2316/R
> Chipset - FCC-ID:I38-MMSN846"
I have a few similar cards. Also a "Nova 16 Extra" in fact, but that one an
older AZT1605 based version (I38-MMSN811). My closest match is probably a
"Sound Galaxy Waverider Pro 32-3D" (I38-MMSN811852) which is a AZT2316R +
CS4231 (+ an AZT3321 wavetable). Have a number of AZT2316A cards as well.
> I believe the card is unsupported in alsa and I was hoping someone might
> be free to help me with this legacy card ?
It's at least "unsupported" in the sense that noone is supporting it yes :-)
As you have noticed, snd-sgalaxy will not work for this card. "sgalaxy" is
actually a really unfortunate name for that driver as Aztech named _all_
their cards "Sound Galaxy" and snd-sgalaxy only drives the couple with a
AZT1605 chip on them. The module should preferably be renamed.
As you also found out, snd-azt2320 will not work as is as that's an ISA-PnP
only driver and the AZT2316A/R is legacy ISA. The drivers are not more than
shells around the cs4231 library though and can be made to work with
relative ease. I was actually working on snd-sgalaxy a while ago and briefly
looked at my azt2316 cards as well but a few other things intervened again.
Let's first see if your card is as expected. It should have a "JMPB0" on it
somewhere that you can use to choose between 0x22x and 0x24x as the base
address. Look which one it's using (the windows driver will also tell).
Then, there should be a "JMPCFG" jumper on the card somewhere where 1-2
means "use EEPROM settings" and 2-3 "use software settings". For use in
Linux, you should (at least for now) set it to EEPROM so that the card will
enable itself and not wait for the driver to do so.
If you have that done, you should already be able to use it in it's basic
Soundblaster Pro mode. Try loading snd-sb8 with:
modprobe snd-sb8 port=0x220 irq=5 dma8=1
This is not unlikely to work (change 0x220 to 0x240 if the jumper is set to
the other one ofcourse). If it's giving you a load "hum" on the speakers
immediately after loading use the DOS mixer application to mute all and save
to the EEPROM.
I can help with getting the rest to work (where "the rest" is the MIDI port
and the cs4231 codec which it offers instead of the sb8 mode as well) in a
few weeks time, but maybe you won't even care greatly -- it's "instead of"
and while the cs4231 is in principle the better chip these days it's all
water under the bridge; they're _both_ old crap. But yes, I'll also want my
2316A/R cards supported again so if you have a while, I'll get to it...
Rene.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Can someone verify support for "AzTech Sound Galaxy Nova 16 Extra II-3D - using AZT-2316/R Chipset - FCC-ID:I38-MMSN846" ?
2007-05-07 20:51 ` Rene Herman
@ 2007-05-10 14:56 ` Rene Herman
0 siblings, 0 replies; 27+ messages in thread
From: Rene Herman @ 2007-05-10 14:56 UTC (permalink / raw)
To: ramkromberg; +Cc: alsa-devel
[-- Attachment #1: Type: text/plain, Size: 3215 bytes --]
On 05/07/2007 10:51 PM, Rene Herman wrote:
> As you have noticed, snd-sgalaxy will not work for this card. "sgalaxy"
> is actually a really unfortunate name for that driver as Aztech named
> _all_ their cards "Sound Galaxy" and snd-sgalaxy only drives the couple
> with a AZT1605 chip on them.
Actually, snd-sgalaxy doesn't work for the AZT2316A cards that I've tried it
with (two different types) but it _does_ in fact work for my AZT2316R based
"Sound Galaxy Waverider Pro 32-3D" (I38-MMSN852) that is a very close match
to your "Nova 16 Extra II-3D" (I38-MMSN846).
Please first make sure the EEPROM on the card contains sensible values for
which you'll unfortunately need the DOS utilities (once). They can be had from:
ftp://ftp.aztech.com/download/sg/NOV16EII
After installation, C:\FOO\UTILITY\ contains CONFIG.EXE, HWSET.EXE,
VOLSET.EXE, DIAGNOSE.EXE, ...
Running "HWSET /MR /MS" (and "VOLSET /MR /MS") will restore factory default
values to the EEPROM which means SB = 0x220, irq 5, dma 1 and WSS = 0x530.
The DOS utilities use IRQ 10 as the WSS IRQ but that one didn't work under
Linux for me. Too many possible reasons why not though, so try it. The WSS
part can be configured on IRQ 7, 9, 10 and 11 and 7 worked for me. Make sure
you also set your BIOS to reserve this IRQ and the SB IRQ and DMA (which the
WSS part shares) for "legacy ISA".
When you've done that (or they were sensible to start with) you should both
be able to load snd-sb8 as adviced in the previous message:
modprobe snd-sb8 port=0x220 irq=5 dma8=1
and snd-sgalaxy for access to the WSS part:
modprobe snd-sgalaxy sbport=0x220 wssport=0x530
The sgalaxy driver will grab IRQ7 when it's free.
But...
Before I noticed that sgalaxy would in fact work on my 2316R I had already
done most of a new "azt2316" driver. Filling in the hardware details showed
that sgalaxy actually worked for the 2316R (again, not for my 2316A cards).
snd-sgalaxy is not a nice driver so I did complete it and renamed it to
snd-azt1605. It's attached as a patch against kernel 2.6.21. If you don't
know what that means or what to do with it, never mind, both sb8 and sgalaxy
should as said also work.
The attached driver is a bit better in so far that it keeps the SB part
reserved after switching to WSS (we don't want anyone resetting our bus
interface out from under us while we're happily playing MP3s), provides
access to the onboard MPU-401 (MIDI port) and OPL3 (FM synthesis chip) and
allows to tell the driver where you want the wss_irq yourself. If you want
to try it out, it should be loaded as:
modprobe snd-azt1605 port=0x220 irq=5 dma=1 wss_port=0x530 wss_irq=7
Also specify mpu_port=0x330 (and possibly mpu_irq=9) and fm_port=0x388 if
you want MPU-401 and OPL3 enabled.
It's been only quickly tested on AZT1605 and AZT2316R and I'm not submitting
this or anything. AZT2316A not working is probably something small but it's
going to need trial & error and/or poking around in the DOS utilities and I
don't have time for either at the moment.
It does show promise for eventually having one unified snd-galaxy driver (I
hate that s!) with AZT2320 folded back in as well...
Hope this helps.
Rene.
[-- Attachment #2: azt1605.diff --]
[-- Type: text/plain, Size: 10374 bytes --]
diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig
index 4e3a972..d7bb734 100644
--- a/sound/isa/Kconfig
+++ b/sound/isa/Kconfig
@@ -63,6 +63,19 @@ config SND_ALS100
To compile this driver as a module, choose M here: the module
will be called snd-als100.
+config SND_AZT1605
+ tristate "Aztech AZT1605/2316 Driver"
+ depends on SND
+ select SND_CS4231_LIB
+ select SND_MPU401_UART
+ select SND_OPL3_LIB
+ help
+ Say Y here to include support for Aztech AZT1605/2316 based
+ soundcards.
+
+ To compile this driver as a module, choose M here: the module
+ will be called snd-azt1605.
+
config SND_AZT2320
tristate "Aztech Systems AZT2320"
depends on SND && PNP && ISA
diff --git a/sound/isa/sb/Makefile b/sound/isa/sb/Makefile
index fd9d9c5..73912bf 100644
--- a/sound/isa/sb/Makefile
+++ b/sound/isa/sb/Makefile
@@ -12,6 +12,7 @@ snd-sb16-objs := sb16.o
snd-sbawe-objs := sbawe.o emu8000.o
snd-emu8000-synth-objs := emu8000_synth.o emu8000_callback.o emu8000_patch.o emu8000_pcm.o
snd-es968-objs := es968.o
+snd-azt1605-objs := azt1605.o
#
# this function returns:
@@ -23,6 +24,7 @@ sequencer = $(if $(subst y,,$(CONFIG_SND_SEQUENCER)),$(if $(1),m),$(if $(CONFIG_
# Toplevel Module Dependency
obj-$(CONFIG_SND_ALS100) += snd-sb16-dsp.o snd-sb-common.o
+obj-$(CONFIG_SND_AZT1605) += snd-azt1605.o snd-sb8-dsp.o snd-sb-common.o
obj-$(CONFIG_SND_CMI8330) += snd-sb16-dsp.o snd-sb-common.o
obj-$(CONFIG_SND_DT019X) += snd-sb16-dsp.o snd-sb-common.o
obj-$(CONFIG_SND_SB8) += snd-sb8.o snd-sb8-dsp.o snd-sb-common.o
diff --git a/sound/isa/sb/azt1605.c b/sound/isa/sb/azt1605.c
new file mode 100644
index 0000000..7eeac01
--- /dev/null
+++ b/sound/isa/sb/azt1605.c
@@ -0,0 +1,350 @@
+/*
+ * Aztech AZT1605 Driver (also works for AZT2316R, not AZT2316A)
+ */
+
+#include <sound/driver.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/isa.h>
+#include <linux/delay.h>
+#include <asm/io.h>
+#include <sound/core.h>
+#include <sound/initval.h>
+#include <sound/sb.h>
+#include <sound/cs4231.h>
+#include <sound/mpu401.h>
+#include <sound/opl3.h>
+
+#define CRD_NAME "Aztech AZT1605"
+#define DRV_NAME "AZT1605"
+#define DEV_NAME "azt1605"
+
+MODULE_DESCRIPTION(CRD_NAME);
+MODULE_AUTHOR("Rene Herman");
+MODULE_LICENSE("GPL");
+
+static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
+static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
+static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE;
+
+module_param_array(index, int, NULL, 0444);
+MODULE_PARM_DESC(index, "Index value for " CRD_NAME " soundcard.");
+module_param_array(id, charp, NULL, 0444);
+MODULE_PARM_DESC(id, "ID string for " CRD_NAME " soundcard.");
+module_param_array(enable, bool, NULL, 0444);
+MODULE_PARM_DESC(enable, "Enable " CRD_NAME " soundcard.");
+
+static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;
+static long wss_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;
+static long mpu_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;
+static long fm_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;
+static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;
+static int wss_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;
+static int mpu_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;
+static int dma[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;
+
+module_param_array(port, long, NULL, 0444);
+MODULE_PARM_DESC(port, "Port # for " CRD_NAME " driver.");
+module_param_array(wss_port, long, NULL, 0444);
+MODULE_PARM_DESC(wss_port, "WSS port # for " CRD_NAME " driver.");
+module_param_array(mpu_port, long, NULL, 0444);
+MODULE_PARM_DESC(mpu_port, "MPU-401 port # for " CRD_NAME " driver.");
+module_param_array(fm_port, long, NULL, 0444);
+MODULE_PARM_DESC(fm_port, "OPL3 port # for " CRD_NAME " driver.");
+module_param_array(irq, int, NULL, 0444);
+MODULE_PARM_DESC(irq, "IRQ # for " CRD_NAME " driver.");
+module_param_array(wss_irq, int, NULL, 0444);
+MODULE_PARM_DESC(wss_irq, "WSS IRQ # for " CRD_NAME " driver.");
+module_param_array(mpu_irq, int, NULL, 0444);
+MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for " CRD_NAME " driver.");
+module_param_array(dma, int, NULL, 0444);
+MODULE_PARM_DESC(dma, "DMA # for " CRD_NAME " driver.");
+
+static int __devinit snd_azt1605_match(struct device *dev, unsigned int n)
+{
+ int match = enable[n];
+
+ if (!match)
+ goto out;
+
+ match = port[n] != SNDRV_AUTO_PORT;
+ if (!match) {
+ snd_printk(KERN_ERR "%s: please specify port\n", dev->bus_id);
+ goto out;
+ }
+
+ match = irq[n] != SNDRV_AUTO_IRQ;
+ if (!match) {
+ snd_printk(KERN_ERR "%s: please specify irq\n", dev->bus_id);
+ goto out;
+ }
+
+ match = dma[n] != SNDRV_AUTO_DMA;
+ if (!match) {
+ snd_printk(KERN_ERR "%s: please specify dma\n", dev->bus_id);
+ goto out;
+ }
+
+ if (wss_port[n] != SNDRV_AUTO_PORT) {
+ match = wss_irq[n] != SNDRV_AUTO_IRQ;
+ if (!match) {
+ snd_printk(KERN_ERR "%s: please specify wss_irq\n",
+ dev->bus_id);
+ goto out;
+ }
+ match = wss_irq[n] != irq[n];
+ if (!match) {
+ snd_printk(KERN_ERR "%s: cannot share IRQ between SB "
+ "and WSS\n", dev->bus_id);
+ goto out;
+ }
+ } else {
+ snd_printk(KERN_WARNING "%s: wss_port not specified: using SB "
+ "mode\n", dev->bus_id);
+ wss_port[n] = -1;
+ }
+
+ if (mpu_port[n] != SNDRV_AUTO_PORT) {
+ if (mpu_irq[n] == SNDRV_AUTO_IRQ) {
+ snd_printk(KERN_WARNING "%s: mpu_irq not specified: "
+ "using polling mode\n", dev->bus_id);
+ mpu_irq[n] = -1;
+ }
+ } else {
+ snd_printk(KERN_WARNING "%s: mpu_port not specified: not using "
+ "MPU-401\n", dev->bus_id);
+ mpu_port[n] = -1;
+ }
+
+ if (fm_port[n] == SNDRV_AUTO_PORT) {
+ snd_printk(KERN_WARNING "%s: fm_port not specified: not using "
+ "OPL3\n", dev->bus_id);
+ fm_port[n] = -1;
+ }
+
+out: return match;
+}
+
+static int __devinit snd_azt1605_wssmode(struct snd_sb *sb, unsigned long port,
+ int irq)
+{
+ unsigned char val;
+ int error;
+
+ error = snd_sbdsp_reset(sb);
+ if (error < 0)
+ goto out;
+
+ error = snd_sbdsp_command(sb, 9);
+ if (error < 0)
+ goto out;
+
+ error = snd_sbdsp_command(sb, 0);
+ if (error < 0)
+ goto out;
+
+ msleep(100);
+
+ /* check WSS signature */
+ if ((inb(port + 3) & 0x3f) != 4) {
+ error = -ENODEV;
+ goto out;
+ }
+
+ switch (irq) {
+ case 7:
+ val = 1 << 3;
+ break;
+ case 9:
+ val = 2 << 3;
+ break;
+ case 10:
+ val = 3 << 3;
+ break;
+ case 11:
+ val = 4 << 3;
+ break;
+ default:
+ error = -EINVAL;
+ goto out;
+ }
+ outb(0x40 | val, port);
+
+ switch (sb->dma8) {
+ case 0:
+ val |= 1;
+ break;
+ case 1:
+ val |= 2;
+ break;
+ case 3:
+ val |= 3;
+ break;
+ default:
+ error = -EINVAL;
+ goto out;
+ }
+ outb(val, port);
+
+out: return error;
+}
+
+static irqreturn_t snd_azt1605_interrupt(int irq, void *dev_id)
+{
+ struct snd_sb *sb = dev_id;
+ irqreturn_t ret = IRQ_NONE;
+
+ if (!sb->card->private_data) {
+ if (sb->open & SB_OPEN_PCM)
+ ret = snd_sb8dsp_interrupt(sb);
+ else
+ ret = snd_sb8dsp_midi_interrupt(sb);
+ }
+ return ret;
+}
+
+static void snd_azt1605_free(struct snd_card *card)
+{
+ release_and_free_resource(card->private_data);
+}
+
+static int __devinit snd_azt1605_probe(struct device *dev, unsigned int n)
+{
+ struct snd_card *card;
+ struct snd_sb *sb;
+ int error;
+
+ card = snd_card_new(index[n], id[n], THIS_MODULE, 0);
+ if (!card)
+ return -EINVAL;
+
+ snd_card_set_dev(card, dev);
+
+ error = snd_sbdsp_create(card, port[n], irq[n], snd_azt1605_interrupt,
+ dma[n], -1, SB_HW_AUTO, &sb);
+ if (error < 0)
+ goto out;
+
+ if (wss_port[n] >= 0) {
+ struct snd_cs4231 *wss;
+
+ card->private_data = request_region(wss_port[n], 4, DRV_NAME);
+ if (!card->private_data) {
+ snd_printk(KERN_ERR "%s: ports %#lx-%#lx unavailable\n",
+ dev->bus_id, wss_port[n], wss_port[n] + 3);
+ error = -EBUSY;
+ goto out;
+ }
+ card->private_free = snd_azt1605_free;
+
+ error = snd_azt1605_wssmode(sb, wss_port[n], wss_irq[n]);
+ if (error < 0) {
+ snd_printk(KERN_ERR "%s: " CRD_NAME " not detected\n",
+ dev->bus_id);
+ goto out;
+ }
+
+ error = snd_cs4231_create(card, wss_port[n] + 4, -1, wss_irq[n],
+ dma[n], -1, CS4231_HW_DETECT,
+ CS4231_HWSHARE_DMA1, &wss);
+ if (error < 0)
+ goto out;
+
+ error = snd_cs4231_pcm(wss, 0, NULL);
+ if (error < 0)
+ goto out;
+
+ error = snd_cs4231_mixer(wss);
+ if (error < 0)
+ goto out;
+
+ error = snd_cs4231_timer(wss, 0, NULL);
+ if (error < 0)
+ goto out;
+
+ sprintf(card->shortname, snd_cs4231_chip_id(wss));
+ sprintf(card->longname, "%s at %#lx, irq %d, dma %d",
+ card->shortname, wss->port, wss->irq, wss->dma1);
+ } else {
+ error = snd_sb8dsp_pcm(sb, 0, NULL);
+ if (error < 0)
+ goto out;
+
+ error = snd_sbmixer_new(sb);
+ if (error < 0)
+ goto out;
+
+ sprintf(card->shortname, sb->name);
+ sprintf(card->longname, "%s at %#lx, irq %d, dma %d",
+ card->shortname, sb->port, sb->irq, sb->dma8);
+ }
+ strcpy(card->driver, DRV_NAME);
+
+ if (mpu_port[n] >= 0) {
+ error = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401,
+ mpu_port[n], 0, mpu_irq[n],
+ mpu_irq[n] < 0 ? 0 : IRQF_DISABLED,
+ NULL);
+ if (error < 0)
+ goto out;
+ }
+
+ if (fm_port[n] >= 0) {
+ struct snd_opl3 *opl3;
+
+ error = snd_opl3_create(card, fm_port[n], fm_port[n] + 2,
+ OPL3_HW_AUTO, 0, &opl3);
+ if (error < 0) {
+ snd_printk(KERN_ERR "%s: no OPL device at %#lx\n",
+ dev->bus_id, fm_port[n]);
+ goto out;
+ }
+ error = snd_opl3_timer_new(opl3, 1, 2);
+ if (error < 0)
+ goto out;
+
+ error = snd_opl3_hwdep_new(opl3, 0, 1, NULL);
+ if (error < 0)
+ goto out;
+ }
+
+ error = snd_card_register(card);
+ if (error < 0)
+ goto out;
+
+ dev_set_drvdata(dev, card);
+ return 0;
+
+out: snd_card_free(card);
+ return error;
+}
+
+static int __devexit snd_azt1605_remove(struct device *dev, unsigned int n)
+{
+ snd_card_free(dev_get_drvdata(dev));
+ dev_set_drvdata(dev, NULL);
+ return 0;
+}
+
+static struct isa_driver snd_azt1605_driver = {
+ .match = snd_azt1605_match,
+ .probe = snd_azt1605_probe,
+ .remove = __devexit_p(snd_azt1605_remove),
+
+ .driver = {
+ .name = DEV_NAME
+ }
+};
+
+static int __init alsa_card_azt1605_init(void)
+{
+ return isa_register_driver(&snd_azt1605_driver, SNDRV_CARDS);
+}
+
+static void __exit alsa_card_azt1605_exit(void)
+{
+ isa_unregister_driver(&snd_azt1605_driver);
+}
+
+module_init(alsa_card_azt1605_init);
+module_exit(alsa_card_azt1605_exit);
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: Can someone verify support for "AzTech Sound Galaxy Nova 16 Extra II-3D - using AZT-2316/R Chipset - FCC-ID:I38-MMSN846" ?
@ 2007-05-10 18:24 ramkromberg
0 siblings, 0 replies; 27+ messages in thread
From: ramkromberg @ 2007-05-10 18:24 UTC (permalink / raw)
To: Rene Herman; +Cc: alsa-devel
I already installed dos + the drivers and ubuntu, So I'll try working
with that.
As far as I can tell from the win95 driver name, the "AzTech Sound Galaxy
Nova 16 Extra II-3D - using AZT-2316/R Chipset - FCC-ID:I38-MMSN846" is
full-duplex : In :
http://www.aztech.com/support_download_soundcard01.html :
2316FD95.ZIP 90,526 Windows 95 Full Duplex Audio Driver Version 4.8.0
Build 1128
I will try working with the software first, then probably either the
epprom or the jumper (since I have dos + drivers working I'm tempted to
try the epprom first ;-) )
I can't at the moment compile in that machine (My poor little xubuntu is
barely working as it is, I don't even dare installing samba let alone a
dev-env of any sorts..., maybe when I'll get everything working I'll
install slackware, I decided gentoo is not a good idea ;-) ) so I won't
be testing your drivers any time soon :-( , I do however hope you'll
submit your drivers cause a non PnP driver can't hurt and waiting for
confirms on such old hw will be point-less...
When I'll have results I'll let you know...
Also, I'm CCing the mailing list now as pair request...
Thanks Rene,
Ram Kromberg
ramkromberg@mail.com
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Can someone verify support for "AzTech Sound Galaxy Nova 16 Extra II-3D - using AZT-2316/R Chipset - FCC-ID:I38-MMSN846" ?
@ 2007-05-10 20:57 ramkromberg
2007-05-10 21:06 ` Rene Herman
0 siblings, 1 reply; 27+ messages in thread
From: ramkromberg @ 2007-05-10 20:57 UTC (permalink / raw)
To: Rene Herman; +Cc: alsa-devel
Well, it didn't take long so here's the results :
"sudo modprobe snd-sb8 port=0x220 irq=5 dma8=1" gave no errors, and
"lsmod" later gave:
Module Size Used by
snd_sb8 9216 0
snd_sb8_dsp 12288 1 snd_sb8
snd_sb_common 17792 2 snd_sb8,snd_sb8_dsp
snd_opl3_lib 11520 1 snd_sb8
snd_hwdep 9988 1 snd_opl3_lib
snd_pcm_oss 44544 0
snd_pcm 79876 3 snd_sb8,snd_sb8_dsp,snd_pcm_oss
snd_mixer_oss 17408 1 snd_pcm_oss
snd_seq_dummy 4740 0
snd_seq_oss 32896 0
snd_seq_midi 9600 0
snd_rawmidi 25472 2 snd_sb8_dsp,snd_seq_midi
snd_seq_midi_event 8448 2 snd_seq_oss,snd_seq_midi
snd_seq 52592 6
snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
snd_timer 23684 3 snd_opl3_lib,snd_pcm,snd_seq
snd_seq_device 9100 6
snd_opl3_lib,snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
snd 54020 13
snd_sb8,snd_sb8_dsp,snd_sb_common,snd_opl3_lib,snd_hwdep,snd_pcm_oss,snd_pcm,snd_mixer_oss,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
soundcore 8672 1 snd
snd_page_alloc 10888 1 snd_pcm
nfs 240876 0
nfsd 218992 17
exportfs 6912 1 nfsd
lockd 64904 3 nfs,nfsd
sunrpc 161340 12 nfs,nfsd,lockd
apm 22752 1
ppdev 10116 0
cpufreq_stats 7360 0
cpufreq_ondemand 9228 0
cpufreq_powersave 2688 0
freq_table 5792 2 cpufreq_stats,cpufreq_ondemand
cpufreq_conservative 8200 0
cpufreq_userspace 5408 0
nls_iso8859_1 5120 1
nls_cp437 6784 1
vfat 14208 1
fat 53916 1 vfat
ext2 66824 1
lp 12452 0
parport_pc 36388 1
parport 36936 3 ppdev,lp,parport_pc
pcspkr 4224 0
ipv6 268704 8
tsdev 8768 0
evdev 11008 1
ext3 133128 1
jbd 59816 1 ext3
mbcache 9604 2 ext2,ext3
8139too 27648 0
ide_cd 32672 0
cdrom 37664 1 ide_cd
ide_disk 17024 5
floppy 59524 0
ehci_hcd 34188 0
8139cp 25088 0
mii 6528 2 8139too,8139cp
uhci_hcd 25360 0
usbcore 134280 3 ehci_hcd,uhci_hcd
piix 10756 0 [permanent]
generic 5124 0 [permanent]
ata_generic 9092 0
libata 125720 1 ata_generic
scsi_mod 142348 1 libata
fbcon 42656 0
tileblit 3584 1 fbcon
font 9216 1 fbcon
bitblit 6912 1 fbcon
softcursor 3200 1 bitblit
vesafb 9220 0
capability 5896 0
commoncap 8192 1 capability
But when I try to play an ogg gxine crushes an xmms
ignores, when trying an mp3 gxine again crushes and
xmms gives the soundcard no configured error...
Just a recap: I verifyed using dos the settings
(hwset and volset - default and save), and used the bios
to set "IRQ 5" as "ISA Legacy".
I didn't use the jumper as I see no need since the epprom
already does the job.
So I'm stuck,
What do you think I should do now ?
Ram Kromberg
ramkromberg@mail.com
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Can someone verify support for "AzTech Sound Galaxy Nova 16 Extra II-3D - using AZT-2316/R Chipset - FCC-ID:I38-MMSN846" ?
2007-05-10 20:57 ramkromberg
@ 2007-05-10 21:06 ` Rene Herman
0 siblings, 0 replies; 27+ messages in thread
From: Rene Herman @ 2007-05-10 21:06 UTC (permalink / raw)
To: ramkromberg; +Cc: alsa-devel
On 05/10/2007 10:57 PM, ramkromberg@mail.com wrote:
> Just a recap: I verifyed using dos the settings
> (hwset and volset - default and save), and used the bios
> to set "IRQ 5" as "ISA Legacy".
>
> I didn't use the jumper as I see no need since the epprom
> already does the job.
I don't understand what you mean here. You need to set the JMPCFG jumper to
the EEPROM setting so that the card will configure itself at poweron using
the values stored in its EEPROM and not wait for a driver to configure and
enable it (which the Linux driver does not do).
Rene.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Can someone verify support for "AzTech Sound Galaxy Nova 16 Extra II-3D - using AZT-2316/R Chipset - FCC-ID:I38-MMSN846" ?
@ 2007-05-11 16:44 ramkromberg
2007-05-11 21:42 ` Rene Herman
0 siblings, 1 reply; 27+ messages in thread
From: ramkromberg @ 2007-05-11 16:44 UTC (permalink / raw)
To: Rene Herman; +Cc: alsa-devel
o, I thought the epprom settings are default until the
driver kicks in...
So I set the jumpers accordingly and still no luck:
IDESEL: 1-2 (Disabled - Its the CD IDE ON\OFF)
JMPCFG: 1-2 (EPPROM ON)
JMPB0: 1-2 (22XH)
IDEIRQ: 1 (IRQ 15 - shouldn't make a different)
JX1: 2-3 (Carbon MIC - again just letting you know though it shouldn't
make a different)
This should make sense with the picture I sent earlier...
I also removed another card I had connected - ISA Modem, Just making sure
their are no conflicts...
Here's the grim results:
sudo modprobe snd-sb8 port=0x220 irq=5 dma8=1
FATAL: Error inserting snd_sb8
(/lib/modules/2.6.20-15-generic/kernel/sound/isa/sb/snd-sb8.ko): No such
device
P.S: Also an interesting note is that I now installed Win98 on top of
that Dos and it worked too -
It did also mention to use IRQ 11 so I also reserved in the bios, but
again to no avail.
Maybe I'm missing something ?
Ram Kromberg
ramkromberg@mail.com
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Can someone verify support for "AzTech Sound Galaxy Nova 16 Extra II-3D - using AZT-2316/R Chipset - FCC-ID:I38-MMSN846" ?
2007-05-11 16:44 ramkromberg
@ 2007-05-11 21:42 ` Rene Herman
0 siblings, 0 replies; 27+ messages in thread
From: Rene Herman @ 2007-05-11 21:42 UTC (permalink / raw)
To: ramkromberg; +Cc: alsa-devel
On 05/11/2007 06:44 PM, ramkromberg@mail.com wrote:
> o, I thought the epprom settings are default until the
> driver kicks in...
Only if you set the JMPCFG jumper to EEPROM; otherwise the card's just dead
in the water until software enables it (by writing to some specific I/O
port; not sure which).
> So I set the jumpers accordingly and still no luck:
> IDESEL: 1-2 (Disabled - Its the CD IDE ON\OFF)
> JMPCFG: 1-2 (EPPROM ON)
> JMPB0: 1-2 (22XH)
> IDEIRQ: 1 (IRQ 15 - shouldn't make a different)
> JX1: 2-3 (Carbon MIC - again just letting you know though it shouldn't
> make a different)
>
> This should make sense with the picture I sent earlier...
> I also removed another card I had connected - ISA Modem, Just making
> sure their are no conflicts...
>
> Here's the grim results:
>
> sudo modprobe snd-sb8 port=0x220 irq=5 dma8=1
> FATAL: Error inserting snd_sb8
> (/lib/modules/2.6.20-15-generic/kernel/sound/isa/sb/snd-sb8.ko): No such
> device
Okay, that's unfortunate. It works fine here with my AZT2316R and AZT1605 cards.
1. Did you restore the default settings to the EEPROM with "HWSET /MR /MS"?
If an "EEPROM.SYS" is being loaded from your CONFIG.SYS in the DOS setup
also try that HWSET after rebooting with that line commented out. maybe it's
interfering (EEPROM.SYS is the "software" that takes on the role of the
physical EEPROM when you have the JMPCFG jumper set to "software").
2. What do the last few lines of "dmesg" say after the modprobe?
3. Both my AZT2316A cards actually needed the JMPCFG jumper set to the
"software" setting to even have the DSP show up at 0x220 which seems like it
just might be a strange fluke. But if it really won't work, try the HWSET
and loading of the snd-sb8 driver also with the JMPCFG jumper switched again...
Don't seem to have more bright ideas...
Rene.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Can someone verify support for "AzTech Sound Galaxy Nova 16 Extra II-3D - using AZT-2316/R Chipset - FCC-ID:I38-MMSN846" ?
@ 2007-05-13 10:17 ramkromberg
2007-05-13 11:00 ` j t
` (2 more replies)
0 siblings, 3 replies; 27+ messages in thread
From: ramkromberg @ 2007-05-13 10:17 UTC (permalink / raw)
To: Rene Herman; +Cc: alsa-devel
EPPROM ON:
OK, I formated that dos partition and simply sys a: c:,
then I installed the driver (copying them to the partition from the linux
install),
in theinstall I selected the defaults settings (220 irq5 dma1...) and
rebooted,
now in dos again I used diagnose to test the audio and hwset /mr /ms to
reset and save the epprom.
now I rebooted and loged to linux:
sudo modprobe snd-sb8 port=0x220 irq=5 dma8=1
FATAL: Error inserting snd_sb8
(/lib/modules/2.6.20-15-generic/kernel/sound/isa/sb/snd-sb8.ko): No such
device
dmesg last lines (
[ 319.827327] Sound Blaster soundcard not found or device busy
-reboot-
EPPROM OFF (SOFTWARE ON):
in dos: diagnose works,
reboot and back to lin: sudo modprobe snd-sb8 port=0x220 irq=5 dma8=1
no error, no mention in dmesg, but xmms gives the usual error...
Heres lsmod just for kicks:
Module Size Used by
snd_sb8 9216 0
snd_sb8_dsp 12288 1 snd_sb8
snd_sb_common 17792 2 snd_sb8,snd_sb8_dsp
snd_opl3_lib 11520 1 snd_sb8
snd_hwdep 9988 1 snd_opl3_lib
snd_pcm_oss 44544 0
snd_pcm 79876 3 snd_sb8,snd_sb8_dsp,snd_pcm_oss
snd_mixer_oss 17408 1 snd_pcm_oss
snd_seq_dummy 4740 0
snd_seq_oss 32896 0
snd_seq_midi 9600 0
snd_rawmidi 25472 2 snd_sb8_dsp,snd_seq_midi
snd_seq_midi_event 8448 2 snd_seq_oss,snd_seq_midi
snd_seq 52592 6
snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
snd_timer 23684 3 snd_opl3_lib,snd_pcm,snd_seq
snd_seq_device 9100 6
snd_opl3_lib,snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
snd 54020 13
snd_sb8,snd_sb8_dsp,snd_sb_common,snd_opl3_lib,snd_hwdep,snd_pcm_oss,snd_pcm,snd_mixer_oss,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
soundcore 8672 1 snd
snd_page_alloc 10888 1 snd_pcm
nfs 240876 0
nfsd 218992 17
exportfs 6912 1 nfsd
lockd 64904 3 nfs,nfsd
sunrpc 161340 12 nfs,nfsd,lockd
apm 22752 2
ppdev 10116 0
cpufreq_stats 7360 0
cpufreq_ondemand 9228 0
cpufreq_powersave 2688 0
freq_table 5792 2 cpufreq_stats,cpufreq_ondemand
cpufreq_conservative 8200 0
cpufreq_userspace 5408 0
nls_iso8859_1 5120 1
nls_cp437 6784 1
vfat 14208 1
fat 53916 1 vfat
ext2 66824 1
lp 12452 0
parport_pc 36388 1
parport 36936 3 ppdev,lp,parport_pc
pcspkr 4224 0
ipv6 268704 8
tsdev 8768 0
evdev 11008 1
ext3 133128 1
jbd 59816 1 ext3
mbcache 9604 2 ext2,ext3
ide_disk 17024 5
8139too 27648 0
ide_cd 32672 0
cdrom 37664 1 ide_cd
floppy 59524 0
ehci_hcd 34188 0
8139cp 25088 0
mii 6528 2 8139too,8139cp
uhci_hcd 25360 0
usbcore 134280 3 ehci_hcd,uhci_hcd
piix 10756 0 [permanent]
generic 5124 0 [permanent]
ata_generic 9092 0
libata 125720 1 ata_generic
scsi_mod 142348 1 libata
fbcon 42656 0
tileblit 3584 1 fbcon
font 9216 1 fbcon
bitblit 6912 1 fbcon
softcursor 3200 1 bitblit
vesafb 9220 0
capability 5896 0
commoncap 8192 1 capability
So now atleast we know its not the jumpers ;-)
Is their the slight chance xmms is the problem ? gxine crushs too...
Is their something like "beep" only for the sound card ?
Maybe droping some data to /dev/### to produce a beep ?
Ram Kromberg
ramkromberg@mail.com
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Can someone verify support for "AzTech Sound Galaxy Nova 16 Extra II-3D - using AZT-2316/R Chipset - FCC-ID:I38-MMSN846" ?
2007-05-13 10:17 ramkromberg
@ 2007-05-13 11:00 ` j t
2007-05-14 9:07 ` Rask Ingemann Lambertsen
2007-05-14 21:53 ` Rene Herman
2 siblings, 0 replies; 27+ messages in thread
From: j t @ 2007-05-13 11:00 UTC (permalink / raw)
To: alsa-devel
On 5/13/07, ramkromberg@mail.com <ramkromberg@mail.com> wrote:
> Is their something like "beep" only for the sound card ?
> Maybe droping some data to /dev/### to produce a beep ?
Perhaps
cat /dev/urandom | aplay -f cd
or
cat /dev/urandom | aplay -Dhw:0,0 -f cd
HTH...
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Can someone verify support for "AzTech Sound Galaxy Nova 16 Extra II-3D - using AZT-2316/R Chipset - FCC-ID:I38-MMSN846" ?
2007-05-13 10:17 ramkromberg
2007-05-13 11:00 ` j t
@ 2007-05-14 9:07 ` Rask Ingemann Lambertsen
2007-05-14 21:53 ` Rene Herman
2 siblings, 0 replies; 27+ messages in thread
From: Rask Ingemann Lambertsen @ 2007-05-14 9:07 UTC (permalink / raw)
To: ramkromberg; +Cc: alsa-devel, Rene Herman
On Sun, May 13, 2007 at 12:17:57PM +0200, ramkromberg@mail.com wrote:
> in dos: diagnose works,
> reboot and back to lin: sudo modprobe snd-sb8 port=0x220 irq=5 dma8=1
>
> no error, no mention in dmesg, but xmms gives the usual error...
Also check what /proc/asound/cards says and check dmesg again after
trying to use the card.
--
Rask Ingemann Lambertsen
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Can someone verify support for "AzTech Sound Galaxy Nova 16 Extra II-3D - using AZT-2316/R Chipset - FCC-ID:I38-MMSN846" ?
@ 2007-05-14 13:21 ramkromberg
2007-05-14 14:53 ` Rene Herman
0 siblings, 1 reply; 27+ messages in thread
From: ramkromberg @ 2007-05-14 13:21 UTC (permalink / raw)
To: Rask Ingemann Lambertsen; +Cc: alsa-devel, Rene Herman
Since the only successful modprobe is done with the jumper on SOFTWARE
instead of EPPROM, I'll only tested the following:
Jumper: Software:
sudo modprobe snd-sb8 port=0x220 irq=5 dma8=1
without an error,
dmesg - gives no hint, verbose, mention...
cat /proc/asound/cards:
0 [Pro ]: SB Pro - Sound Blaster Pro
Sound Blaster Pro at 0x220, irq 5, dma 1
So I did the following:
cd /proc/asound/
cat *
cat: Pro: Is a directory
cat: card0: Is a directory
0 [Pro ]: SB Pro - Sound Blaster Pro
Sound Blaster Pro at 0x220, irq 5, dma 1
2: : timer
3: : sequencer
4: [ 0- 0]: raw midi
5: [ 0- 0]: hardware dependent
6: [ 0- 0]: digital audio playback
7: [ 0- 0]: digital audio capture
8: [ 0] : control
00-00: OPL3 FM
0 snd_sb8
cat: oss: Is a directory
00-00: SB8 DSP : DSP v3.1 : playback 1 : capture 1
cat: seq: Is a directory
G0: system timer : 4000.000us (10000000 ticks)
P0-0-0: PCM playback 0-0-0 : SLAVE
P0-0-1: PCM capture 0-0-1 : SLAVE
Advanced Linux Sound Architecture Driver Version 1.0.14rc1 (Tue Jan 09
09:56:17 2007 UTC).
Thanks for your help,
Ram Kromberg,
ramkromberg@mail.com
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Can someone verify support for "AzTech Sound Galaxy Nova 16 Extra II-3D - using AZT-2316/R Chipset - FCC-ID:I38-MMSN846" ?
2007-05-14 13:21 ramkromberg
@ 2007-05-14 14:53 ` Rene Herman
0 siblings, 0 replies; 27+ messages in thread
From: Rene Herman @ 2007-05-14 14:53 UTC (permalink / raw)
To: ramkromberg; +Cc: alsa-devel
On 05/14/2007 03:21 PM, ramkromberg@mail.com wrote:
> Since the only successful modprobe is done with the jumper on SOFTWARE
> instead of EPPROM, I'll only tested the following:
Hang on a bit guys, I now understand the problem. Will have something for
Ram to test in a bit.
Rene.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Can someone verify support for "AzTech Sound Galaxy Nova 16 Extra II-3D - using AZT-2316/R Chipset - FCC-ID:I38-MMSN846" ?
2007-05-13 10:17 ramkromberg
2007-05-13 11:00 ` j t
2007-05-14 9:07 ` Rask Ingemann Lambertsen
@ 2007-05-14 21:53 ` Rene Herman
2007-05-14 22:22 ` Rene Herman
2007-05-15 10:16 ` Rask Ingemann Lambertsen
2 siblings, 2 replies; 27+ messages in thread
From: Rene Herman @ 2007-05-14 21:53 UTC (permalink / raw)
To: ramkromberg; +Cc: alsa-devel
[-- Attachment #1: Type: text/plain, Size: 2024 bytes --]
On 05/13/2007 12:17 PM, ramkromberg@mail.com wrote:
> EPPROM OFF (SOFTWARE ON):
>
> in dos: diagnose works,
> reboot and back to lin: sudo modprobe snd-sb8 port=0x220 irq=5 dma8=1
>
> no error, no mention in dmesg, but xmms gives the usual error...
Yep. The DSP is there but the IRQ isn't firing.
I now understand what the difference between our boards is; we both have a
jumper that can be set to EEPROM, but only I actually have an EEPROM...
It's amazing the things some manufacturers choose to save a penny on but
both your and my (formerly) non-working AZT2316A boards do not have an
actual EEPROM. It should be on that spot marked UX2 close to the clock (the
shiny metal thing in the lower left corner).
This also means your board is simply not supported by any driver currently
available in the tree. The driver needs to "play EEPROM" and upload the
configuration values to the AZT2316 before the card will work and current
drivers don't do this (under DOS, it's the job of that EEPROM.SYS DOS device
driver that's executed from CONFIG.SYS).
Attached is a new snd-galaxy driver that _does_ do the enabling. It's not
final yet, but works nicely for my EEPROM-less boards. It took quite a bit
of grovveling around but it's completely documented now.
I want to test it with more cards first, with and without EEPROMS and with
the JMPCFG jumper set to either position, need to figure out full-duplex on
cards with a CS4231 (as opposed to a half-duplex CS4248), want to see if
there are any cards among them that allow _both_ the SB and the WSS part to
be active, and will finally merge in snd-azt2320 as well for one unified
snd-galaxy driver.
Thought I'd post it now though. You already said you can't compile new
drivers for that machine anyhow so consider this just for educational
purposes. In the next message I'll post a small userspace program to do the
enabling from userspace so that you can use that for now and then just use
either snd-sb8 or snd-sgalaxy to drive the card.
Rene.
[-- Attachment #2: galaxy.diff --]
[-- Type: text/plain, Size: 16647 bytes --]
diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig
index 4e3a972..4b07dec 100644
--- a/sound/isa/Kconfig
+++ b/sound/isa/Kconfig
@@ -177,6 +177,19 @@ config SND_ES18XX
To compile this driver as a module, choose M here: the module
will be called snd-es18xx.
+config SND_GALAXY
+ tristate "Aztech Sound Galaxy Driver"
+ depends on SND
+ select SND_CS4231_LIB
+ select SND_MPU401_UART
+ select SND_OPL3_LIB
+ select SND_PCM
+ help
+ Say Y here to include support for Aztech Sound Galaxy cards.
+
+ To compile this driver as a module, choose M here: the module
+ will be called snd-galaxy.
+
config SND_GUS_SYNTH
tristate
diff --git a/sound/isa/sb/Makefile b/sound/isa/sb/Makefile
index fd9d9c5..75ced01 100644
--- a/sound/isa/sb/Makefile
+++ b/sound/isa/sb/Makefile
@@ -12,6 +12,7 @@ snd-sb16-objs := sb16.o
snd-sbawe-objs := sbawe.o emu8000.o
snd-emu8000-synth-objs := emu8000_synth.o emu8000_callback.o emu8000_patch.o emu8000_pcm.o
snd-es968-objs := es968.o
+snd-galaxy-objs := galaxy.o
#
# this function returns:
@@ -25,6 +26,7 @@ sequencer = $(if $(subst y,,$(CONFIG_SND_SEQUENCER)),$(if $(1),m),$(if $(CONFIG_
obj-$(CONFIG_SND_ALS100) += snd-sb16-dsp.o snd-sb-common.o
obj-$(CONFIG_SND_CMI8330) += snd-sb16-dsp.o snd-sb-common.o
obj-$(CONFIG_SND_DT019X) += snd-sb16-dsp.o snd-sb-common.o
+obj-$(CONFIG_SND_GALAXY) += snd-galaxy.o snd-sb8-dsp.o snd-sb-common.o
obj-$(CONFIG_SND_SB8) += snd-sb8.o snd-sb8-dsp.o snd-sb-common.o
obj-$(CONFIG_SND_SB16) += snd-sb16.o snd-sb16-dsp.o snd-sb-common.o
obj-$(CONFIG_SND_SBAWE) += snd-sbawe.o snd-sb16-dsp.o snd-sb-common.o
diff --git a/sound/isa/sb/galaxy.c b/sound/isa/sb/galaxy.c
new file mode 100644
index 0000000..dd04194
--- /dev/null
+++ b/sound/isa/sb/galaxy.c
@@ -0,0 +1,607 @@
+/*
+ * Aztech Sound Galaxy Driver
+ */
+
+#include <sound/driver.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/isa.h>
+#include <linux/delay.h>
+#include <asm/io.h>
+#include <sound/core.h>
+#include <sound/initval.h>
+#include <sound/sb.h>
+#include <sound/cs4231.h>
+#include <sound/mpu401.h>
+#include <sound/opl3.h>
+
+#define CRD_NAME "Aztech Sound Galaxy"
+#define DRV_NAME "GALAXY"
+#define DEV_NAME "galaxy"
+
+MODULE_DESCRIPTION(CRD_NAME);
+MODULE_AUTHOR("Rene Herman");
+MODULE_LICENSE("GPL");
+
+static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
+static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
+static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE;
+
+module_param_array(index, int, NULL, 0444);
+MODULE_PARM_DESC(index, "Index value for " CRD_NAME " soundcard.");
+module_param_array(id, charp, NULL, 0444);
+MODULE_PARM_DESC(id, "ID string for " CRD_NAME " soundcard.");
+module_param_array(enable, bool, NULL, 0444);
+MODULE_PARM_DESC(enable, "Enable " CRD_NAME " soundcard.");
+
+static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;
+static long wss_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;
+static long mpu_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;
+static long fm_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;
+static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;
+static int wss_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;
+static int mpu_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;
+static int dma[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;
+
+module_param_array(port, long, NULL, 0444);
+MODULE_PARM_DESC(port, "Port # for " CRD_NAME " driver.");
+module_param_array(wss_port, long, NULL, 0444);
+MODULE_PARM_DESC(wss_port, "WSS port # for " CRD_NAME " driver.");
+module_param_array(mpu_port, long, NULL, 0444);
+MODULE_PARM_DESC(mpu_port, "MPU-401 port # for " CRD_NAME " driver.");
+module_param_array(fm_port, long, NULL, 0444);
+MODULE_PARM_DESC(fm_port, "OPL3 port # for " CRD_NAME " driver.");
+module_param_array(irq, int, NULL, 0444);
+MODULE_PARM_DESC(irq, "IRQ # for " CRD_NAME " driver.");
+module_param_array(wss_irq, int, NULL, 0444);
+MODULE_PARM_DESC(wss_irq, "WSS IRQ # for " CRD_NAME " driver.");
+module_param_array(mpu_irq, int, NULL, 0444);
+MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for " CRD_NAME " driver.");
+module_param_array(dma, int, NULL, 0444);
+MODULE_PARM_DESC(dma, "DMA # for " CRD_NAME " driver.");
+
+#define GALAXY_PORT_CONFIG 0x400
+
+#define WSS_PORT_CONFIG 0
+#define WSS_PORT_SIGNATURE 3
+
+#define WSS_SIGNATURE 4
+
+/*
+ * Sound Galaxy 32-bit serial EEPROM
+ */
+
+#define GALAXY_CONFIG_SBDMA_DISABLE (0 << 30)
+#define GALAXY_CONFIG_SBDMA_0 (1 << 30)
+#define GALAXY_CONFIG_SBDMA_1 (2 << 30)
+#define GALAXY_CONFIG_SBDMA_3 (3 << 30)
+
+#define GALAXY_CONFIG_SBIRQ_10 (1 << 29)
+#define GALAXY_CONFIG_SBIRQ_7 (1 << 28)
+#define GALAXY_CONFIG_SBIRQ_5 (1 << 27)
+#define GALAXY_CONFIG_SBIRQ_2 (1 << 26)
+
+#define GALAXY_CONFIG_SBA_220 (0 << 24)
+#define GALAXY_CONFIG_SBA_240 (1 << 24)
+#define GALAXY_CONFIG_SBA_260 (2 << 24)
+#define GALAXY_CONFIG_SBA_280 (3 << 24)
+
+#define GALAXY_CONFIG_CDA_310 (0 << 22)
+#define GALAXY_CONFIG_CDA_320 (1 << 22)
+#define GALAXY_CONFIG_CDA_340 (2 << 22)
+#define GALAXY_CONFIG_CDA_350 (3 << 22)
+
+#define GALAXY_CONFIG_MPU_ENABLE (1 << 21)
+#define GALAXY_CONFIG_MPUA_300 (0 << 20)
+#define GALAXY_CONFIG_MPUA_330 (1 << 20)
+
+#define GALAXY_CONFIG_GAME_ENABLE (1 << 19)
+
+#define GALAXY_CONFIG_WSS_ENABLE (1 << 18)
+#define GALAXY_CONFIG_WSSA_530 (0 << 16)
+#define GALAXY_CONFIG_WSSA_604 (1 << 16)
+#define GALAXY_CONFIG_WSSA_E80 (2 << 16)
+#define GALAXY_CONFIG_WSSA_F40 (3 << 16)
+
+#define GALAXY_CONFIG_CDDMA16_DISABLE (0 << 14)
+#define GALAXY_CONFIG_CDDMA16_5 (1 << 14)
+#define GALAXY_CONFIG_CDDMA16_6 (2 << 14)
+#define GALAXY_CONFIG_CDDMA16_7 (3 << 14)
+
+#define GALAXY_CONFIG_CDDMA8_DISABLE (0 << 12)
+#define GALAXY_CONFIG_CDDMA8_0 (1 << 12)
+#define GALAXY_CONFIG_CDDMA8_1 (2 << 12)
+#define GALAXY_CONFIG_CDDMA8_3 (3 << 12)
+
+#define GALAXY_CONFIG_CD_DISABLE (0 << 8)
+#define GALAXY_CONFIG_CD_PANASONIC (1 << 8)
+#define GALAXY_CONFIG_CD_SONY (2 << 8)
+#define GALAXY_CONFIG_CD_MITSUMI (3 << 8)
+#define GALAXY_CONFIG_CD_AZTECH (4 << 8)
+
+#define GALAXY_CONFIG_CDIRQ_15 (1 << 7)
+#define GALAXY_CONFIG_CDIRQ_12 (1 << 6)
+#define GALAXY_CONFIG_CDIRQ_11 (1 << 5)
+#define GALAXY_CONFIG_CDIRQ_5 (1 << 4)
+
+#define GALAXY_CONFIG_MPUIRQ_10 (1 << 3)
+#define GALAXY_CONFIG_MPUIRQ_7 (1 << 2)
+#define GALAXY_CONFIG_MPUIRQ_5 (1 << 1)
+#define GALAXY_CONFIG_MPUIRQ_2 (1 << 0)
+
+/*
+ * Sound Galaxy specific DSP commands.
+ */
+
+#define SB_DSP_GALAXY 9
+
+#define GALAXY_DSP_WSSMODE 0
+#define GALAXY_DSP_MPU 2
+#define GALAXY_DSP_MPUA 4
+
+struct snd_galaxy {
+ struct resource *config_port;
+ struct resource *wss_port;
+};
+
+static u32 config[SNDRV_CARDS];
+
+static int __devinit snd_galaxy_match(struct device *dev, unsigned int n)
+{
+ if (!enable[n])
+ return 0;
+
+ switch (port[n]) {
+ case SNDRV_AUTO_PORT:
+ snd_printk(KERN_ERR "%s: please specify port\n", dev->bus_id);
+ return 0;
+ case 0x220:
+ config[n] |= GALAXY_CONFIG_SBA_220;
+ break;
+ case 0x240:
+ config[n] |= GALAXY_CONFIG_SBA_240;
+ break;
+ default:
+ snd_printk(KERN_ERR "%s: invalid port %#lx\n", dev->bus_id,
+ port[n]);
+ return 0;
+ }
+
+ switch (irq[n]) {
+ case SNDRV_AUTO_IRQ:
+ snd_printk(KERN_ERR "%s: please specify irq\n", dev->bus_id);
+ return 0;
+ case 2:
+ config[n] |= GALAXY_CONFIG_SBIRQ_2;
+ break;
+ case 5:
+ config[n] |= GALAXY_CONFIG_SBIRQ_5;
+ break;
+ case 7:
+ config[n] |= GALAXY_CONFIG_SBIRQ_7;
+ break;
+ case 10:
+ config[n] |= GALAXY_CONFIG_SBIRQ_10;
+ break;
+ default:
+ snd_printk(KERN_ERR "%s: invalid irq %d\n", dev->bus_id,
+ irq[n]);
+ return 0;
+ }
+
+ switch (dma[n]) {
+ case SNDRV_AUTO_DMA:
+ snd_printk(KERN_ERR "%s: please specify dma\n", dev->bus_id);
+ return 0;
+ case 0:
+ config[n] |= GALAXY_CONFIG_SBDMA_0;
+ break;
+ case 1:
+ config[n] |= GALAXY_CONFIG_SBDMA_1;
+ break;
+ case 3:
+ config[n] |= GALAXY_CONFIG_SBDMA_3;
+ break;
+ default:
+ snd_printk(KERN_ERR "%s: invalid dma %d\n", dev->bus_id,
+ dma[n]);
+ return 0;
+ }
+
+ switch (wss_port[n]) {
+ case SNDRV_AUTO_PORT:
+ wss_port[n] = -1;
+ goto mpu;
+ case 0x530:
+ config[n] |= GALAXY_CONFIG_WSS_ENABLE | GALAXY_CONFIG_WSSA_530;
+ break;
+ case 0x604:
+ config[n] |= GALAXY_CONFIG_WSS_ENABLE | GALAXY_CONFIG_WSSA_604;
+ break;
+ case 0xe80:
+ config[n] |= GALAXY_CONFIG_WSS_ENABLE | GALAXY_CONFIG_WSSA_E80;
+ break;
+ case 0xf40:
+ config[n] |= GALAXY_CONFIG_WSS_ENABLE | GALAXY_CONFIG_WSSA_F40;
+ break;
+ default:
+ snd_printk(KERN_ERR "%s: invalid wss port %#lx\n", dev->bus_id,
+ wss_port[n]);
+ return 0;
+ }
+
+ if (wss_irq[n] == irq[n]) {
+ snd_printk(KERN_ERR "%s: cannot share IRQ between SB and WSS\n",
+ dev->bus_id);
+ return 0;
+ }
+
+ switch (wss_irq[n]) {
+ case SNDRV_AUTO_IRQ:
+ snd_printk(KERN_ERR "%s: please specify wss_irq", dev->bus_id);
+ return 0;
+ case 2:
+ case 5:
+ case 7:
+ case 10:
+ break;
+ default:
+ snd_printk(KERN_ERR "%s: invalid wss irq %d\n", dev->bus_id,
+ irq[n]);
+ return 0;
+ }
+
+ mpu:
+ switch (mpu_port[n]) {
+ case SNDRV_AUTO_PORT:
+ snd_printk(KERN_WARNING "%s: mpu_port not specified; not using "
+ "MPU-401\n", dev->bus_id);
+ mpu_port[n] = -1;
+ goto fm;
+ case 0x300:
+ config[n] |= GALAXY_CONFIG_MPU_ENABLE | GALAXY_CONFIG_MPUA_300;
+ break;
+ case 0x330:
+ config[n] |= GALAXY_CONFIG_MPU_ENABLE | GALAXY_CONFIG_MPUA_330;
+ break;
+ default:
+ snd_printk(KERN_ERR "%s: invalid mpu port %#lx\n", dev->bus_id,
+ mpu_port[n]);
+ return 0;
+ }
+
+ if (mpu_irq[n] == irq[n] || mpu_irq[n] == wss_irq[n]) {
+ snd_printk(KERN_ERR "%s: cannot share IRQ between SB/WSS "
+ "and MPU-401\n", dev->bus_id);
+ return 0;
+ }
+
+ switch (mpu_irq[n]) {
+ case SNDRV_AUTO_IRQ:
+ snd_printk(KERN_WARNING "%s: mpu_irq not specified; using "
+ "polling mode\n", dev->bus_id);
+ break;
+ case 2:
+ config[n] |= GALAXY_CONFIG_MPUIRQ_2;
+ break;
+ case 5:
+ config[n] |= GALAXY_CONFIG_MPUIRQ_5;
+ break;
+ case 7:
+ config[n] |= GALAXY_CONFIG_MPUIRQ_7;
+ break;
+ case 10:
+ config[n] |= GALAXY_CONFIG_MPUIRQ_10;
+ break;
+ default:
+ snd_printk(KERN_ERR "%s: invalid mpu irq %d\n", dev->bus_id,
+ irq[n]);
+ return 0;
+ }
+
+ fm:
+ switch (fm_port[n]) {
+ case SNDRV_AUTO_PORT:
+ snd_printk(KERN_WARNING "%s: fm_port not specified: not using "
+ "OPL3\n", dev->bus_id);
+ fm_port[n] = -1;
+ break;
+ case 0x388:
+ break;
+ default:
+ snd_printk(KERN_ERR "%s: illegal fm port %#lx\n", dev->bus_id,
+ fm_port[n]);
+ return 0;
+ }
+
+ config[n] |= GALAXY_CONFIG_GAME_ENABLE;
+
+ return 1;
+}
+
+static int __devinit snd_galaxy_set(struct snd_sb *sb, unsigned char cmd,
+ int set)
+{
+ int err;
+
+ err = snd_sbdsp_command(sb, SB_DSP_GALAXY);
+ if (err < 0)
+ return err;
+
+ err = snd_sbdsp_command(sb, cmd);
+ if (err < 0)
+ return err;
+
+ return snd_sbdsp_command(sb, set ? 255 : 0);
+}
+
+static int __devinit snd_galaxy_config(struct snd_card *card, struct snd_sb *sb,
+ u32 config)
+{
+ struct snd_galaxy *galaxy = card->private_data;
+ unsigned char val;
+ int err;
+
+ galaxy->config_port = request_region(sb->port + GALAXY_PORT_CONFIG, 5,
+ DRV_NAME);
+ if (!galaxy->config_port)
+ return -EBUSY;
+
+ err = snd_galaxy_set(sb, GALAXY_DSP_MPU,
+ config & GALAXY_CONFIG_MPU_ENABLE);
+ if (err < 0)
+ return err;
+
+ err = snd_galaxy_set(sb, GALAXY_DSP_MPUA,
+ config & GALAXY_CONFIG_MPUA_330);
+ if (err < 0)
+ return err;
+
+ val = inb(sb->port + GALAXY_PORT_CONFIG + 4);
+
+ outb(val | 0x80, sb->port + GALAXY_PORT_CONFIG + 4);
+ msleep(100);
+
+ outb(config, sb->port + GALAXY_PORT_CONFIG + 3);
+ config >>= 8;
+ outb(config, sb->port + GALAXY_PORT_CONFIG + 2);
+ config >>= 8;
+ outb(config, sb->port + GALAXY_PORT_CONFIG + 1);
+ config >>= 8;
+ outb(config, sb->port + GALAXY_PORT_CONFIG);
+
+ outb(val & 0x7f, sb->port + GALAXY_PORT_CONFIG + 4);
+ msleep(100);
+
+ return 0;
+}
+
+static int __devinit snd_galaxy_wssmode(struct snd_sb *sb)
+{
+ int err;
+
+ err = snd_sbdsp_reset(sb);
+ if (err < 0)
+ return err;
+
+ err = snd_sbdsp_command(sb, SB_DSP_GALAXY);
+ if (err < 0)
+ return err;
+
+ err = snd_sbdsp_command(sb, GALAXY_DSP_WSSMODE);
+ if (err < 0)
+ return err;
+
+ msleep(100);
+
+ return 0;
+}
+
+static int __devinit snd_galaxy_wss(struct snd_card *card, unsigned long port,
+ int irq, int dma)
+{
+ struct snd_galaxy *galaxy = card->private_data;
+ unsigned char wss_config;
+ struct snd_cs4231 *wss;
+ int err;
+
+ galaxy->wss_port = request_region(port, 4, DRV_NAME);
+ if (!galaxy->wss_port)
+ return -EBUSY;
+
+ if ((inb(port + WSS_PORT_SIGNATURE) & 0x3f) != WSS_SIGNATURE)
+ return -ENODEV;
+
+ switch (irq) {
+ case 7:
+ wss_config = 1 << 3;
+ break;
+ case 9:
+ wss_config = 2 << 3;
+ break;
+ case 10:
+ wss_config = 3 << 3;
+ break;
+ case 11:
+ wss_config = 4 << 3;
+ break;
+ default:
+ return -EINVAL;
+ }
+ outb(wss_config | 0x40, port + WSS_PORT_CONFIG);
+
+ switch (dma) {
+ case 0:
+ wss_config |= 1;
+ break;
+ case 1:
+ wss_config |= 2;
+ break;
+ case 3:
+ wss_config |= 3;
+ break;
+ default:
+ return -EINVAL;
+ }
+ outb(wss_config, port + WSS_PORT_CONFIG);
+
+ err = snd_cs4231_create(card, port + 4, -1, irq, dma, -1,
+ CS4231_HW_DETECT, CS4231_HWSHARE_DMA1, &wss);
+ if (err < 0)
+ return err;
+
+ err = snd_cs4231_pcm(wss, 0, NULL);
+ if (err < 0)
+ return err;
+
+ err = snd_cs4231_mixer(wss);
+ if (err < 0)
+ return err;
+
+ err = snd_cs4231_timer(wss, 0, NULL);
+ if (err < 0)
+ return err;
+
+ strcpy(card->shortname, snd_cs4231_chip_id(wss));
+ sprintf(card->longname, "%s at %#lx, irq %d, dma %d; ",
+ card->shortname, wss->port, wss->irq, wss->dma1);
+
+ return 0;
+}
+
+static irqreturn_t snd_galaxy_interrupt(int irq, void *dev_id)
+{
+ struct snd_sb *sb = dev_id;
+
+ if (sb->open & SB_OPEN_PCM)
+ return snd_sb8dsp_interrupt(sb);
+
+ return snd_sb8dsp_midi_interrupt(sb);
+}
+
+static void snd_galaxy_free(struct snd_card *card)
+{
+ struct snd_galaxy *galaxy = card->private_data;
+
+ release_and_free_resource(galaxy->wss_port);
+ release_and_free_resource(galaxy->config_port);
+}
+
+static int __devinit snd_galaxy_probe(struct device *dev, unsigned int n)
+{
+ struct snd_card *card;
+ struct snd_sb *sb;
+ int err;
+
+ card = snd_card_new(index[n], id[n], THIS_MODULE,
+ sizeof(struct snd_galaxy));
+ if (!card)
+ return -EINVAL;
+
+ snd_card_set_dev(card, dev);
+
+ err = snd_sbdsp_create(card, port[n], irq[n], snd_galaxy_interrupt,
+ dma[n], -1, SB_HW_AUTO, &sb);
+ if (err < 0)
+ goto error;
+
+ card->private_free = snd_galaxy_free;
+
+ err = snd_galaxy_config(card, sb, config[n]);
+ if (err < 0)
+ goto error;
+
+ if (wss_port[n] >= 0) {
+ err = snd_galaxy_wssmode(sb);
+ if (err < 0)
+ goto error;
+
+ err = snd_galaxy_wss(card, wss_port[n], wss_irq[n], sb->dma8);
+ if (err < 0)
+ goto error;
+ } else {
+ err = snd_sb8dsp_pcm(sb, 0, NULL);
+ if (err < 0)
+ goto error;
+
+ err = snd_sbmixer_new(sb);
+ if (err < 0)
+ goto error;
+
+ strcpy(card->shortname, sb->name);
+ }
+
+ sprintf(card->longname + strlen(card->longname),
+ "%s at %#lx, irq %d, dma %d",
+ sb->name, sb->port, sb->irq, sb->dma8);
+ strcpy(card->driver, DRV_NAME);
+
+ if (mpu_port[n] >= 0) {
+ err = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401,
+ mpu_port[n], 0, mpu_irq[n],
+ mpu_irq[n] < 0 ? 0 : IRQF_DISABLED,
+ NULL);
+ if (err < 0)
+ goto error;
+ }
+
+ if (fm_port[n] >= 0) {
+ struct snd_opl3 *opl3;
+
+ err = snd_opl3_create(card, fm_port[n], fm_port[n] + 2,
+ OPL3_HW_AUTO, 0, &opl3);
+ if (err < 0) {
+ snd_printk(KERN_ERR "%s: no OPL device at %#lx\n",
+ dev->bus_id, fm_port[n]);
+ goto error;
+ }
+ err = snd_opl3_timer_new(opl3, 1, 2);
+ if (err < 0)
+ goto error;
+
+ err = snd_opl3_hwdep_new(opl3, 0, 1, NULL);
+ if (err < 0)
+ goto error;
+ }
+
+ err = snd_card_register(card);
+ if (err < 0)
+ goto error;
+
+ dev_set_drvdata(dev, card);
+ return 0;
+
+ error:
+ snd_card_free(card);
+ return err;
+}
+
+static int __devexit snd_galaxy_remove(struct device *dev, unsigned int n)
+{
+ snd_card_free(dev_get_drvdata(dev));
+ dev_set_drvdata(dev, NULL);
+ return 0;
+}
+
+static struct isa_driver snd_galaxy_driver = {
+ .match = snd_galaxy_match,
+ .probe = snd_galaxy_probe,
+ .remove = __devexit_p(snd_galaxy_remove),
+
+ .driver = {
+ .name = DEV_NAME
+ }
+};
+
+static int __init alsa_card_galaxy_init(void)
+{
+ return isa_register_driver(&snd_galaxy_driver, SNDRV_CARDS);
+}
+
+static void __exit alsa_card_galaxy_exit(void)
+{
+ isa_unregister_driver(&snd_galaxy_driver);
+}
+
+module_init(alsa_card_galaxy_init);
+module_exit(alsa_card_galaxy_exit);
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: Can someone verify support for "AzTech Sound Galaxy Nova 16 Extra II-3D - using AZT-2316/R Chipset - FCC-ID:I38-MMSN846" ?
2007-05-14 21:53 ` Rene Herman
@ 2007-05-14 22:22 ` Rene Herman
2007-05-14 22:25 ` Rene Herman
2007-05-15 10:12 ` Rask Ingemann Lambertsen
2007-05-15 10:16 ` Rask Ingemann Lambertsen
1 sibling, 2 replies; 27+ messages in thread
From: Rene Herman @ 2007-05-14 22:22 UTC (permalink / raw)
To: ramkromberg; +Cc: alsa-devel
[-- Attachment #1: Type: text/plain, Size: 1659 bytes --]
On 05/14/2007 11:53 PM, Rene Herman wrote:
> In the next message I'll post a small userspace program to do the
> enabling from userspace so that you can use that for now and then just
> use either snd-sb8 or snd-sgalaxy to drive the card.
As said. If you execute this as root it should enable the card. You can pick
the base address (the one JMPB0 is set to) with "-p 0x220|0x240". Default is
0x200 if you don't specify one.
You can supply a configuration value yourself; you'd want the same value as
the parameter to EEPROM.SYS in CONFIG.SYS under your DOS install. However,
if you do not supply a a value the card will just be enabled using a default
value (same default value DOS uses) and this should work fine assuming you
have those default resources free/reserved.
so:
sudo ./eeprom
sudo modprobe snd-sb8 port=0x220 irq=5 dma8=1
or
sudo ./eeprom
sudo modprobe snd-sgalaxy sbport=0x220 wssport=0x530
Once you have the card set to wss mode (ie, have loaded snd-sgalaxy) you
can't unload snd-sgalaxy again and start using snd-sb8; the card would have
to be reset to SB mode first again.
After that sudo ./eeprom, the drivers should not only load but in fact work.
Remember to increase/unmute the volumes in a mixer...
The program needs to talk to I/O ports and therefore needs root priviliges.
It's generally a fairly bad idea to run root programs you haven't compiled
yourself, but if compiling this userspace program is also a problem for you
currently, there's a binary at:
http://members.home.nl/rene.herman/eeprom
was compiled on slackware 11.0, staticly linked.
If this still doesn't work you... I'm going to be sad.
Rene.
[-- Attachment #2: eeprom.c --]
[-- Type: text/plain, Size: 2910 bytes --]
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <sys/io.h>
#include <unistd.h>
#define SB_PORT_RESET 0x06
#define SB_PORT_READ 0x0a
#define SB_PORT_STATUS 0x0c
#define SB_PORT_COMMAND 0x0c
#define SB_PORT_DATA_AVAIL 0x0e
#define SB_DSP_GALAXY 9
#define GALAXY_DSP_MPU 2
#define GALAXY_DSP_MPUA 4
#define GALAXY_PORT_CONFIG 0x400
#define GALAXY_CONFIG_MPU_ENABLE (1 << 21)
#define GALAXY_CONFIG_MPUA_330 (1 << 20)
#define BUSY_LOOPS 100000
int sbdsp_reset(long int port)
{
int i;
outb(1, port + SB_PORT_RESET);
usleep(10);
outb(0, port + SB_PORT_RESET);
usleep(30);
for (i = BUSY_LOOPS; i; i--)
if (inb(port + SB_PORT_DATA_AVAIL) & 0x80) {
if (inb(port + SB_PORT_READ) == 0xaa)
return 0;
break;
}
return 1;
}
int sbdsp_command(long int port, unsigned char val)
{
int i;
for (i = BUSY_LOOPS; i; i--)
if ((inb(port + SB_PORT_STATUS) & 0x80) == 0) {
outb(val, port + SB_PORT_COMMAND);
return 0;
}
return 1;
}
int galaxy_set(long int port, unsigned char cmd, int set)
{
if (sbdsp_command(port, SB_DSP_GALAXY) != 0)
return 1;
if (sbdsp_command(port, cmd) != 0)
return 1;
return sbdsp_command(port, set ? 255 : 0);
}
int main(int argc, char *argv[])
{
long int port = 0x220;
uint32_t conf = 0x887C0101;
unsigned char val;
char *s;
int c = getopt(argc, argv, "p:");
if (c != -1) {
if (c != 'p')
goto usage;
port = strtol(optarg, &s, 0);
if (*s || (port != 0x220 && port != 0x240))
goto usage;
}
if (optind < argc) {
conf = strtol(argv[optind++], &s, 16);
if (*s)
goto usage;
}
if (optind < argc) {
usage:
printf("usage: %s [-p <port>] [value]\n", argv[0]);
return EXIT_FAILURE;
}
if (iopl(3) != 0)
goto iopl;
if (sbdsp_reset(port) != 0) {
printf("could not find board\n");
return EXIT_FAILURE;
}
if (galaxy_set(port, GALAXY_DSP_MPU,
conf & GALAXY_CONFIG_MPU_ENABLE) != 0)
goto set;
if (galaxy_set(port, GALAXY_DSP_MPUA,
conf & GALAXY_CONFIG_MPUA_330) != 0) {
set:
printf("could not set board\n");
return EXIT_FAILURE;
}
val = inb(port + GALAXY_PORT_CONFIG + 4);
outb(val | 0x80, port + GALAXY_PORT_CONFIG + 4);
usleep(100);
outb(conf, port + GALAXY_PORT_CONFIG + 3);
conf >>= 8;
outb(conf, port + GALAXY_PORT_CONFIG + 2);
conf >>= 8;
outb(conf, port + GALAXY_PORT_CONFIG + 1);
conf >>= 8;
outb(conf, port + GALAXY_PORT_CONFIG);
outb(val & 0x7f, port + GALAXY_PORT_CONFIG + 4);
if (iopl(0) != 0) {
iopl:
perror ("iopl");
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Can someone verify support for "AzTech Sound Galaxy Nova 16 Extra II-3D - using AZT-2316/R Chipset - FCC-ID:I38-MMSN846" ?
2007-05-14 22:22 ` Rene Herman
@ 2007-05-14 22:25 ` Rene Herman
2007-05-15 10:12 ` Rask Ingemann Lambertsen
1 sibling, 0 replies; 27+ messages in thread
From: Rene Herman @ 2007-05-14 22:25 UTC (permalink / raw)
To: ramkromberg; +Cc: alsa-devel
On 05/15/2007 12:22 AM, Rene Herman wrote:
> As said. If you execute this as root it should enable the card.
(oh, compilation instructions just "gcc -W -Wall -o eeprom eeprom.c")
Rene.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Can someone verify support for "AzTech Sound Galaxy Nova 16 Extra II-3D - using AZT-2316/R Chipset - FCC-ID:I38-MMSN846" ?
@ 2007-05-15 8:50 ramkromberg
2007-05-16 23:23 ` Rene Herman
0 siblings, 1 reply; 27+ messages in thread
From: ramkromberg @ 2007-05-15 8:50 UTC (permalink / raw)
To: Rene Herman; +Cc: alsa-devel
You did it Rene !!!
>sudo ./eeprom
>sudo modprobe snd-sgalaxy sbport=0x220 wssport=0x530
It's working now !!
I downloaded the binary (i didn't compile the code), chmod it, sudo it
and the sgalaxy worked !!!
the sb8 didn't work but I don't really care for that anyhow :-)
For the record, I tested it on xubuntu 7.04 with xmms.
Are you now planning to implement the code to the driver itself ?
If you want me to test anything, let me know.
i'm also considering installing slackware 11 since I need the
preformance...
THANKS !!!
Ram Kromberg
ramkromberg@mail.com
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Can someone verify support for "AzTech Sound Galaxy Nova 16 Extra II-3D - using AZT-2316/R Chipset - FCC-ID:I38-MMSN846" ?
2007-05-14 22:22 ` Rene Herman
2007-05-14 22:25 ` Rene Herman
@ 2007-05-15 10:12 ` Rask Ingemann Lambertsen
2007-05-16 23:35 ` Rene Herman
1 sibling, 1 reply; 27+ messages in thread
From: Rask Ingemann Lambertsen @ 2007-05-15 10:12 UTC (permalink / raw)
To: Rene Herman; +Cc: alsa-devel, ramkromberg
On Tue, May 15, 2007 at 12:22:03AM +0200, Rene Herman wrote:
> As said. If you execute this as root it should enable the card. You can
> pick the base address (the one JMPB0 is set to) with "-p 0x220|0x240".
> Default is 0x200 if you don't specify one.
^^^^^
0x220 or 0x240?
Do you think there is any point in trying any of this configuration stuff
on an NXPro?
> return EXIT_FAILURE;
> }
>
> return EXIT_SUCCESS;
It is not often that I see other people use standards compliant return
values from main().
--
Rask Ingemann Lambertsen
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Can someone verify support for "AzTech Sound Galaxy Nova 16 Extra II-3D - using AZT-2316/R Chipset - FCC-ID:I38-MMSN846" ?
2007-05-14 21:53 ` Rene Herman
2007-05-14 22:22 ` Rene Herman
@ 2007-05-15 10:16 ` Rask Ingemann Lambertsen
2007-05-16 23:47 ` Rene Herman
1 sibling, 1 reply; 27+ messages in thread
From: Rask Ingemann Lambertsen @ 2007-05-15 10:16 UTC (permalink / raw)
To: Rene Herman; +Cc: alsa-devel, ramkromberg
On Mon, May 14, 2007 at 11:53:18PM +0200, Rene Herman wrote:
> --- a/sound/isa/Kconfig
> +++ b/sound/isa/Kconfig
> @@ -177,6 +177,19 @@ config SND_ES18XX
> To compile this driver as a module, choose M here: the module
> will be called snd-es18xx.
>
> +config SND_GALAXY
> + tristate "Aztech Sound Galaxy Driver"
> + depends on SND
> + select SND_CS4231_LIB
> + select SND_MPU401_UART
> + select SND_OPL3_LIB
> + select SND_PCM
> + help
> + Say Y here to include support for Aztech Sound Galaxy cards.
> +
> + To compile this driver as a module, choose M here: the module
> + will be called snd-galaxy.
> +
> config SND_GUS_SYNTH
> tristate
>
Like you said yourself, there are a lot of different Sound Galaxy cards,
not all of which are CS42xx compatible. Perhaps be a bit more specific as to
which ones are expected to work (or not work) with the driver.
--
Rask Ingemann Lambertsen
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Can someone verify support for "AzTech Sound Galaxy Nova 16 Extra II-3D - using AZT-2316/R Chipset - FCC-ID:I38-MMSN846" ?
2007-05-15 8:50 ramkromberg
@ 2007-05-16 23:23 ` Rene Herman
0 siblings, 0 replies; 27+ messages in thread
From: Rene Herman @ 2007-05-16 23:23 UTC (permalink / raw)
To: ramkromberg; +Cc: alsa-devel
On 05/15/2007 10:50 AM, ramkromberg@mail.com wrote:
> You did it Rene !!!
> >sudo ./eeprom
> >sudo modprobe snd-sgalaxy sbport=0x220 wssport=0x530
>
> It's working now !!
Great. Thanks for testing/reporting.
> I downloaded the binary (i didn't compile the code), chmod it, sudo it
> and the sgalaxy worked !!!
> the sb8 didn't work but I don't really care for that anyhow :-)
Mmm. That was probably then since the card was already in WSS mode. If you'd
boot straight into Linux (from a hardware reset/machine off state certainly)
and run that "eeprom" tool as the first thing you do, then:
modprobe snd-sb8 port=0x220 irq=5 dm8=1
should work. If not, I have some further figuring to do. I did figure out
how to switch the card back to SB mode from WSS mode already, but am seeing
some trouble with where (and how often...) to reset the DSP to have it back
again after that.
> For the record, I tested it on xubuntu 7.04 with xmms.
>
> Are you now planning to implement the code to the driver itself ? If you
> want me to test anything, let me know.
Yes, this will find it's way into an ALSA driver shortly. Since I'm seeing
some trouble again with putting the card back in SB mode from WSS mode I'm
giving it a bit of a rest for now while I continue the things I actually
_should_ have been doing right now (...) but I will make sure a new driver
gets submitted that supports our EEPROM-less Sound Galaxies...
Rene.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Can someone verify support for "AzTech Sound Galaxy Nova 16 Extra II-3D - using AZT-2316/R Chipset - FCC-ID:I38-MMSN846" ?
2007-05-15 10:12 ` Rask Ingemann Lambertsen
@ 2007-05-16 23:35 ` Rene Herman
2007-05-17 13:08 ` Rask Ingemann Lambertsen
0 siblings, 1 reply; 27+ messages in thread
From: Rene Herman @ 2007-05-16 23:35 UTC (permalink / raw)
To: Rask Ingemann Lambertsen; +Cc: alsa-devel, ramkromberg
On 05/15/2007 12:12 PM, Rask Ingemann Lambertsen wrote:
> On Tue, May 15, 2007 at 12:22:03AM +0200, Rene Herman wrote:
>
>> As said. If you execute this as root it should enable the card. You can
>> pick the base address (the one JMPB0 is set to) with "-p 0x220|0x240".
>> Default is 0x200 if you don't specify one.
> ^^^^^
> 0x220 or 0x240?
0x220.
> Do you think there is any point in trying any of this configuration stuff
> on an NXPro?
Probably not. The oldest Sound Galaxy I have is a NX Pro 16 (I38-MMSN803)
and I haven't yet tested on that either. That one does have an EEPROM but
the jumper doesn't select between EEPROM and software but between EEPROM and
"factory setting" which probably implies it's not software configurable.
(other than by writing to the EEPROM and rebooting the card with the jumper
set to EEPROM; writing to the EEPROM is yet another fun little project for a
future HWDEP interface in the driver but it's not an important feature).
Does your NX Pro have an EEPROM? It should be a small 8-pin chip marked with
something close to "X24C00", near a clock chip and probably near an Intel
8051 microcontroller. And does it have a jumper that sounds like it has
anything to do with things?
>> return EXIT_FAILURE;
>> }
>>
>> return EXIT_SUCCESS;
>
> It is not often that I see other people use standards compliant return
> values from main().
0 and !0 are as standards compliant... :-)
Rene.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Can someone verify support for "AzTech Sound Galaxy Nova 16 Extra II-3D - using AZT-2316/R Chipset - FCC-ID:I38-MMSN846" ?
2007-05-15 10:16 ` Rask Ingemann Lambertsen
@ 2007-05-16 23:47 ` Rene Herman
0 siblings, 0 replies; 27+ messages in thread
From: Rene Herman @ 2007-05-16 23:47 UTC (permalink / raw)
To: Rask Ingemann Lambertsen; +Cc: alsa-devel, ramkromberg
On 05/15/2007 12:16 PM, Rask Ingemann Lambertsen wrote:
> Like you said yourself, there are a lot of different Sound Galaxy cards,
> not all of which are CS42xx compatible. Perhaps be a bit more specific as to
> which ones are expected to work (or not work) with the driver.
It's starting to look like I'll be able to support all sound galaxies with
this one driver (pnp provides for a different set of entry points so merging
azt2320 is also not going to be a problem) where only the very, very first
(including your NX pro) would only allow SBB mode. Yes, it then makes more
sense to just use snd-sb8, but hey...
My I38-MMSN803 already includes an AD1848 (AZT-NXPMIX0592 and AZTSSPT0592 as
the other chips) and I know it drives AZT1605, AZT2316A and AZT2316R...
If it's "all Sound Galaxies except maybe some of the very first 8-bit cards"
then I feel snd-galaxy is an okay name (snd-aztech isn't, since aztech has
since then also made PCI cards) but yes, I need to do some further testing
and probing on different cards before it's final.
Rene
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Can someone verify support for "AzTech Sound Galaxy Nova 16 Extra II-3D - using AZT-2316/R Chipset - FCC-ID:I38-MMSN846" ?
@ 2007-05-17 8:48 ramkromberg
2007-05-17 9:22 ` Rene Herman
0 siblings, 1 reply; 27+ messages in thread
From: ramkromberg @ 2007-05-17 8:48 UTC (permalink / raw)
To: Rene Herman; +Cc: alsa-devel
[-- Attachment #1: Type: text/plain, Size: 658 bytes --]
Yes, its like you said Rene, sb8 works although the sound is distorted
and the module can't be removed...
Later I can modprobe sgalaxy too, and the sound works without a hitch.
Also since now I can compile some code - your "eeprom.c" compiles and
works - I'm available for further testing...
I also noticed that the binary you sent was 506kb while my compilation is
9kb, maybe you sent an early/later version with some additional includes
for verbose ?
I compiled it with "gcc -W -Wall -o eeprom eeprom.c" like you said (on my
xubuntu 7.04 with build-essentials deb package installed).
See attachment...
Ram Kromberg
ramkromberg@mail.com
[-- Attachment #2: eeprom --]
[-- Type: application/octet-stream, Size: 8646 bytes --]
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Can someone verify support for "AzTech Sound Galaxy Nova 16 Extra II-3D - using AZT-2316/R Chipset - FCC-ID:I38-MMSN846" ?
2007-05-17 8:48 Can someone verify support for "AzTech Sound Galaxy Nova 16 Extra II-3D - using AZT-2316/R Chipset - FCC-ID:I38-MMSN846" ? ramkromberg
@ 2007-05-17 9:22 ` Rene Herman
0 siblings, 0 replies; 27+ messages in thread
From: Rene Herman @ 2007-05-17 9:22 UTC (permalink / raw)
To: ramkromberg; +Cc: alsa-devel
On 05/17/2007 10:48 AM, ramkromberg@mail.com wrote:
> Yes, its like you said Rene, sb8 works although the sound is distorted
> and the module can't be removed...
> Later I can modprobe sgalaxy too, and the sound works without a hitch.
Okay, don't know what the trouble is with that distortion (if you haven't
set the volumes to 100, that is) but not too important right now.
> Also since now I can compile some code - your "eeprom.c" compiles and
> works - I'm available for further testing...
I might want you to test some mode-resetting code later; will be sure to ask
if needed.
> I also noticed that the binary you sent was 506kb while my compilation
> is 9kb, maybe you sent an early/later version with some additional
> includes for verbose ?
> I compiled it with "gcc -W -Wall -o eeprom eeprom.c" like you said (on
> my xubuntu 7.04 with build-essentials deb package installed).
Now try it with "gcc -static -W -Wall -o eeprom eeprom.c". I compiled the
binary I provided with that "-static" flag which means the program includes
all library code directly inside the binary and doesn't link to the library
code you already have on your system.
I did this to avoid any version problems that may exist between different
distributions. Essentially you're only guaranteed that a dynamic executable
will work on the system on which it was compiled (rather, on a system with
the same versions of the libraries installed as on the system on which it
was compiled). In this case the program only links to the system C library
and did nothing weird so it wasn't much of an issue, but I don't even want
to deal with any _possible_ problems of that nature...
Yes, with a normal (ie, dynamic) link that 9k is correct.
Rene.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Can someone verify support for "AzTech Sound Galaxy Nova 16 Extra II-3D - using AZT-2316/R Chipset - FCC-ID:I38-MMSN846" ?
2007-05-16 23:35 ` Rene Herman
@ 2007-05-17 13:08 ` Rask Ingemann Lambertsen
2007-05-19 2:55 ` Rene Herman
0 siblings, 1 reply; 27+ messages in thread
From: Rask Ingemann Lambertsen @ 2007-05-17 13:08 UTC (permalink / raw)
To: Rene Herman; +Cc: alsa-devel, ramkromberg
On Thu, May 17, 2007 at 01:35:59AM +0200, Rene Herman wrote:
> Does your NX Pro have an EEPROM? It should be a small 8-pin chip marked
> with something close to "X24C00", near a clock chip and probably near an
> Intel 8051 microcontroller. And does it have a jumper that sounds like it
> has anything to do with things?
I've found the X24C00 chip, a 12 MHz crystal or oscilator (I'm not sure
which) and an Intel S-80C51FANM chip. The uncommented jumpers J1 and J2 are
my best bet, although they are connected to the AZTSSPT0592 chip.
--
Rask Ingemann Lambertsen
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Can someone verify support for "AzTech Sound Galaxy Nova 16 Extra II-3D - using AZT-2316/R Chipset - FCC-ID:I38-MMSN846" ?
2007-05-17 13:08 ` Rask Ingemann Lambertsen
@ 2007-05-19 2:55 ` Rene Herman
2007-05-20 12:23 ` Rask Ingemann Lambertsen
0 siblings, 1 reply; 27+ messages in thread
From: Rene Herman @ 2007-05-19 2:55 UTC (permalink / raw)
To: Rask Ingemann Lambertsen; +Cc: alsa-devel, ramkromberg
On 05/17/2007 03:08 PM, Rask Ingemann Lambertsen wrote:
> I've found the X24C00 chip, a 12 MHz crystal or oscilator (I'm not sure
> which) and an Intel S-80C51FANM chip. The uncommented jumpers J1 and J2
> are my best bet, although they are connected to the AZTSSPT0592 chip.
Right, so you also have that one. Also the AZT-NXPMIX0592? If so, then your
NX Pro is just my NX Pro 16 minus the AD1848 codec it seems.
If J1 and J2 are connected to pin 17 and 18 at the top (the side which is
"up" when you can read the markings) of the AZTSSPT0592 then those will be
my J4/J5. Also unmarked, but I have the booklet!
If they're the same, then you should have a "virtual parallel port" at 0x278
when they're closed for "Disney Sound Source" compatibility.
If I find out this NX Pro 16 is software configurable, I'll send you test
code for your NX Pro...
Rene.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Can someone verify support for "AzTech Sound Galaxy Nova 16 Extra II-3D - using AZT-2316/R Chipset - FCC-ID:I38-MMSN846" ?
2007-05-19 2:55 ` Rene Herman
@ 2007-05-20 12:23 ` Rask Ingemann Lambertsen
0 siblings, 0 replies; 27+ messages in thread
From: Rask Ingemann Lambertsen @ 2007-05-20 12:23 UTC (permalink / raw)
To: Rene Herman; +Cc: alsa-devel
On Sat, May 19, 2007 at 04:55:12AM +0200, Rene Herman wrote:
> On 05/17/2007 03:08 PM, Rask Ingemann Lambertsen wrote:
>
> >I've found the X24C00 chip, a 12 MHz crystal or oscilator (I'm not sure
> >which) and an Intel S-80C51FANM chip. The uncommented jumpers J1 and J2
> >are my best bet, although they are connected to the AZTSSPT0592 chip.
>
> Right, so you also have that one. Also the AZT-NXPMIX0592?
Yes.
> If J1 and J2 are connected to pin 17 and 18 at the top (the side which is
> "up" when you can read the markings) of the AZTSSPT0592 then those will be
> my J4/J5. Also unmarked, but I have the booklet!
They are. I also have J4/J5 labelled PC SPKR, do you happen to know what
they are for?
> If they're the same, then you should have a "virtual parallel port" at
> 0x278 when they're closed for "Disney Sound Source" compatibility.
I do.
--
Rask Ingemann Lambertsen
^ permalink raw reply [flat|nested] 27+ messages in thread
end of thread, other threads:[~2007-05-20 12:23 UTC | newest]
Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-17 8:48 Can someone verify support for "AzTech Sound Galaxy Nova 16 Extra II-3D - using AZT-2316/R Chipset - FCC-ID:I38-MMSN846" ? ramkromberg
2007-05-17 9:22 ` Rene Herman
-- strict thread matches above, loose matches on Subject: below --
2007-05-15 8:50 ramkromberg
2007-05-16 23:23 ` Rene Herman
2007-05-14 13:21 ramkromberg
2007-05-14 14:53 ` Rene Herman
2007-05-13 10:17 ramkromberg
2007-05-13 11:00 ` j t
2007-05-14 9:07 ` Rask Ingemann Lambertsen
2007-05-14 21:53 ` Rene Herman
2007-05-14 22:22 ` Rene Herman
2007-05-14 22:25 ` Rene Herman
2007-05-15 10:12 ` Rask Ingemann Lambertsen
2007-05-16 23:35 ` Rene Herman
2007-05-17 13:08 ` Rask Ingemann Lambertsen
2007-05-19 2:55 ` Rene Herman
2007-05-20 12:23 ` Rask Ingemann Lambertsen
2007-05-15 10:16 ` Rask Ingemann Lambertsen
2007-05-16 23:47 ` Rene Herman
2007-05-11 16:44 ramkromberg
2007-05-11 21:42 ` Rene Herman
2007-05-10 20:57 ramkromberg
2007-05-10 21:06 ` Rene Herman
2007-05-10 18:24 ramkromberg
2007-05-07 5:46 ramkromberg
2007-05-07 20:51 ` Rene Herman
2007-05-10 14:56 ` Rene Herman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).