Skip to contentSkip to conversation

reenable MIDI for usx2y

PATCH karsten wiese 3 participants 3 messages Mar 30, 2005

lore
Share & tools
lore
#0 lore raw
Quoted 6 lines · --- Takashi Iwai

At Sun, 27 Mar 2005 14:00:12 +0200 (CEST),

Quoted 4 lines · karsten wiese

Hi Clemens,

usx2y needs to specify exactly what usb-endpoints to

Quoted 8 lines

use.

Quoted 1 line

this feature got lost lately and is restored by

attached

Quoted 1 line

patch. Please apply!

IMO, it's better to fix snd_usbmidi_detect_endpoints() to check
in_ep and out_ep rather than its caller.

I'd prefer a new function snd_usbmidi_check_endpoints() then.
Caller would call snd_usbmidi_check_endpoints() if ep_out/ep_in would be set by client and would call snd_usbmidi_detect_endpoints() in the other case. How about that?

Karsten

___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de

-------------------------------------------------------
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://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

#1 lore raw

At Wed, 30 Mar 2005 15:49:27 +0200 (CEST),

Quoted 18 lines · karsten wiese
Quoted 6 lines · --- Takashi Iwai

At Sun, 27 Mar 2005 14:00:12 +0200 (CEST),

Quoted 4 lines · karsten wiese

Hi Clemens,

usx2y needs to specify exactly what usb-endpoints to

Quoted 8 lines

use.

Quoted 1 line

this feature got lost lately and is restored by

attached

Quoted 1 line

patch. Please apply!

IMO, it's better to fix snd_usbmidi_detect_endpoints() to check
in_ep and out_ep rather than its caller.

Quoted 6 lines

I'd prefer a new function snd_usbmidi_check_endpoints() then.
Caller would call snd_usbmidi_check_endpoints() if ep_out/ep_in would be set by client and would call snd_usbmidi_detect_endpoints() in the other case. How about that?

Hmm, I thought the old code detects in/out endpoints if they are NULL. That is, if out_ep == NULL and in_ep != NULL, out_ep is detected but in_ep is used as it is.

If this isn't the case, checking in the caller side seems OK.

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://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

#2 lore raw
Quoted 20 lines · Takashi Iwai
Quoted 12 lines · karsten wiese
Quoted 10 lines · --- Takashi Iwai
Quoted 1 line · karsten wiese

usx2y needs to specify exactly what usb-endpoints to

use.

Quoted 1 line

this feature got lost lately and is restored by

attached

Quoted 1 line

patch. Please apply!

IMO, it's better to fix snd_usbmidi_detect_endpoints() to check
in_ep and out_ep rather than its caller.

Quoted 6 lines

I'd prefer a new function snd_usbmidi_check_endpoints() then.
Caller would call snd_usbmidi_check_endpoints() if ep_out/ep_in would be set by client and would call snd_usbmidi_detect_endpoints() in the other case. How about that?

Quoted 3 lines

Hmm, I thought the old code detects in/out endpoints if they are NULL. That is, if out_ep == NULL and in_ep != NULL, out_ep is detected but in_ep is used as it is.

The old code was designed so that quirks can optionally specify endpoints.

However, if _any_ endpoint is set, it should be assumed that the quirk knows what it does, and that no endpoint should be detected automatically. (The old code didn't behave in this way.)

Quoted 1 line

If this isn't the case, checking in the caller side seems OK.

snd_usbmidi_detect_endpoints() is called in several places, and any of them could theoretically use explicitly specified endpoints.

I've added the check inside the snd_usbmidi_detect_endpoints() function.

Regards,
Clemens

-------------------------------------------------------
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://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click