Re: [Alsa-devel] An driver error when I using aplay!

2004-06-07 Thread Clemens Ladisch
Roc Wu wrote:
  # ./aplay -t wav -f U8 -r 22050 alarm.wav
  Playing WAVE 'alarm.wav' : Unsigned 8 bit, Rate 22050 Hz, Mono
  ALSA lib pcm_plug.c:727:(snd_pcm_plug_hw_refine_schange)
  Unable to find an usable access for 'default'
  aplay: set_params:832: Sample format non available
 
  And the kernel driver will dump out the message as below:
  Badness in aaci_pcm_close at sound/arm/aaci.c:404

This seems to be a bug in the sound driver.

However, arm/aaci.c is not part of the official ALSA distribution.
AFAIK it's a patch written by Russell King.


HTH
Clemens




---
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] limits

2004-06-07 Thread Clemens Ladisch
Florin Andrei wrote:
 What's the max number of cards in a system that can be used by ALSA
 simultaneously?

8

 What's the max number of MIDI ports that's supported by ALSA?

There can be up to 8 rawmidi devices per card, but each device can
have an unlimited number of subdevices.

OSS emulation supports 2 ports per card (/dev/midi0X, /dev/amidi0X).

There can be up to 192 sequencer clients (64 each for kernel, drivers
(8*8), and applications), and each can have up to 254 ports.

 What are other similar limits?

Up to 8 playback and 8 capture PCM devices per card, with unlimited
number of subdevices.

Up to 8 sequencer queues.

 The answers to the questions above - are they in the docs?

Use the Source, Luke!  :-)


HTH
Clemens




---
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] alsa-lib spamming terminal

2004-05-28 Thread Clemens Ladisch
Måns Rullgård wrote:
 Is there a way to make alsa-lib stop spamming the terminal with error
 messages, for instance when a non-blocking open fails?

snd_lib_error_set_handler()


HTH
Clemens





---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149alloc_id66op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] MAYA44 USB audio device doesn't work with 1.0.4.

2004-05-28 Thread Clemens Ladisch
Luke Yelavich wrote:
 usbcore: registered new driver snd-usb-audio

No other message?  There should be at least an error message when the
driver fails to initialize.  Please try to compile the kernel with
ALSA's Debug detection enabled, or --with-debug=detect when
configuring the package.


Regards,
Clemens




---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Question regarding period/buffer and error handling

2004-05-28 Thread Clemens Ladisch
Cournapeau David wrote:
 My second problem is related to snd_card_next: If the card value
 returned by snd_card_next is different from -1, does that always mean
 than a alsa audio device is present on the system ?

It means that same kind of device with an ALSA driver is present.
This does not mean that you'll be able to play PCM data to it.  And
there may be software devices available.

 Is it the best method to probe a soundcard with alsa support?

snd_card_next() and snd_ctl_pcm_next_device() will give you a list of
hardware devices only.

Usually, you should use the device named default and let the user
allow to specify another device name.


HTH
Clemens




---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] MAYA44 USB audio device doesn't work with 1.0.4.

2004-05-27 Thread Clemens Ladisch
Luke Yelavich wrote:
 below is the information I get when attempting to use this soundcard under
 a 2.6.6 kernel with alsa drivers 1.0.5rc1 and hotplug.

 dmes:
 usbaudio: device 3 audiocontrol interface 0 has 1 input and 1 output AudioStreaming 
 interfaces

This is the OSS driver (audio).  Put the line

audio

into the file /etc/hotplug/blacklist to prevent it from loading (or
deactivate it in the kernel config).


HTH
Clemens




---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] RME 9632 Mixer...

2004-05-26 Thread Clemens Ladisch
Ed Wildgoose wrote:
 Can anyone suggest how to script the controls to default to some known
 values?

alsactl store saves the current values of all mixer control in
/etc/asound.state, alsactl restore restores them.


HTH
Clemens




---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] pcm buffer size

2004-05-25 Thread Clemens Ladisch
Nicolas Hüppelshäuser wrote:
 I'm using alsa 1.0.4.  How can I get a larger alsa buffer size?

PCM devices have a default maximum buffer size and a maximum maxmimum
buffer size.  For example, in the snd-usb-audio driver, it's 64 KB and
128 KB.

The current value (in KB) can be seen in the file
/proc/asound/cardX/pcmXY/subX/prealloc.  You can change it with

  echo 128  /proc/asound/card0/pcm0p/sub0/prealloc


In most cases, the maxmimum buffer size is constrained by hardware
limitations, but in the case of snd-usb-audio, it should be safe to
raise this value (look for the call to snd_pcm_lib_preallocate_pages()
in usbaudio.c).


HTH
Clemens





---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149alloc_id66op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] 1.0.5rc1 release

2004-05-25 Thread Clemens Ladisch
 Please, report (especially compilation) problems.

depmod: *** Unresolved symbols in
/lib/modules/2.4.26/kernel/sound/isa/wavefront/snd-wavefront.o
depmod: errno

The open/close/read system calls are implemented as inline functions
which change errno which isn't exported from the kernel.

We could reintroduce the dummy definition of errno for older kernels,
or use filp_* calls (like sound_firmware.c).


Regards,
Clemens




---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] MPG123 and alsa

2004-05-25 Thread Clemens Ladisch
Tom Watson wrote:
 I just downloaded a version (most recent I assume) of MPG123.
 When I tried to do a 'make linux-alsa' I got a wholw bunch of
 errors.  While I suspect that this is because they are using an
 older oversion of alsa (0.5.x?).

Yes.

 and has anyone else done any mods to the mpg123 (or its library).

Try the patch below.


HTH
Clemens

-- 
diff -ur mpg123-pre0.59s-orig/audio.c mpg123-pre0.59s/audio.c
--- mpg123-pre0.59s-orig/audio.cThu Jan 18 15:00:33 2001
+++ mpg123-pre0.59s/audio.c Sat May 22 16:52:21 2004
@@ -17,9 +17,6 @@
   ai-output = -1;
 #ifdef ALSA
   ai-handle = NULL;
-  ai-alsa_format.format = -1;
-  ai-alsa_format.rate = -1;
-  ai-alsa_format.channels = -1;
 #endif
   ai-device = NULL;
   ai-channels = -1;
diff -ur mpg123-pre0.59s-orig/audio.h mpg123-pre0.59s/audio.h
--- mpg123-pre0.59s-orig/audio.hThu Jan 18 15:00:33 2001
+++ mpg123-pre0.59s/audio.h Sat May 22 16:55:10 2004
@@ -42,7 +42,9 @@


 #ifdef ALSA
-#include sys/asoundlib.h
+#define ALSA_PCM_NEW_HW_PARAMS_API
+#define ALSA_PCM_NEW_SW_PARAMS_API
+#include alsa/asoundlib.h
 #endif

 struct audio_info_struct
@@ -59,7 +61,6 @@
   int output;
 #ifdef ALSA
   snd_pcm_t *handle;
-  snd_pcm_format_t alsa_format;
 #endif
 #ifdef AIX_UMS
   UMSAudioDevice dev;
diff -ur mpg123-pre0.59s-orig/audio_alsa.c mpg123-pre0.59s/audio_alsa.c
--- mpg123-pre0.59s-orig/audio_alsa.c   Mon Sep 20 16:55:02 1999
+++ mpg123-pre0.59s/audio_alsa.cSat May 22 21:20:31 2004
@@ -1,189 +1,168 @@
 /*
- *  Driver for Advanced Linux Sound Architecture, http://alsa.jcu.cz
+ *  Driver for Advanced Linux Sound Architecture, http://www.alsa-project.org
  *
  *  Code by Anders Semb Hermansen [EMAIL PROTECTED]
- *  Cleanups by Jaroslav Kysela [EMAIL PROTECTED]
+ *  Cleanups by Jaroslav Kysela [EMAIL PROTECTED]
  *  Ville Syrjala [EMAIL PROTECTED]
+ *  Modified for ALSA 1.0.x by Clemens Ladisch [EMAIL PROTECTED]
  *
- *  You can use -a soundcard #:device #...
- *  For example: mpg123 -a 1:0 aaa.mpg
- *   mpg123 -a guspnp:1 aaa.mpg
+ *  You can use -a devicename ...
+ *  For example: mpg123 -a hw:1,0 aaa.mpg
+ *   mpg123 -a guspnp aaa.mpg
  *
  * This file comes under GPL license.
  */

 #include mpg123.h

-#include stdlib.h
-#include ctype.h
-#include sys/asoundlib.h
-
-#ifdef SND_LITTLE_ENDIAN
-#define SND_PCM_SFMT_S16_NE SND_PCM_SFMT_S16_LE
-#define SND_PCM_SFMT_U16_NE SND_PCM_SFMT_U16_LE
-#define SND_PCM_FMT_S16_NE SND_PCM_FMT_S16_LE
-#define SND_PCM_FMT_U16_NE SND_PCM_FMT_U16_LE
-#else
-#define SND_PCM_SFMT_S16_NE SND_PCM_SFMT_S16_BE
-#define SND_PCM_SFMT_U16_NE SND_PCM_SFMT_U16_BE
-#define SND_PCM_FMT_S16_NE SND_PCM_FMT_S16_BE
-#define SND_PCM_FMT_U16_NE SND_PCM_FMT_U16_BE
-#endif
-
 int audio_open(struct audio_info_struct *ai)
 {
int err;
-   int card=0,device=0;
-   char scard[128], sdevice[128];
+   const char *pcm_name;

if(!ai)
return -1;
-   if(ai-device) {/* parse ALSA device name */
-   if(strchr(ai-device,':')) {/* card with device */
-   strncpy(scard, ai-device, sizeof(scard)-1);
-   scard[sizeof(scard)-1] = '\0';
-   if (strchr(scard,':')) *strchr(scard,':') = '\0';
-   card = snd_card_name(scard);
-   if (card  0) {
-   fprintf(stderr, wrong soundcard number: %s\n, scard);
-   exit(1);
-   }
-   strncpy(sdevice, strchr(ai-device, ':') + 1, 
sizeof(sdevice)-1);
-   } else {
-   strncpy(sdevice, ai-device, sizeof(sdevice)-1);
-   }
-   sdevice[sizeof(sdevice)-1] = '\0';
-   device = atoi(sdevice);
-   if (!isdigit(sdevice[0]) || device  0 || device  31) {
-   fprintf(stderr, wrong device number: %s\n, sdevice);
-   exit(1);
-   }
-   }
-
-   if((err=snd_pcm_open(ai-handle, card, device, SND_PCM_OPEN_PLAYBACK))  0 )
-   {
-   fprintf(stderr, open failed: %s\n, snd_strerror(err));
-   exit(1);
-   }

-   if(audio_reset_parameters(ai)  0)
+   pcm_name = ai-device ? ai-device : default;
+   if((err=snd_pcm_open(ai-handle, pcm_name, SND_PCM_STREAM_PLAYBACK, 0))  0)
{
-   audio_close(ai);
+   fprintf(stderr, cannot open %s: %s\n, pcm_name, snd_strerror(err));
return -1;
}

-   return 0;
+   if(ai-format != -1)
+   /* we're going to play: initialize sample format */
+   return audio_reset_parameters(ai);
+   else
+   /* query mode; sample format will be set for each query */
+   return 0;
 }

-static void audio_set_playback_params(struct audio_info_struct *ai)
+int audio_reset_parameters(struct audio_info_struct *ai)
 {
int

Re: [Alsa-devel] 1.0.5rc1 release

2004-05-25 Thread Clemens Ladisch
Takashi Iwai wrote:

 I wrote:
 
  Clemens Ladisch wrote:
  
   depmod: *** Unresolved symbols in
   /lib/modules/2.4.26/kernel/sound/isa/wavefront/snd-wavefront.o
   depmod: errno
  
   The open/close/read system calls are implemented as inline functions
   which change errno which isn't exported from the kernel.

 does the attached patch work?

 +static int errno;

I don't have access to my Linux machine here, but I guess it does.

  i guess sys_* functions are also not defined correctly on older
  kernels.  they were open(), close(), read() with __KERNEL_SYSCALLS__.

 +#define sys_open open
 +#define sys_close close
 +#define sys_read read

These definitions are already in alsa-driver/include/syscalls_26.h.


I'm going to test and apply this until tomorrow, but feel free to
apply it now if you want to release rc2 earlier. :)


Regards,
Clemens




---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] direct midi event dispatching

2004-05-24 Thread Clemens Ladisch
Gilles Dégottex wrote:
 Why SND_SEQ_EVENT_NOTE event doesnt accept direct dispatching ?
 technicaly, there is surely a reason, but conceptualy, I dont see. Why do a
 difference ?

SND_SEQ_EVENT_NOTE isn't a 'real' event but gets split into two
events, SND_SEQ_EVENT_NOTE_ON and _OFF, and the latter must be sent at
a later time.  Scheduling events to be sent later requires a timer
which isn't avilable without a queue.

The SND_SEQ_EVENT_NOTE event is the only event that uses the
event.data.note.duration field, but you cannot know what the value in
this field means without having a timer which specifies how long one
timer tick lasts.


HTH
Clemens





---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149alloc_id66op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] USB audio kernel panic

2004-05-21 Thread Clemens Ladisch
Patrick Shirkey wrote:
 Using the latest usb-audio code from cvs I get a kernel panic when
 loading the drivers.
 
 I'm running kernel-2.2.21 with gcc-2.95.4

 Unable to handle kernel paging request at virtual address 28302e63
 EIP:0010:[e08eafc0]Tainted: PF

 e08e7060 __insmod_snd-usb-audio_S.text_L29104   [snd-usb-audio]
 e08eb02c snd_hack_usb_set_interface [snd-usb-audio]

The 2.6.5-rc2 kernel introduced some API changes to work around
devices with broken descriptors.  The resulting changes in the ALSA
code broke ALSA's workaround for the same problem.

The fix below is now in CVS.


HTH
Clemens
-- 

Index: usbaudio.inc1
===
RCS file: /cvsroot/alsa/alsa-driver/usb/usbaudio.inc1,v
retrieving revision 1.5
diff -u -r1.5 usbaudio.inc1
--- alsa-driver/usb/usbaudio.inc1   23 Mar 2004 12:48:18 -  1.5
+++ alsa-driver/usb/usbaudio.inc1   21 May 2004 07:34:10 -
@@ -98,7 +98,7 @@
   interface, NULL, 0, HZ * 5))  0)
return ret;

-   iface-act_altsetting = alternate;
+   iface-act_altsetting = i;
for (i = 0; i  iface_as-bNumEndpoints; i++) {
u8 ep = iface_as-endpoint[i].bEndpointAddress;
usb_settoggle(dev, epUSB_ENDPOINT_NUMBER_MASK, usb_endpoint_out(ep), 
0);




---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] MAYA44 USB audio device doesn't work with 1.0.4.

2004-05-21 Thread Clemens Ladisch
Luke Yelavich wrote:
 As above. The vendor and product IDs given are 0xa92 and 0x91 respectively.

 If there is any more information I can give, please let me know.

Output of lsusb -v?

And what exactly does doesn't work mean?


Regards,
Clemens




---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] mixer device

2004-05-18 Thread Clemens Ladisch
Ronald S. Bultje wrote:
 is it possible for me to get the cardnumber (and thereby the hw:N
 entry) for a given non-hw device (e.g. dspN, hw:N,M, dmix, ...)?

