Skip to contentSkip to conversation

USB224_usbsnoop1.log captured on WinXP

PATCH Karsten Wiese 2 participants 9 messages Apr 2, 2004 – Apr 6, 2004

lore
Share & tools
lore
#0 lore raw

It shows the same light switching as is already implemented:

	grep -n ": 19" USB224_usbsnoop1.log 
gives us pre INPUT MONITOR pressed
	21501:    00000000: 19 00 1a 00 1b 00 1c 00 1d 11 1e 00 1f 00
and post
	21941:    00000000: 19 00 1a 00 1b 00 1c 02 1d 01 1e 00 1f 00

the 8th byte changing from 0 to 2 is the actual INPUT MONITOR Led switch on.

see us428control:

	void us428_lights::init_us428_lights()
	void us428_lights::LightSet(eLight L, bool Value)
with
	enum eLight{
		eL_InputMonitor = 25
	};

the same urb as in the log should be sent to the us224 on linux. for the us428 it works. not for the us224.

So please try the following patch:

Quoted 1 line
Quoted 1 line
Quoted 1 line
usb/usx2y/usbusx2yaudio.c +1 -1
@@ -1245,7 +1245,7 @@
 	    					     snd_dma_continuous_data(GFP_KERNEL),
 						     usX2Y_capt_substream->endpoints * 64*1024,
 						     usX2Y_capt_substream->endpoints * 128*1024)) ||
-	    (usX2Y(card)->chip.dev->descriptor.idProduct == USB_ID_US428 &&
+	    (usX2Y(card)->chip.dev->descriptor.idProduct != USB_ID_US122 &&
 	     0 > (err = usX2Y_rate_set(usX2Y_stream, 44100)))) {	// Lets us428 

recognize output-volume settings, disturbs us122.
snd_usX2Y_audio_stream_free(usX2Y_stream); return err;
<<<

if the us428 doesn't get the "usX2Y_rate_set(usX2Y_stream, 44100)" at startup, it later behaves ignorant to light & volume setting. like us224 behaves now.

If we get the INPUT MONITOR Led enlightened, the Volume settings should also work with respect to direct monitoring at least.
US224 Master Fader seams to b where US428's Fader5 is. That needs adjustment in us428control.

The data sent to set us224 internal mixers is filtered out with

	grep -n "00: 0[0123456789] .. .. .. ..$" USB224_usbsnoop1.log
it gives i. e.:
	11721:    00000000: 00 00 25 00 25
	11732:    00000000: 01 00 25 00 25
	11743:    00000000: 02 00 25 00 25
	11754:    00000000: 03 00 25 00 25
	11831:    00000000: 04 00 42 00 42

look at struct usX2Y_volume and its methods. it should fit the us224. But lets get that Leds enlighted first :-)

Cheers,
Karsten

-------------------------------------------------------
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=1470&alloc_id=3638&op=click

#1 lore raw

Tascam US-224 progress report (was: USB224_usbsnoop1.log captured on WinXP)

I have news, and they're good this time.

After some juggling and persistance around compiling and patching the snd-usb-usx2y module, I've finally got that dreaded INPUT MONITOR LED come to light and, as Karsten rightly predicted, playback has shown its ugly head on my Tascam US-224. Hip, hip, hurray!

Like a miracle, the MUTE and SELECT LED lights of the mixer strips 1-4 are lightning up too. Again, Karsten tips are quite cirurgical :)

However, I don't get the SOLO, REC, NULL, nor all other transport LEDs to lit. But that's yet another step, I think the next.

We're getting near and I'm quite happier now.

Quoted 17 lines · Karsten Wiese

So please try the following patch:

Quoted 1 line
Quoted 1 line
Quoted 1 line
usb/usx2y/usbusx2yaudio.c +1 -1
@@ -1245,7 +1245,7 @@
 	    					     snd_dma_continuous_data(GFP_KERNEL),
 						     usX2Y_capt_substream->endpoints * 64*1024,
 						     usX2Y_capt_substream->endpoints * 128*1024)) ||
