[Alsa-devel] [PATCH] Roland UA-100 PCM support

2002-10-24 Thread Clemens Ladisch

The UA-100 doesn't have any class-specific descriptors, so the PCM format
information has to be supplied by the driver as well.


Index: usb/usbaudio.c
===
RCS file: /cvsroot/alsa/alsa-kernel/usb/usbaudio.c,v
retrieving revision 1.21
diff -u -r1.21 usbaudio.c
--- usb/usbaudio.c  22 Oct 2002 10:14:19 -  1.21
+++ usb/usbaudio.c  24 Oct 2002 07:06:41 -
@@ -1891,12 +1891,94 @@
return 0;
 }

-static inline int snd_usb_create_quirk(snd_usb_audio_t *chip,
-  struct usb_interface *iface,
-  const snd_usb_audio_quirk_t *quirk)
+static int snd_usb_roland_ua100_hack_intf(snd_usb_audio_t *chip, int ifnum)
 {
-   /* in the future, there may be quirks for PCM devices */
-   return snd_usb_create_midi_interface(chip, iface, quirk);
+   struct audioformat *fp;
+   int err;
+
+   fp = kmalloc(sizeof(*fp), GFP_KERNEL);
+   if (! fp) {
+   snd_printk(KERN_ERR "cannot malloc\n");
+   return -ENOMEM;
+   }
+   memset(fp, 0, sizeof(*fp));
+   fp->format = SNDRV_PCM_FORMAT_S16_LE;
+   fp->channels = ifnum == 0 ? 4 : 2;
+   fp->iface = ifnum;
+   fp->altsetting = 1;
+   fp->altset_idx = 1;
+   fp->attributes = ifnum == 0 ? 0 : EP_CS_ATTR_FILL_MAX;
+   fp->endpoint = ifnum == 0 ? 0x01 : 0x81;
+   fp->ep_attr = ifnum == 0 ? 0x09 : 0x05;
+   fp->rates = SNDRV_PCM_RATE_CONTINUOUS;
+   fp->rate_min = fp->rate_max = 44100;
+
+   err = add_audio_endpoint(chip, ifnum == 0 ? SNDRV_PCM_STREAM_PLAYBACK
+: SNDRV_PCM_STREAM_CAPTURE, fp);
+   if (err < 0) {
+   kfree(fp);
+   return err;
+   }
+   usb_set_interface(chip->dev, ifnum, 0);
+   return 0;
+}
+
+static int snd_usb_roland_ua100_hack(snd_usb_audio_t *chip)
+{
+   static const snd_usb_audio_quirk_t midi_quirk = {
+   .vendor_name = "Roland",
+   .product_name = "UA-100",
+   .ifnum = 2,
+   .type = QUIRK_MIDI_FIXED_ENDPOINT,
+   .data = & (const snd_usb_midi_endpoint_info_t) {
+   .epnum = -1,
+   .out_cables = 0x0007,
+   .in_cables  = 0x0007
+   }
+   };
+   struct usb_config_descriptor *cfg = chip->dev->actconfig;
+   struct usb_interface *iface;
+   int err;
+
+   if (cfg->bNumInterfaces != 3) {
+   snd_printdd(KERN_ERR "invalid UA-100 descriptor\n");
+   return -ENXIO;
+   }
+   /* if 0: output */
+   if ((err = snd_usb_roland_ua100_hack_intf(chip, 0)) < 0)
+   return err;
+   /* if 1: input */
+   iface = &cfg->interface[1];
+   if (! usb_interface_claimed(iface)) {
+   if ((err = snd_usb_roland_ua100_hack_intf(chip, 1)) < 0)
+   return err;
+   usb_driver_claim_interface(&usb_audio_driver, iface, (void*)-1);
+   }
+   /* if 2: MIDI */
+   iface = &cfg->interface[2];
+   if (! usb_interface_claimed(iface)) {
+   if ((err = snd_usb_create_midi_interface(chip, iface, &midi_quirk)) < 
+0)
+   return err;
+   usb_driver_claim_interface(&usb_audio_driver, iface, (void*)-1);
+   }
+   return 0;
+}
+
+static int snd_usb_create_quirk(snd_usb_audio_t *chip,
+   struct usb_interface *iface,
+   const snd_usb_audio_quirk_t *quirk)
+{
+   switch (quirk->type) {
+   case QUIRK_MIDI_FIXED_ENDPOINT:
+   case QUIRK_MIDI_YAMAHA:
+   case QUIRK_MIDI_MIDIMAN:
+   return snd_usb_create_midi_interface(chip, iface, quirk);
+   case QUIRK_ROLAND_UA100:
+   return snd_usb_roland_ua100_hack(chip);
+   default:
+   snd_printd(KERN_ERR "invalid quirk type %d\n", quirk->type);
+   return -ENXIO;
+   }
 }