Try something like this:

/* Get the slave pcm of a pcm node.  Caller must free the result. */
static snd_config_t *get_pcm_slave_pcm(snd_config_t *pcm)
{
snd_config_t *slave;
snd_config_t *result = NULL;
int free_slave = 0;
const char *str;

if (snd_config_search(pcm, slave, slave)  0)
goto _exit;
if (snd_config_get_string(slave, str) = 0) {
if (snd_config_search_definition(snd_config, pcm_slave, str, slave) 
 0)
goto _exit;
free_slave = 1;
}
if (snd_config_get_type(slave) != SND_CONFIG_TYPE_COMPOUND)
goto _exit;

if (snd_config_search(slave, pcm, pcm)  0)
goto _exit;
if (snd_config_get_string(pcm, str) = 0) {
if (snd_config_search_definition(snd_config, pcm, str, pcm) = 0)
result = pcm;
} else {
/* always make a dynamic copy, because the caller frees it */
if (snd_config_copy(pcm, pcm) = 0)
result = pcm;
}
_exit:
if (free_slave)
snd_config_delete(slave);
return result;
}

/* Get the card number from a pcm node.  Searches recursively. */
static int get_pcm_card(snd_config_t *pcm)
{
snd_config_t *slave_pcm;
snd_config_t *card_node;
long card;

if (snd_config_get_type(pcm) != SND_CONFIG_TYPE_COMPOUND)
return -1;
slave_pcm = get_pcm_slave_pcm(pcm);
if (slave_pcm) {
card = get_pcm_card(slave_pcm);
snd_config_delete(slave_pcm);
return card;
} else if (snd_config_search(pcm, card, card_node) = 0) {
const char *str;
if (snd_config_get_integer(card_node, card) = 0)
return card;
if (snd_config_get_string(card_node, str) = 0)
return snd_card_get_index(str);
}
return -1;
}

/* Get the card number from a pcm device name. */
static int get_named_pcm_card(const char *pcm_name)
{
snd_config_t *pcm;
int card;

if (snd_config_update()  0)
return -1;

if (snd_config_search_definition(snd_config, pcm, pcm_name, pcm)  0)
return -1;
card = get_pcm_card(pcm);
snd_config_delete(pcm);
return card;
}


/* ... */
card = get_named_pcm_card(pcm_name);
if (card = 0)
sprintf(ctl_name, hw:CARD=%d, card);
else
/* unknown card */


HTH
Clemens




---
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] BT878 support.

2004-05-13 Thread Clemens Ladisch
Rodrigo Severo wrote:
 With the Askey Magic I got only silence but with the Prolink PlayTV Pro
 revision 9D I got bad sound with btaudio. By bad I mean a slightly high
 pitch soundI got the sound of the TV with a slightly higher pitch than
 usual and with more than usual noise during silence. The sound was bad
 but at least I got something.

 Do you think there is any chance for these boards to work with btaudio
 and/or snd-bt87x?

The driver supports the functionality that is implemented by the BT878
chip.  If a card has some extra hardware for amplifying/routing/etc.
that needs to be configured, the driver doesn't know about this.

It would be possible to add this hardware-specific support if there
would be some documentation about it.

 BTW, is there some kind of list with boards that work with btaudio
 and/or snd-bt87x?

My Hauppauge WinTV works.  It seems most other cards have added
features that must be configured explicitly.


Regards,
Clemens




---
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] BT878 support.

2004-05-12 Thread Clemens Ladisch
Rodrigo Severo wrote:

 Clemens Ladisch wrote:

 Rodrigo Severo wrote:
 
 I have two Prolink PlayTV Pro capture cards (PV-BT878P+). One of them is
 revision 8E and tthe other is revision 9F.
 
 I tried to use both of them with the snd-bt87x driver. Both of them
 returned only static.

Did you try analog or digital or both?

 I managed to get analog sound from the 8E with the btaudio (OSS) driver,

Does digital work?

 Which version?
 
 ALSA 1.0.4 and btaudio which came with kernel 2.4.25.

In theory, btaudio and snd-bt87x should behave identically.
What btaudio mixer settings and input do you use when it works?


Regards,
Clemens




---
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson  Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] mixer device

2004-05-12 Thread Clemens Ladisch
Ronald S. Bultje wrote:
 for a given alsa device (default, dmix, plughw:N, hw:N,M,
 dspN, etc.), how do I automatically obtain the right device to use as
 a audio mixer with that device?

Depends on your definition of right device.  In the general case
this isn't possible because many cards don't have any mixer controls,
or don't have the controls you want to use.  Or the pcm device uses
several cards, or none.

What do you want to do with the mixer?

 So far, it seems I can only attach to hw:N mixer devices.

You can use any control device that is defined in your .asoundrc with
something like:

  ctl.x {
type hw
card N
  }


Regards,
Clemens




---
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson  Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] ALSA snd-usb-audio kernel 2.6.5

2004-05-12 Thread Clemens Ladisch
Matt Flax wrote:
 The snd-usb-audio driver now doesn't hang my computer anymore during
 shutdown (it did with previous versions).

Just BTW: Does it still work if you unload and then reload the
snd-usb-audio module?  :-


Regards,
Clemens




---
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson  Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] HELP! seq - writing to q in realtime mode

2004-05-12 Thread Clemens Ladisch
David McNab wrote:
 I'm trying to create and schedule outbound events, in realtime absolute
 mode.

 When sending these events directly, using SND_SEQ_QUEUE_DIRECT, the
 events get delivered fine to subscribers.

 But when adding realtime absolute timestamps, and marking the event to a
 queue I've created, only the very first event (time=0) gets sent.

Is the queue running?  (see /proc/asound/seq/queues)

 Can someone please give an overview (or preferably sample code)
 explaining what I need to do to transmit events in realtime absolute mode?

See the aplaymidi example, which transmits events with relative tick
timestamps.  Set the appropriate bits in ev.flags
(SND_SEQ_TIME_STAMP_REAL and SND_SEQ_TIME_MODE_ABS) and use
ev.time.time.tv_sec and .tv_nsec instead of ev.time.tick.  (The
snd_seq_ev_schedule_real macro just sets these fields, too.)

 For instance, do I need to set up timers on the queue?

No, queues have a default timer.


HTH
Clemens




---
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson  Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] USB audio kernel panic

2004-05-11 Thread Clemens Ladisch
Patrick Shirkey wrote:
 Using the latest usb-audio code from cvs I get a kernel panic when
 loading the drivers.

 I'm running kernel-2.2.21 with gcc-2.95.4

Works fine with my 2.2.19(?).

ALSA 1.0.4 fixed some horrible bugs in the USB compatibility code for
2.2.x kernels.

Where exactly does this crash happen?


Regards,
Clemens




---
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson  Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] spin_lock_irqwhat ?

2004-05-10 Thread Clemens Ladisch
Giuliano Pochini wrote:
 Some drivers use spin_lock_irq() a lot, while others always use
 spin_lock_irqsave(). I can't see the difference. When it's safe
 using the _irq() version ?

Only when you know that you are not in interrupt context.


Regards,
Clemens




---
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson  Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] BT878 support.

2004-05-10 Thread Clemens Ladisch
Rodrigo Severo wrote:
 I have two Prolink PlayTV Pro capture cards (PV-BT878P+). One of them is
 revision 8E and tthe other is revision 9F.

 I tried to use both of them with the snd-bt87x driver. Both of them
 returned only static.

Probably different mixer settings?

 I managed to get analog sound from the 8E with the btaudio (OSS) driver,

Which version?


Regards,
Clemens




---
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson  Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Samples: Float to Int conversions.

2004-05-03 Thread Clemens Ladisch
James Courtier-Dutton wrote:
 Which section of code in alsa-lib is doing these conversions.
 I would like to see what code you use for the task of converting samples
 in float format to samples in int format.

Function snd_pcm_lfloat_convert_float_integer() in
alsa-lib/src/pcm/pcm_lfloat.c.


Regards,
Clemens




---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] ALI M5451 (CMI 9739): PCM always muted?

2004-05-03 Thread Clemens Ladisch
Nico Schottelius wrote:
 anyone knows if there is the possibility to adjust sound volume or
 not.

CMI hardware doesn't have this capability.

It would be possible to write a plugin that scales sound data in
software before sending it to the device, but nobody has done this
yet.


Regards,
Clemens




---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Attempts on the ESS-1869 card (one more time)

2004-05-03 Thread Clemens Ladisch
Tom Watson wrote:
 Well, I've gone to another Compaq laptop.  The previous one I had to
 resort to OSS (yuck) drivers and send it on its way.  This laptop is
 one I'm going to use, so I'd like to get ALSA working on it.

 So...  I've loaded ALSA and put the following in 'modules.conf':
 alias char-major-116 snd
 alias snd-card-0 snd-es18xx
 options snd-es18xx index=1

This is sound card 0, so use index=0.

 id=1

The id cannot be a number.  But ALSA has a sensible default anyway, so
you don't need to specify this.

 fm_port=0x338

  fm_port=0x388

 dma1=1 dma2=0

Does your card really use 1/0 and not 0/1?
(To disable a dma channel, specify -1.)

 But alas, nothing works.

What exactly doesn't work?  Error messages when trying to load the
driver?  No sound?  Green demons coming out of your speakers?  ;-)


HTH
Clemens




---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] configuration space never flattened? Bug?

