[alsa-devel] Ensoniq SoundScape VIVO90
Hi,
I acquired Ensoniq VIVO90 card. I tried sscape driver but it does not work. I quickly looked at the oss driver in the kernel and it works completely different (uses different pnp resources for codec and mpu).
I want to ask if somebody tested this driver and if so what was the Ensoniq card model. If it worked only for non-pnp models I would integrate at least for VIVO cards.
BTW. I found the old post which describes difference between VIVO and VIVO90. It is below the email.
Regards, Krzysztof
Hannu Savolainen (ha...@voxware.pp.fi, ha...@4front-tech.com) wrote:
Temat: Re: Ensoniq VIVO vs. VIVO 90
Bill Plenderleith nospam!plend...@nortel.ca writes:
Are VIVO & VIVO 90 different products? Can anyone summarize the diffences?
The only difference is that in VIVO90 the wave table output signal goes through the codec/mixer chip (AD1845). In the original VIVO it's summed to the output of AD1845. This difference is'n really anything important.
Best regards,
Hannu
On 09/14/2007 10:12 AM, Krzysztof Helt wrote:
I acquired Ensoniq VIVO90 card. I tried sscape driver but it does not work. I quickly looked at the oss driver in the kernel and it works completely different (uses different pnp resources for codec and mpu).
Also looked at that in response to a list question a while ago and posted a very basic driver for the codec part only:
http://mailman.alsa-project.org/pipermail/alsa-devel/2007-April/000716.html
Also attached again. Haven't looked at it anymore since then.
I want to ask if somebody tested this driver and if so what was the Ensoniq card model. If it worked only for non-pnp models I would integrate at least for VIVO cards.
It supposedly worked for the original author (Chris Rankin, CCed) with that ENS3081 card that's listed. I suppose you also have the 4081 as both I and Cody did?
(I do also have an old non-pnp soundscape lying about, but I haven't gotten around to testing that yet).
Rene.
commit f52cdda56fd648315fcc276d701760e9183939b3 Author: Rene Herman rene.herman@gmail.com Date: Tue May 8 20:25:17 2007 +0200
[ALSA] snd-vivo
diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig index cf3803c..9567090 100644 --- a/sound/isa/Kconfig +++ b/sound/isa/Kconfig @@ -397,6 +397,18 @@ config SND_SSCAPE To compile this driver as a module, choose M here: the module will be called snd-sscape.
+config SND_VIVO + tristate "Ensoniq Soundscape VIVO(90) Driver" + depends on SND + select SND_MPU401_UART + select SND_CS4231_LIB + help + Say Y here to include support for Ensoniq Soundscape VIVO(90) + soundcards. + + To compile this driver as a module, choose M here: the module + will be called snd-vivo. + config SND_WAVEFRONT tristate "Turtle Beach Maui,Tropez,Tropez+ (Wavefront)" depends on SND diff --git a/sound/isa/Makefile b/sound/isa/Makefile index bb317cc..8f246af 100644 --- a/sound/isa/Makefile +++ b/sound/isa/Makefile @@ -12,6 +12,7 @@ snd-es18xx-objs := es18xx.o snd-opl3sa2-objs := opl3sa2.o snd-sgalaxy-objs := sgalaxy.o snd-sscape-objs := sscape.o +snd-vivo-objs := vivo.o
# Toplevel Module Dependency obj-$(CONFIG_SND_ADLIB) += snd-adlib.o @@ -23,6 +24,7 @@ obj-$(CONFIG_SND_ES18XX) += snd-es18xx.o obj-$(CONFIG_SND_OPL3SA2) += snd-opl3sa2.o obj-$(CONFIG_SND_SGALAXY) += snd-sgalaxy.o obj-$(CONFIG_SND_SSCAPE) += snd-sscape.o +obj-$(CONFIG_SND_VIVO) += snd-vivo.o
obj-$(CONFIG_SND) += ad1816a/ ad1848/ cs423x/ es1688/ gus/ opti9xx/ \ sb/ wavefront/ diff --git a/sound/isa/vivo.c b/sound/isa/vivo.c new file mode 100644 index 0000000..fd2c774 --- /dev/null +++ b/sound/isa/vivo.c @@ -0,0 +1,148 @@ +/* + * Ensoniq Soundscape VIVO(90) Driver + */ + +#include <sound/driver.h> +#include <linux/kernel.h> +#include <linux/module.h> +#include <linux/pnp.h> +#include <linux/delay.h> +#include <sound/core.h> +#include <sound/initval.h> +#include <sound/mpu401.h> +#include <sound/cs4231.h> + +#define CRD_NAME "Ensoniq Soundscape VIVO(90)" +#define DRV_NAME "VIVO" +#define DEV_NAME "vivo" + +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 struct pnp_card_device_id snd_vivo_pnpids[] = { + { .id = "ENS4081", .devs = { { "ENS1011" } } }, + { .id = "" } +}; + +MODULE_DEVICE_TABLE(pnp_card, snd_vivo_pnpids); + +static int snd_vivo_error __devinitdata = -ENODEV; + +static int __devinit snd_vivo_probe(struct pnp_card_link *pcard, + const struct pnp_card_device_id *pid) +{ + static int card_num; + + struct pnp_dev *pdev; + struct snd_card *card; + struct snd_cs4231 *chip; + + int num, error; + + if (card_num == SNDRV_CARDS) + return -ENODEV; + + num = card_num++; + if (!enable[num]) + return -ENODEV; + + pdev = pnp_request_card_device(pcard, pid->devs[0].id, NULL); + if (!pdev || pnp_activate_dev(pdev) < 0) + return -ENODEV; + + card = snd_card_new(index[num], id[num], THIS_MODULE, 0); + if (!card) + return -EINVAL; + + snd_card_set_dev(card, &pdev->dev); + + strcpy(card->driver, DRV_NAME); + strcpy(card->shortname, DRV_NAME); + strcpy(card->longname, CRD_NAME); + + error = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, + pnp_port_start(pdev, 0), 0, + pnp_irq(pdev, 1), 0, NULL); + if (error < 0) + goto out; + + msleep(500); + + error = snd_cs4231_create(card, pnp_port_start(pdev, 1) + 4, -1, + pnp_irq(pdev, 0), pnp_dma(pdev, 0), + pnp_dma(pdev, 1), CS4231_HW_DETECT, + 0, &chip); + if (error < 0) + goto out; + + error = snd_cs4231_pcm(chip, 0, NULL); + if (error < 0) + goto out; + + error = snd_cs4231_mixer(chip); + if (error < 0) + goto out; + + error = snd_cs4231_timer(chip, 0, NULL); + if (error < 0) + goto out; + + error = snd_card_register(card); + if (error < 0) + goto out; + + pnp_set_card_drvdata(pcard, card); + return (snd_vivo_error = 0); + +out: snd_card_free(card); + return error; +} + +static void __devexit snd_vivo_remove(struct pnp_card_link *pcard) +{ + snd_card_free(pnp_get_card_drvdata(pcard)); + pnp_set_card_drvdata(pcard, NULL); +} + +static struct pnp_card_driver snd_vivo_driver = { + .flags = PNP_DRIVER_RES_DISABLE, + .name = DEV_NAME, + .id_table = snd_vivo_pnpids, + .probe = snd_vivo_probe, + .remove = __devexit_p(snd_vivo_remove) +}; + +static int __init alsa_card_vivo_init(void) +{ + int error; + + error = pnp_register_card_driver(&snd_vivo_driver); + if (error < 0) + goto out; + + error = snd_vivo_error; + if (error < 0) + pnp_unregister_card_driver(&snd_vivo_driver); + +out: return error; +} + +static void __exit alsa_card_vivo_exit(void) +{ + pnp_unregister_card_driver(&snd_vivo_driver); +} + +module_init(alsa_card_vivo_init); +module_exit(alsa_card_vivo_exit);
Thanks for the answer.
I found also this: http://contents.driverguide.com/content.php?id=19870&path=ENSONIQ.INF
This is an INF file for the Windows driver of the card with ENS3081 id. It is called "SoundScape PnP". It also gives ranges of io ports and irqs possible to use for the driver (search for IOConfig). They are the same as for the VIVO card I have which means they are incorrect in the sscape driver.
I would like to hear something from Cris Rankin. Maybe he tested it on the non-PnP card and the PnP part is untested yet.
Regards, Krzysztof
On 9/14/07, Rene Herman rene.herman@gmail.com wrote:
On 09/14/2007 10:12 AM, Krzysztof Helt wrote:
I acquired Ensoniq VIVO90 card. I tried sscape driver but it does not work. I quickly looked at the oss driver in the kernel and it works completely different (uses different pnp resources for codec and mpu).
Also looked at that in response to a list question a while ago and posted a very basic driver for the codec part only:
http://mailman.alsa-project.org/pipermail/alsa-devel/2007-April/000716.html
Also attached again. Haven't looked at it anymore since then.
I want to ask if somebody tested this driver and if so what was the Ensoniq card model. If it worked only for non-pnp models I would integrate at least for VIVO cards.
It supposedly worked for the original author (Chris Rankin, CCed) with that ENS3081 card that's listed. I suppose you also have the 4081 as both I and Cody did?
(I do also have an old non-pnp soundscape lying about, but I haven't gotten around to testing that yet).
Rene.
commit f52cdda56fd648315fcc276d701760e9183939b3 Author: Rene Herman rene.herman@gmail.com Date: Tue May 8 20:25:17 2007 +0200
[ALSA] snd-vivo
diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig index cf3803c..9567090 100644 --- a/sound/isa/Kconfig +++ b/sound/isa/Kconfig @@ -397,6 +397,18 @@ config SND_SSCAPE To compile this driver as a module, choose M here: the module will be called snd-sscape.
+config SND_VIVO
tristate "Ensoniq Soundscape VIVO(90) Driver"
depends on SND
select SND_MPU401_UART
select SND_CS4231_LIB
help
Say Y here to include support for Ensoniq Soundscape VIVO(90)
soundcards.
To compile this driver as a module, choose M here: the module
will be called snd-vivo.
config SND_WAVEFRONT tristate "Turtle Beach Maui,Tropez,Tropez+ (Wavefront)" depends on SND diff --git a/sound/isa/Makefile b/sound/isa/Makefile index bb317cc..8f246af 100644 --- a/sound/isa/Makefile +++ b/sound/isa/Makefile @@ -12,6 +12,7 @@ snd-es18xx-objs := es18xx.o snd-opl3sa2-objs := opl3sa2.o snd-sgalaxy-objs := sgalaxy.o snd-sscape-objs := sscape.o +snd-vivo-objs := vivo.o
# Toplevel Module Dependency obj-$(CONFIG_SND_ADLIB) += snd-adlib.o @@ -23,6 +24,7 @@ obj-$(CONFIG_SND_ES18XX) += snd-es18xx.o obj-$(CONFIG_SND_OPL3SA2) += snd-opl3sa2.o obj-$(CONFIG_SND_SGALAXY) += snd-sgalaxy.o obj-$(CONFIG_SND_SSCAPE) += snd-sscape.o +obj-$(CONFIG_SND_VIVO) += snd-vivo.o
obj-$(CONFIG_SND) += ad1816a/ ad1848/ cs423x/ es1688/ gus/ opti9xx/ \ sb/ wavefront/ diff --git a/sound/isa/vivo.c b/sound/isa/vivo.c new file mode 100644 index 0000000..fd2c774 --- /dev/null +++ b/sound/isa/vivo.c @@ -0,0 +1,148 @@ +/*
- Ensoniq Soundscape VIVO(90) Driver
- */
+#include <sound/driver.h> +#include <linux/kernel.h> +#include <linux/module.h> +#include <linux/pnp.h> +#include <linux/delay.h> +#include <sound/core.h> +#include <sound/initval.h> +#include <sound/mpu401.h> +#include <sound/cs4231.h>
+#define CRD_NAME "Ensoniq Soundscape VIVO(90)" +#define DRV_NAME "VIVO" +#define DEV_NAME "vivo"
+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 struct pnp_card_device_id snd_vivo_pnpids[] = {
{ .id = "ENS4081", .devs = { { "ENS1011" } } },
{ .id = "" }
+};
+MODULE_DEVICE_TABLE(pnp_card, snd_vivo_pnpids);
+static int snd_vivo_error __devinitdata = -ENODEV;
+static int __devinit snd_vivo_probe(struct pnp_card_link *pcard,
const struct pnp_card_device_id *pid)
+{
static int card_num;
struct pnp_dev *pdev;
struct snd_card *card;
struct snd_cs4231 *chip;
int num, error;
if (card_num == SNDRV_CARDS)
return -ENODEV;
num = card_num++;
if (!enable[num])
return -ENODEV;
pdev = pnp_request_card_device(pcard, pid->devs[0].id, NULL);
if (!pdev || pnp_activate_dev(pdev) < 0)
return -ENODEV;
card = snd_card_new(index[num], id[num], THIS_MODULE, 0);
if (!card)
return -EINVAL;
snd_card_set_dev(card, &pdev->dev);
strcpy(card->driver, DRV_NAME);
strcpy(card->shortname, DRV_NAME);
strcpy(card->longname, CRD_NAME);
error = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401,
pnp_port_start(pdev, 0), 0,
pnp_irq(pdev, 1), 0, NULL);
if (error < 0)
goto out;
msleep(500);
error = snd_cs4231_create(card, pnp_port_start(pdev, 1) + 4, -1,
pnp_irq(pdev, 0), pnp_dma(pdev, 0),
pnp_dma(pdev, 1), CS4231_HW_DETECT,
0, &chip);
if (error < 0)
goto out;
error = snd_cs4231_pcm(chip, 0, NULL);
if (error < 0)
goto out;
error = snd_cs4231_mixer(chip);
if (error < 0)
goto out;
error = snd_cs4231_timer(chip, 0, NULL);
if (error < 0)
goto out;
error = snd_card_register(card);
if (error < 0)
goto out;
pnp_set_card_drvdata(pcard, card);
return (snd_vivo_error = 0);
+out: snd_card_free(card);
return error;
+}
+static void __devexit snd_vivo_remove(struct pnp_card_link *pcard) +{
snd_card_free(pnp_get_card_drvdata(pcard));
pnp_set_card_drvdata(pcard, NULL);
+}
+static struct pnp_card_driver snd_vivo_driver = {
.flags = PNP_DRIVER_RES_DISABLE,
.name = DEV_NAME,
.id_table = snd_vivo_pnpids,
.probe = snd_vivo_probe,
.remove = __devexit_p(snd_vivo_remove)
+};
+static int __init alsa_card_vivo_init(void) +{
int error;
error = pnp_register_card_driver(&snd_vivo_driver);
if (error < 0)
goto out;
error = snd_vivo_error;
if (error < 0)
pnp_unregister_card_driver(&snd_vivo_driver);
+out: return error; +}
+static void __exit alsa_card_vivo_exit(void) +{
pnp_unregister_card_driver(&snd_vivo_driver);
+}
+module_init(alsa_card_vivo_init); +module_exit(alsa_card_vivo_exit);
--- Rene Herman rene.herman@gmail.com wrote:
I want to ask if somebody tested this driver and if so what was the Ensoniq card model. If it worked only for non-pnp models I would integrate at least for VIVO cards.
Hello Rene,
I naturally tested this driver with the only Ensoniq SoundScape card that I owned (the PnP version), and yes, it works. All I did was convert as much of the original OSS driver to ALSA as I could verify.
Cheers, Chris
______________________________________________________ Yahoo! Mail now has unlimited storage, which means you can have spam control and more space for those important e-mails. http://uk.mail.yahoo.com
On 09/14/2007 05:17 PM, Chris Rankin wrote:
I naturally tested this driver with the only Ensoniq SoundScape card that I owned (the PnP version), and yes, it works. All I did was convert as much of the original OSS driver to ALSA as I could verify.
Great, thanks for the answer. The 3081 is a little different resource wise then. It finds the codec at "mpu_port" + 8, whereas the VIVOs (4081) has it as a seperate PnP resource.
3081: Soundscape/MPU port = pnp_port(0), irq = pnp_irq(1) Codec port = + 8, irq = pnp_irq(0)
4081: Soundscape/MPU port = pnp_port(0), irq = pnp_irq(1) Codec port = pnp_port(1), irq = pnp_irq(0)
It's possible to switch behaviour on the PnP ID (for example by setting pnp_card_device_id->driver_data in the ID table).
Rene.
--- Rene Herman rene.herman@gmail.com wrote:
On 09/14/2007 05:17 PM, Chris Rankin wrote:
I naturally tested this driver with the only Ensoniq SoundScape card that I owned (the PnP version), and yes, it works. All I did was convert as much of the original OSS driver to ALSA as I could verify.
Great, thanks for the answer. The 3081 is a little different resource wise then. It finds the codec at "mpu_port" + 8, whereas the VIVOs (4081) has it as a seperate PnP resource.
3081: Soundscape/MPU port = pnp_port(0), irq = pnp_irq(1) Codec port = + 8, irq = pnp_irq(0)
4081: Soundscape/MPU port = pnp_port(0), irq = pnp_irq(1) Codec port = pnp_port(1), irq = pnp_irq(0)
It's possible to switch behaviour on the PnP ID (for example by setting pnp_card_device_id->driver_data in the ID table).
Do you have the old OSS SoundScape driver code, and did it support the VIVO? I seem to recall that there were several extra code-paths in there for other SoundScape versions.
Cheers, Chris
_______________________________________________________ Try Yahoo! Mail now with Unlimited Storage and see the difference. http://uk.mail.yahoo.com
On 09/14/2007 06:06 PM, Chris Rankin wrote:
Do you have the old OSS SoundScape driver code, and did it support the VIVO? I seem to recall that there were several extra code-paths in there for other SoundScape versions.
The code is still in the tree, yes. Krzysztof is looking into it...
Rene.
On Fri, 14 Sep 2007 16:17:33 +0100 (BST) Chris Rankin rankincj@yahoo.com wrote:
I naturally tested this driver with the only Ensoniq SoundScape card that I owned (the PnP version), and yes, it works. All I did was convert as much of the original OSS driver to ALSA as I could verify.
Thank you for the answer. I was fooled by the INF file, the link I posted before.
If it worked for you I'll try to add another code patch for the ENS4081 model.
Regards, Krzysztof
participants (3)
-
Chris Rankin
-
Krzysztof Helt
-
Rene Herman