Index: usb/usbaudio.h
===
RCS file: /cvsroot/alsa/alsa-kernel/usb/usbaudio.h,v
retrieving revision 1.5
diff -u -r1.5 usbaudio.h
--- usb/usbaudio.h  22 Oct 2002 10:14:19 -  1.5
+++ usb/usbaudio.h  24 Oct 2002 07:06:41 -
@@ -149,6 +149,7 @@
 #define QUIRK_MIDI_FIXED_ENDPOINT  0
 #define QUIRK_MIDI_YAMAHA  1
 #define QUIRK_MIDI_MIDIMAN 2
+#define QUIRK_ROLAND_UA100 3

 typedef struct snd_usb_audio_quirk snd_usb_audio_quirk_t;
 typedef struct snd_usb_midi_endpoint_info snd_usb_midi_endpoint_info_t;
@@ -171,6 +172,8 @@
 /* for QUIRK_MIDI_YAMAHA, data is NULL */

 /* for QUIRK_MIDI_MIDIMAN, data is the number of ports */
+
+/* for QUIRK_ROLAND_UA100, data is NULL */

 /*
  */
Index: usb/usbquirks.h
===
RCS file: /cvsroot/alsa/alsa-kernel/usb/usb

Re: [Alsa-devel] Re: [linux-audio-user] Evolution UC16 problems, modules.conf for usb-midi and usb-audio together

2002-10-24 Thread Martin Langer
On Wed, Oct 23, 2002 at 01:27:23PM +0200, Takashi Iwai wrote:
> At Wed, 23 Oct 2002 13:02:28 +0200 (CEST),
> Jaroslav wrote:
> > 
> > On Wed, 23 Oct 2002, Martin Langer wrote:
> > 
> > > On Wed, Oct 23, 2002 at 11:50:37AM +0200, Clemens Ladisch wrote:
> > > > And you need to say which driver to use for snd-card-1. For the UC16 with
> > > > 0.9.0rc3, it would be
> > > > alias snd-card-1 snd-usb-midi
> > > > For 0.9.0rc4, it would be
> > > > alias snd-card-1 snd-usb-audio
> > > > 
> > > 
> > > 
> > > It would be better to add this module name change to the rc4 announce lines on
> > > www.alsa-project.org !
> > 
> > It's not possible to comment changes for all drivers in the news 
> > section...
> 
> but the change of driver names is actually very important for users,
> and there are only few:
> 
>   snd-via686, snd-via8233 ==> snd-via82xx
>   snd-usb-midi ==> snd-usb-audio

What about a linked changelog or announce file?

martin

> 
> 
> Takashi
> 
> 

-- 
"2b|!2b"


---
This sf.net emial is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0002en
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel



Re: [Alsa-devel] rc4

2002-10-24 Thread Takashi Iwai
At Wed, 23 Oct 2002 20:17:15 +0200 (CEST),
tomasz motylewski wrote:
> 
> On Wed, 23 Oct 2002, Takashi Iwai wrote:
> 
> > > I have just updated to CVS.
> > > 
> > > Debian 2.2
> > > 
> > > I needed to run autoconf; ./configure; make; ./configure; make
> > 
> > do you mean that the original configure script in rc4 tarball doesn't
> > work?  if yes, it's a bug of rc4 tarball - we have to release rc5...
> 
> No, I have got CVS version, but did not run cvscompile - my fault.
> 
> But now with the real rc4  tarball and 2.4.9 kernel + Debian 2.2rev7
> ./configure
> make
> [...]
> make[3]: Leaving directory `/tmp/alsa-driver-0.9.0rc4/isa/wavefront'
> /tmp/alsa-driver-0.9.0rc4/include/sndversions.h was not updated
> gcc -M -D__KERNEL__ -DMODULE=1 -I/tmp/alsa-driver-0.9.0rc4/include
> -I/lib/modules/2.4.9/build/include -O2 -mpreferred-stack-boundary=2 -march=i686
> -DLINUX -Wall -Wstrict-prototypes -fomit-frame-pointer -pipe -DALSA_BUILD
> als100.c azt2320.c cmi8330.c dt019x.c es18xx.c opl3sa2.c sgalaxy.c sscape.c >
> .depend
> sscape.c:500: macro `min' used with only 2 args
> make[2]: *** [fastdep] Error 1
> make[2]: Leaving directory `/tmp/alsa-driver-0.9.0rc4/isa'
> make[1]: *** [dep] Error 1
> make[1]: Leaving directory `/tmp/alsa-driver-0.9.0rc4'
> make: *** [include/sndversions.h] Error 2
> 
> 
> I would say, low priority - 2.4.9 kernel is probably quite exotic at the
> moment.