2004-04-30 Thread Clemens Ladisch
Erik Inge Bolsø wrote:
 I'm having trouble doing snd_pcm_hw_params_can_pause() on a certain pcm,
 even though it has already (hopefully?) been fixed to one config by
 snd_pcm_hw_params()... snd_pcm_hw_params has been called, at least. How
 can I check?

 fileja {
 type file
 file /tmp/alsa
 slave.pcm null
 }

 xine: pcm.c:2604: snd_pcm_hw_params_can_pause: Assertion `params  params-info != 
 ~0U' failed.

Apparently, the null pcm doesn't initialize params-info.

The patch below should help.


HTH
Clemens

-- 
Index: alsa-lib/src/pcm/pcm_null.c
===
RCS file: /cvsroot/alsa/alsa-lib/src/pcm/pcm_null.c,v
retrieving revision 1.50
diff -u -r1.50 pcm_null.c
--- alsa-lib/src/pcm/pcm_null.c 17 Mar 2004 11:48:15 -  1.50
+++ alsa-lib/src/pcm/pcm_null.c 30 Apr 2004 09:38:09 -
@@ -276,6 +276,9 @@
 {
int err = snd_pcm_hw_refine_soft(pcm, params);
params-fifo_size = 0;
+   params-info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID |
+  SNDRV_PCM_INFO_INTERLEAVED |
+  SNDRV_PCM_INFO_RESUME | SNDRV_PCM_INFO_PAUSE;
return err;
 }






---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149alloc_id66op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] How do create a dummy device for recording audio? Does it exist already?

2004-04-29 Thread Clemens Ladisch
Caleb Crome wrote:
 Clemens Ladisch wrote:
 However, Realplayer uses the OSS emulation through /dev/dsp0.  To make
 that work with your file device, add the following to the config
 file:
 
   pcm.dsp0 = file

 Awesome!  It works like a charm.  Than you so much!  The one thing that
 doesn't work quite right is that I get the following error when
 RealPlayer attempts to access the mixer:

 ALSA lib control.c:601:(snd_ctl_open_noupdate) Invalid CTL mixer0

It tries to use /dev/mixer0, too.  Add the following:

  ctl.mixer0 = hw:0


HTH
Clemens




---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] [PATCH] intel8x0 - fixes 'periodical noisy output'

2004-04-26 Thread Clemens Ladisch
Arek Korbik wrote:
 To summarise: hardware generates an interrupt when it should not - the
 driver should handle it (the simplest solution: ignore). The attached
 patch:
  - adds interrupt-on-FIFOE handling(/ignoring) to handler routine

IMNSHO it's better to check for the buffer completion interrupt status
bit because that is the actual event we want to handle.

The patch below has been applied to CVS.


Regards,
Clemens


-- 
Index: intel8x0.c
===
RCS file: /cvsroot/alsa/alsa-kernel/pci/intel8x0.c,v
retrieving revision 1.136
diff -u -r1.136 intel8x0.c
--- intel8x0.c  21 Apr 2004 18:18:27 -  1.136
+++ intel8x0.c  26 Apr 2004 07:41:50 -
@@ -775,11 +775,14 @@
 static inline void snd_intel8x0_update(intel8x0_t *chip, ichdev_t *ichdev)
 {
unsigned long port = ichdev-reg_offset;
-   int civ, i, step;
+   int status, civ, i, step;
int ack = 0;

+   status = igetbyte(chip, port + ichdev-roff_sr);
civ = igetbyte(chip, port + ICH_REG_OFF_CIV);
-   if (civ == ichdev-civ) {
+   if (!(status  ICH_BCIS)) {
+   step = 0;
+   } else if (civ == ichdev-civ) {
// snd_printd(civ same %d\n, civ);
step = 1;
ichdev-civ++;
@@ -813,7 +816,8 @@
snd_pcm_period_elapsed(ichdev-substream);
spin_lock(chip-reg_lock);
}
-   iputbyte(chip, port + ichdev-roff_sr, ICH_FIFOE | ICH_BCIS | ICH_LVBCI);
+   iputbyte(chip, port + ichdev-roff_sr,
+status  (ICH_FIFOE | ICH_BCIS | ICH_LVBCI));
 }

 static irqreturn_t snd_intel8x0_interrupt(int irq, void *dev_id, struct pt_regs *regs)




---
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] [linux-audio-dev] DSP2000 C-PORT and MIDI input

2004-04-26 Thread Clemens Ladisch
Lukas Degener wrote:
 Hi everybody and sorry for posting this to both, lad and alsa-dev,
 i was not sure which one fits better.

alsa-devel would be appropriate, but non-subscribers cannot post
there, so I'm keeping linux-audio-dev in the CCs.

 Concerning the issue with non-functional midi in on the DSP2000 c-port:
 Someone on lau(Clemens?) said the problem is a lack of information an
 how to enable some interrupts.

From what I've heard, interrupts just don't happen.  The MIDI receiver
is part of the ICE1712 chip, so, apparently, the MIDI input isn't
enabled or in power saving mode or something like that.

MIDI input works with this driver on ICE1712-based cards from other
vendors, so this seems to be some Hoontech-specific configuration
issue.

  Matthew Skinner, Sound and Music Tech Support wrote:
 
   If you can program in c++ and want to get the midi io working
   on the cport then let me know what you need.

I need to know how exactly the box configuration registers(?) are to
be initialized for DSP* cards.  The driver currently fiddles with
three bits named MIDIIN, MIDI1, and MIDI2, but their function seems to
be more complex than the names imply.

And the driver doesn't actually know about the C-Port.  There are two
known EEPROM subdevice IDs: 0x1712/0x1412 for the DSP24, and
0x1712/0x1416 for the Media7.1.  I guess the C-Port uses one of these
IDs?  (Otherwise, this would explain why the C-Port isn't initialized
completely.)


Regards,
Clemens




---
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] How do create a dummy device for recording audio? Does it exist already?

2004-04-26 Thread Clemens Ladisch
Caleb Crome wrote:
 pcm.file {
type file
slave {
pcm hw:0,0
}
file /tmp/file.raw
 }

 Alright, I did what you suggested, and real player comes up and connects
 to the dummy sound card (I had to do a modprobe snd-pcm-oss and
 snd-mixer-oss).   However, I don't get a file called /tmp/file.raw.

You have to configure the program to use the PCM named file instead
of the default default.

However, Realplayer uses the OSS emulation through /dev/dsp0.  To make
that work with your file device, add the following to the config
file:

  pcm.dsp0 = file

and try to run realplayer with the aoss script from the alsa-oss
package.


HTH
Clemens




---
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] How to branch from WDM to ALSA fastest way??

2004-04-26 Thread Clemens Ladisch
ns wrote:
 I have WDM driver for our lab's own propertiary sound
 card(ADAT+SPDIF+DB...) and wanna write ALSA drv.
 I have linux w/kernel 2.4.20 (original).

 I know that I must patch kernel for ALSA and write ALSA driver.
 HOw to do it fastest?

look into alsa-kernel/Documentation/DocBook/writing-an-alsa-driver


HTH
Clemens




---
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] How do create a dummy device for recording audio? Does it exist already?

2004-04-23 Thread Clemens Ladisch
Caleb Crome wrote:
 Arek Korbik wrote:
 pcm.file {
 type file
 slave {
 pcm hw:0,0
 }
 file /tmp/file.raw
 }

 what do I do with that bit of configuration data?  I found the
 /usr/share/alsa/alsa.conf, and there is a similar pcm.file entry
 in that, but it seems to take parameters.

Put it into your ~/.asoundrc file, or into /etc/asound.conf for all
users.

 Since I have no sound card, how do I configure my system to use
 the dummy PCM driver and use the pcm.file plugin?

modprobe snd-dummy should work.


HTH
Clemens




---
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] midisport 8x8

2004-04-16 Thread Clemens Ladisch
ian esten wrote:
 On Wed, 2004-04-14 at 10:00, Clemens Ladisch wrote:
  What happens when you exchange the two 8x8 files in
  /usr/share/usb/midisport?

 i get a working midisport 8x8! i can send it midi, and it shows up in
 /proc/asound/cards. thanks so much! so why is it incorrectly being
 reported as hardware version 1.21?

The reporting is correct, but I remembered that I wasn't sure which
file was which when I wrote the extracting program.  (This bug has now
been fixed.)


Regards,
Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] alsa driver data rates

2004-04-16 Thread Clemens Ladisch
Brian Furey wrote:
  i'm using an open source VoIP application with the
 alsa driver. My card is the onboard intel8x0.

My problem is figuring out the patterns I am
 getting with the alsa driver when transmitting
 packets.

This depends more on how the VoIP application does things, not on the
driver/soundcard.

 For instance when I use the GSM codec with a packets
 size of 80 msecs and 132 bytes, packets are
 transmitted at alternate intervals of 64/96 msecs.
 When i use G.711 packets of 240 bytes are transmitted
 every 32 msecs with an extra packet every 15 pkts.
 With G.711 it is obvious that 256 bytes are added to driver
 sending buffer every 32 msecs.However this does not match for GSM
 because it needs only 132 bytes every 64/96 msecs.
 Can the driver change the amount of data it gets from the
 soundcard to suit the codec?

Have a look into /proc/asound/card0/pcm0?/sub0/hw_params to see the
period size.  The period size is constant, but if it is small enough
the application can just wait until enough periods have accumulated
for one packet.


HTH
Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] midisport 8x8

2004-04-14 Thread Clemens Ladisch
ian esten wrote:
 the midisport i have is reported as being hardware version 1.33 by the
 midisport control panel under windows xp (where it works fine). i looked
 in the midisport_fw loader, and it seems to only know about hardware
 versions 1.10 and 1.21. here are the entries in /var/log/messages when
 it is powered up:

 Apr 13 14:49:33 [/etc/hotplug/usb/midisport_fw] load
 /usr/share/usb/midisport/MidiSport8x8-2.21.ihx for 763/1031/121 to
 /proc/bus/usb/002/009

21 hexadecimal = 33 decimal

 Apr 13 14:49:33 [kernel] usb.c: USB disconnect on device 00:1f.4-1 address 9
 Apr 13 14:49:34 [kernel] hub.c: new USB device 00:1f.4-1, assigned address 10
 Apr 13 14:49:39 [kernel] usb_control/bulk_msg: timeout
 - Last output repeated 4 times -
 Apr 13 14:50:00 [kernel] hub.c: new USB device 00:1f.4-1, assigned address 11
 Apr 13 14:50:05 [kernel] usb_control/bulk_msg: timeout

 the midisport never shows up in /proc/asound/cards.

I guess it doesn't shop up in /proc/bus/usb/devices or in the output
of lsusb, either?

What version of the firmware loader do you use?

What happens when you exchange the two 8x8 files in
/usr/share/usb/midisport?

 i also have a midisport 8x8 at work (hardware version 1.21)

What hexadecimal version number does this one have? (bcdDevice field
of lsusb -v)

 which i brought home to check i had everything set up ok. here is
 what it reports to /var/log/messages:

 Apr 13 14:53:12 [kernel] hub.c: connect-debounce failed, port 1 disabled
 Apr 13 14:53:14 [kernel] hub.c: new USB device 00:1f.4-1, assigned address 12
 Apr 13 14:53:14 [kernel] devfs_register(unknown): could not append to parent, err: 
 -17
 Apr 13 14:53:17 [usb.agent] missing kernel or user mode driver snd-usb-audio

Are these all the messages for this device?  If yes, then this one
already has the firmware in its ROM and doesn't need a firmware
download.


Regards,
Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Adding a Mute Switch to snd-tvmixer

2004-04-13 Thread Clemens Ladisch
Perry Gilfillan wrote:
 I've a couple of people using my snd-tvmixer module with success now,
 and would appreciate comments/critcism/abuse (any thing is better than
 the deathly silence my first announcement yeilded) from people more
 experienced than myself.

Looks nice.  (Not that I actually have used it :)

 In particular, I'd like to know what I may have missed in getting a Mute
 Switch to show up in gnome-alsa-mixer.

Does it show up in alsamixer?
In /etc/asound.state after running alsactl store?


Regards,
Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] DigiDesign MBox USB Audio device

2004-04-07 Thread Clemens Ladisch
Patrick Boettcher wrote:
 I only applied the patch, loaded the module, pluged in the device
 ... result is attached.

 EIP is at __wake_up_common+0x13/0x50
 Call Trace:
  [c0119a0c] __wake_up+0x32/0x57
  [c015cc1e] pipe_readv+0x288/0x2d8
  [c015cca5] pipe_read+0x37/0x3b
  [c0150d74] vfs_read+0xd0/0x135
  [c0151007] sys_read+0x42/0x63
  [c01071ef] syscall_call+0x7/0xb
 note: sed[5839] exited with preempt_count 1

 EIP is at fasync_helper+0x39/0xed
 Call Trace:
  [c015d244] pipe_read_fasync+0x48/0x68
  [c015d36b] pipe_read_release+0x0/0x3f
  [c015d38a] pipe_read_release+0x1f/0x3f
  [c0151e50] __fput+0x116/0x128
  [c0150562] filp_close+0x59/0x86
  [c01505f2] sys_close+0x63/0x96
  [c01071ef] syscall_call+0x7/0xb
 note: usb.agent[5828] exited with preempt_count 1

Strange.  But having two endpoints in one interface is not what the
driver was written for.  I think part of the driver needs to be
rewritten before this device can work.


Regards,
Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] [PATCH] new options for arecordmidi

2004-04-06 Thread Clemens Ladisch
Pedro Lopez-Cabanillas wrote:
 This patch adds three new options to arecordmidi.

Committed, with some changes.


Thanks,
Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Bug in sis7012 driver - or probably I'm doing something wrong ?

2004-04-06 Thread Clemens Ladisch
Robert Rozman wrote:
 I've got advice how to use this 6 channel device as 3 stereo channels but
 there seems something not to be right (it could be my mistake).

 I have /etc/asound.conf :

 pcm.a {
 type plug
 slave.pcm ch12
 }

 pcm.b {
 type plug
 slave.pcm ch34
 }

 Now I do:

 - alsaplayer with mp3 file on device plug:a

a is already defined as a plug plugin on top of ch12, it's exactly
the same as plug:ch12.  Adding another plug layer (plug:plug:ch12)
wouldn't make much sense.

 - aplay -D plug:ch12 (funny is that plug:a doesn't work)
 - everything is ok and mixed properly

 - but if I start another alsaplayer on plug:b (probably also plug:c would be
 the same), then aplay produces sound that is interleaved in short chunks
 and also sound from alsaplayer on plug:b is also heard in addition to
 original mp3 and aplay sound.

Please try the a,b,c pcm devices without the plug: prefix.

Does it work if you run aplay on devices a and b?


Regards,
Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] snd_pcm_writei not returning (?!?)

2004-04-06 Thread Clemens Ladisch
Tom Browne wrote:
 Clemens Ladisch wrote:
  Tom Browne wrote:
  Under certain conditions (yet to be established properly - it doesn't
  happen every single time) with this ICE1712 card (DSP24),
  snd_pcm_writei doesn't just block... it never comes back.
 
  What is the state of the PCM device when this happens?
  (see /proc/asound/cardX/pcm0p/*)

 state: PREPARED

The pcm isn't (yet) running.

 avail   : 5

And the buffer is almost full.  snd_pcm_writei blocks because it
cannot write more data to the buffer, probably because the transfer
threshold is too high.

How do you start the pcm?  If you're using the start threshold, it may
be too big, too.


HTH
Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] cannot submit datapipe for urb 0 on /dev/dsp access -extigy

2004-04-06 Thread Clemens Ladisch
John H. wrote:

 the usb 2.0 hub was at fault,. thanks!

I have heard rumors that the latest 2.6.5 kernel is supposed to have
support for playing audio data through 2.0 hubs to 1.x devices.


HTH
Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] DigiDesign MBox USB Audio device

2004-04-06 Thread Clemens Ladisch
Patrick Boettcher wrote:
 On Mon, 5 Apr 2004, Clemens Ladisch wrote:
  What sample rate/format uses 304000 bytes per second?

 I don't understand the question completely, what do you mean?

The descriptors say that the device can transfer up to 304000 bytes
per second in each direction.  What sample rate and formats does it
support?  (stereo 24 bits at 48 kHz would be 288000 bytes/s)

   2. Can I use somehow the i2c/cs8427.c?
  Probably not.  The CS8427 will be connected (via I2C) to some USB
  interface/controller chip.  Can you determine which one?

 TAS1020A, Texas Instrument USB Streaming Controller. I thought I have to
 talk to the sound chip directly and that the the usb chip is only
 for bus control?!

The USB chip manages communication on the bus, and contains an
embedded 8051(?)-compatible CPU which must be programmed to implement
the actual behaviour of the device (in this case, writing/reading
samples over the I2C bus).

 Beside of the a/d and d/a converter, there is only one bigger chip on the
 device board. It is an EEPROM, I suppose to take the firmware, the owner
 of the device told me, that sometimes he has to make a firmware update.

 What exactly does the firmware?

It's the code running on the TAS1020A's CPU.

  Sending/receiving sample data should work, but I guess this device
  needs vendor-specific commands to configure it.  These are control
  transfers, not isochronous; please look in the log file for them.

 There are only isochronous transfers (of course, there are only
 isoc-endpoints?) visible.

Each interface has an implicit control endpoint.

There are some control transfers in the UsbSnoop log, but those look
very much like standard USB Audio request.  It seems the device only
pretends to be vendor-specific.

I think I'll write a quirk for this ...


Regards,
Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] problem while opening device

2004-04-06 Thread Clemens Ladisch
Pavana Sharma wrote:
 ALSA lib pcm.c:1947:(snd_pcm_open_noupdate) Unknown PCM hw:0,0

Please show the output of aplay -l and aplay -L.


Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] DigiDesign MBox USB Audio device

2004-04-06 Thread Clemens Ladisch
I wrote:
 I think I'll write a quirk for this ...

Please try the attached patch.


HTH
Clemens
diff -urN alsaold/alsa-kernel/usb/usbaudio.c alsa/alsa-kernel/usb/usbaudio.c
--- alsaold/alsa-kernel/usb/usbaudio.c  Tue Mar 30 13:51:30 2004
+++ alsa/alsa-kernel/usb/usbaudio.c Tue Apr  6 13:20:36 2004
@@ -2640,6 +2640,7 @@
struct audioformat *fp;
struct usb_host_interface *alts;
int stream, err;
+   int *rate_table = NULL;
 
fp = kmalloc(sizeof(*fp), GFP_KERNEL);
if (! fp) {
@@ -2647,16 +2648,30 @@
return -ENOMEM;
}
memcpy(fp, quirk-data, sizeof(*fp));
+   if (fp-nr_rates  0) {
+   rate_table = kmalloc(sizeof(int) * fp-nr_rates, GFP_KERNEL);
+   if (!rate_table) {
+   kfree(fp);
+   return -ENOMEM;
+   }
+   memcpy(rate_table, fp-rate_table, sizeof(int) * fp-nr_rates);
+   fp-rate_table = rate_table;
+   }
+
stream = (fp-endpoint  USB_DIR_IN)
? SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK;
err = add_audio_endpoint(chip, stream, fp);
if (err  0) {
kfree(fp);
+   if (rate_table)
+   kfree(rate_table);
return err;
}
if (fp-iface != get_iface_desc(iface-altsetting[0])-bInterfaceNumber ||
fp-altset_idx = iface-num_altsetting) {
kfree(fp);
+   if (rate_table)
+   kfree(rate_table);
return -EINVAL;
}
alts = iface-altsetting[fp-altset_idx];
diff -urN alsaold/alsa-kernel/usb/usbquirks.h alsa/alsa-kernel/usb/usbquirks.h
--- alsaold/alsa-kernel/usb/usbquirks.h Thu Mar 18 21:45:03 2004
+++ alsa/alsa-kernel/usb/usbquirks.hTue Apr  6 13:44:07 2004
@@ -838,6 +886,72 @@
.product_name = PHASE 26,
.ifnum = 3,
.type = QUIRK_MIDI_STANDARD_INTERFACE
+   }
+},
+
+{
+   USB_DEVICE(0x0dba, 0x1000),
+   .driver_info = (unsigned long)  (const snd_usb_audio_quirk_t) {
+   .vendor_name = Digidesign,
+   .product_name = MBox,
+   .ifnum = QUIRK_ANY_INTERFACE,
+   .type = QUIRK_COMPOSITE,
+   .data = (const snd_usb_audio_quirk_t[]) {
+   {
+   /*
+* The MBox has both endpoints in interface 1,
+* but we need one interface for each
+* direction, so use interface 0 here.
+*/
+   .ifnum = 0,
+   .type = QUIRK_AUDIO_FIXED_ENDPOINT,
+   .data =  (const struct audioformat) {
+   .format = SNDRV_PCM_FORMAT_S24_3BE,
+   .channels = 2,
+   .iface = 1,
+   .altsetting = 1,
+   .altset_idx = 1,
+   .attributes = EP_CS_ATTR_SAMPLE_RATE,
+   .endpoint = 0x81,
+   .ep_attr = EP_ATTR_ASYNC | 0x01,
+   .maxpacksize = 0x130,
+   .rates = SNDRV_PCM_RATE_44100 |
+   SNDRV_PCM_RATE_48000,
+   .rate_min = 44100,
+   .rate_max = 48000,
+   .nr_rates = 2,
+   .rate_table = (unsigned int[]) {
+   44100, 48000
+   }
+   }
+   },
+   {
+   .ifnum = 1,
+   .type = QUIRK_AUDIO_FIXED_ENDPOINT,
+   .data =  (const struct audioformat) {
+   .format = SNDRV_PCM_FORMAT_S24_3BE,
+   .channels = 2,
+   .iface = 1,
+   .altsetting = 1,
+   .altset_idx = 1,
+   .attributes = EP_CS_ATTR_SAMPLE_RATE,
+   .endpoint = 0x02,
+   .ep_attr = 0x01,
+   .maxpacksize = 0x130,
+   .rates = SNDRV_PCM_RATE_44100 |
+   SNDRV_PCM_RATE_48000,
+   .rate_min = 44100,
+   .rate_max = 

Re: [Alsa-devel] snd_pcm_writei not returning (?!?)

2004-04-05 Thread Clemens Ladisch
Tom Browne wrote:
 Under certain conditions (yet to be established properly - it doesn't
 happen every single time) with this ICE1712 card (DSP24),
 snd_pcm_writei doesn't just block... it never comes back.

What is the state of the PCM device when this happens?
(see /proc/asound/cardX/pcm0p/*)


Regards,
Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] DigiDesign MBox USB Audio device

2004-04-05 Thread Clemens Ladisch
Patrick Boettcher wrote:
 I'm using a usbsnoop program to do some basic sniffing. Logs are
 really big :/.

Try to play some 0.01-seconds wave file, and don't connect any other
USB devices.

 After plugging in, the device shows like this in /proc/bus/usb/devices:

 I:  If#= 0 Alt= 0 #EPs= 0 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
 I:  If#= 1 Alt= 0 #EPs= 0 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
 I:  If#= 1 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
 E:  Ad=81(I) Atr=05(Isoc) MxPS= 304 Ivl=1ms
 E:  Ad=02(O) Atr=05(Isoc) MxPS= 304 Ivl=1ms

Class 0xff means vendor-specific.  This is not a USB Audio Device as
defined in the USB specifications.

What sample rate/format uses 304000 bytes per second?

 After talking to some more experienced guys, I know, that there has to be
 a sound chip, so I opened the device and among some A/D and D/A converter
 I found a cs8427 chip. I suppose this is the one.
 After looking into sound directory in linux, I saw i2c/cs8427.c and
 i2c/cs8427.h.

 1. How should a go on?

Output of lsusb -v?

 2. Can I use somehow the i2c/cs8427.c?

Probably not.  The CS8427 will be connected (via I2C) to some USB
interface/controller chip.  Can you determine which one?

 3. How does communication with the device should work?

Sending/receiving sample data should work, but I guess this device
needs vendor-specific commands to configure it.  These are control
transfers, not isochronous; please look in the log file for them.


HTH
Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] cannot submit datapipe for urb 0 on /dev/dsp access -extigy

2004-04-05 Thread Clemens Ladisch
John H. wrote:
 see, this is what is weird, it worked last week, now it doesn't
 work with exaudio or alsa! same errors!

Then it's not a problem of the sound driver.

 cannot submit datapipe for urb 0, err = -38

-38 means not implemented.  Probably some bug in the USB core in
your kernel.

Have you connected the device through a USB 2.0 hub?


Regards,
Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Disabling onboard codec

2004-04-02 Thread Clemens Ladisch
Ron Cococcia wrote:
 In a setup I'm working with, I have a motherboard (815 w/82801BA-ICH2) that
 has an onboard/primary (00) AC97 codec (AD1885).  We've been playing around
 with adding a CNR card that would have a different/secondary (01) codec on
 it (CS4299). [...]
 The onboard chip is generating (I think) a BIT_CLK signal, and (I think) the
 CNR is as well (it's wired to an oscillator).

There is exactly one clock signal on the AC'97 bus, driven either by
the primary codec or (more often) by the controller.  I guess the
oscillator on the CMR card is for a configuration where the CS4299
would be the primary codec.

 I'm worried that both chips generating a BIT_CLK might cause
 jitter, and could cause audio quality issues.

Even worse, two different clocks would drift apart over time, which
would make it impossible to send synchronized samples to both codecs.
Having two independent clocks in an audio system would require
resampling.

The second codec in an AC'97 system should not affect the primary one.


HTH
Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] cannot submit datapipe for urb 0 on /dev/dsp access -extigy

2004-04-01 Thread Clemens Ladisch
John H. wrote:
 I get this error repeatedly

 ALSA /tmp/alsa-driver-1.0.4rc2/usb/usbaudio.c:811:
 cannot submit datapipe for urb 0, err = -38

 whenever i try to use /dev/dsp now, and i can only get sound from line in.

 i have kernel 2.6.4 and drivers 1.0.4rc2

What is in /proc/asound/cards?

Is your host controller UHCI or OHCI?

Does it work with aplay something.wav?

Does it work with a 2.4.x kernel?


Regards,
Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] 1.0.4rc1 release

2004-03-31 Thread Clemens Ladisch
Jaroslav Kysela wrote:

 On Wed, 31 Mar 2004, Clemens Ladisch wrote:

  But now:
 
  # modprobe snd
  modprobe: Too deep recursion in module dependencies!
  modprobe: Circular dependency? snd-page-alloc snd
 
  snd_pci_compat_get_pci_driver() is called from
  pci_compat_pm_callback() in misc.c.

 I don't see the circular dependency for this function.

Sorry, I didn't remember that snd-page-alloc should not depend on snd.

The circular dependency is caused by snd_pci_compat_request_region()
which calls request_region() which is #defined to be
snd_wrapper_request_region() in wrappers.c.

snd_pci_compat_request_region() clearly didn't intend to use the
wrapper function, so I added another wrapper function to call the
original function.


Now the modules load.  However, loading snd-usb-audio doesn't do
anything, and unloading and reloading it results in a crash or a hang.
Still debugging ...


Regards,
Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] 1.0.4rc1 release

2004-03-31 Thread Clemens Ladisch
I wrote:
 Now the modules load.  However, loading snd-usb-audio doesn't do
 anything, and unloading and reloading it results in a crash or a hang.

Fixed.  Apparently, snd-usb-audio has never been working on 2.2.x, and
nobody noticed ...

No remaining 2.2.x bugs AFAICS.


Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] 1.0.4rc1 release

2004-03-30 Thread Clemens Ladisch
Jaroslav Kysela wrote:
 1.0.4rc1 packages are out. Please, report compilation problems.

On a 2.2.19 kernel:

depmod: *** Unresolved symbols in /lib/modules/2.2.19/misc/snd-*
depmod: synchronize_irq
depmod: tqueue_lock
depmod: waitqueue_lock
depmod: *** Unresolved symbols in /lib/modules/2.2.19/misc/snd-au88?0.o
depmod: snd_pci_compat_disable_device
depmod: *** Unresolved symbols in /lib/modules/2.2.19/misc/snd.o
depmod: kernel_flag


How long do we want to support 2.2.x?


Regards,
Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] 1.0.4rc1 release

2004-03-30 Thread Clemens Ladisch
Jaroslav Kysela wrote:
 On Tue, 30 Mar 2004, Clemens Ladisch wrote:
  On a 2.2.19 kernel:
 
  depmod: *** Unresolved symbols in /lib/modules/2.2.19/misc/snd-*
  ...

 Missing inclusion of some header files?

Sorry, my error.  Wrong kernel configuration.  (The result of Hey,
this old file looks like a kernel -- let's see what happens if I boot
it ...  ;-)

But now:

# modprobe snd
modprobe: Too deep recursion in module dependencies!
modprobe: Circular dependency? snd-page-alloc snd

snd_pci_compat_get_pci_driver() is called from
pci_compat_pm_callback() in misc.c.  I think the 2.2.x CONFIG_APM
stuff in misc.c could be moved into pci_compat_22.c, but OTOH it might
make more sense to move the PCI functions that don't do page
allocation from the snd-page-alloc module into snd.  What's your
opinion on this?


Regards,
Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] help needed-- providing control interface

2004-03-26 Thread Clemens Ladisch
Pavana Sharma wrote:
 I am providing control interface for my driver to access from user space
 with functions get  put .

  * while creating new controls should I be allowed to create my hardware
 specific controls like gain, power, rate  other codec specific parameters.

All controls are hardware-specific.  There are no requirements what
controls you must, or must not, provide.

 or  should I take care of mapping OSS mixer controls to ALSA mixer.

ALSA does this automatically, based on the control names.

  * How user comes to know what controls are available  the valid range of
 values for sliders  switches.

The driver defines type and range of a control in the info callback.

The user can determine these things with the snd_ctl_* functions in
the ALSA library.  See the source code of amixer and alsactl for
details.


HTH
Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] snd_pcm_wait() More details required.

2004-03-24 Thread Clemens Ladisch
Jaroslav Kysela wrote:
 On Tue, 23 Mar 2004, Clemens Ladisch wrote:
  The following test program shows strange behaviour:

 Thanks. It's fixed in CVS now.

The second problem persists, i.e., snd_pcm_wait() returns although the
pcm isn't actually ready:

$ ./waittest dmix:hw:0
12000 frames written
pcm is not ready!
6000 frames written
6000 frames written
6000 frames written
...


Regards,
Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] snd_pcm_wait() More details required.

2004-03-23 Thread Clemens Ladisch
Jaroslav Kysela wrote:

 On Mon, 22 Mar 2004, James Courtier-Dutton wrote:

  My current tests were not using the resampler. i.e. app using 48k, sound
  card using 48k. I will try some tests that would use the resampler.

 Then I need more info how I can reproduce the bug.

The following test program shows strange behaviour:

// -- bite off here 
#include alsa/asoundlib.h

#define CHECK(command) do { \
err = (command); \
if (err  0) { \
printf(%s failed: %s\n, #command, snd_strerror(err)); \
return 1; \
} \
} while (0)

int main(int argc, char *argv[])
{
snd_pcm_t *pcm;
snd_pcm_hw_params_t *hw_params;
snd_pcm_sw_params_t *sw_params;
int err;
static char silence[12000 * 2 * 2];

if (argc  2) return 1;
CHECK(snd_pcm_open(pcm, argv[1], SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK));
snd_pcm_hw_params_alloca(hw_params);
CHECK(snd_pcm_hw_params_any(pcm, hw_params));
CHECK(snd_pcm_hw_params_set_access(pcm, hw_params, 
SND_PCM_ACCESS_RW_INTERLEAVED));
CHECK(snd_pcm_hw_params_set_format(pcm, hw_params, SND_PCM_FORMAT_S16));
CHECK(snd_pcm_hw_params_set_channels(pcm, hw_params, 2));
CHECK(snd_pcm_hw_params_set_rate(pcm, hw_params, 48000, 0));
CHECK(snd_pcm_hw_params_set_buffer_size(pcm, hw_params, 12000));
CHECK(snd_pcm_hw_params_set_period_size(pcm, hw_params, 6000, 0));
CHECK(snd_pcm_hw_params(pcm, hw_params));
snd_pcm_sw_params_alloca(sw_params);
CHECK(snd_pcm_sw_params_current(pcm, sw_params));
CHECK(snd_pcm_sw_params_set_start_threshold(pcm, sw_params, 12000));
CHECK(snd_pcm_sw_params_set_avail_min(pcm, sw_params, 6000));
CHECK(snd_pcm_sw_params(pcm, sw_params));
for (;;) {
CHECK(snd_pcm_wait(pcm, 2000));
if (err == 0)
printf(timeout!\n);
err = snd_pcm_writei(pcm, silence, 12000);
if (err = 0)
printf(%d frames written\n, err);
else if (err == -EAGAIN)
printf(pcm not ready!\n);
else
CHECK(err);
}
}
// -- bite off here 

With an AC'97 device:

$ ./waittest hw:0
12000 frames written
6000 frames written
6000 frames written
6000 frames written
6000 frames written
...

$ ./waittest dmix:hw:0
timeout!
12000 frames written
pcm is not ready!
6000 frames written
6000 frames written
6000 frames written
6000 frames written
...

When running with dmix, the first call to snd_pcm_wait() times out
although the pcm is ready (it seems the hardware pcm is still stopped
and doesn't generate interrupts), and the second call to
snd_pcm_wait() returns 1 although the pcm is not yet ready.


Regards,
Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] snd-usb-audio and midisport1x1 little hack fixes hotplug pb

2004-03-17 Thread Clemens Ladisch
Hartmut Geissbauer wrote:
 I removed the quick hack from Mathieu and inserted snd_printk's in
 snd_usbmidi_disconnect.

 The new function:
 ...
 if (ep-out  ep-out-urb)
 usb_unlink_urb(ep-out-urb);
 snd_printk(KERN_INFO usb_unlink_urb out\n);

Please note that this is C, not Python.  :-)

 The output from dmesg I got:

 ohci_hcd :00:02.0: urb e2e2b4c0 path 2.4 ep1in 5e16 cc 5 -- status -110
 hub 1-2:1.0: port 4, status 100, change 1, 12 Mb/s
 usb 1-2.4: USB disconnect, address 5
 usb 1-2.4: usb_disable_device nuking all URBs

It seems we don't need to unlink the URBs as the kernel does this for
us, but it doesn't hurt.

 ...
 ALSA sound/usb/usbmidi.c:723: usb_unlink_urb in
 ALSA sound/usb/usbaudio.c:2924: snd_usb_audio_disconnect called, refcount = 0

Apparently, snd_usb_audio_disconnect is called recursively, caused by
the call to usb_driver_release_interface, and then deadlocks.

The USB core will release all interfaces automatically, so we don't
need this call.  Please remove the usb_driver_release_interface line.


HTH
Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Opening dev/dsp takes very long

2004-03-16 Thread Clemens Ladisch
Lars Heineken wrote:
 Takashi Iwai wrote:

 | try strace with -r option and check which call takes too long time.

 When I use the application 'play' the delay is only around one second,
 the strace output is attached below.

It seems play is a shell script that calls sox to play the file.
Please try to strace sox.


Regards,
Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] snd-usb-audio and midisport1x1 little hack fixes hotplug pb

2004-03-16 Thread Clemens Ladisch
Mathieu Geli wrote:
 Ok, I applied your second patch, and get this dmesg output:

 drivers/usb/core/usb.c: deregistering driver snd-usb-audio
 ALSA /home/mathieu/alsa-driver/usb/usbaudio.c:2944: snd_usb_audio_disconnect called, 
 refcount = 1
 ALSA /home/mathieu/alsa-driver/usb/usbaudio.c:2944: snd_usb_audio_disconnect called, 
 refcount = 0

Two calls to disconnect?  Strange.

 ALSA /home/mathieu/alsa-driver/alsa-kernel/usb/usbmidi.c:148: urb status -104
 ALSA /home/mathieu/alsa-driver/alsa-kernel/usb/usbmidi.c:134: usb_submit_urb: -32

The driver tries to resubmit the URB although the device is being shut
down.  I don't think this causes the hang, but the patch below
(already in CVS) fixes this.  (-104 is -ECONNRESET which shouldn't
occur when unlinking synchronously.)

Apparently, snd_usb_audio_disconnect hangs before returning.  Please
try to insert printk's in snd_usbmidi_disconnect as Takashi suggestes.


Regards,
Clemens

-- 
diff -u -r1.25 -r1.26
--- alsa-kernel/usb/usbmidi.c   8 Mar 2004 09:34:05 -   1.25
+++ alsa-kernel/usb/usbmidi.c   16 Mar 2004 16:36:05 -  1.26
@@ -143,8 +143,9 @@
if (status == -ENOENT)
return status; /* killed */
if (status == -EILSEQ ||
+   status == -ECONNRESET ||
status == -ETIMEDOUT)
-   return -ENODEV; /* device removed */
+   return -ENODEV; /* device removed/shutdown */
snd_printk(KERN_ERR urb status %d\n, status);
return 0; /* continue */
 }
@@ -706,7 +707,6 @@
int i;

umidi = list_entry(p, snd_usb_midi_t, list);
-   usb_driver_release_interface(driver, umidi-iface);
for (i = 0; i  MIDI_MAX_ENDPOINTS; ++i) {
snd_usb_midi_endpoint_t* ep = umidi-endpoints[i];
if (ep-out  ep-out-urb)
@@ -714,6 +714,7 @@
if (ep-in  ep-in-urb)
usb_unlink_urb(ep-in-urb);
}
+   usb_driver_release_interface(driver, umidi-iface);
 }

 static void snd_usbmidi_rawmidi_free(snd_rawmidi_t* rmidi)




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] the emu10k1 midi bug

2004-03-15 Thread Clemens Ladisch
Ove Kaaven wrote:
 - wavetable drops notes sometimes. (a good test example wanted.)

 I've encountered this randomly sometimes, but I think I also have an
 example of the opposite - a note that is never turned off - that
 manifests every single time for me. So I'm wondering if anyone else can
 reproduce.

 1. Install MusE 0.6.3. (pmidi or aplaymidi does not exhibit the problem,
 but MusE does;

If it doesn't happen with aplaymidi, it's probably not an emu10k1 bug.
Did you try playmidi?


Regards,
Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] snd-usb-audio hang when rmmoding after unplugging midisport1x1

2004-03-12 Thread Clemens Ladisch
Mathieu Geli wrote:
 ok, what I did, is first to apply your patch to my source tree
 (1.0.3rc2), clean, compile, install, and even reboot. That doesn't
 output anymore the two lines urb status -104, and
 usb_submit_urb: -32 but still hang after printing:
 drivers/usb/core/usb.c: deregistering driver snd-usb-audio

It seems to work fine on my 2.4.25 kernel.

Can you unload the snd-usb-audio module?  If not, please apply the
patch below to see whether the driver or the USB core is the culprit.


Regards,
Clemens

-- 
--- alsa-kernel/usb/usbaudio.c  8 Mar 2004 09:29:51 -   1.87
+++ alsa-kernel/usb/usbaudio.c  12 Mar 2004 12:05:22 -
@@ -2928,6 +2928,7 @@
return;

chip = snd_magic_cast(snd_usb_audio_t, ptr, return);
+   snd_printk(KERN_INFO snd_usb_audio_disconnect called, refcount = %d\n, 
chip-num_interfaces);
card = chip-card;
down(register_mutex);
chip-shutdown = 1;
@@ -2947,6 +2948,7 @@
} else {
up(register_mutex);
}
+   snd_printk(KERN_INFO snd_usb_audio_disconnect finished!\n);
 }

 /*




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] USB audio devices

2004-03-11 Thread Clemens Ladisch
Karsten Wiese wrote:
 We can also vary the exact USB frame time.
 With UHCI 1.1 USB Hosts there is the SOF Register.
 ...
 It really works here already with the us428: The trick is:
 We first make the USB-Frame longer until we capture 1 Sample Frame more  45
 (for 44100). then the USB-Frame is shortened until we capture only 43 Sample
 Frames for one USB Frame. and so on.

Cool idea!

However, standard-compliant devices are supposed to base their timing
for feedback/feedforward information on the arrival of SOF packets.
Introducing jitter into the SOF timer may not be a good idea in every
case.

And this won't work if there is more than one audio device connected
to the same bus, or if the HC is OHCI or EHCI.


Regards,
Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] USB audio devices

2004-03-11 Thread Clemens Ladisch
Clemens Ladisch wrote:

 Jaroslav Kysela wrote:

  I don't know much about USB 2.0,

 Not too much differences for the driver.

Well, I should have read the specification before saying such things.
The format of synchronization information has changed, too; it's not
10.14 bits but 12.13 packed into 16.16 (4 bytes).


Regards,
Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] snd-usb-audio hang when rmmoding after unplugging midisport1x1

2004-03-11 Thread Clemens Ladisch
Mathieu Geli wrote:
 I'm trying to plug/unplug the midisport1x1 from M-Audio. The plug
 works like a charm, hotplug does its job, load the firmware
 (fxload) and snd-usb-audio, if not inserted, is auto-loaded. But
 hen I unplug the device, and I want to plug it again, the usb
 just hang, trying to rmmoding snd-usb-audio or anything else usb
 related will just hang.

There was a bug which has been fixed three days ago (after 1.0.3 came
out).  Either get the latest version from the CVS, or apply the patch
below.


HTH
Clemens

-- 

--- alsa-kernel/usb/usbmidi.c   3 Mar 2004 11:35:15 -   1.24
+++ alsa-kernel/usb/usbmidi.c   8 Mar 2004 09:34:05 -   1.25
@@ -453,8 +453,16 @@
usbmidi_out_port_t* port = 
(usbmidi_out_port_t*)substream-runtime-private_data;

port-active = up;
-   if (up)
+   if (up) {
+   if (port-ep-umidi-chip-shutdown) {
+   /* gobble up remaining bytes to prevent wait in
+* snd_rawmidi_drain_output */
+   while (!snd_rawmidi_transmit_empty(substream))
+   snd_rawmidi_transmit_ack(substream, 1);
+   return;
+   }
tasklet_hi_schedule(port-ep-tasklet);
+   }
 }

 static int snd_usbmidi_input_open(snd_rawmidi_substream_t* substream)




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] USB audio devices

2004-03-10 Thread Clemens Ladisch
Jaroslav Kysela wrote:

 On Tue, 9 Mar 2004, Takashi Iwai wrote:

  BTW, the USB audio is another headache. the current ALSA PCM model isn't
  perfectly suitable for the devices like USB audio.

 Unfortunately I don't see a better model.

Conceptually, USB devices have variable-sized periods.  The question
is whether we actually want to allow this in the API.  Probably not.

I have thought about forcing the period size to one ALSA frame (with
period_elapsed() calls at USB frame boundaries, like it's now).  In
theory, applications should be able to cope with this.

 I don't know much about USB 2.0,

Not too much differences for the driver.  The main difference is that
there are now 8000 microframes per second.  I have written a patch
(see below) and am about to test it.

 but I guess that 1.x compatibility issues brings another overhead
 to this extension which makes it also unuseable when 1.x devices
 are connected to same USB port.

There are some nasty contortions when a 1.x device is connected
through a 2.0 hub, but otherwise there is no overhead for 1.x devices
because logically (and electrically AFAIK) either the 2.0 or the 1.x
host controller device is connected to a specific port.


Regards,
Clemens

-- 
Index: alsa-kernel/usb/usbaudio.c
===
RCS file: /cvsroot/alsa/alsa-kernel/usb/usbaudio.c,v
retrieving revision 1.87
diff -u -r1.87 usbaudio.c
--- alsa-kernel/usb/usbaudio.c  8 Mar 2004 09:29:51 -   1.87
+++ alsa-kernel/usb/usbaudio.c  8 Mar 2004 09:48:09 -
@@ -104,6 +104,7 @@
  */

 #define MAX_PACKS  10
+#define MAX_PACKS_HS   (MAX_PACKS * 8) /* in high speed mode */
 #define MAX_URBS   5   /* max. 20ms long packets */
 #define SYNC_URBS  2   /* always two urbs for sync */
 #define MIN_PACKS_URB  1   /* minimum 1 packet per urb */
@@ -165,6 +166,8 @@
unsigned int freqm;  /* momentary sampling rate in USB format, i.e. 
fs/1000 in Q10.14 */
unsigned int freqmax;/* maximum sampling rate, used for buffer management 
*/
unsigned int phase;  /* phase accumulator */
+   unsigned int phase_shift;   /* fractional bits of phase */
+   unsigned int phase_mask;/* (1  phase_shift) - 1 */
unsigned int maxpacksize;   /* max packet size in bytes */
unsigned int maxframesize;  /* max packet size in frames */
unsigned int curpacksize;   /* current packet size in bytes (for capture) 
*/
@@ -250,7 +253,6 @@
cp[1] = subs-freqn  8;
cp[2] = subs-freqn  16;
}
-   urb-interval = 1;
return 0;
 }

@@ -301,7 +303,6 @@
spin_unlock_irqrestore(subs-lock, flags);
urb-transfer_buffer = ctx-buf;
urb-transfer_buffer_length = offs;
-   urb-interval = 1;
 #if 0 // for check
if (! urb-bandwidth) {
int bustime;
@@ -390,7 +391,6 @@
urb-iso_frame_desc[i].length = 3;
urb-iso_frame_desc[i].offset = offs;
}
-   urb-interval = 1;
return 0;
 }

@@ -464,8 +464,8 @@
if (subs-fill_max)
counts = subs-maxframesize; /* fixed */
else {
-   subs-phase = (subs-phase  0x3fff) + subs-freqm;
-   counts = subs-phase  14;
+   subs-phase = (subs-phase  subs-phase_mask) + subs-freqm;
+   counts = subs-phase  subs-phase_shift;
if (counts  subs-maxframesize)
counts = subs-maxframesize;
}
@@ -515,7 +515,6 @@
spin_unlock_irqrestore(subs-lock, flags);
urb-transfer_buffer_length = offs * stride;
ctx-transfer = offs;
-   urb-interval = 1;

return 0;
 }
@@ -822,15 +821,22 @@
 {
unsigned int maxsize, n, i;
int is_playback = subs-direction == SNDRV_PCM_STREAM_PLAYBACK;
-   unsigned int npacks[MAX_URBS], total_packs;
+   unsigned int npacks[MAX_URBS], urb_packs, total_packs;

/* calculate the frequency in 10.14 format */
subs-freqn = subs-freqm = get_usb_rate(rate);
subs-freqmax = subs-freqn + (subs-freqn  2); /* max. allowed frequency */
subs-phase = 0;
+   if (subs-dev-speed == USB_SPEED_HIGH) {
+   subs-phase_shift = 11;
+   subs-phase_mask = 0x07ff;
+   } else {
+   subs-phase_shift = 14;
+   subs-phase_mask = 0x3fff;
+   }

/* calculate the max. size of packet */
-   maxsize = ((subs-freqmax + 0x3fff) * (frame_bits  3))  14;
+   maxsize = ((subs-freqmax + subs-phase_mask) * (frame_bits  3))  
subs-phase_shift;
if (subs-maxpacksize  maxsize  subs-maxpacksize) {
//snd_printd(KERN_DEBUG maxsize %d is greater than defined size %d\n,
// maxsize, subs-maxpacksize);
@@ -842,9 +848,14 @@
else
   

Re: [Alsa-devel] USB audio devices

2004-03-10 Thread Clemens Ladisch
Jaroslav Kysela wrote:

 On Wed, 10 Mar 2004, Clemens Ladisch wrote:

  Conceptually, USB devices have variable-sized periods.  The question
  is whether we actually want to allow this in the API.  Probably not.

 What this does mean? I though that the period size is specified with time
 (1ms) for USB, isn't it? I think that we can describe this constraint
 with the refine algorithm.

One USB frame is 1 ms, but the number of samples per USB frame varies
if the sample rate isn't an integer multiple of 1000.  E.g., at
44100 Hz, each USB frame has 44 samples, with one out of ten having
45.

I don't know what happens when we constrain the period size to 1 ms,
which would be exactly 44.1 frames.  The period size in frames gets
rounded to an integer, doesn't it?


Regards,
Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Full support for Creamware Noah and SFP

2004-03-10 Thread Clemens Ladisch
Willie Sippel wrote:
  But I'm not sure about, wether the NDA agrees in the basic alsa
  principles. What are the developers of alsa are thinking about that
  agreement?

AFAIK drivers for ATI hardware are developed in a similar way (ATI
gives specs under an NDA, the resulting driver is open source).

Takashi, is that right?

 I told Frank about the work you did on Noah support, and he was _very_
 impressed.

Well, there isn't much reason to be impressed, as the Noah conforms to
the USB audio specification, and the driver already implemented it.
(The only reason I had to make a change to the driver was that the
Noah and the driver, uh, didn't entirely agree on how to interpret a
minor detail of the spec.)

Tell him that NetBSD and OpenBSD have USB MIDI drivers, too.  :-)

Unlike the USB audio/MIDI parts, writing support for the vendor-
specific parts of the Noah and for the SFP PCI cards won't be a matter
of ten minutes, of course.

 It should work as follows:
 1. Interested developers would sign the NDA.
 2. Those developers would get the source and specs, and tell CW what
 parts need to become open to get the hardware working.

Well, I would be interested in this.


Regards,
Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] USB audio devices

2004-03-10 Thread Clemens Ladisch
Takashi Iwai wrote:
 Clemens Ladisch wrote:
 
   I don't know much about USB 2.0,
 
  Not too much differences for the driver.  The main difference is that
  there are now 8000 microframes per second.  I have written a patch
  (see below) and am about to test it.

 is there any real usb2-audio device available?

I have (remote) access to a machine with an Audigy 2 NX, which can do
USB 2.0.  And there is the Ediroal UA-1000, which I would really like
to have access to. :-)


Regards,
Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] How do I redirect sound from 1st soundacrd to 2nd soundcard?

2004-03-05 Thread Clemens Ladisch
Bauke Jan Douma wrote:
 I have two soundcards in my system, a cmipci(card) and
 an intel8x0 (on board).

 I have the audio cable of my CD/ROM drive wired onto the
 cmipci.  Attached to line-out of the cmipci is just my
 headphones.

 I also have a TV-card.
 An audio cable runs from the TV-card to the intel8x0.
 Attached to line-out of the intel8x0 is a speaker set.

 So when I play an audio CD (with cdctrl or xmcd or xmms)
 I usually listen to the audio on the headphones.  This is
 intentional, because it suits me best.  TV audio goes to
 the speaker set.

 However, occasionally I want to have the audio from a CD
 redirected to the speaker set.
 Right now, to accomplish this I do something like:

 $ cdda2wav -S 1 -t 1+12 -D /dev/sg0 -O wav - | \
aplay -D intel8x0 -f cd /dev/stdin

 These work without a problem, for the better part.
 But I was wondering if this cannot be done a bit more
 elegantly with some configuration in ~/.asoundrc, such
 that I can call aplay directly with that device as
 parameter to -D.

aplay always reads its input from a file.  IMHO, your pipe already is
the most elegant way to provide a file for aplay.  You can put it into
a script.

I would suggest to connect all input and output devices to one card,
and to change the mixer settings appropriately.  At least your onboard
chip should be able to do this.


HTH
Clemens




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] library problems

2004-03-03 Thread Clemens Ladisch
[EMAIL PROTECTED] wrote:
 I wanted to get the tempo, so I did this:

 snd_seq_queue_tempo_t *qt;
 snd_seq_queue_tempo_alloca(qt);
 snd_seq_get_queue_tempo(seq,id,qt);
 return qt-tempo;//line 91

 and the compiler told me this:

 alsa.cpp:91: invalid use of undefined type `struct _snd_seq_queue_tempo'
 /usr/include/alsa/seq.h:382: forward declaration of `struct
_snd_seq_queue_tempo'

The real definition of snd_seq_queue_tempo_t is hidden deep inside the
ALSA library.  Applications are not allowed to access its fields
directly to allow binary compatibility with future versions of ALSA.

To get the tempo, call snd_seq_queue_tempo_get_tempo(qt).


HTH
Clemens




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Re: [PATCH] snd_pcm_hw_params_set_rate_near val pointer

2004-03-03 Thread Clemens Ladisch
Jack O'Quin wrote:

 Samuel S Chessman [EMAIL PROTECTED] writes:

  This is caused by snd_pcm_hw_params_set_rate_near parameter val needing
  to be a pointer, and alsa_driver passing in the frame rate instead.
 
  This occurs against current CVS of alsa. (2004-03-02)

 I think this is the wrong fix, Sam.

 Apparently, that parameter was changed in ALSA between 0.9 and 1.0.
 For compatibility with the maximum number of systems, the JACK
 alsa_driver is still compiled using ALSA_PCM_OLD_HW_PARAMS_API, which
 selects the older (non-pointer) interface.

To elaborate on this:  both ALSA 0.9 and 1.0 support both versions of
these functions, and allow selecting between them by defining
ALSA_PCM_OLD_HW_PARAMS_API or ALSA_PCM_NEW_HW_PARAMS_API.  Without one
of these symbols defined, the default would be the old API when
compiling with 0.9 headers and the new one with 1.0 headers.  All
versions of the library are binary compatible with both old and new
applications.

 So, maybe this is an ALSA bug in emulating the older interface?

In theory, this should not happen.

Sam, which version of ALSA are your ALSA headers/libraries from?


Regards,
Clemens




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Re: [alsa-cvslog] CVS: alsa-lib/src/pcm pcm.c,1.271,1.272

2004-03-01 Thread Clemens Ladisch
Abramo Bagnara wrote:
 Jaroslav Kysela ha scritto:
  Log Message:
  Fixed return comment for *near() functions
 
  + * \return 0 otherwise a negative error code if configuration space would become 
  empty

 *near() functions semantic cannot return error by design.

 Taken for granted that configuration space on entry of function is not
 empty how it can become empty if I ask for *nearest* value?

 Obviously at least one configuration exists, then in the worst case such
 value is returned.

It may be possible that other errors than an empty configuration space
could occur.  For example, future ALSA versions might want to fail if
an hotplug device has been unpluggeed, or the configuration space
could have been reduced due to some outside influence.

I don't think we can guarantee that this function never ever fails.

Maybe we should simply drop the if configuration space would become
empty.


Regards,
Clemens




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


[Alsa-devel] [PATCH] fix for Creamware Noah

2004-02-27 Thread Clemens Ladisch
Hartmut Geissbauer wrote:
 That _has_ helped. Now the device is fully functional.



- search class-specific endpoint descriptor after the sync ep, too


Index: alsa-kernel/usb/usbaudio.c
===
RCS file: /cvsroot/alsa/alsa-kernel/usb/usbaudio.c,v
retrieving revision 1.81
diff -u -r1.81 usbaudio.c
--- alsa-kernel/usb/usbaudio.c  24 Feb 2004 08:44:33 -  1.81
+++ alsa-kernel/usb/usbaudio.c  27 Feb 2004 10:37:08 -
@@ -2324,6 +2324,9 @@
}

csep = snd_usb_find_desc(alts-endpoint[0].extra, 
alts-endpoint[0].extralen, NULL, USB_DT_CS_ENDPOINT);
+   /* Creamware Noah has this descriptor after the 2nd endpoint */
+   if (!csep  altsd-bNumEndpoints = 2)
+   csep = snd_usb_find_desc(alts-endpoint[1].extra, 
alts-endpoint[1].extralen, NULL, USB_DT_CS_ENDPOINT);
if (!csep || csep[0]  7 || csep[2] != EP_GENERAL) {
snd_printk(KERN_ERR %d:%u:%d : no or invalid class specific 
endpoint descriptor\n,
   dev-devnum, iface_no, altno);





---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] [partialy fixed] Creamware Noah, snd-usb-audio capable?

2004-02-26 Thread Clemens Ladisch
Hartmut Geissbauer wrote:
 Clemens Ladisch wrote:
  Hartmut Geissbauer wrote:
 The only thing that's missing now are the two playback ports.
   
Please show the output of lsusb -v.
 
  The descriptors look OK.

But only at first sight.

Please try this patch.


HTH
Clemens

-- 

Index: alsa-kernel/usb/usbaudio.c
===
RCS file: /cvsroot/alsa/alsa-kernel/usb/usbaudio.c,v
retrieving revision 1.81
diff -u -r1.81 usbaudio.c
--- alsa-kernel/usb/usbaudio.c  24 Feb 2004 08:44:33 -  1.81
+++ alsa-kernel/usb/usbaudio.c  26 Feb 2004 10:21:55 -
@@ -2324,6 +2324,9 @@
}

csep = snd_usb_find_desc(alts-endpoint[0].extra, 
alts-endpoint[0].extralen, NULL, USB_DT_CS_ENDPOINT);
+   /* Creamware Noah has this descriptor after the 2nd endpoint */
+   if (!csep  altsd-bNumEndpoints = 2)
+   csep = snd_usb_find_desc(alts-endpoint[1].extra, 
alts-endpoint[1].extralen, NULL, USB_DT_CS_ENDPOINT);
if (!csep || csep[0]  7 || csep[2] != EP_GENERAL) {
snd_printk(KERN_ERR %d:%u:%d : no or invalid class specific 
endpoint descriptor\n,
   dev-devnum, iface_no, altno);




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] period_size, periods, count parameters

2004-02-26 Thread Clemens Ladisch
Mathieu Rondonneau wrote:
 I don't understand why count is 1024 ?
 why count is not equal to runtime-period_size (i.e. 16*1024)?

If your frame size is 4, this is the size of a memory page.  I guess
ALSA wants to copy the data one page at a time, and this is required
if the buffer isn't contiguous.


Regards,
Clemens




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] [PATCH] add aplaymidi arecordmidi utils

2004-02-25 Thread Clemens Ladisch
Will wrote:

 Clemens Ladisch [EMAIL PROTECTED] wrote:
 
 If you get correct output when you run amidi -p virtual -d and
 aconnect your keyboard to that port, then it may be a bug in
 arecordmidi.  I'll test when I'm at home.

 This is what I get:

   $ pmidi -l
 Port Client name   Port name
 64:0 Rawmidi 0 - Sound Blaster 16 MSound Blaster 16 MPU-401

You didn't apply all my patches, or recompile; this name would be
different.

Did you change asequencer.h in both the kernel and alsa-lib?

 playing various notes on the MIDI keyboard gives correct MIDI output in ASCII:

90 29 4A
...

On my machine, arecordmidi works just fine.


Regards,
Clemens




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


[Alsa-devel] [PATCH] fix amixer load error messages

2004-02-24 Thread Clemens Ladisch

fix error messages for snd_mixer_load


BTW: yesterday's change to alsa-lib's asequencer.h hasn't been
committed yet


Index: alsa-utils/amixer/amixer.c
===
RCS file: /cvsroot/alsa/alsa-utils/amixer/amixer.c,v
retrieving revision 1.79
diff -u -r1.79 amixer.c
--- alsa-utils/amixer/amixer.c  21 Feb 2004 18:44:18 -  1.79
+++ alsa-utils/amixer/amixer.c  24 Feb 2004 08:56:13 -
@@ -774,7 +774,7 @@
}
err = snd_mixer_load(handle);
if (err  0) {
-   error(Mixer load error: %s, card, snd_strerror(err));
+   error(Mixer %s load error: %s, card, snd_strerror(err));
snd_mixer_close(handle);
return err;
}
@@ -1145,7 +1145,7 @@
}
err = snd_mixer_load(handle);
if (err  0) {
-   error(Mixer load error: %s, card, snd_strerror(err));
+   error(Mixer %s load error: %s, card, snd_strerror(err));
snd_mixer_close(handle);
return err;
}
@@ -1427,7 +1427,7 @@
snd_mixer_set_callback(handle, mixer_event);
err = snd_mixer_load(handle);
if (err  0) {
-   error(Mixer load error: %s, card, snd_strerror(err));
+   error(Mixer %s load error: %s, card, snd_strerror(err));
snd_mixer_close(handle);
return err;
}




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] [PATCH] add aplaymidi arecordmidi utils

2004-02-24 Thread Clemens Ladisch
Will wrote:
 How easy would it be to make aplaymidi be able to adjust the playback speed
 like playmidi?  (playmidi -t 0.5 music.mid plays at twice the default speed)

Very easy.

 How easy would it be to make aplaymidi be able to move forwards and backwards
 during playback, e.g. by pressing f or b, like Takashi Iwai's drvmidi?

Not so easy; even more so if you want to have correct controller
values.  Adjusting settings changed by sysexs would be almost
impossible.


However, these tools are meant as basic command-line utilities (and
examples).  I think your suggestions would fit better into some GUI
player.


Regards,
Clemens




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] [PATCH] add aplaymidi arecordmidi utils

2004-02-24 Thread Clemens Ladisch
Will wrote:
 Clemens Ladisch [EMAIL PROTECTED] wrote:
   I'm getting empty MIDI files containing only the MIDI header.
 
 Are you using the latest CVS version of ALSA?
 Some of the bugfixes I sent yesterday are needed by arecordmidi.

 No, but I applied your patches to alsa-lib-1.0.3rc1 and Linux 2.6.3 in
 include/sound/asequencer, sound/* etc.  Is that enough to get a
 working ALSA sequencer?

If you recompiled both alsa-driver and alsa-lib packages, yes.

Perhaps I should test more; the latest tests were made only against
data recorded through the snd-seq-dummy client (this is where the
unpatched sequencer would fail).

If you get correct output when you run amidi -p virtual -d and
aconnect your keyboard to that port, then it may be a bug in
arecordmidi.  I'll test when I'm at home.


Regards,
Clemens




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Compile errors with latest alsa releases

2004-02-24 Thread Clemens Ladisch
snookertb wrote:
 SND_CTL_READONLY does not appear to be declared anywhere.

It's defined in alsa-lib/include/control.h.  You have to install the
alsa-lib package before compiling alsa-utils and alsa-tools.

 Are you part of the alsa development team?

SourceForge says no, the bugtracker says yes.  :-)


Regards,
Clemens




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] period_size, periods, count parameters

2004-02-24 Thread Clemens Ladisch
Mathieu Rondonneau wrote:
   .period_bytes_min = 1092,
   .period_bytes_max = 32768,
   .periods_min  = 8,
   .periods_max  = 512,

 When i start to send a file, I Don't know why:
 runtime-period_size = 8192
 runtime-periods: 8
 and the ¨count¨ parameter in the copy operator is 1024

These values fit into the constraints defined above.

 I tryed to change
 .period_bytes_min = 8192,
 .periods_min= 1,

 but the ¨count¨ parameter, the ¨periode_size¨ and ¨periods¨ remain
 the same.

The same for these values.

 Is it possible to change the ¨count¨ parameter in the copy
 operator?

Apparently, your copy operator is to copy one period.

Probably you have to force another period size.

What's wrong with these parameters?


Regards,
Clemens





---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56alloc_id438op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


[Alsa-devel] [PATCH] change snd-seq-midi client names

2004-02-23 Thread Clemens Ladisch

This patch reverses the order of the Rawmidi x and rawmidi name
parts of client names to enable selecting clients by a unique prefix
(as snd_seq_parse_address does).


Index: alsa-kernel/core/seq/seq_midi.c
===
RCS file: /cvsroot/alsa/alsa-kernel/core/seq/seq_midi.c,v
retrieving revision 1.15
diff -u -r1.15 seq_midi.c
--- alsa-kernel/core/seq/seq_midi.c 7 Jan 2004 14:34:22 -   1.15
+++ alsa-kernel/core/seq/seq_midi.c 23 Feb 2004 08:27:41 -
@@ -285,7 +285,7 @@
cinfo.client = client-seq_client;
cinfo.type = KERNEL_CLIENT;
name = rmidi-name[0] ? (const char *)rmidi-name : External MIDI;
-   snprintf(cinfo.name, sizeof(cinfo.name), Rawmidi %d - %s, card-number, 
name);
+   snprintf(cinfo.name, sizeof(cinfo.name), %s - Rawmidi %d, name, 
card-number);
return snd_seq_kernel_client_ctl(client-seq_client, 
SNDRV_SEQ_IOCTL_SET_CLIENT_INFO, cinfo);
 }





---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


[Alsa-devel] [PATCH] add USB MIDI port names

2004-02-23 Thread Clemens Ladisch

- add device-specific port names
- begin numbering ports at 1


Index: alsa-kernel/usb/usbmidi.c
===
RCS file: /cvsroot/alsa/alsa-kernel/usb/usbmidi.c,v
retrieving revision 1.22
diff -u -r1.22 usbmidi.c
--- alsa-kernel/usb/usbmidi.c   26 Jan 2004 14:19:24 -  1.22
+++ alsa-kernel/usb/usbmidi.c   23 Feb 2004 08:27:42 -
@@ -1,7 +1,7 @@
 /*
  * usbmidi.c - ALSA USB MIDI driver
  *
- * Copyright (c) 2002 Clemens Ladisch
+ * Copyright (c) 2002-2004 Clemens Ladisch
  * All rights reserved.
  *
  * Based on the OSS usb-midi driver by NAGANO Daisuke,
@@ -727,18 +727,92 @@
return NULL;
 }

+/*
+ * This list specifies names for ports that do not fit into the standard
+ * (product) MIDI (n) schema because they aren't external MIDI ports,
+ * such as internal control or synthesizer ports.
+ */
+static struct {
+   __u16 vendor;
+   __u16 product;
+   int port;
+   const char *name_format;
+} snd_usbmidi_port_names[] = {
+   /* Roland UA-100 */
+   {0x0582, 0x, 2, %s Control},
+   /* Roland SC-8850 */
+   {0x0582, 0x0003, 0, %s Part A},
+   {0x0582, 0x0003, 1, %s Part B},
+   {0x0582, 0x0003, 2, %s Part C},
+   {0x0582, 0x0003, 3, %s Part D},
+   {0x0582, 0x0003, 4, %s MIDI 1},
+   {0x0582, 0x0003, 5, %s MIDI 2},
+   /* Roland U-8 */
+   {0x0582, 0x0004, 1, %s Control},
+   /* Roland SC-8820 */
+   {0x0582, 0x0007, 0, %s Part A},
+   {0x0582, 0x0007, 1, %s Part B},
+   {0x0582, 0x0007, 2, %s MIDI},
+   /* Roland SK-500 */
+   {0x0582, 0x000b, 0, %s Part A},
+   {0x0582, 0x000b, 1, %s Part B},
+   {0x0582, 0x000b, 2, %s MIDI},
+   /* Roland SC-D70 */
+   {0x0582, 0x000c, 0, %s Part A},
+   {0x0582, 0x000c, 1, %s Part B},
+   {0x0582, 0x000c, 2, %s MIDI},
+   /* Edirol UM-880 */
+   {0x0582, 0x0014, 8, %s Control},
+   /* Edirol SD-90 */
+   {0x0582, 0x0016, 0, %s Part A},
+   {0x0582, 0x0016, 1, %s Part B},
+   {0x0582, 0x0016, 2, %s MIDI 1},
+   {0x0582, 0x0016, 3, %s MIDI 2},
+   /* Edirol UM-550 */
+   {0x0582, 0x0023, 5, %s Control},
+   /* Edirol SD-20 */
+   {0x0582, 0x0027, 0, %s Part A},
+   {0x0582, 0x0027, 1, %s Part B},
+   {0x0582, 0x0027, 2, %s MIDI},
+   /* Edirol SD-80 */
+   {0x0582, 0x0029, 0, %s Part A},
+   {0x0582, 0x0029, 1, %s Part B},
+   {0x0582, 0x0029, 2, %s MIDI 1},
+   {0x0582, 0x0029, 3, %s MIDI 2},
+   /* M-Audio MidiSport 8x8 */
+   {0x0763, 0x1031, 8, %s Control},
+   {0x0763, 0x1033, 8, %s Control},
+};
+
 static void snd_usbmidi_init_substream(snd_usb_midi_t* umidi,
   int stream, int number,
   snd_rawmidi_substream_t** rsubstream)
 {
+   int i;
+   __u16 vendor, product;
+   const char *name_format;
+
snd_rawmidi_substream_t* substream = snd_usbmidi_find_substream(umidi, stream, 
number);
if (!substream) {
snd_printd(KERN_ERR substream %d:%d not found\n, stream, number);
return;
}
+
/* TODO: read port name from jack descriptor */
+   name_format = %s MIDI %d;
+   vendor = umidi-chip-dev-descriptor.idVendor;
+   product = umidi-chip-dev-descriptor.idProduct;
+   for (i = 0; i  ARRAY_SIZE(snd_usbmidi_port_names); ++i) {
+   if (snd_usbmidi_port_names[i].vendor == vendor 
+   snd_usbmidi_port_names[i].product == product 
+   snd_usbmidi_port_names[i].port == number) {
+   name_format = snd_usbmidi_port_names[i].name_format;
+   break;
+   }
+   }
snprintf(substream-name, sizeof(substream-name),
-%s Port %d, umidi-chip-card-shortname, number);
+name_format, umidi-chip-card-shortname, number + 1);
+
*rsubstream = substream;
 }





---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


[Alsa-devel] [PATCH] fix KERNEL_QUOTE event handling

2004-02-23 Thread Clemens Ladisch

Timestamping (if enabled on a subscription or a port) is not applied
to the quoted event but to the quoting event.  This patch adds a
function to copy only selected fields into the event to be delivered.


- fix KERNEL_QUOTE event timestamping
- fix typo in port_broadcast_event

Index: alsa-kernel/core/seq/seq_clientmgr.c
===
RCS file: /cvsroot/alsa/alsa-kernel/core/seq/seq_clientmgr.c,v
retrieving revision 1.27
diff -u -r1.27 seq_clientmgr.c
--- alsa-kernel/core/seq/seq_clientmgr.c5 Feb 2004 15:38:42 -   1.27
+++ alsa-kernel/core/seq/seq_clientmgr.c23 Feb 2004 08:27:41 -
@@ -547,6 +547,36 @@


 /*
+ * expand a quoted event.
+ */
+static int expand_quoted_event(snd_seq_event_t *event)
+{
+   snd_seq_event_t *quoted;
+
+   quoted = event-data.quote.event;
+   if (quoted == NULL) {
+   snd_printd(seq: quoted event is NULL\n);
+   return -EINVAL;
+   }
+
+   event-type = quoted-type;
+   event-tag = quoted-tag;
+   event-source = quoted-source;
+   /* don't use quoted destination */
+   event-data = quoted-data;
+   /* use quoted timestamp only if subscription/port didn't update it */
+   if (event-queue == SNDRV_SEQ_QUEUE_DIRECT) {
+   event-flags = quoted-flags;
+   event-queue = quoted-queue;
+   event-time = quoted-time;
+   } else {
+   event-flags = (event-flags  SNDRV_SEQ_TIME_STAMP_MASK)
+   | (quoted-flags  ~SNDRV_SEQ_TIME_STAMP_MASK);
+   }
+   return 0;
+}
+
+/*
  * deliver an event to the specified destination.
  * if filter is non-zero, client filter bitmap is tested.
  *
@@ -581,12 +611,9 @@
update_timestamp_of_queue(event, dest_port-time_queue,
  dest_port-time_real);

-   /* expand the quoted event */
if (event-type == SNDRV_SEQ_EVENT_KERNEL_QUOTE) {
quoted = 1;
-   event = event-data.quote.event;
-   if (event == NULL) {
-   snd_printd(seq: quoted event is NULL\n);
+   if (expand_quoted_event(event)  0) {
result = 0; /* do not send bounce error */
goto __skip;
}
@@ -694,8 +721,8 @@
if (dest_client == NULL)
return 0; /* no matching destination */

-   read_lock(client-ports_lock);
-   list_for_each(p, client-ports_list_head) {
+   read_lock(dest_client-ports_lock);
+   list_for_each(p, dest_client-ports_list_head) {
client_port_t *port = list_entry(p, client_port_t, list);
event-dest.port = port-addr.port;
/* pass NULL as source client to avoid error bounce */
@@ -706,7 +733,7 @@
break;
num_ev++;
}
-   read_unlock(client-ports_lock);
+   read_unlock(dest_client-ports_lock);
snd_seq_client_unlock(dest_client);
event-dest.port = SNDRV_SEQ_ADDRESS_BROADCAST; /* restore */
return (err  0) ? err : num_ev;




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


[Alsa-devel] [PATCH] fix MPU-401 port names

2004-02-23 Thread Clemens Ladisch

remove unneeded technical information from port names


Index: alsa-kernel/drivers/mpu401/mpu401_uart.c
===
RCS file: /cvsroot/alsa/alsa-kernel/drivers/mpu401/mpu401_uart.c,v
retrieving revision 1.29
diff -u -r1.29 mpu401_uart.c
--- alsa-kernel/drivers/mpu401/mpu401_uart.c13 Jan 2004 17:11:25 -  1.29
+++ alsa-kernel/drivers/mpu401/mpu401_uart.c23 Feb 2004 08:27:41 -
@@ -528,9 +528,9 @@
mpu-irq = irq;
mpu-irq_flags = irq_flags;
if (card-shortname[0])
-   snprintf(rmidi-name, sizeof(rmidi-name), %s MPU-401, 
card-shortname);
+   snprintf(rmidi-name, sizeof(rmidi-name), %s MIDI, card-shortname);
else
-   sprintf(rmidi-name, MPU-401 (UART) %d-%d, card-number, device);
+   sprintf(rmidi-name, MPU-401 MIDI %d-%d, card-number, device);
snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_OUTPUT, 
snd_mpu401_uart_output);
snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_INPUT, snd_mpu401_uart_input);
rmidi-info_flags |= SNDRV_RAWMIDI_INFO_OUTPUT |




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


[Alsa-devel] [PATCH] fix typo in port flags

2004-02-23 Thread Clemens Ladisch

- fix typo in port flags
- add GM2 capability bit


Index: alsa-kernel/include/asequencer.h
===
RCS file: /cvsroot/alsa/alsa-kernel/include/asequencer.h,v
retrieving revision 1.11
diff -u -r1.11 asequencer.h
--- alsa-kernel/include/asequencer.h7 Jan 2004 14:34:23 -   1.11
+++ alsa-kernel/include/asequencer.h23 Feb 2004 08:27:42 -
@@ -594,6 +594,7 @@
 #define SNDRV_SEQ_PORT_TYPE_MIDI_GS(13)  /* GS compatible device */
 #define SNDRV_SEQ_PORT_TYPE_MIDI_XG(14)  /* XG compatible device */
 #define SNDRV_SEQ_PORT_TYPE_MIDI_MT32  (15)  /* MT-32 compatible device */
+#define SNDRV_SEQ_PORT_TYPE_MIDI_GM2   (16)  /* General MIDI 2 compatible device */

 /* other standards...*/
 #define SNDRV_SEQ_PORT_TYPE_SYNTH  (110) /* Synth device (no MIDI compatible - 
direct wavetable) */
@@ -605,7 +606,7 @@
 /* misc. conditioning flags */
 #define SNDRV_SEQ_PORT_FLG_GIVEN_PORT  (10)
 #define SNDRV_SEQ_PORT_FLG_TIMESTAMP   (11)
-#define SNDRV_SEQ_PORT_FLG_TIME_REAL   (11)
+#define SNDRV_SEQ_PORT_FLG_TIME_REAL   (12)

 struct sndrv_seq_port_info {
struct sndrv_seq_addr addr; /* client/port numbers */
Index: alsa-lib/include/sound/asequencer.h
===
RCS file: /cvsroot/alsa/alsa-lib/include/sound/asequencer.h,v
retrieving revision 1.3
diff -u -r1.3 asequencer.h
--- alsa-lib/include/sound/asequencer.h 7 Jan 2004 14:36:40 -   1.3
+++ alsa-lib/include/sound/asequencer.h 23 Feb 2004 08:27:42 -
@@ -594,6 +594,7 @@
 #define SNDRV_SEQ_PORT_TYPE_MIDI_GS(13)  /* GS compatible device */
 #define SNDRV_SEQ_PORT_TYPE_MIDI_XG(14)  /* XG compatible device */
 #define SNDRV_SEQ_PORT_TYPE_MIDI_MT32  (15)  /* MT-32 compatible device */
+#define SNDRV_SEQ_PORT_TYPE_MIDI_GM2   (16)  /* General MIDI 2 compatible device */

 /* other standards...*/
 #define SNDRV_SEQ_PORT_TYPE_SYNTH  (110) /* Synth device (no MIDI compatible - 
direct wavetable) */
@@ -605,7 +606,7 @@
 /* misc. conditioning flags */
 #define SNDRV_SEQ_PORT_FLG_GIVEN_PORT  (10)
 #define SNDRV_SEQ_PORT_FLG_TIMESTAMP   (11)
-#define SNDRV_SEQ_PORT_FLG_TIME_REAL   (11)
+#define SNDRV_SEQ_PORT_FLG_TIME_REAL   (12)

 struct sndrv_seq_port_info {
struct sndrv_seq_addr addr; /* client/port numbers */




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


[Alsa-devel] [PATCH] add aplaymidi arecordmidi utils

2004-02-23 Thread Clemens Ladisch

See man pages for details.


add aplaymidi  arecordmidi utilities

Index: alsa-utils/configure.in
===
RCS file: /cvsroot/alsa/alsa-utils/configure.in,v
retrieving revision 1.76
diff -u -r1.76 configure.in
--- alsa-utils/configure.in 26 Jan 2004 19:30:45 -  1.76
+++ alsa-utils/configure.in 23 Feb 2004 08:27:54 -
@@ -69,4 +69,5 @@
 AC_OUTPUT(Makefile alsactl/Makefile alsamixer/Makefile amidi/Makefile amixer/Makefile 
\
  alsaconf/alsaconf alsaconf/Makefile \
  aplay/Makefile include/Makefile iecset/Makefile utils/Makefile \
- utils/alsa-utils.spec seq/Makefile seq/aconnect/Makefile 
seq/aseqnet/Makefile)
+ utils/alsa-utils.spec seq/Makefile seq/aconnect/Makefile \
+ seq/aplaymidi/Makefile seq/aseqnet/Makefile)
Index: alsa-utils/amidi/amidi.1
===
RCS file: /cvsroot/alsa/alsa-utils/amidi/amidi.1,v
retrieving revision 1.2
diff -u -r1.2 amidi.1
--- alsa-utils/amidi/amidi.119 Jan 2004 18:39:12 -  1.2
+++ alsa-utils/amidi/amidi.123 Feb 2004 08:27:54 -
@@ -1,4 +1,4 @@
-.TH AMIDI 1 18 Jan 2004
+.TH AMIDI 1 22 Feb 2004

 .SH NAME
 amidi \- read from and write to ALSA RawMIDI ports
@@ -16,7 +16,12 @@
 .B amidi
 handles only files containing raw MIDI commands, without timing
 information.
-Standard MIDI (.mid) files are not supported.
+.B amidi
+does not support Standard MIDI (.mid) files, but
+.B aplaymidi(1)
+and
+.B arecordmidi(1)
+do.

 .SH INVOKING
 .B amidi
@@ -68,17 +73,15 @@
 .I -s, --send=filename
 Sends the contents of the specified file to the MIDI port.
 The file must contain raw MIDI commands (e.g. a .syx file);
-you can
-.I not
-use a Standard MIDI (.mid) file for this.
+for Standard MIDI (.mid) files, use
+.B aplaymidi(1).

 .TP
 .I -r, --receive=filename
 Writes data received from the MIDI port into the specified file.
 The file will contain raw MIDI commands (such as in a .syx file);
-this will
-.I not
-create a Standard MIDI (.mid) file.
+to record a Standard MIDI (.mid) file, use
+.B arecordmidi(1).

 .B amidi
 will filter out any Active Sensing bytes (FEh), unless the
@@ -155,6 +158,11 @@
 The
 .I --list-devices
 option pretends that output and input ports are the same.
+
+.SH SEE ALSO
+aplaymidi(1)
+.br
+arecordmidi(1)

 .SH AUTHOR
 Clemens Ladisch [EMAIL PROTECTED]
Index: alsa-utils/seq/Makefile.am
===
RCS file: /cvsroot/alsa/alsa-utils/seq/Makefile.am,v
retrieving revision 1.1
diff -u -r1.1 Makefile.am
--- alsa-utils/seq/Makefile.am  4 Jan 2000 12:39:00 -   1.1
+++ alsa-utils/seq/Makefile.am  23 Feb 2004 08:27:54 -
@@ -1 +1 @@
-SUBDIRS=aconnect aseqnet
+SUBDIRS=aconnect aplaymidi aseqnet
diff -urN ../../oalsa/alsa/alsa-utils/seq/aplaymidi/Makefile.am 
alsa-utils/seq/aplaymidi/Makefile.am
--- ../../oalsa/alsa/alsa-utils/seq/aplaymidi/Makefile.am   1970-01-01 
01:00:00.0 +0100
+++ alsa-utils/seq/aplaymidi/Makefile.am2004-02-23 09:38:11.051239000 +0100
@@ -0,0 +1,5 @@
+INCLUDES = -I$(top_srcdir)/include
+EXTRA_DIST = aplaymidi.1 arecordmidi.1
+
+bin_PROGRAMS = aplaymidi arecordmidi
+man_MANS = aplaymidi.1 arecordmidi.1
diff -urN ../../oalsa/alsa/alsa-utils/seq/aplaymidi/aplaymidi.1 
alsa-utils/seq/aplaymidi/aplaymidi.1
--- ../../oalsa/alsa/alsa-utils/seq/aplaymidi/aplaymidi.1   1970-01-01 
01:00:00.0 +0100
+++ alsa-utils/seq/aplaymidi/aplaymidi.12004-02-23 09:38:11.061243000 +0100
@@ -0,0 +1,55 @@
+.TH APLAYMIDI 1 15 Feb 2004
+
+.SH NAME
+aplaymidi \- play Standard MIDI Files
+
+.SH SYNOPSIS
+.B aplaymidi
+-p client:port[,...] [-d delay] midifile ...
+
+.SH DESCRIPTION
+.B aplaymidi
+is a command-line utility that plays the specified MIDI file(s) to one
+or more ALSA sequencer ports.
+
+.SH OPTIONS
+
+.TP
+.I -h, --help
+Prints a list of options.
+
+.TP
+.I -V, --version
+Prints the current version.
+
+.TP
+.I -l, --list
+Prints a list of possible output ports.
+
+.TP
+.I -p, --port=client:port,...
+Sets the sequencer port(s) to which the events in the MIDI file(s) are
+sent.
+
+A client can be specified by its number, its name, or a prefix of its
+name. A port is specified by its number; for port 0 of a client, the
+:0 part of the port specification can be omitted.
+
+For compatibility with
+.B pmidi(1),
+the port specification is taken from the
+.I ALSA_OUTPUT_PORTS
+environment variable if none is given on the command line.
+
+.TP
+.I -d, --delay=seconds
+Specifies how long to wait after the end of each MIDI file,
+to allow the last notes to die away.
+
+.SH SEE ALSO
+pmidi(1)
+.br
+playmidi(1)
+
+.SH AUTHOR
+Clemens Ladisch [EMAIL PROTECTED]
diff -urN ../../oalsa/alsa/alsa-utils/seq/aplaymidi/aplaymidi.c 
alsa-utils/seq/aplaymidi/aplaymidi.c
--- ../../oalsa/alsa/alsa-utils/seq/aplaymidi/aplaymidi.c   1970-01-01 
01:00:00.0 +0100
+++ alsa-utils/seq/aplaymidi

Re: [Alsa-devel] Compile errors with latest alsa releases

2004-02-23 Thread Clemens Ladisch
snookertb wrote:
 I am attempting to update the Sun JDS distro from alsa version 0.9.0 to
 a later version which supports newer Intel sound chips. I get the
 following errors in these two compiles.

 /home/tarpon/downloads/alsa-driver-1.0.2c/include/adriver.h:295:
 redefinition of `usb_make_path'

