Skip to contentSkip to conversation

M-Audio Qattro USB

DISCUSSION Michael Hoffer 3 participants 4 messages Jan 17, 2005 – Jan 18, 2005

lore
Share & tools
lore
#0 lore raw

HI!

I read the Install-Howto for snd-usb-audio on www.alsa-project.org. I use Gentoo-Linux (kernel 2.6.9). I have the feeling that the .asoundrc file had no effect on my system.

When I tried to record with a samplerate of 96000 Hz audacity could not open the sounddevice. With 48000 Hz it worked fine in audacity.

With arecord I get the following error message. It doesn't make a difference if I use other sample rates or sample formates.
arecord gives the following output:

bash-2.05b$ arecord -D quattro -f S24_3LE -r 96000 -c 2 -d 10 test.raw Recording WAVE 'test.raw' : Signed 24 bit Little Endian in 3bytes, Rate 96000 Hz, Stereo
arecord: set_params:854: Sample format non available

Thanks for your help!

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt

#1 lore raw

Hi,

It's possible the alsa drivers you are using had a broken implementation.

what is the ouput of:

cat /proc/asound/version

Quoting Michael Hoffer <[email protected]>:

Quoted 22 lines

HI!

I read the Install-Howto for snd-usb-audio on www.alsa-project.org. I use Gentoo-Linux (kernel 2.6.9). I have the feeling that the .asoundrc file had no effect on my system.

When I tried to record with a samplerate of 96000 Hz audacity could not open the sounddevice. With 48000 Hz it worked fine in audacity.

With arecord I get the following error message. It doesn't make a difference if I use other sample rates or sample formates.
arecord gives the following output:

bash-2.05b$ arecord -D quattro -f S24_3LE -r 96000 -c 2 -d 10 test.raw Recording WAVE 'test.raw' : Signed 24 bit Little Endian in 3bytes, Rate 96000 Hz, Stereo
arecord: set_params:854: Sample format non available

Thanks for your help!

Quoted 9 lines

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

--
Patrick Shirkey - Boost Hardware Ltd. Http://www.boosthardware.com Http://www.djcj.org/ - The Linux Audio Users guide Http://www.djcj.org/gigs - Gigs Guide Korea
========================================

Being on stage with the band in front of crowds shouting, "Get off! No! We want normal music!", I think that was more like acting than anything I've ever done.

Goldie, 8 Nov, 2002
The Scotsman

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt

#2 lore raw
Quoted 6 lines · Patrick Shirkey

Quoting Michael Hoffer <[email protected]>:

Quoted 4 lines

bash-2.05b$ arecord -D quattro -f S24_3LE -r 96000 -c 2 -d 10 test.raw Recording WAVE 'test.raw' : Signed 24 bit Little Endian in 3bytes, Rate 96000 Hz, Stereo
arecord: set_params:854: Sample format non available

What sample formats appear in /proc/asound/cardX/stream0, 1?

Quoted 1 line

It's possible the alsa drivers you are using had a broken implementation.

I just committed a patch against 1.0.8 which should improve the behaviour in some cases (I don't know if it is related to this problem).

Clemens

Signature · 153 lines
Index: alsa-kernel/usb/usbaudio.h
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/usb/usbaudio.h,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- alsa-kernel/usb/usbaudio.h	30 Sep 2004 10:11:25 -0000	1.35
+++ alsa-kernel/usb/usbaudio.h	17 Jan 2005 17:41:38 -0000	1.36
@@ -157,6 +157,7 @@
 #define QUIRK_MIDI_STANDARD_INTERFACE	6
 #define QUIRK_AUDIO_EDIROL_UA700_UA25	7
 #define QUIRK_AUDIO_EDIROL_UA1000	8
+#define QUIRK_IGNORE_INTERFACE		9

 typedef struct snd_usb_audio_quirk snd_usb_audio_quirk_t;
 typedef struct snd_usb_midi_endpoint_info snd_usb_midi_endpoint_info_t;
@@ -190,6 +191,8 @@

 /* for QUIRK_AUDIO_EDIROL_UA700_UA25/UA1000, data is NULL */

+/* for QUIRK_IGNORE_INTERFACE, data is null */
+
 /*
  */

Index: alsa-kernel/usb/usbaudio.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/usb/usbaudio.c,v
retrieving revision 1.113
retrieving revision 1.114
diff -u -r1.113 -r1.114
--- alsa-kernel/usb/usbaudio.c	16 Dec 2004 16:12:51 -0000	1.113
+++ alsa-kernel/usb/usbaudio.c	17 Jan 2005 17:41:34 -0000	1.114
@@ -2977,6 +2977,8 @@
 		return create_ua700_ua25_quirk(chip, iface);
 	case QUIRK_AUDIO_EDIROL_UA1000:
 		return create_ua1000_quirk(chip, iface);
+	case QUIRK_IGNORE_INTERFACE:
+		return 0;
 	default:
 		snd_printd(KERN_ERR "invalid quirk type %d\n", quirk->type);
 		return -ENXIO;
Index: alsa-kernel/usb/usbquirks.h
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/usb/usbquirks.h,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- alsa-kernel/usb/usbquirks.h	30 Sep 2004 10:11:25 -0000	1.38
+++ alsa-kernel/usb/usbquirks.h	17 Jan 2005 17:41:38 -0000	1.39
@@ -876,6 +876,22 @@
 			 * but captured samples are big-endian (see usbaudio.c).
 			 */
 			{
+				.ifnum = 0,
+				.type = QUIRK_IGNORE_INTERFACE
+			},
+			{
+				.ifnum = 1,
+				.type = QUIRK_IGNORE_INTERFACE
+			},
+			{
+				.ifnum = 2,
+				.type = QUIRK_IGNORE_INTERFACE
+			},
+			{
+				.ifnum = 3,
+				.type = QUIRK_IGNORE_INTERFACE
+			},
+			{
 				.ifnum = 4,
 				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 			},
@@ -884,6 +900,10 @@
 				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 			},
 			{
+				.ifnum = 6,
+				.type = QUIRK_IGNORE_INTERFACE
+			},
+			{
 				.ifnum = 7,
 				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 			},