yes, i guess it's the kernel version problem.
there was the time shortly once that min() and max() macro takes the
third argument for specifying the variable type.  it was removed in
the later version.

there are definitions of correct min() and max() macros in adriver.h.
they are protected by ifdef, so you can put

#undef min

and

#undef max

so that they will be redefined.
i hope this doesn't conflict...


Takashi


---
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ad.doubleclick.net/clk;4729346;7592162;s?http://www.sun.com/javavote
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel



[Alsa-devel] Patch for snd-serialmidi

2002-10-24 Thread MARUBAYASHI Takamichi
Hello,

A module parameter doesn't chenge from 'snd_sdev' to 'sdev' in the snd-serialmidi.
And, this parameter isn't registered with MODULE_PARM.

--- drivers/serialmidi.c.orig   2002-10-22 23:25:55.0 +0900
+++ drivers/serialmidi.c2002-10-23 23:23:32.0 +0900
@@ -52,20 +52,23 @@
 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */
 static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;  /* ID for this card */
 static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE; /* Enable this card */
-static char *snd_sdev[SNDRV_CARDS] = {"/dev/ttyS0", [1 ... (SNDRV_CARDS - 1)] = ""}; 
/* serial device */
+static char *sdev[SNDRV_CARDS] = {"/dev/ttyS0", [1 ... (SNDRV_CARDS - 1)] = ""}; /* 
+serial device */
 static int speed[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 38400}; /* 
9600,19200,38400,57600,115200 */
 static int adaptor[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 
SERIAL_ADAPTOR_SOUNDCANVAS};
 static int outs[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1}; /* 1 to 16 */
 
 MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(index, "Index value for MPU-401 device.");
+MODULE_PARM_DESC(index, "Index value for serial device.");
 MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
 MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(id, "ID string for MPU-401 device.");
+MODULE_PARM_DESC(id, "ID string for serial device.");
 MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
 MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(enable, "Enable MPU-401 device.");