This is a function which doesn't exist in older 2.4 kernels, so ALSA
defines its own version.  It seems Sun backported some USB stuff from
a newer kernel.

Try to uncomment this function in adriver.h.


HTH
Clemens




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] emagic mt4

2004-02-23 Thread Clemens Ladisch
ian esten wrote:
 thanks clemens. the mt4 now shows up in /proc/asound/cards.
 unfortunately though it doesnt seem to be working. i sent it some midi
 from seq24, and got no blinking lights on the front of the unit. do you
 think it will be possible to get the mt4 working with alsa?

It's possible, but not easy.  We have to find out what protocol the
device uses.  You could install something like usbsnoop on a Windows
computer and send/receive a few MIDI bytes, then send me the log file,
then I could try to find out what the stuff means.  If you do this,
please send no more than a few MIDI commands, and don't connect any
other USB devices, because the log file can become very big.


Regards,
Clemens




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] emagic mt4

2004-02-20 Thread Clemens Ladisch
ian esten wrote:
 On Thu, 2004-02-19 at 03:28, Clemens Ladisch wrote:
  Please post the output of lsusb -v.

 Bus 001 Device 040: ID 086a:0003 Emagic Soft-und Hardware GmbH
 .
 .
 .

These descriptors look very much like those of earlier Edirol devices.
It may be possible that the MT4 is similar enough to speak the same
protocol.