@@ -936,11 +956,56 @@
 	.driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
 		.vendor_name = "M-Audio",
 		.product_name = "OmniStudio",
-		.ifnum = 9,
-		.type = QUIRK_MIDI_MIDIMAN,
-		.data = & (const snd_usb_midi_endpoint_info_t) {
-			.out_cables = 0x0001,
-			.in_cables  = 0x0001
+		.ifnum = QUIRK_ANY_INTERFACE,
+		.type = QUIRK_COMPOSITE,
+		.data = & (const snd_usb_audio_quirk_t[]) {
+			{
+				.ifnum = 0,
+				.type = QUIRK_IGNORE_INTERFACE
+			},
+			{
+				.ifnum = 1,
+				.type = QUIRK_IGNORE_INTERFACE
+			},
+			{
+				.ifnum = 2,
+				.type = QUIRK_IGNORE_INTERFACE
+			},
+			{
+				.ifnum = 3,
+				.type = QUIRK_IGNORE_INTERFACE
+			},
+			{
+				.ifnum = 4,
+				.type = QUIRK_AUDIO_STANDARD_INTERFACE
+			},
+			{
+				.ifnum = 5,
+				.type = QUIRK_AUDIO_STANDARD_INTERFACE
+			},
+			{
+				.ifnum = 6,
+				.type = QUIRK_IGNORE_INTERFACE
+			},
+			{
+				.ifnum = 7,
+				.type = QUIRK_AUDIO_STANDARD_INTERFACE
+			},
+			{
+				.ifnum = 8,
+				.type = QUIRK_AUDIO_STANDARD_INTERFACE
+			},
+			{
+				.ifnum = 9,
+				.type = QUIRK_MIDI_MIDIMAN,
+				.data = & (const snd_usb_midi_endpoint_info_t) {
+					.out_cables = 0x0001,
+					.in_cables  = 0x0001
+				}
+			},
+			{
+				.ifnum = -1
+			}
 		}
 	}
 },



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
#3 lore raw

That's interesting.

I have been unable to get inputs to work with jackd using a recent cvs. I'll update now.

Regards.

Quoting Clemens Ladisch <[email protected]>:

Quoted 160 lines
Quoted 4 lines · Patrick Shirkey

Quoting Michael Hoffer <[email protected]>:

Quoted 2 lines

bash-2.05b$ arecord -D quattro -f S24_3LE -r 96000 -c 2 -d 10 test.raw Recording WAVE 'test.raw' : Signed 24 bit Little Endian in 3bytes, Rate

96000

Quoted 2 lines
Quoted 2 lines

Hz, Stereo
arecord: set_params:854: Sample format non available

What sample formats appear in /proc/asound/cardX/stream0, 1?

Quoted 1 line

It's possible the alsa drivers you are using had a broken implementation.

