Skip to contentSkip to conversation

snd-usb-usx2y 0.8.7: Use macro usb_maxpacket() for portability

PATCH Applied Karsten Wiese 4 participants 16 messages Dec 2, 2004 – Dec 10, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 snd-usb-usx2y 0.8.7: Use macro usb_maxpacket() for portability

Hi

on the usb-devel list there is a similar patch by David Brownell:
http://marc.theaimsgroup.com/?i=<200411281314.50175.david-b%20()%20pacbell%20!%20net>
David's patch doesn't compile on current kernel, so I wrote this one.

regards,
Karsten

patch header:

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

Summary: Use macro usb_maxpacket() for portability.

In future kernels struct usb_device won't have the epmaxpacketin/out members. Use macro usb_maxpacket() instead of directly accessing those members.

<<<<

Index: alsa-kernel/usb/usx2y/usbusx2y.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/usb/usx2y/usbusx2y.c,v retrieving revision 1.6

usb/usx2y/usbusx2y.c +5 -1
diff -U3 -r1.6 usbusx2y.c
@@ -1,6 +1,10 @@
 /*
  * usbusy2y.c - ALSA USB US-428 Driver
  *
+2004-12-02 Karsten Wiese
+	Version 0.8.7:
+	Use macro usb_maxpacket() for portability.
+
 2004-10-26 Karsten Wiese
 	Version 0.8.6:
 	wake_up() process waiting in usX2Y_urbs_start() on error.
@@ -135,7 +139,7 @@
 
 
 MODULE_AUTHOR("Karsten Wiese <[email protected]>");
-MODULE_DESCRIPTION("TASCAM "NAME_ALLCAPS" Version 0.8.6");
+MODULE_DESCRIPTION("TASCAM "NAME_ALLCAPS" Version 0.8.7");
 MODULE_LICENSE("GPL");
 MODULE_SUPPORTED_DEVICE("{{TASCAM(0x1604), "NAME_ALLCAPS"(0x8001)(0x8005)(0x8007) }}");
 

Index: alsa-kernel/usb/usx2y/usbusx2yaudio.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/usb/usx2y/usbusx2yaudio.c,v retrieving revision 1.6

usb/usx2y/usbusx2yaudio.c +12 -14
diff -U3 -r1.6 usbusx2yaudio.c
@@ -413,25 +413,23 @@
 static int usX2Y_urbs_allocate(snd_usX2Y_substream_t *subs)
 {
 	int i;
-	unsigned int datapipe;  		/* the data i/o pipe */
+	unsigned int pipe;
 	int is_playback = subs == subs->usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK];
 	struct usb_device *dev = subs->usX2Y->chip.dev;
 
-	if (is_playback) {	/* allocate a temporary buffer for playback */
-		datapipe = usb_sndisocpipe(dev, subs->endpoint);
-		subs->maxpacksize = dev->epmaxpacketout[subs->endpoint];
+	pipe = is_playback ? usb_sndisocpipe(dev, subs->endpoint) :
+			usb_rcvisocpipe(dev, subs->endpoint);
+	subs->maxpacksize = usb_maxpacket(dev, pipe, is_playback);
+	if (!subs->maxpacksize)
+		return -EINVAL;
+
+	if (is_playback && NULL == subs->tmpbuf) {	/* allocate a temporary buffer for playback */
+		subs->tmpbuf = kcalloc(nr_of_packs(), subs->maxpacksize, GFP_KERNEL);
 		if (NULL == subs->tmpbuf) {
-			subs->tmpbuf = kcalloc(nr_of_packs(), subs->maxpacksize, GFP_KERNEL);
-			if (NULL == subs->tmpbuf) {
-				snd_printk(KERN_ERR "cannot malloc tmpbuf\n");
-				return -ENOMEM;
-			}
+			snd_printk(KERN_ERR "cannot malloc tmpbuf\n");
+			return -ENOMEM;
 		}
-	} else {
-		datapipe = usb_rcvisocpipe(dev, subs->endpoint);
-		subs->maxpacksize = dev->epmaxpacketin[subs->endpoint];
 	}
-
 	/* allocate and initialize data urbs */
 	for (i = 0; i < NRURBS; i++) {
 		struct urb** purb = subs->urb + i;
@@ -453,7 +451,7 @@
 			}
 		}
 		(*purb)->dev = dev;