-	    (usX2Y(card)->chip.dev->descriptor.idProduct == USB_ID_US428 &&
+	    (usX2Y(card)->chip.dev->descriptor.idProduct != USB_ID_US122 &&
 	     0 > (err = usX2Y_rate_set(usX2Y_stream, 44100)))) {	// Lets us428

recognize output-volume settings, disturbs us122.

usb/usx2y/usbusx2yaudio.c +0 -0
 		snd_usX2Y_audio_stream_free(usX2Y_stream);
 		return err;

<<<

Quoted 4 lines

if the us428 doesn't get the "usX2Y_rate_set(usX2Y_stream, 44100)" at startup, it later behaves ignorant to light & volume setting. like us224 behaves now.

That was it. Although I only got it working after one last alsa-driver-1.0.3 rebuild and when set --with-debug=full on ./configure. Kind of strange. My literal patch applied to stock alsa-driver-1.0.3 is on attachment. It is just the same of Karsten's supplied above, just for reference.

Quoted 14 lines

If we get the INPUT MONITOR Led enlightened, the Volume settings should also work with respect to direct monitoring at least. US224 Master Fader seams to b where US428's Fader5 is. That needs adjustment in s428control.

The data sent to set us224 internal mixers is filtered out with

	grep -n "00: 0[0123456789] .. .. .. ..$" USB224_usbsnoop1.log
it gives i. e.:
	11721:    00000000: 00 00 25 00 25
	11732:    00000000: 01 00 25 00 25
	11743:    00000000: 02 00 25 00 25
	11754:    00000000: 03 00 25 00 25
	11831:    00000000: 04 00 42 00 42
Quoted 3 lines

look at struct usX2Y_volume and its methods. it should fit the us224. But lets get that Leds enlighted first :-)

The master fader works, at least while on playback. I don't seem to get fader strips 1-4 to have any audible effect. But now's too early to judge my experiments.

Other issues are now just emerging... rest assured ;)

Thanks a lot Karsten, your help and advice is priceless.

CU

Signature · 2 lines
rncbc aka Rui Nuno Capela
[email protected]
#2 lore raw

Re: Tascam US-224 progress report (was: USB224_usbsnoop1.log captured on WinXP)

Am Samstag 03 April 2004 03:24 schrieb Rui Nuno Capela:

Quoted 7 lines

I have news, and they're good this time.

After some juggling and persistance around compiling and patching the snd-usb-usx2y module, I've finally got that dreaded INPUT MONITOR LED come to light and, as Karsten rightly predicted, playback has shown its ugly head on my Tascam US-224. Hip, hip, hurray!

Quoted 5 lines

Like a miracle, the MUTE and SELECT LED lights of the mixer strips 1-4 are lightning up too. Again, Karsten tips are quite cirurgical :)

However, I don't get the SOLO, REC, NULL, nor all other transport LEDs to lit. But that's yet another step, I think the next.

Ok, go for it. Should be fairly easy. Just implement the sink-side of the alsa-sequencer interface in us428control ;-)
erm.... no it is not implemented yet.
The Transport Lights could react to MMC Messages.
MUTE, REC, SOLO & SELECT Lights would be controlled by i. e. ardour. NULL-Mode is a little more complicated:
In INPUT MONITOR Mode us428control knows all to handle it.
In not INPUT MONITOR Mode us428control has to know from i. e. Ardour the Mixer Settings to compare them with the actual state.

Quoted 20 lines

We're getting near and I'm quite happier now.

Quoted 16 lines · Karsten Wiese

So please try the following patch:

usb/usx2y/usbusx2yaudio.c +1 -1
@@ -1245,7 +1245,7 @@
 	    					     snd_dma_continuous_data(GFP_KERNEL),
 						     usX2Y_capt_substream->endpoints * 64*1024,
 						     usX2Y_capt_substream->endpoints * 128*1024)) ||
-	    (usX2Y(card)->chip.dev->descriptor.idProduct == USB_ID_US428 &&
+	    (usX2Y(card)->chip.dev->descriptor.idProduct != USB_ID_US122 &&
 	     0 > (err = usX2Y_rate_set(usX2Y_stream, 44100)))) {	// Lets us428

recognize output-volume settings, disturbs us122.

usb/usx2y/usbusx2yaudio.c +0 -0
 		snd_usX2Y_audio_stream_free(usX2Y_stream);
 		return err;

<<<

Quoted 9 lines
Quoted 3 lines

if the us428 doesn't get the "usX2Y_rate_set(usX2Y_stream, 44100)" at startup, it later behaves ignorant to light & volume setting. like us224 behaves now.

That was it. Although I only got it working after one last alsa-driver-1.0.3 rebuild and when set --with-debug=full on ./configure. Kind of strange. My literal patch applied to stock alsa-driver-1.0.3 is on attachment. It is just the same of Karsten's supplied above, just for reference.

Please make shure it also works without debug mode. after make clean.

Quoted 15 lines
Quoted 15 lines

If we get the INPUT MONITOR Led enlightened, the Volume settings should also work with respect to direct monitoring at least. US224 Master Fader seams to b where US428's Fader5 is. That needs adjustment in s428control.

The data sent to set us224 internal mixers is filtered out with

	grep -n "00: 0[0123456789] .. .. .. ..$" USB224_usbsnoop1.log
it gives i. e.:
	11721:    00000000: 00 00 25 00 25
	11732:    00000000: 01 00 25 00 25
	11743:    00000000: 02 00 25 00 25
	11754:    00000000: 03 00 25 00 25
	11831:    00000000: 04 00 42 00 42
Quoted 6 lines
Quoted 2 lines

look at struct usX2Y_volume and its methods. it should fit the us224. But lets get that Leds enlighted first :-)

The master fader works, at least while on playback. I don't seem to get fader strips 1-4 to have any audible effect. But now's too early to judge my experiments.

Is Direct Monitoring not working? Please try. Has the us224 got SPDIF besides the 2 Anolog Ins?
I'm wondering why there are 5 internal mixers being set.
4 should be PCM from usb,
0 shold be Chanell A Monitor and
1 shold be Chanell B Monitor
What are 2 and 3?

CU

-------------------------------------------------------
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=1470&alloc_id=3638&op=click

#3 lore raw

Re: Re: Tascam US-224 progress report (was: USB224_usbsnoop1.log captured on WinXP)

Quoted 12 lines · Karsten Wiese

Am Samstag 03 April 2004 03:24 schrieb Rui Nuno Capela:

Quoted 10 lines

I have news, and they're good this time.
After some juggling and persistance around compiling and patching the snd-usb-usx2y module, I've finally got that dreaded INPUT MONITOR LED come to light and, as Karsten rightly prehome/rncbc/dicted, playback has shown its ugly head on my Tascam US-224. Hip, hip, hurray!

Like a miracle, the MUTE and SELECT LED lights of the mixer strips 1-4 are lightning up too. Again, Karsten tips are quite cirurgical :) However, I don't get the SOLO, REC, NULL, nor all other transport LEDs to lit. But that's yet another step, I think the next.

Quoted 6 lines

Ok, go for it. Should be fairly easy. Just implement the sink-side of the alsa-sequencer interface in us428control ;-)
erm.... no it is not implemented yet.
The Transport Lights could react to MMC Messages.
MUTE, REC, SOLO & SELECT Lights would be controlled by i. e. ardour.

Oh yeah? That's great, but I'm afraid my ardour is still with it's default configuration (trident anyone?). Does anybody have a quick and dirty "solution" on how to change this? Please forgive my idleness :)

Quoted 6 lines

NULL-Mode is a little more complicated:
In INPUT MONITOR Mode us428control knows all to handle it. In not INPUT MONITOR Mode us428control has to know from i. e. Ardour the Mixer Settings to compare them with the actual state.

I don't even have a clear idea on whether this NULL-mode is all about, so let's leave it for a little bit later, OK? :)

Quoted 3 lines

Please make shure it also works without debug mode. after make clean.

Now comes the weird part. No, I couldn't get it to work unless I set --with-debug=full on configure line. And I've tested several times, believe me.

FYI, I'm stick with 2.6 kernel tree, and already tested with 2.6.4 and latest 2.6.5.

My way of building the kernel modules is from stock tarball, and is pretty canonical, as literally as follows (all as root):

tar -jxf alsa-driver-1.0.4.tar.bz2
cd alsa-driver-1.0.4
gzip -dc ../alsa-driver-1.0.4p1.patch.gz # see attachment
./configure --with-isapnp=no --with-sequencer=yes --with-oss=yes
--with-cards=all --with-debug=full
make
make install

As stated, the INPUT MONITOR LED does not get lit if I take out the clause --with-debug=full.

How come?

Signature · 2 lines
rncbc aka Rui Nuno Capela
[email protected]
#4 lore raw

Re: Re: Tascam US-224 progress report (was: USB224_usbsnoop1.log captured on WinXP)

Am Dienstag 06 April 2004 02:10 schrieb Rui Nuno Capela:

Quoted 18 lines

Now comes the weird part. No, I couldn't get it to work unless I set --with-debug=full on configure line. And I've tested several times, believe me.

FYI, I'm stick with 2.6 kernel tree, and already tested with 2.6.4 and latest 2.6.5.

My way of building the kernel modules is from stock tarball, and is pretty canonical, as literally as follows (all as root):

tar -jxf alsa-driver-1.0.4.tar.bz2
cd alsa-driver-1.0.4
gzip -dc ../alsa-driver-1.0.4p1.patch.gz # see attachment
./configure --with-isapnp=no --with-sequencer=yes --with-oss=yes
--with-cards=all --with-debug=full
make
make install

Quoted 4 lines

As stated, the INPUT MONITOR LED does not get lit if I take out the clause --with-debug=full.

How come?

You don't use --with-kernel option.
Are you shure ALSA build sees the correct linux-kernel source? What distro are you using?
On some (i.e. fc1) you'd have to specify a special gcc like
export CC=gcc32
befure ./configure.
I'm building a no debug ALSA here with a 2.6.5-aa1 kernel. maybe I'll find something.....

Cheers,
Karsten

-------------------------------------------------------
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=1470&alloc_id=3638&op=click

#5 lore raw

Re: Re: Tascam US-224 progress report (was: USB224_usbsnoop1.log captured on WinXP)

Am Dienstag 06 April 2004 12:52 schrieb Karsten Wiese:

Quoted 24 lines

Am Dienstag 06 April 2004 02:10 schrieb Rui Nuno Capela:

Quoted 18 lines

Now comes the weird part. No, I couldn't get it to work unless I set --with-debug=full on configure line. And I've tested several times, believe me.

FYI, I'm stick with 2.6 kernel tree, and already tested with 2.6.4 and latest 2.6.5.

My way of building the kernel modules is from stock tarball, and is pretty canonical, as literally as follows (all as root):

tar -jxf alsa-driver-1.0.4.tar.bz2
cd alsa-driver-1.0.4
gzip -dc ../alsa-driver-1.0.4p1.patch.gz # see attachment
./configure --with-isapnp=no --with-sequencer=yes --with-oss=yes
--with-cards=all --with-debug=full
make
make install

Quoted 4 lines

As stated, the INPUT MONITOR LED does not get lit if I take out the clause --with-debug=full.

How come?

Quoted 8 lines

You don't use --with-kernel option.
Are you shure ALSA build sees the correct linux-kernel source? What distro are you using?
On some (i.e. fc1) you'd have to specify a special gcc like
export CC=gcc32
befure ./configure.
I'm building a no debug ALSA here with a 2.6.5-aa1 kernel. maybe I'll find something.....

Yes, same odd behavior here: built without --with-debug=full, nothing is sent from us428control to the us428. So your build process is propably ok.

Cheers,
Karsten

-------------------------------------------------------
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=1470&alloc_id=3638&op=click

#6 lore raw

Re: Re: Tascam US-224 progress report (was: USB224_usbsnoop1.log captured on WinXP)

In reply to Karsten Wiese
Quoted 18 lines · Karsten Wiese
Quoted 18 lines

Now comes the weird part. No, I couldn't get it to work unless I set --with-debug=full on configure line. And I've tested several times, believe me.

FYI, I'm stick with 2.6 kernel tree, and already tested with 2.6.4 and latest 2.6.5.

My way of building the kernel modules is from stock tarball, and is pretty canonical, as literally as follows (all as root):

tar -jxf alsa-driver-1.0.4.tar.bz2
cd alsa-driver-1.0.4
gzip -dc ../alsa-driver-1.0.4p1.patch.gz # see attachment
./configure --with-isapnp=no --with-sequencer=yes --with-oss=yes
--with-cards=all --with-debug=full
make
make install

Quoted 6 lines
Quoted 4 lines

As stated, the INPUT MONITOR LED does not get lit if I take out the clause --with-debug=full.

How come?

You don't use --with-kernel option.
Are you shure ALSA build sees the correct linux-kernel source?

My current linux kernel source is always under /usr/src/linux, a pretty standard place. I always build the alsa-driver's under and for the current running kernel.

But as I said, the issue is only triggered by whether the --with-debug configure option is there. The build environment remains exactly the same, so I think.

Quoted 1 line

What distro are you using?

SUSE 9.0 on a desktop, and Mandrake 10.0 on a laptop. The results are, not surprisingly, the same (the build steps are the same too, without --with-kernel option).

Quoted 3 lines

On some (i.e. fc1) you'd have to specify a special gcc like
export CC=gcc32
befure ./configure.

Is there any issue with gcc 3.3, which I think is the one I'm using ?

Quoted 3 lines

I'm building a no debug ALSA here with a 2.6.5-aa1 kernel. maybe I'll find something.....

Thanks for the patience.

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


-------------------------------------------------------
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=1470&alloc_id=3638&op=click
#7 lore raw