Please apply the patch below and recompile ALSA.  The device and its
ports will show up in ALSA, but I'm not sure if sending/receiving MIDI
data will work.


HTH
Clemens


-- 
Index: alsa-kernel/usb/usbquirks.h
===
RCS file: /cvsroot/alsa/alsa-kernel/usb/usbquirks.h,v
retrieving revision 1.28
diff -u -r1.28 usbquirks.h
--- alsa-kernel/usb/usbquirks.h 18 Feb 2004 16:24:55 -  1.28
+++ alsa-kernel/usb/usbquirks.h 20 Feb 2004 11:15:09 -
@@ -714,4 +714,19 @@

 },

+/* Emagic devices */
+{
+   USB_DEVICE(0x086a, 0x0003),
+   .driver_info = (unsigned long)  (const snd_usb_audio_quirk_t) {
+   .vendor_name = Emagic,
+   .product_name = MT4,
+   .ifnum = 2,
+   .type = QUIRK_MIDI_FIXED_ENDPOINT,
+   .data =  (const snd_usb_midi_endpoint_info_t) {
+   .out_cables = 0x000f,
+   .in_cables  = 0x0003
+   }
+   }
+},
+
 {




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] [partialy fixed] Creamware Noah, snd-usb-audio capable?

2004-02-19 Thread Clemens Ladisch
Hartmut Geissbauer wrote:
 Clemens Ladisch wrote:
   Might the patch(the code in it) for usbaudio.c you posted before be
   helpfull for the program?
 
  No. Please remove the patch.

 Done, except of the entries in usbquirks.h. Is it still needed?