+MODULE_PARM_DESC(enable, "Enable serial device.");
 MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(sdev, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(sdev, "Device file string for serial device.");
+MODULE_PARM_SYNTAX(sdev, SNDRV_ID_DESC);
 MODULE_PARM(speed, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
 MODULE_PARM_DESC(speed, "Speed in bauds.");
 MODULE_PARM_SYNTAX(speed, SNDRV_ENABLED 
",allows:{9600,19200,38400,57600,115200},dialog:list");
@@ -493,7 +496,7 @@
strcpy(card->shortname, card->driver);
 
if ((err = snd_serialmidi_create(card,
-snd_sdev[dev],
+sdev[dev],
 speed[dev],
 adaptor[dev],
 outs[dev],
@@ -502,7 +505,7 @@
return err;
}
 
-   sprintf(card->longname, "%s at %s", card->shortname, snd_sdev[dev]);
+   sprintf(card->longname, "%s at %s", card->shortname, sdev[dev]);
if ((err = snd_card_register(card)) < 0) {
snd_card_free(card);
return err;
@@ -544,7 +547,7 @@
 #ifndef MODULE
 
 /* format is: snd-serialmidi=enable,index,id,
-snd_sdev,speed,adaptor,outs */
+sdev,speed,adaptor,outs */
 
 static int __init alsa_card_serialmidi_setup(char *str)
 {
@@ -555,7 +558,7 @@
(void)(get_option(&str,&enable[nr_dev]) == 2 &&
   get_option(&str,&index[nr_dev]) == 2 &&
   get_id(&str,&id[nr_dev]) == 2 &&
-  get_id(&str,&snd_sdev[nr_dev]) == 2 &&
+  get_id(&str,&sdev[nr_dev]) == 2 &&
   get_option(&str,&speed[nr_dev]) == 2 &&
   get_option(&str,&adaptor[nr_dev]) == 2 &&
   get_option(&str,&outs[nr_dev]) == 2);


---
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ad.doubleclick.net/clk;4729346;7592162;s?http://www.sun.com/javavote
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel



[Alsa-devel] RC5 driver make fail (usbaudio.c)

2002-10-24 Thread Phil Kerr
Takashi,

Attached is the configure and make dump of alsa-drivers-rc5 (webserver 
timestamp 10/24/2002  02:47:00 PM).

100% stock RH 8.0 installed an hour before with a es1371 card.

It's failed at:

In file included from usbaudio.c:2:
../alsa-kernel/usb/usbaudio.c: In function `snd_usb_roland_ua100_hack':
../alsa-kernel/usb/usbaudio.c:1938: initializer element is not constant
../alsa-kernel/usb/usbaudio.c:1938: (near initialization for 
`midi_quirk.data')
make[1]: *** [usbaudio.o] Error 1
make[1]: Leaving directory `/home/phil/installs/alsa-driver-0.9.0rc5/usb'
make: *** [compile] Error 1


Regards,
Phil



alsa-driver-rc5-errors.txt.bz2
Description: BZip2 compressed data


Re: [Alsa-devel] RC5 driver make fail (usbaudio.c)

2002-10-24 Thread Matthias Saou
Once upon a time, Phil wrote :

> 100% stock RH 8.0 installed an hour before with a es1371 card.
> 
> It's failed at:
> 
> In file included from usbaudio.c:2:
> ../alsa-kernel/usb/usbaudio.c: In function `snd_usb_roland_ua100_hack':
> ../alsa-kernel/usb/usbaudio.c:1938: initializer element is not constant
> ../alsa-kernel/usb/usbaudio.c:1938: (near initialization for 
> `midi_quirk.data')
> make[1]: *** [usbaudio.o] Error 1
> make[1]: Leaving directory `/home/phil/installs/alsa-driver-0.9.0rc5/usb'
> make: *** [compile] Error 1

Strange, I've had no problems whatsoever on a fully updated vanilla Red Hat
Linux 8.0 system (kernel 2.4.18-17.8.0), compiling all drivers just like
you did.

Matthias

-- 
Clean custom Red Hat Linux rpm packages : http://freshrpms.net/
Red Hat Linux release 7.3 (Valhalla) running Linux kernel 2.4.18-10acpi
Load : 0.09 0.14 0.21


---
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ad.doubleclick.net/clk;4729346;7592162;s?http://www.sun.com/javavote
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel



[Alsa-devel] sassi, can you hear me? or Re: A little report on Guillemots MAXIStudio ISIS...

2002-10-24 Thread Daniel Haus
I am very interested if there is any progress with the Guillemot Maxi
Studio ISIS, or the Dream SAM9707 chip at all All I could find was -
except the usual "buy some other card"-messages this very interesting
post from Sassi, that gave me hope that at least there used to be
someone who really had the will to make it work with alsa.

http://sourceforge.net/mailarchive/message.php?msg_id=104782
from 2001-12-02, a long time.

Now, even if I don't have much experience developing device drivers,
too, I am really willing to spend time trying to make alsa and isis
friends. At least for the learning effect.

Does anyone have such a card or know if there is development? Sassi,
where are you?

Guillemot's drivers for win98/me are as ugly as win itself .. argh .. 

Regards,
Daniel

And thanks to all of you for developing such fantastic software!

--
[EMAIL PROTECTED]
icq# 38148428




---
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0003en
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel



[Alsa-devel] Fwd: Problem wth alsa-driver (rc3-rc4) rc5

2002-10-24 Thread Unet
Hi,

I have a problem having alsa-driver to work since rc3.

The driver compiles fine, but when I try to register the modules, here's what
I got:
depmod: *** Unresolved symbols in
/lib/modules/2.4.19/kernel/sound/acore/oss/snd-mixer-oss.o
depmod: *** Unresolved symbols in
/lib/modules/2.4.19/kernel/sound/acore/oss/snd-pcm-oss.o
depmod: *** Unresolved symbols in
/lib/modules/2.4.19/kernel/sound/acore/seq/oss/snd-seq-oss.o
depmod: *** Unresolved symbols in
/lib/modules/2.4.19/kernel/sound/acore/seq/snd-seq-device.o
depmod: *** Unresolved symbols in
/lib/modules/2.4.19/kernel/sound/acore/seq/snd-seq-instr.o
depmod: *** Unresolved symbols in
/lib/modules/2.4.19/kernel/sound/acore/seq/snd-seq-midi-emul.o
depmod: *** Unresolved symbols in
/lib/modules/2.4.19/kernel/sound/acore/seq/snd-seq-midi-event.o
depmod: *** Unresolved symbols in
/lib/modules/2.4.19/kernel/sound/acore/seq/snd-seq-midi.o
depmod: *** Unresolved symbols in
/lib/modules/2.4.19/kernel/sound/acore/seq/snd-seq.o
depmod: *** Unresolved symbols in
/lib/modules/2.4.19/kernel/sound/acore/snd-hwdep.o
depmod: *** Unresolved symbols in
/lib/modules/2.4.19/kernel/sound/acore/snd-pcm.o
depmod: *** Unresolved symbols in
/lib/modules/2.4.19/kernel/sound/acore/snd-rawmidi.o
depmod: *** Unresolved symbols in
/lib/modules/2.4.19/kernel/sound/acore/snd-timer.o
depmod: *** Unresolved symbols in
 /lib/modules/2.4.19/kernel/sound/acore/snd.o depmod: *** Unresolved symbols
 in
/lib/modules/2.4.19/kernel/sound/drivers/mpu401/snd-mpu401-uart.o
depmod: *** Unresolved symbols in
/lib/modules/2.4.19/kernel/sound/drivers/opl3/snd-opl3-lib.o
depmod: *** Unresolved symbols in
/lib/modules/2.4.19/kernel/sound/drivers/opl3/snd-opl3-synth.o
depmod: *** Unresolved symbols in
/lib/modules/2.4.19/kernel/sound/pci/ac97/snd-ac97-codec.o
depmod: *** Unresolved symbols in
/lib/modules/2.4.19/kernel/sound/pci/ymfpci/snd-ymfpci.o


I'd *love* to know what is wrong.

I'm using 2.4.19 with preempt + low-latency patches.

Thank you :)

--
-
Unet != UUnet

>SourceMage

Grimoire Guru for Audio<
void Unet_im(gabber [EMAIL PROTECTED]);
void Unet_dm(mail [EMAIL PROTECTED])
{
subject(to change);
};
--



---
This sf.net email is sponsored by: Influence the future
of Java(TM) technology. Join the Java Community
Process(SM) (JCP(SM)) program now.
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0003en
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel



[Alsa-devel] Terratec DMX 6fire problem

2002-10-24 Thread Wolfgang Teichmann
Hallo,

I have a TV card connected to the rear input of the Terratec DMX 6fire ,
but when I start xawtv or xawdecode - no sound.
Alsamixer does not help.Envycontrol shows no signal H/W in 3 and H/W in4
If I start the PC with Windows and restart (warm boot) into Linux, there
is sound in xawtv and xawdecodeand, Envycontrol shows the signal H/W in3 
and H/W in4

Any idea?

-Wolfgang


smime.p7s
Description: S/MIME Cryptographic Signature


Re: [Alsa-devel] RC5 driver make fail (usbaudio.c)

2002-10-24 Thread Takashi Iwai
At Thu, 24 Oct 2002 17:44:17 +0200 (METDST),
Clemens Ladisch wrote:
> 
> Phil Kerr wrote:
> > Attached is the configure and make dump of alsa-drivers-rc5 (webserver
> > timestamp 10/24/2002  02:47:00 PM).
> >
> > 100% stock RH 8.0 installed an hour before with a es1371 card.
> >
> > ../alsa-kernel/usb/usbaudio.c: In function `snd_usb_roland_ua100_hack':
> > ../alsa-kernel/usb/usbaudio.c:1938: initializer element is not constant
> > ../alsa-kernel/usb/usbaudio.c:1938: (near initialization for `midi_quirk.data')
> 
> What is your compiler version?
> That code is valid C99 (I think :) and compiles with my gcc 2.95.3.

i couldn't compile it, too (using gcc-3.2).
apparently the initialization of data field failed.

this was already fixed on cvs, but surely there is a cleaner
solution.


Takashi


---
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ad.doubleclick.net/clk;4729346;7592162;s?http://www.sun.com/javavote
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel



[Alsa-devel] polling question

2002-10-24 Thread Eric Angel
Hello,
   I am trying to write a program using alsa.  I want to run the pcm.m example 
that is posted at: 
http://www.alsa-project.org/alsa-doc/alsa-lib/_2test_2pcm_8c-example.html
but when I try to compile it, I get lots of errors. The errors indicate that 
the code is trying to use functions incorrectly. 

It seems that the documentation and examples at alsa-project.org do not match 
the current function prototypes. Do you have any suggestions on how I can 
find current documentation to help me use alsa in my program?

Here is an overview of what I need to do with alsa: 
--
There is a while loop that processes 1 block of 1024 frames (stereo) and sends 
it to the soundcard each time through the loop.  I want the program to send 
blocks out in real-time: i.e. blocks should be sent out every (1024 frames / 
44,100 frames per sec) = 23 msec.  I have working code right now, but it runs 
way too fast. It will process and send 1 minute of sound to the soundcard in 
a few seconds. I think I need to use the polling option, but I am having 
difficulties understanding how to use it.

(I am using release candidate 3 of alsa)

  Thank you very much,
  Eric


---
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0003en
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel



Re: [Alsa-devel] RC5 driver make fail (usbaudio.c)

2002-10-24 Thread Clemens Ladisch
Phil Kerr wrote:
> Attached is the configure and make dump of alsa-drivers-rc5 (webserver
> timestamp 10/24/2002  02:47:00 PM).
>
> 100% stock RH 8.0 installed an hour before with a es1371 card.
>
> ../alsa-kernel/usb/usbaudio.c: In function `snd_usb_roland_ua100_hack':
> ../alsa-kernel/usb/usbaudio.c:1938: initializer element is not constant
> ../alsa-kernel/usb/usbaudio.c:1938: (near initialization for `midi_quirk.data')

What is your compiler version?
That code is valid C99 (I think :) and compiles with my gcc 2.95.3.


Clemens



---
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ad.doubleclick.net/clk;4729346;7592162;s?http://www.sun.com/javavote
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel



Re: [Alsa-devel] sassi, can you hear me? or Re: A little report on Guillemots MAXI Studio ISIS...

2002-10-24 Thread Andreas Mohr
Hi,

On Thu, Oct 24, 2002 at 12:28:05PM -0700, [EMAIL PROTECTED] 
wrote:
> I am very interested if there is any progress with the Guillemot Maxi
> Studio ISIS, or the Dream SAM9707 chip at all All I could find was -
> except the usual "buy some other card"-messages this very interesting
> post from Sassi, that gave me hope that at least there used to be
> someone who really had the will to make it work with alsa.
> 
> http://sourceforge.net/mailarchive/message.php?msg_id=104782
> from 2001-12-02, a long time.
> 
> Now, even if I don't have much experience developing device drivers,
> too, I am really willing to spend time trying to make alsa and isis
> friends. At least for the learning effect.

I just fortunately finished the horrible ;-) and tiresome process
of writing a driver for an entirely unsupported card, the Aztech PCI168.
So if you need help about anything, just ask me (and maybe I'm even able
to help ;)

-- 
The Declaration of Software Freedom:
http://freedevelopers.net/freedomdec/index.php


---
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0003en
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel



Re: [Alsa-devel] sassi, can you hear me? or Re: A little report onGuillemots MAXI Studio ISIS...

2002-10-24 Thread Patrick Shirkey
Andreas Mohr wrote:

Hi,

On Thu, Oct 24, 2002 at 12:28:05PM -0700, [EMAIL PROTECTED] wrote:


I am very interested if there is any progress with the Guillemot Maxi
Studio ISIS, or the Dream SAM9707 chip at all All I could find was -
except the usual "buy some other card"-messages this very interesting
post from Sassi, that gave me hope that at least there used to be
someone who really had the will to make it work with alsa.

http://sourceforge.net/mailarchive/message.php?msg_id=104782
from 2001-12-02, a long time.

Now, even if I don't have much experience developing device drivers,
too, I am really willing to spend time trying to make alsa and isis
friends. At least for the learning effect.



I just fortunately finished the horrible ;-) and tiresome process
of writing a driver for an entirely unsupported card, the Aztech PCI168.
So if you need help about anything, just ask me (and maybe I'm even able
to help ;)



Perhaps who would consider writing down some notes which could be used 
for documentation.


--
Patrick Shirkey - Boost Hardware Ltd.
For the discerning hardware connoisseur
Http://www.boosthardware.com
Http://www.djcj.org - The Linux Audio Users guide


"Um...symbol_get and symbol_put... They're
kindof like does anyone remember like get_symbol
and put_symbol I think we used to have..."
- Rusty Russell in his talk on the module subsystem



---
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0003en
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


[Alsa-devel] Major Bug in Alsa 0.9 for over 1 year

2002-10-24 Thread kreuzritter2000
Hello,

I allways have the same bug when trying to modprobe the cs4232 or cs4236
sounddriver for my Terratec EWS654XL soundcard.

The bug is called unresolved symbol, this bug exists in ALSA 0.9 since the
existing of ALSA 0.9.

I tried nearly every ALSA 0.9x version.

Alsa 0.9.0  -> didn't work
Alsa 0.9.0beta1 -> didn't work
Alsa 0.9.0beta2 -> didn't work
Alsa 0.9.0beta3 -> didn't work

Alsa 0.9.0beta9 -> didn't work
Alsa 0.9.0beta10 -> didn't work
Alsa 0.9.0rc1 -> didn't work
Alsa 0.9.0rc2 -> "
Alsa 0.9.0rc3 -> "
Alsa 0.9.0rc5 -> "

I wrote nearly for every ALSA  version a bugreport including
a lot of pnpdumps, module.conf, dmesg output files etc. etc. but no one
could help me and fix this problem.
I am really fed up with this.

I can't write a driver myself, the only thing i can do for the alsa-project
is 
writing bug reports, i can't fix this bug, but you can, so it's up to you.

The soundcard "worked" fine with the old ALSA 0.5x drivers,
the soundcard and its two chips the cs4232/cs4236 and the sam9407
are well documented, sources, documentations it's all there.
So fixing this bug is not impossible!
But still, this bug was never fixed.

No, this time i won't sent plenty of pnpdump files, module.confs files etc.
to you.  If you need my pnpdump files, you will find many in the alsa-devel
mailinglist archives of it. (search for EWS64)
It never helped, and it won't help in future.
 
I am giving up, i am frustrated and this was my last bug report
to the alsa-mailinglist.

Perhaps i will stick with only one chip of my soundcard (the sam9407) and
use this great sam9407 OSS driver or buy a new soundcard -> problem solved.

I really tried everthing.
Every option, nothing did help.

Perhaps no one tried to go the steps i did step by step, like
installing Slackware (my main distribution), upgrading the kernel and
checking if the cs4232/6 drivers work on Slackware without this unresolved symbols.


There are 2 or 3 people on this mailinglist that have the same soundcard,
maybe that one could send me their modules.conf file and step by step
installation guide, that would be the last try, i could do that.
But i am not continuing this writing bug reports and  seeing no progress.
  
So that's the end.

Best Regards 
 Oliver C.


Here's the unsresolved symbol error:

modprobe snd-cs4232
/lib/modules/2.4.19/kernel/sound/isa/cs423x/snd-cs4232.o: init_module: No
such device
/lib/modules/2.4.19/kernel/sound/isa/cs423x/snd-cs4232.o: Hint: insmod
errors can be caused by incorrect module parameters, including invalid IO or IRQ
parameters.
  You may find more information in syslog or the output from dmesg
/lib/modules/2.4.19/kernel/sound/isa/cs423x/snd-cs4232.o: insmod
/lib/modules/2.4.19/kernel/sound/isa/cs423x/snd-cs4232.o failed
/lib/modules/2.4.19/kernel/sound/isa/cs423x/snd-cs4232.o: insmod snd-cs4232
failed


insmod snd-cs4232
Using /lib/modules/2.4.19/kernel/sound/isa/cs423x/snd-cs4232.o
/lib/modules/2.4.19/kernel/sound/isa/cs423x/snd-cs4232.o: unresolved symbol
snd_card_new_R506deba1
/lib/modules/2.4.19/kernel/sound/isa/cs423x/snd-cs4232.o: unresolved symbol
snd_card_free_Rff997e04
/lib/modules/2.4.19/kernel/sound/isa/cs423x/snd-cs4232.o: unresolved symbol
snd_cs4231_pcm_R75bb3150
/lib/modules/2.4.19/kernel/sound/isa/cs423x/snd-cs4232.o: unresolved symbol
snd_card_register_R4baee9de
/lib/modules/2.4.19/kernel/sound/isa/cs423x/snd-cs4232.o: unresolved symbol
snd_verbose_printk_R49d4e4d1
/lib/modules/2.4.19/kernel/sound/isa/cs423x/snd-cs4232.o: unresolved symbol
snd_opl3_create_R7cfd1ec5
/lib/modules/2.4.19/kernel/sound/isa/cs423x/snd-cs4232.o: unresolved symbol
snd_opl3_hwdep_new_Rd214f5bf
/lib/modules/2.4.19/kernel/sound/isa/cs423x/snd-cs4232.o: unresolved symbol
snd_cs4231_create_Rce85e590
/lib/modules/2.4.19/kernel/sound/isa/cs423x/snd-cs4232.o: unresolved symbol
snd_cs4231_mixer_Re022cecf
/lib/modules/2.4.19/kernel/sound/isa/cs423x/snd-cs4232.o: unresolved symbol
snd_wrapper_kfree
/lib/modules/2.4.19/kernel/sound/isa/cs423x/snd-cs4232.o: unresolved symbol
snd_mpu401_uart_new_R606a10b8
/lib/modules/2.4.19/kernel/sound/isa/cs423x/snd-cs4232.o: unresolved symbol
snd_cs4231_timer_R7a2d8746

insmod snd-cs4236
Using /lib/modules/2.4.19/kernel/sound/isa/cs423x/snd-cs4236.o
/lib/modules/2.4.19/kernel/sound/isa/cs423x/snd-cs4236.o: unresolved symbol
snd_cs4236_create_Racbbd0d2
/lib/modules/2.4.19/kernel/sound/isa/cs423x/snd-cs4236.o: unresolved symbol
snd_card_new_R506deba1
/lib/modules/2.4.19/kernel/sound/isa/cs423x/snd-cs4236.o: unresolved symbol
snd_card_free_Rff997e04
/lib/modules/2.4.19/kernel/sound/isa/cs423x/snd-cs4236.o: unresolved symbol
snd_card_register_R4baee9de
/lib/modules/2.4.19/kernel/sound/isa/cs423x/snd-cs4236.o: unresolved symbol
snd_verbose_printk_R49d4e4d1
/lib/modules/2.4.19/kernel/sound/isa/cs423x/snd-cs4236.o: unresolved symbol
snd_opl3_create_R7cfd1ec5
/lib/modules/2.4.19/kernel/sound/isa/cs423x/snd-cs4236.o: unresolved symbol
snd_cs4236_pcm_R25584f2a
/lib/modules/2.4.19/kernel/sound/isa/cs42

[Alsa-devel] Help ! Distorted sound on re-run

2002-10-24 Thread Bruce Paterson
HELP !
I've tried everything I can think of and I'm at a loss.

Setup:
alsa 0.9.0rc2
soundcard Terratec EWS88 (envy24 driver)
direct hw:0,0 using snd_pcm_readi & writei with descriptor polling.
length approx 50s similtaneous read & write. read from all channels.
modified 'envy24setup' to preset hardware levels on startup
full restart of sound system each 'pass' (new handles etc.)

Problem:
The first pass works fine with beautiful audio.
The next pass the output is badly distorted (sounds like an incomplete
buffer or something), but
no errors reported, no under/overruns only evidence that something
is wrong is to listen to it.

What fixes it:
Waiting. Yup...if I wait > 1 minute before the 2nd pass then that is
also fine. Something 'happens'
in that time to make it all ok again.
This is why it's taken me ages to actually notice the problem at all !
(program has been running
for months).

What *doesn't* help:
Not doing a full sound restart between passes (ie. merely doing a drop
afterwards, then restart with
prepare & start, leaving pcm handles alive).
Playing a wav file with 'aplay' in between passes.
Exiting from my program and starting again between passes.
adding hw_free commands prior to close of the in & out handles.

Wild groping theories:
Due to time alone fixing it I'm wondering if it's a code problem at all
(at least in my code), but
I'm at a loss to know why waiting fixes the problem !
Does the EWS hardware "timeout" somehow ?
  
-- 
Cheers,
Bruce
---
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom
they are addressed. If you have received this email in error please
notify the system manager.

/\\\/\\\/\\\/   /  Bruce Paterson  
   /  \\\ \\\ \\\  /   /Senior Design Engineer
  /   /\\\/\\\/\\\/   /   87 Peters Ave, Mulgrave, Vic, 3170
 /   /  \\\ \\\ \\\  /  PO Box 4112, Mulgrave, Vic, 3170, Australia
/   /\\\/\\\ \\\/   Ph: +61 3 8561 4232   Fax: +61 3 9560 9055
  Tele-IP Ltd.  Email: [EMAIL PROTECTED]Icq: #32015991
WWW:   http://www.tele-ip.com   VK3TJN
---


---
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel



[Alsa-devel] ALSA documentation project?

2002-10-24 Thread Kevin Conder
Abramo Bagnara <[EMAIL PROTECTED]> wrote:
>Documentation has not been written for lack of funding and lack of
>volunteers.

Well, I've come foward a few times as a documentation volunteer and
have been frustrated at every turn. The first time I volunteered, the
ALSA team suddenly switched from the DocBook standard (which I am
familiar with) to doxygen. Also, the alsa-doc mailing list was taken
off-line.

The next time I volunteered, a member of the ALSA team blew me off. He
refused to answer my questions directly and told me to ask them on the
*alsa-users* mailing list instead! I felt disrespected and definitely
not a member of the ALSA team.

The last time I volunteered, my hard work was attacked on this list as
being "mechanical". Then a Wiki was implemented and my work was thrown
out. That was the last straw!

So I'm working on the Alternative Csound Reference Manual
(http://www.kevindumpscore.com/docs/csound-manual/) these days. 

As a frustrated former documentation volunteer, here is my advice:

1. Identify the documentation tasks that need to be done and
maintained.
2. Start an ALSA documentation project.
3. Restart the alsa-docs mailing list.
4. Never switch documentation standards without discussing it first.
5. Put a responsible person in charge of coordinating the submissions,
tasks, and volunteers.
6. Recruit volunteers and delegate tasks.
7. Take time to answer the volunteer's technical questions. 
8. Treat the volunteers with respect.


=
-- kwconder at yahoo dot com

__
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/


---
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel