All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: questions about usbmidi
@ 2003-04-10 14:38 Thomas Rabe
  2003-04-10 15:38 ` Clemens Ladisch
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Rabe @ 2003-04-10 14:38 UTC (permalink / raw)
  To: alsa-devel


Clemens Ladisch wrote:
> Thomas Rabe wrote:
> 
>>Clemens Ladisch wrote:
   >>>Well, this may indicate that the MIDI part works and that the error
is in
>>>some other part of the driver. Does the oops still happen when you don't
>>>call snd_usb_create_midi_interface?
>>
>>the driver works fine without calling snd_usb_create_midi_interface (no
>>errors, all audiochannels are available).
> 
> 
> The initialization code does nothing USB-related except allocing some URBs
> and submitting the input URBs. Please try to remove the call to
> snd_usbmidi_submit_urb at the end of _create_midi_interface.

removing the snd_usbmidi_submit_urb call also oopses. i tried some
endpoint configs like below but each crashing my machine:

.data = & (const snd_usb_midi_endpoint_info_t) {
		  .out_ep =0x06,
		  .in_ep = 0x06,
		  .out_cables =	0x003,
		  .in_cables =	0x003
}

last msg:
created 2 output and 2 input ports


.data = & (const snd_usb_midi_endpoint_info_t) {
		  .out_ep =0x06,
		  .out_cables =	0x003,
		  }

last msg:
created 2 output and 0 input ports

.data = & (const snd_usb_midi_endpoint_info_t) {
		 }

last msg:
created 0 output and 0 input ports



Greetings,

Thomas Rabe.



-- mail: raven at drehmoment dot org
-- home: http://hal9000.drehmoment.org
-- more: http://drehmoment.org





-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com

^ permalink raw reply	[flat|nested] 9+ messages in thread
* questions about usbmidi
@ 2003-04-09 13:01 Thomas Rabe
  2003-04-09 14:34 ` Clemens Ladisch
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Rabe @ 2003-04-09 13:01 UTC (permalink / raw)
  To: alsa-devel; +Cc: us428

hello,

I try to hack a little bit on Karstens tascam-us428 alsa patch and have 
some problems to integrate usbmidi (usbaudio works). in the patch 
(written for alsa rc3?) this was done with:

8<-----------------------------------------------------------
static int snd_us428_create_usbmidi( snd_card_t* card )
{
#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)
         static snd_usb_audio_quirk_t quirk = {
                 .vendor_name =  "TASCAM",
                 .product_name = "US-428",
                 .ifnum =        0,
                 .endpoints = {{
                         .epnum =        6,
                         .out_cables =   3,
                         .in_cables =    3
                         }}
         };
         snd_seq_device_t *seq_device;
         snd_usb_midi_t *umidi;
         int err;

         err = snd_seq_device_new( card, us428( card)->chip.next_seq_device,
                                  SNDRV_SEQ_DEV_ID_USBMIDI,
                                  sizeof(snd_usb_midi_t), &seq_device);
         if (err < 0)
                 return err;
         us428( card)->chip.next_seq_device++;
         strcpy(seq_device->name, card->shortname);
         umidi = (snd_usb_midi_t *)SNDRV_SEQ_DEVICE_ARGPTR(seq_device);
         umidi->chip = &us428( card)->chip;
         umidi->ifnum = 0;
         umidi->quirk = &quirk;
         umidi->seq_client = -1;
#endif
         return 0;
}

8<------------------------------------------------------------------

i changed this to:
8<----------------------------------------------------------------
static int snd_us428_create_usbmidi( snd_card_t* card )
{
#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)
	static snd_usb_audio_quirk_t quirk = {
		.vendor_name =	"TASCAM",
		.product_name =	"US-428",
		.ifnum = 	0,
        		.type = QUIRK_MIDI_FIXED_ENDPOINT,
		.data = & (const snd_usb_midi_endpoint_info_t) {
        		  .out_ep =0x06,
		  .in_ep = 0x86,
			.out_cables =	0x003,
			.in_cables =	0x003
			}
	};

	int err;

	err = snd_usb_create_midi_interface(&us428( card)->chip, us428( 
card)->chip.dev->actconfig->interface , &quirk);
         if (err < 0)
           return err;

#endif
	return 0;
}
8<--------------------------------------------------------------------

but if i insert the module with modprobe i get segfault + kernel oops. 
what should be wrong?
is it a good idea to link against usbmidi.o? (the us428 is non standard 
audio/midi device).
btw: karstens original code is available at
http://hal9000.drehmoment.org/tascam



Greetings,

Thomas Rabe.



-- mail: raven at drehmoment dot org
-- home: http://hal9000.drehmoment.org
-- more: http://drehmoment.org



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-04-10 18:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-10 14:38 questions about usbmidi Thomas Rabe
2003-04-10 15:38 ` Clemens Ladisch
2003-04-10 18:18   ` Thomas Rabe
  -- strict thread matches above, loose matches on Subject: below --
2003-04-09 13:01 Thomas Rabe
2003-04-09 14:34 ` Clemens Ladisch
2003-04-09 16:08   ` Thomas Rabe
2003-04-10  6:45     ` Clemens Ladisch
2003-04-10  7:29       ` Thomas Rabe
2003-04-10 10:47         ` Clemens Ladisch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.