-		(*purb)->pipe = datapipe;
+		(*purb)->pipe = pipe;
 		(*purb)->number_of_packets = nr_of_packs();
 		(*purb)->context = subs;
 		(*purb)->interval = 1;
Applied
#1 lore raw

At Thu, 2 Dec 2004 13:19:19 +0100,

Quoted 6 lines · Karsten Wiese

Hi

on the usb-devel list there is a similar patch by David Brownell:
http://marc.theaimsgroup.com/?i=<200411281314.50175.david-b%20()%20pacbell%20!%20net>
David's patch doesn't compile on current kernel, so I wrote this one.

Thanks, applied to CVS.

BTW, do you have the latest hwdep-pcm paptch to apply to CVS, too?

Takashi

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/

#2 lore raw

Am Donnerstag 02 Dezember 2004 15:42 schrieb Takashi Iwai:

Quoted 2 lines

BTW, do you have the latest hwdep-pcm paptch to apply to CVS, too?

This is it.

Karsten

patch header:

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

Summary: hwdep interface for pcm data.

Implements "rawusb" pcm data transfer through hwdep interface:
The usb_hcd reads/writes pcm data from/into dma-memory.
That memory is mmaped by jack's usx2y driver.
Jack's usx2y driver is the first/last to read/write pcm data. Read/write is a combination of power of 2 period shaping and float/int conversation. Compared to standard alsa/jack we leave out power of 2 period shaping inside snd-usb-usx2y which needs memcpy() and additional buffers.
As a side effect possible unwanted pcm-data coruption resulting of standard alsa's snd-usb-usx2y period shaping scheme falls away.
Result is sane jack operation at buffering schemes down to 128frames, 2 periods.

<<<<

#3 lore raw

At Mon, 6 Dec 2004 23:15:01 +0100,

Quoted 6 lines · Karsten Wiese

Am Donnerstag 02 Dezember 2004 15:42 schrieb Takashi Iwai:

Quoted 2 lines

BTW, do you have the latest hwdep-pcm paptch to apply to CVS, too?

This is it.

A part of patches seems missing. I got:

usx2yhwdeppcm.c: In function `usX2Y_usbpcm_urb_capt_retire':
usx2yhwdeppcm.c:77: error: structure has no member named `hwdep_pcm_shm'
...

The code looks almost fine. I found some strange coding style occasinally (e.g. unnecessary block in a function or a goto-jump into the if-branch). The fixed usx2yhwdeppcm.c is attached below. Also, the patch file which would be needed for alsa-driver tree is below, too.

In addition, two things I'd like to request you to change.

1. handling of pcm streams in usX2Y_reset() and
snd_usX2Y_hwdep_pcm_open()

It's quite hacky. It'd be simpler to create another PCM instances for hwdep PCM.

For example, when hwdep is opened and mmapped, only hwdep-pcm is allowed, i.e. access to the normal PCM would result in -EBUSY. OTOH, when hwdep is closed, hwdep-pcm would return -EBUSY. Also, hwdep should return -EBUSY if pcm is already running.

2. RAM mmap support

The RAM mmap would work only on certain architectures. For example, it won't work properly on ARM.
You should add some ifdefs, or more restriction in Kconfig. (This is true for the other hwdep mmap, too.)

Takashi

usx2yhwdeppcm.c renamed from ../alsa-kernel/usb/usx2y/usx2yhwdeppcm.c +19 -0
@@ -1,3 +1,14 @@
+#include <linux/config.h>
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,5)
+#define SND_NEED_USB_SET_INTERFACE
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+#define SND_NEED_USB_WRAPPER
+#endif
+#define __NO_VERSION__
+#endif
+
 /*
  *   This program is free software; you can redistribute it and/or modify
  *   it under the terms of the GNU General Public License as published by
@@ -226,7 +237,11 @@
 }
 
 
+#ifndef OLD_USB
 static void i_usX2Y_usbpcm_urb_complete(struct urb *urb, struct pt_regs *regs)
+#else
+static void i_usX2Y_usbpcm_urb_complete(struct urb *urb)
+#endif
 {
 	snd_usX2Y_substream_t *subs = (snd_usX2Y_substream_t*)urb->context;
 	usX2Ydev_t *usX2Y = subs->usX2Y;
@@ -308,7 +323,11 @@
 		wake_up(&usX2Y->prepare_wait_queue);
 	}
 
+#ifndef OLD_USB
 	i_usX2Y_usbpcm_urb_complete(urb, regs);
+#else
+	i_usX2Y_usbpcm_urb_complete(urb);
+#endif
 }
 
 /*
#4 lore raw

Am Dienstag 07 Dezember 2004 12:48 schrieb Takashi Iwai:

Quoted 5 lines

A part of patches seems missing. I got:

usx2yhwdeppcm.c: In function `usX2Y_usbpcm_urb_capt_retire':
usx2yhwdeppcm.c:77: error: structure has no member named `hwdep_pcm_shm'
...

oops, this patch should be complete now.

Quoted 7 lines

The code looks almost fine. I found some strange coding style occasinally (e.g. unnecessary block in a function or a goto-jump into the if-branch). The fixed usx2yhwdeppcm.c is attached below. Also, the patch file which would be needed for alsa-driver tree is below, too.

This patch is based on your usx2yhwdeppcm.c.

Quoted 7 lines

In addition, two things I'd like to request you to change.

1. handling of pcm streams in usX2Y_reset() and
snd_usX2Y_hwdep_pcm_open()

Quoted 7 lines

It's quite hacky. It'd be simpler to create another PCM instances for hwdep PCM.

For example, when hwdep is opened and mmapped, only hwdep-pcm is allowed, i.e. access to the normal PCM would result in -EBUSY. OTOH, when hwdep is closed, hwdep-pcm would return -EBUSY. Also, hwdep should return -EBUSY if pcm is already running.

Ok, done.
To use it now, jackd is started like this:

$ jackd -R -dusx2y -dhw:1,2 -r44100 -p128 -n2
The important difference is the ",2".
Quoted 7 lines

2. RAM mmap support

The RAM mmap would work only on certain architectures. For example, it won't work properly on ARM.
You should add some ifdefs, or more restriction in Kconfig. (This is true for the other hwdep mmap, too.)

snd-usb-usx2y now depends on X86 || PPC || ALPHA.

slightly corrected patch header:

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

Summary: hwdep interface for pcm data.

Implements "rawusb" pcm data transfer through hwdep interface:
The usb_hc moves pcm data from/into memory via DMA.
That memory is mmaped by jack's usx2y driver.
Jack's usx2y driver is the first/last executable code to read/write pcm data. Read/write is a combination of power of 2 period shaping and float/int conversation. Compared to standard alsa/jack we leave out power of 2 period shaping
inside snd-usb-usx2y which needs memcpy() and additional buffers.
As a side effect possible unwanted pcm-data coruption resulting of
standard alsa's snd-usb-usx2y period shaping scheme falls away.
Result is sane jack operation at buffering schemes down to 128frames, 2 periods. Also changed Kconfig file, so snd-usb-usx2y is only available for X86, PPC or ALPHA platforms, as on others DMA-memory isn't mmapable.

<<<<

Karsten

Applied
#5 lore raw

At Tue, 7 Dec 2004 23:01:51 +0100,

Quoted 17 lines · Karsten Wiese
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Summary: hwdep interface for pcm data.

Implements "rawusb" pcm data transfer through hwdep interface:
The usb_hc moves pcm data from/into memory via DMA.
That memory is mmaped by jack's usx2y driver.
Jack's usx2y driver is the first/last executable code to read/write pcm data. Read/write is a combination of power of 2 period shaping and float/int conversation. Compared to standard alsa/jack we leave out power of 2 period shaping
inside snd-usb-usx2y which needs memcpy() and additional buffers.
As a side effect possible unwanted pcm-data coruption resulting of
standard alsa's snd-usb-usx2y period shaping scheme falls away.
Result is sane jack operation at buffering schemes down to 128frames, 2 periods. Also changed Kconfig file, so snd-usb-usx2y is only available for X86, PPC or ALPHA platforms, as on others DMA-memory isn't mmapable.

Quoted 2 lines

<<<<

Thanks, applied to the CVS tree now.
Please check later whether it works for you...

Takashi

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/

#6 lore raw
Quoted 19 lines · Takashi Iwai

At Tue, 7 Dec 2004 23:01:51 +0100,

Quoted 17 lines · Karsten Wiese
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Summary: hwdep interface for pcm data.

Implements "rawusb" pcm data transfer through hwdep interface:
The usb_hc moves pcm data from/into memory via DMA.
That memory is mmaped by jack's usx2y driver.
Jack's usx2y driver is the first/last executable code to read/write pcm data. Read/write is a combination of power of 2 period shaping and float/int conversation. Compared to standard alsa/jack we leave out power of 2 period shaping
inside snd-usb-usx2y which needs memcpy() and additional buffers.
As a side effect possible unwanted pcm-data coruption resulting of
standard alsa's snd-usb-usx2y period shaping scheme falls away.
Result is sane jack operation at buffering schemes down to 128frames, 2 periods. Also changed Kconfig file, so snd-usb-usx2y is only available for X86, PPC or ALPHA platforms, as on others DMA-memory isn't mmapable.

Quoted 5 lines
Quoted 2 lines

<<<<

Thanks, applied to the CVS tree now.
Please check later whether it works for you...

My feeling is that it's against all we're trying to do with the PCM interface. Cannot we extend/optimize the current PCM API? Using hwdep for PCM data transfers seems very ugly. We can add a new special access method for example for URBs etc. I think that we will have exactly similar problem with Bluetooth and Firewire.

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/

#7 lore raw

At Thu, 9 Dec 2004 09:18:04 +0100 (CET),

Quoted 22 lines · Jaroslav
Quoted 19 lines · Takashi Iwai

At Tue, 7 Dec 2004 23:01:51 +0100,

Quoted 17 lines · Karsten Wiese
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Summary: hwdep interface for pcm data.

Implements "rawusb" pcm data transfer through hwdep interface:
The usb_hc moves pcm data from/into memory via DMA.
That memory is mmaped by jack's usx2y driver.
Jack's usx2y driver is the first/last executable code to read/write pcm data. Read/write is a combination of power of 2 period shaping and float/int conversation. Compared to standard alsa/jack we leave out power of 2 period shaping
inside snd-usb-usx2y which needs memcpy() and additional buffers.
As a side effect possible unwanted pcm-data coruption resulting of
standard alsa's snd-usb-usx2y period shaping scheme falls away.
Result is sane jack operation at buffering schemes down to 128frames, 2 periods. Also changed Kconfig file, so snd-usb-usx2y is only available for X86, PPC or ALPHA platforms, as on others DMA-memory isn't mmapable.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

<<<<

Thanks, applied to the CVS tree now.
Please check later whether it works for you...

My feeling is that it's against all we're trying to do with the PCM interface. Cannot we extend/optimize the current PCM API?

Don't worry, in the new patch, the hwdep does actually only mmap. The others are done with the usual PCM API.

The implementation is still a bit tricky, IMO, though. We can generalize this if there would be more wide needs for such stuff.

Takashi

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/

#8 lore raw
In reply to Takashi Iwai

Am Mittwoch 08 Dezember 2004 20:32 schrieb Takashi Iwai:

Quoted 19 lines

At Tue, 7 Dec 2004 23:01:51 +0100,

Quoted 17 lines · Karsten Wiese
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Summary: hwdep interface for pcm data.

Implements "rawusb" pcm data transfer through hwdep interface:
The usb_hc moves pcm data from/into memory via DMA.
That memory is mmaped by jack's usx2y driver.
Jack's usx2y driver is the first/last executable code to read/write pcm data. Read/write is a combination of power of 2 period shaping and float/int conversation. Compared to standard alsa/jack we leave out power of 2 period shaping
inside snd-usb-usx2y which needs memcpy() and additional buffers.
As a side effect possible unwanted pcm-data coruption resulting of
standard alsa's snd-usb-usx2y period shaping scheme falls away.
Result is sane jack operation at buffering schemes down to 128frames, 2 periods. Also changed Kconfig file, so snd-usb-usx2y is only available for X86, PPC or ALPHA platforms, as on others DMA-memory isn't mmapable.

Quoted 5 lines
Quoted 2 lines

<<<<

Thanks, applied to the CVS tree now.
Please check later whether it works for you...

May I ask you to check CVS's version?
Keep in mind that jackd is now called like:

$ jackd -dusx2y -dhw:1,2
You might also change qjackctl to always append ",2" to the hw device in the usx2y case.

thanks,
Karsten

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/

#9 lore raw
Quoted 5 lines

May I ask you to check CVS's version?
Keep in mind that jackd is now called like:

$ jackd -dusx2y -dhw:1,2
You might also change qjackctl to always append ",2" to the hw device in

the usx2y case.

Quoted 1 line

Oh oh. Tried with alsa-kernel+driver CVS as of yesterday...

First thing:

- Missing SNDRV_HWDEP_IFACE_USX2Y_PCM definition (used to be defined under asound.h on the pre-CVS 0.8.6 prototypes)

Signature · 13 lines
rncbc aka Rui Nuno Capela
[email protected]






-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
#10 lore raw

At Fri, 10 Dec 2004 15:57:22 -0000 (WET),

Quoted 9 lines · Rui Nuno Capela
Quoted 6 lines

May I ask you to check CVS's version?
Keep in mind that jackd is now called like:

$ jackd -dusx2y -dhw:1,2
You might also change qjackctl to always append ",2" to the hw device in

the usx2y case.

Quoted 1 line
Quoted 6 lines

Oh oh. Tried with alsa-kernel+driver CVS as of yesterday...

First thing:

- Missing SNDRV_HWDEP_IFACE_USX2Y_PCM definition (used to be defined under asound.h on the pre-CVS 0.8.6 prototypes)

Already fixed.

Takashi

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/

#11 lore raw
Quoted 10 lines · Takashi Iwai
Quoted 9 lines · Rui Nuno Capela
Quoted 8 lines

May I ask you to check CVS's version?
Keep in mind that jackd is now called like:

$ jackd -dusx2y -dhw:1,2
You might also change qjackctl to always append ",2" to the hw device
in the usx2y case.
Quoted 9 lines
Quoted 6 lines

Oh oh. Tried with alsa-kernel+driver CVS as of yesterday...

First thing:

- Missing SNDRV_HWDEP_IFACE_USX2Y_PCM definition (used to be defined under asound.h on the pre-CVS 0.8.6 prototypes)

Already fixed.

Thanks. I've fixed myself and went on... and it doesn't seem to be working at all: I get complaints about non existing /dev/snd/pcmC1D2c and /dev/snd/pcmC1D2p devices. That is, it fails whether I enter:
aplay -D hw:1,2 somefile.wav
or:
jackd -R -dusx2y -dhw:1,2 -r44100 -p128 -n2

OTOH if I issue the good old jackd command line:
jackd -R -dusx2y -dhw:1 -r44100 -p128 -n2
the complaint is:
jackd: hwdep.c:263: snd_hwdep_poll_descriptors: Assertion 'hwdep' failed.

However, it works barely on this regular one:
jackd -R -dalsa -dhw:1 -r44100 -p1024 -n2

All this to the bottom-line: this 0.8.7 seems broken, I'll revert to my own functional 0.8.6, for the time being ;)

Just for the record here goes some status info:

# cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.7.
Compiled on Dec 10 2004 for kernel 2.6.10-rc2-mm3-RT-V0.7.32-17.0.
# cat /proc/asound/cards
0 [A5451          ]: ALI5451 - ALI 5451
                     ALI 5451 at 0x1000, irq 5
1 [USX2Y          ]: USB US-X2Y - TASCAM US-X2Y
                     TASCAM US-X2Y (1604:8005 if 0 at 001/003)
# cat /proc/asound/devices
  0: [0- 0]: ctl
 16: [0- 0]: digital audio playback
 24: [0- 0]: digital audio capture
  1:       : sequencer
 33:       : timer
 32: [1- 0]: ctl
 36: [1- 0]: hardware dependent
 48: [1- 0]: digital audio playback
 56: [1- 0]: digital audio capture
 40: [1- 0]: raw midi
# cat /proc/asound/hwdep
01-00: /proc/bus/usb/001/003
# cat /proc/asound/pcm
00-00: ALI 5451 : ALI 5451 : playback 32 : capture 1
01-00: US-X2Y Audio : US-X2Y Audio #0 : playback 1 : capture 1

Bye now. bbl

Signature · 10 lines
rncbc aka Rui Nuno Capela
[email protected]



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
#12 lore raw

At Fri, 10 Dec 2004 17:42:22 -0000 (WET),

Quoted 19 lines · Rui Nuno Capela
Quoted 17 lines · Takashi Iwai
Quoted 15 lines · Rui Nuno Capela
Quoted 8 lines

May I ask you to check CVS's version?
Keep in mind that jackd is now called like:

$ jackd -dusx2y -dhw:1,2
You might also change qjackctl to always append ",2" to the hw device
in the usx2y case.

Oh oh. Tried with alsa-kernel+driver CVS as of yesterday...

First thing:

- Missing SNDRV_HWDEP_IFACE_USX2Y_PCM definition (used to be defined under asound.h on the pre-CVS 0.8.6 prototypes)

Quoted 6 lines
Quoted 2 lines

Already fixed.

Thanks. I've fixed myself and went on... and it doesn't seem to be working at all: I get complaints about non existing /dev/snd/pcmC1D2c and /dev/snd/pcmC1D2p devices. That is, it fails whether I enter:

Did you pass nrpacks=1 module option?
Otherwise the pcm won't be created.

Takashi

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/

#13 lore raw
Quoted 20 lines · Takashi Iwai
Quoted 19 lines · Rui Nuno Capela
Quoted 18 lines
Quoted 9 lines
Quoted 8 lines

May I ask you to check CVS's version?
Keep in mind that jackd is now called like:

$ jackd -dusx2y -dhw:1,2
You might also change qjackctl to always append ",2" to the hw
device in the usx2y case.
Quoted 6 lines

Oh oh. Tried with alsa-kernel+driver CVS as of yesterday...

First thing:

- Missing SNDRV_HWDEP_IFACE_USX2Y_PCM definition (used to be defined under asound.h on the pre-CVS 0.8.6 prototypes)

Already fixed.

Quoted 8 lines
Quoted 4 lines

Thanks. I've fixed myself and went on... and it doesn't seem to be working
at all: I get complaints about non existing /dev/snd/pcmC1D2c and /dev/snd/pcmC1D2p devices. That is, it fails whether I enter:

Did you pass nrpacks=1 module option?
Otherwise the pcm won't be created.

Duh? Yet another magic spell?

OK. Wired the nrpacks=1 on the options snd-usb-usx2y line in /etc/modprobe.conf and things are working now.

Thanks for the help, Takashi-san.

All these magic numbers builds for the urge of some documentation or is it about to change in the near future? In another words, is that really necessary?

Take care.

Signature · 10 lines
rncbc aka Rui Nuno Capela
[email protected]



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
#14 lore raw

At Fri, 10 Dec 2004 18:18:56 -0000 (WET),

Quoted 33 lines · Rui Nuno Capela
Quoted 20 lines · Takashi Iwai
Quoted 19 lines · Rui Nuno Capela
Quoted 18 lines
Quoted 9 lines
Quoted 8 lines

May I ask you to check CVS's version?
Keep in mind that jackd is now called like:

$ jackd -dusx2y -dhw:1,2
You might also change qjackctl to always append ",2" to the hw
device in the usx2y case.
Quoted 6 lines

Oh oh. Tried with alsa-kernel+driver CVS as of yesterday...

First thing:

- Missing SNDRV_HWDEP_IFACE_USX2Y_PCM definition (used to be defined under asound.h on the pre-CVS 0.8.6 prototypes)

Already fixed.

Quoted 8 lines
Quoted 4 lines

Thanks. I've fixed myself and went on... and it doesn't seem to be working
at all: I get complaints about non existing /dev/snd/pcmC1D2c and /dev/snd/pcmC1D2p devices. That is, it fails whether I enter:

Did you pass nrpacks=1 module option?
Otherwise the pcm won't be created.

Duh? Yet another magic spell?

Quoted 8 lines

OK. Wired the nrpacks=1 on the options snd-usb-usx2y line in /etc/modprobe.conf and things are working now.

Thanks for the help, Takashi-san.

All these magic numbers builds for the urge of some documentation or is it about to change in the near future? In another words, is that really necessary?

The current code requires that condition. Though, it'd be possible to solve this restriction including the more better merge with the normal audio mode.

Better to ask Karsten ;)

Takashi

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/

#15 lore raw

Takashi Iwai wrote

Quoted 17 lines
Quoted 7 lines · Rui Nuno Capela
Quoted 4 lines

Did you pass nrpacks=1 module option?
Otherwise the pcm won't be created.

Duh? Yet another magic spell?

Quoted 8 lines

OK. Wired the nrpacks=1 on the options snd-usb-usx2y line in /etc/modprobe.conf and things are working now.

Thanks for the help, Takashi-san.

All these magic numbers builds for the urge of some documentation or is it about to change in the near future? In another words, is that really necessary?

Quoted 6 lines

The current code requires that condition. Though, it'd be possible to solve this restriction including the more better merge with the normal audio mode.

Better to ask Karsten ;)

Although this new hwdep pcm interface may seem tricky, when engaged with the corresponding jackd backend on a Ingo's RT patched kernel it works as never before.

This is my personal low-latency record using a USB audio device and jackd:

    jackd -R -dusx2y -dhw:1,2 -r44100 -p64 -n2

with a couple (yes, only 2) xruns in 60 minutes, mainly due to extra app desktop loading (KDE), running 2.6.10-rc2-mm3-RT-V0.7.32-18 on my [email protected] laptop.

Things' are getting brighter all the time.
Thanks Karsten, Takashi. Now let's get this less esotheric, would we?

Things to care about next, IMO:
- merge of this new hwdep interface into the mainstream ALSA usb audio module code, or whatever.
- lobbying for official integration in the JACK alsa backend; it would be just great if it could be merged in the current alsa backend driver, instead on a cloned one.

You can take a look by my personal homeserver:

    http://www.rncbc.org/usx2y/

where you can find custom jack tarballs and RPMs (for SUSE 9.2 and Mdk 10.1, x86 only)

Bye now.

Signature · 10 lines
rncbc aka Rui Nuno Capela
[email protected]



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/