2012/2/28, Alexandre Ratchov <[email protected]>:
> On Fri, Feb 24, 2012 at 07:39:19PM +0100, Gregor Pintar wrote:
>> Hello.
>>
>> My Creative Sound Blaster X-Fi HD USB sound card doesn't work on OpenBSD
>> 5.0.
>> uaudio reports "sync ep address mismatch".
>> Using my patch it works. But there is still no sound with default 44100Hz
>> rate.
>> All other rates works fine.
>>
>> patch (for revision 1.95):
>> --- uaudio.c Tue Jan 31 21:13:32 2012
>> +++ uaudio.c Fri Feb 24 19:49:47 2012
>> @@ -1768,7 +1768,7 @@
>>                             sc->sc_dev.dv_xname);
>>                      return (USBD_NORMAL_COMPLETION);
>>              }
>> -            if (sync_addr && sync_ed->bEndpointAddress != sync_addr) {
>> +            if (sync_addr && UE_GET_ADDR(sync_ed->bEndpointAddress) != 
>> sync_addr) {
>>                      printf("%s: sync ep address mismatch\n",
>>                             sc->sc_dev.dv_xname);
>>                      return (USBD_NORMAL_COMPLETION);
>>
>
> Good catch! Let me just check if this doesn't break devices that
> currently work by accident before i commit it. Thanks!
>
> -- Alexandre
>

If it breaks try this patch, because maybe some devices sent
bSynchAddress with direction bit and some without.

--- uaudio.c    Tue Jan 31 21:13:32 2012
+++ uaudio.c    Fri Feb 24 19:49:47 2012
@@ -1768,7 +1768,7 @@
                               sc->sc_dev.dv_xname);
                        return (USBD_NORMAL_COMPLETION);
                }
-               if (sync_addr && sync_ed->bEndpointAddress != sync_addr) {
+               if (sync_addr && UE_GET_ADDR(sync_ed->bEndpointAddress) !=
+                   UE_GET_ADDR(sync_addr)) {
                        printf("%s: sync ep address mismatch\n",
                               sc->sc_dev.dv_xname);
                        return (USBD_NORMAL_COMPLETION);

Reason why it works on FreeBSD is that FreeBSD always ignore sync endpoint.
So maybe on sync endpoint errors it could ignore sync endpoint instead
of returning.

Gregor

Reply via email to