No.  The quirk entry causes the driver to be loaded even for the first
configuration, which isn't needed anymore.

 Now by playing around with the settings in the build-in menu of the
 synthesizer, I discovered an entry named USBCom, that isn't described in
 the (so far well done) manual. You can switch it between Windows and
 Mac/Linux. I rememberd that I updated the firmware. (Now: 1.4.23, if
 anyone else is interested) So this menu entry might belong to this
 update.

 OK, with this setting, it is _not_ necessary to switch the configuration
 with your small but excellent tool to 2. There's now only _one_
 configuration  available, which represents  the audio and midi devices.

It's nice to see a device with built-in Linux support.  :-)

Please make an entry on http://qbik.ch/usb/devices/ and describe to
change the USBCom entry.

 The only thing that's missing now are the two playback ports.

Please show the output of lsusb -v.


Regards,
Clemens




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] emagic mt4

2004-02-19 Thread Clemens Ladisch
ian esten wrote:
 i have an emagic mt4 i'm trying to use with alsa.

Currently, nobody knows how to communicate with this device.

Please post the output of lsusb -v.


Regards,
Clemens




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] crashes usb-audio yamaha rp-u200

2004-02-19 Thread Clemens Ladisch
jaap wrote:
 When I start jack with

 jackstart -d alsa -P hw:0,0 -C hw:0,1,
 jack seems to start ,but then the system freezes
 with kernel panic.Sometimes jack is running but then
 the system crashes as soon as I try to do something with audio

 alsa-driver 0.9.8

