FreeBSD Bugzilla – Attachment 198228 Details for
Bug 230434
[DWC OTG] USB sound card fails to record
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Updated fix for issue.
dwc_otg.diff (text/plain), 2.15 KB, created by
Hans Petter Selasky
on 2018-10-16 16:35:43 UTC
(
hide
)
Description:
Updated fix for issue.
Filename:
MIME Type:
Creator:
Hans Petter Selasky
Created:
2018-10-16 16:35:43 UTC
Size:
2.15 KB
patch
obsolete
>Index: sys/dev/usb/controller/dwc_otg.c >=================================================================== >--- sys/dev/usb/controller/dwc_otg.c (revision 339376) >+++ sys/dev/usb/controller/dwc_otg.c (working copy) >@@ -1563,12 +1563,23 @@ > hcchar = td->hcchar; > hcchar |= HCCHAR_EPDIR_IN; > >- /* receive complete split ASAP */ >- if ((sc->sc_last_frame_num & 1) != 0 && >- td->ep_type == UE_ISOCHRONOUS) >- hcchar |= HCCHAR_ODDFRM; >- else >+ if (td->ep_type == UE_ISOCHRONOUS) { >+ if (td->hcsplt != 0) { >+ /* double buffer */ >+ if ((sc->sc_last_frame_num ^ x) & 1) >+ hcchar |= HCCHAR_ODDFRM; >+ else >+ hcchar &= ~HCCHAR_ODDFRM; >+ } else { >+ /* multi buffer, if any */ >+ if (sc->sc_last_frame_num & 1) >+ hcchar |= HCCHAR_ODDFRM; >+ else >+ hcchar &= ~HCCHAR_ODDFRM; >+ } >+ } else { > hcchar &= ~HCCHAR_ODDFRM; >+ } > > /* must enable channel before data can be received */ > DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(channel), hcchar); >@@ -4875,13 +4886,18 @@ > td->tt_index = parm->udev->device_index; > else > td->tt_index = parm->udev->parent_hs_hub->device_index; >+ >+ if ((xfer->endpointno & UE_DIR_IN) != 0 && ep_type == UE_ISOCHRONOUS) >+ td->max_packet_count = 2; /* double buffering */ >+ else >+ td->max_packet_count = xfer->max_packet_count; > } else { > td->tt_index = parm->udev->device_index; >+ td->max_packet_count = xfer->max_packet_count; > } > > /* init TD */ > td->max_packet_size = xfer->max_packet_size; >- td->max_packet_count = xfer->max_packet_count; > /* range check */ > if (td->max_packet_count == 0 || td->max_packet_count > 3) > td->max_packet_count = 1; >@@ -4930,6 +4946,14 @@ > DPRINTFN(-1, "Non-isochronous high bandwidth " > "endpoint not supported\n"); > return; >+ } else if (dwc_otg_uses_split(udev) && >+ (edesc->bEndpointAddress & UE_DIR_IN) != 0 && >+ UGETW(edesc->wMaxPacketSize) >= (171 * 2) && >+ (edesc->bmAttributes & UE_XFERTYPE) == UE_ISOCHRONOUS) { >+ /* not supported */ >+ DPRINTFN(-1, "Isochronous full speed " >+ "endpoint not supported\n"); >+ return; > } > } > if ((edesc->bmAttributes & UE_XFERTYPE) == UE_ISOCHRONOUS)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 230434
:
195979
|
195980
|
198213
| 198228 |
198229