Re: Re: Tascam US-224 progress report (was: USB224_usbsnoop1.log captured on WinXP)

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Now comes the weird part. No, I couldn't get it to work unless I set --with-debug=full on configure line. And I've tested several times, believe me.

Attached diff fixed it here.
Please verify.

CU

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

usb/usx2y/usbusx2y.c +4 -4
diff -u -r1.8 usbusx2y.c
@@ -118,7 +118,6 @@
 static void snd_usX2Y_usb_disconnect(struct usb_device* usb_device, void* ptr);
 static void snd_usX2Y_card_private_free(snd_card_t *card);
 
-#ifdef CONFIG_SND_DEBUG
 /* 
  * pipe 4 is used for switching the lamps, setting samplerate, volumes ....   
  */
@@ -128,14 +127,15 @@
 void snd_usX2Y_Out04Int(struct urb* urb)
 #endif
 {
+#ifdef CONFIG_SND_DEBUG
 	if (urb->status) {
 		int 		i;
 		usX2Ydev_t*	usX2Y = urb->context;
 		for (i = 0; i < 10 && usX2Y->AS04.urb[i] != urb; i++);
 		snd_printd("snd_usX2Y_Out04Int() usX2Y->Seq04=%i urb %i status=%i\n", usX2Y->Seq04, i, urb->status);
 	}
-}
 #endif
+}
 
 #ifndef OLD_USB
 void snd_usX2Y_In04Int(struct urb* urb, struct pt_regs *regs)
@@ -194,7 +194,7 @@
 				int j, send = us428ctls->p4outSent + 1;
 				if (send >= N_us428_p4out_BUFS)
 					send = 0;
-				for (j = 0; j < URBS_AsyncSeq; ++j)
+				for (j = 0; j < URBS_AsyncSeq  &&  !err; ++j)
 					if (0 == usX2Y->AS04.urb[j]->status) {
 						us428_p4out_t *p4out = us428ctls->p4out + send;	// FIXME if more then 1 p4out is new, 1 gets lost.
 						usb_fill_bulk_urb(usX2Y->AS04.urb[j], usX2Y->chip.dev,
@@ -204,7 +204,7 @@
 #ifdef OLD_USB
 						usX2Y->AS04.urb[j]->transfer_flags = USB_QUEUE_BULK;
 #endif
-						usb_submit_urb(usX2Y->AS04.urb[j], GFP_ATOMIC);
+						err = usb_submit_urb(usX2Y->AS04.urb[j], GFP_ATOMIC);
 						us428ctls->p4outSent = send;
 						break;
 					}

Index: alsa-driver/usb/usx2y/usbusx2y.h
===================================================================
RCS file: /cvsroot/alsa/alsa-driver/usb/usx2y/usbusx2y.h,v retrieving revision 1.3

usb/usx2y/usbusx2y.h +0 -4
diff -u -r1.3 usbusx2y.h
@@ -58,10 +58,6 @@
 void snd_usX2Y_In04Int(struct urb* urb);
 #endif
 
-#ifndef CONFIG_SND_DEBUG
-#define snd_usX2Y_Out04Int 0
-#endif
-
 #define NAME_ALLCAPS "US-X2Y"
 
 #endif

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

usb/usx2y/usbusx2yaudio.c +1 -1
diff -u -r1.9 usbusx2yaudio.c
@@ -1245,7 +1245,7 @@
 	    					     snd_dma_continuous_data(GFP_KERNEL),
 						     usX2Y_capt_substream->endpoints * 64*1024,
 						     usX2Y_capt_substream->endpoints * 128*1024)) ||
-	    (usX2Y(card)->chip.dev->descriptor.idProduct == USB_ID_US428 &&
+	    (usX2Y(card)->chip.dev->descriptor.idProduct != USB_ID_US122 &&
 	     0 > (err = usX2Y_rate_set(usX2Y_stream, 44100)))) {	// Lets us428 recognize output-volume settings, disturbs us122.
 		snd_usX2Y_audio_stream_free(usX2Y_stream);
 		return err;
#8 lore raw

Re: Re: Tascam US-224 progress report (was: USB224_usbsnoop1.log captured on WinXP)

Quoted 11 lines

Karsten Wiese

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Now comes the weird part. No, I couldn't get it to work unless I set --with-debug=full on configure line. And I've tested several times, believe me.

Attached diff fixed it here.
Please verify.

CU

First try and it works, that is without debug enabled.

Thankful.

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


-------------------------------------------------------
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=1470&alloc_id=3638&op=click