This is quite old.  Please try the latest version.

 Adhoc cc95e706 [uhci]rh_int_timer_do+76/1e0

Uh, this isn't ALSA, it's in the USB driver.  :-)
But this could be the async unlinking bug where ALSA was responsible
(this has been fixed recently).


HTH
Clemens




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] ad1888 as in ASUS P4R800-VM motherboards

2004-02-16 Thread Clemens Ladisch
Peter Antypas wrote:
 I 've had no luck in using the cvs version with the ad1888 update.
 In fact, I can't even load snd-intel8x0. I thought the intel8x0
 module was supposed to work here?

An AC'97 system consists of two components: an AC'97 codec (in your
case, the AD1888), and an AC'97 controller (usually part of the
southbridge).  Your codec is supported, but your controller isn't.

 cat /proc/pci reveals a PCI id of 1002:4341 with I/O at 0xfbe0
 to 0xfbe000ff. It reports the device is (ATI Technologies) (rev 0)
 grepping through the CVS source (checked out today) for 1002 or
 4341 reveals nothing.

 I added the PCI ids to snd-intel8x0 and it fails to grab the
 specified I/O ports. What could be the problem here?

The problem is that ATI's AC'97 controller isn't compatible with
Intel's, so snd-intel8x0 doesn't work with it.  And it's completely
undocumented, so we cannot write a driver for it.


Regards,
Clemens




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Creamware Noah, snd-usb-audio capable?

2004-02-16 Thread Clemens Ladisch
Hartmut Geissbauer wrote:
 Clemens Ladisch wrote:
  The problem is that the kernel automatically selects the first
  configuration.  Please try the patch below.

 drivers/usb/core/usb.c: usb_hotplug
 usb 1-2.4: configuration #1 chosen from 2 choices
 usb 1-2.4: registering 1-2.4:1.0 (config #1, interface 0)
 drivers/usb/core/usb.c: usb_hotplug
 snd-usb-audio 1-2.4:1.0: usb_probe_interface
 snd-usb-audio 1-2.4:1.0: usb_probe_interface - got id

 The device is not appearing in /proc/asound.

Does the new configuration (the audio interfaces) show up in
/proc/bus/usb/devices?  What happens when you re-load snd-usb-audio
after that?


Regards,
Clemens




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Creamware Noah, snd-usb-audio capable?

2004-02-12 Thread Clemens Ladisch
Frank Barknecht wrote:

 Clemens Ladisch hat gesagt: // Clemens Ladisch wrote:

  it should be possible to use the MIDI_STANDARD_INTERFACE quirk (see
  below).

 I'd love to test it, but I had to send back the device already. :(
 Could you test it?

I would test it if I actually had the device.

Well, it's in CVS now, so let's pretend it works and see if somebody
complains.  ;-)


Regards,
Clemens




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Creamware Noah, snd-usb-audio capable?

2004-02-12 Thread Clemens Ladisch
Hartmut Geissbauer wrote:
 I own a piece of hardware called Noah EX. It's a tactive
 instrument modeller.
 My goal is to get this device working with the alsa usb driver,
 because the output of lsusb -v leads me to the hope, that it has a
 standard usb audio interface.
 ...
 Interface Descriptor:
   bInterfaceClass 1 Audio
   bInterfaceSubClass  1 Control Device
   ...
   bInterfaceSubClass  2 Streaming   (= PCM)
   ...
   bInterfaceSubClass  3 Non Streaming   (= MIDI)

Well, this device indeed has standard descriptors.

 What I discoverd yet, is that the device is offering two
 configurations. And the second is the audio and midi related one.
 The first seems to be the configuration channel.

 Feb  5 00:28:33 chief kernel: usb 1-2.4: configuration #1 chosen from 2 choices

The problem is that the kernel automatically selects the first
configuration.  Please try the patch below.


HTH
Clemens

-- 

Index: alsa-kernel/usb/usbquirks.h
===
RCS file: /cvsroot/alsa/alsa-kernel/usb/usbquirks.h,v
retrieving revision 1.27
diff -u -r1.27 usbquirks.h
--- alsa-kernel/usb/usbquirks.h 11 Feb 2004 12:15:55 -  1.27
+++ alsa-kernel/usb/usbquirks.h 12 Feb 2004 10:56:21 -
@@ -698,4 +698,13 @@
}
 },

+{
+   USB_DEVICE_VENDOR_SPEC(0x1107, 0x0102),
+   .driver_info = (unsigned long)  (const snd_usb_audio_quirk_t) {
+   .vendor_name = CreamWare,
+   .product_name = Noah,
+   .ifnum = QUIRK_NO_INTERFACE
+   }
+},
+
 #undef USB_DEVICE_VENDOR_SPEC
Index: alsa-kernel/usb/usbaudio.c
===
RCS file: /cvsroot/alsa/alsa-kernel/usb/usbaudio.c,v
retrieving revision 1.79
diff -u -r1.79 usbaudio.c
--- alsa-kernel/usb/usbaudio.c  9 Feb 2004 16:25:38 -   1.79
+++ alsa-kernel/usb/usbaudio.c  12 Feb 2004 10:56:21 -
@@ -2820,6 +2820,14 @@
goto __err_val;
config = dev-actconfig;
}
+   /* Creamware Noah needs to be set to the second configuration */
+   if (dev-descriptor.idVendor == 0x1107  dev-descriptor.idProduct == 0x0102 

+   ifnum == 0) {
+   if (get_cfg_desc(dev-actconfig)-bConfigurationValue == 1)
+   usb_set_configuration(dev, 2);
+   /* but don't actually claim interface 0 */
+   goto __err_val;
+   }

/*
 * found a config.  now register to ALSA




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


[Alsa-devel] [PATCH] UA-3FX support

2004-02-12 Thread Clemens Ladisch
Frank Barknecht wrote:
 Now I discovered a teenytiny switch on the back if the UA-3 FX that
 switches the Advanced Driver  features of the device on or off.
 Setting this to OFF, I now got ALSA to recognize the device as a
 simple 44100 Hz device. No higher samplerates, though.
 Probably a quirk is needed?

The descriptors in advanced mode look like this:

 unknown descriptor type: 0b 24 02 01 02 03 18 01 44 ac 00

which is 24 bits at 44.1 kHz.  Probably there is another switch for
the sample rate. :-)

The device has another interface (3) without any descriptors.  You
wouldn't know, just by chance, if the Windows driver offers some MIDI
port, or some device-specific control application for the effects?


Regards,
Clemens

-- 


add UA-3FX support


Index: alsa-kernel/usb/usbquirks.h
===
RCS file: /cvsroot/alsa/alsa-kernel/usb/usbquirks.h,v
retrieving revision 1.27
diff -u -r1.27 usbquirks.h
--- alsa-kernel/usb/usbquirks.h 11 Feb 2004 12:15:55 -  1.27
+++ alsa-kernel/usb/usbquirks.h 12 Feb 2004 11:19:01 -
@@ -502,6 +502,32 @@
}
 },
 {
+   /*
+* This quirk is for the Advanced Driver mode. If off, the UA-3FX
+* is standard compliant, but has only 16-bit PCM.
+*/
+   USB_DEVICE(0x0582, 0x0050),
+   .driver_info = (unsigned long)  (const snd_usb_audio_quirk_t) {
+   .vendor_name = EDIROL,
+   .product_name = UA-3FX,
+   .ifnum = QUIRK_ANY_INTERFACE,
+   .type = QUIRK_COMPOSITE,
+   .data =  (const snd_usb_audio_quirk_t[]) {
+   {
+   .ifnum = 1,
+   .type = QUIRK_AUDIO_STANDARD_INTERFACE
+   },
+   {
+   .ifnum = 2,
+   .type = QUIRK_AUDIO_STANDARD_INTERFACE
+   },
+   {
+   .ifnum = -1
+   }
+   }
+   }
+},
+{
USB_DEVICE(0x0582, 0x0052),
.driver_info = (unsigned long)  (const snd_usb_audio_quirk_t) {
.vendor_name = EDIROL,




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] [Fwd: Audigy2 NX (USB 2.0) on ALSA 1.0.2]

2004-02-12 Thread Clemens Ladisch
John W. Cocula wrote:
 I have an Audigy2 NX working under ALSA 1.0.2 (the latest 1.0.2 :)
 ...
 2. I downloaded the latest firmware under Windows that supposedly
 permits USB 2.0 operation, but lsusb -v stills shows it as a 1.1
 device.

 Bus 002 Device 004: ID 041e:3020 Creative Technology, Ltd
 ...
   bcdUSB   1.10

Yes, this is USB 1.1, the device says so itself.

 Am I right in assuming that this has absolutely nothing to do with
 ALSA?

Yes.

 Does anyone have any pointers on making this a true USB 2.0
 connection?

Probably the device is now compatible with USB 2.0, i.e., the firmware
update prevents the device from blowing up when connected to a
2.0-capable computer, or something like that.

Or the device is 1.1 by default and switches to 2.0 only when the
driver sends it some special command.  (The Extigy needs a similar
hack to enable some advanced features.)

Could you check if the Windows device manager shows it connected to
the 2.0 controller (EHCI) or a 1.x controller (UHCI or OHCI)?


Regards,
Clemens




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


  1   2   3   4   >