I just committed a patch against 1.0.8 which should improve the behaviour in some cases (I don't know if it is related to this problem).

Clemens

--
Index: alsa-kernel/usb/usbaudio.h
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/usb/usbaudio.h,v retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36

usb/usbaudio.h +3 -0
@@ -157,6 +157,7 @@
 #define QUIRK_MIDI_STANDARD_INTERFACE	6
 #define QUIRK_AUDIO_EDIROL_UA700_UA25	7
 #define QUIRK_AUDIO_EDIROL_UA1000	8
+#define QUIRK_IGNORE_INTERFACE		9
 
 typedef struct snd_usb_audio_quirk snd_usb_audio_quirk_t;
 typedef struct snd_usb_midi_endpoint_info snd_usb_midi_endpoint_info_t;
@@ -190,6 +191,8 @@
 
 /* for QUIRK_AUDIO_EDIROL_UA700_UA25/UA1000, data is NULL */
 
+/* for QUIRK_IGNORE_INTERFACE, data is null */
+
 /*
  */
 

Index: alsa-kernel/usb/usbaudio.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/usb/usbaudio.c,v retrieving revision 1.113
retrieving revision 1.114
diff -u -r1.113 -r1.114

usb/usbaudio.c +2 -0
@@ -2977,6 +2977,8 @@
 		return create_ua700_ua25_quirk(chip, iface);
 	case QUIRK_AUDIO_EDIROL_UA1000:
 		return create_ua1000_quirk(chip, iface);
+	case QUIRK_IGNORE_INTERFACE:
+		return 0;
 	default:
 		snd_printd(KERN_ERR "invalid quirk type %d\n", quirk->type);
 		return -ENXIO;

Index: alsa-kernel/usb/usbquirks.h
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/usb/usbquirks.h,v retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39

usb/usbquirks.h +63 -5
@@ -876,6 +876,22 @@
 			 * but captured samples are big-endian (see usbaudio.c).
 			 */
 			{
+				.ifnum = 0,
+				.type = QUIRK_IGNORE_INTERFACE
+			},
+			{
+				.ifnum = 1,
+				.type = QUIRK_IGNORE_INTERFACE
+			},
+			{
+				.ifnum = 2,
+				.type = QUIRK_IGNORE_INTERFACE
+			},
+			{
+				.ifnum = 3,
+				.type = QUIRK_IGNORE_INTERFACE
+			},
+			{
 				.ifnum = 4,
 				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 			},
@@ -884,6 +900,10 @@
 				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 			},
 			{
+				.ifnum = 6,
+				.type = QUIRK_IGNORE_INTERFACE
+			},
+			{
 				.ifnum = 7,
 				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 			},
@@ -936,11 +956,56 @@
 	.driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
 		.vendor_name = "M-Audio",
 		.product_name = "OmniStudio",
-		.ifnum = 9,
-		.type = QUIRK_MIDI_MIDIMAN,
-		.data = & (const snd_usb_midi_endpoint_info_t) {
-			.out_cables = 0x0001,
-			.in_cables  = 0x0001
+		.ifnum = QUIRK_ANY_INTERFACE,
+		.type = QUIRK_COMPOSITE,
+		.data = & (const snd_usb_audio_quirk_t[]) {
+			{
+				.ifnum = 0,
+				.type = QUIRK_IGNORE_INTERFACE
+			},
+			{
+				.ifnum = 1,
+				.type = QUIRK_IGNORE_INTERFACE
+			},
+			{
+				.ifnum = 2,
+				.type = QUIRK_IGNORE_INTERFACE
+			},
+			{
+				.ifnum = 3,
+				.type = QUIRK_IGNORE_INTERFACE
+			},
+			{
+				.ifnum = 4,
+				.type = QUIRK_AUDIO_STANDARD_INTERFACE
+			},
+			{
+				.ifnum = 5,
+				.type = QUIRK_AUDIO_STANDARD_INTERFACE
+			},
+			{
+				.ifnum = 6,
+				.type = QUIRK_IGNORE_INTERFACE
+			},
+			{
+				.ifnum = 7,
+				.type = QUIRK_AUDIO_STANDARD_INTERFACE
+			},
+			{
+				.ifnum = 8,
+				.type = QUIRK_AUDIO_STANDARD_INTERFACE
+			},
+			{
+				.ifnum = 9,
+				.type = QUIRK_MIDI_MIDIMAN,
+				.data = & (const snd_usb_midi_endpoint_info_t) {

usb/usbquirks.h line 1011

Quoted 10 lines
usb/usbquirks.h +7 -0
+					.out_cables = 0x0001,
+					.in_cables  = 0x0001
+				}
+			},
+			{
+				.ifnum = -1
+			}
 		}
 	}
 },

--
Patrick Shirkey - Boost Hardware Ltd. Http://www.boosthardware.com Http://www.djcj.org/ - The Linux Audio Users guide Http://www.djcj.org/gigs - Gigs Guide Korea
========================================

Being on stage with the band in front of crowds shouting, "Get off! No! We want normal music!", I think that was more like acting than anything I've ever done.

Goldie, 8 Nov, 2002
The Scotsman

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt