Re: svn commit: r339388 - head/sys/dev/usb/controller
On 11/3/18 1:15 PM, Herbert J. Skuhra wrote: On Tue, 16 Oct 2018 20:47:13 +0200, Hans Petter Selasky wrote: Author: hselasky Date: Tue Oct 16 18:47:13 2018 New Revision: 339388 URL: https://svnweb.freebsd.org/changeset/base/339388 Log: Fix for reception of large full speed isochronous frames via the transaction translator, when using the DWC OTG USB controller driver. Make sure to re-try getting the complete split packets until a DATA0 packet is received. Larger isochronous frames may be split into multiple MDATA packets terminated by a single DATA0 packet. PR: 230434 MFC after: 3 days Approved by: re (gjb) Sponsored by:Mellanox Technologies Modified: head/sys/dev/usb/controller/dwc_otg.c Hei, I use a Sound Blaster Play 2 USB soundcard on a Raspberry Pi 2 and a Raspberry Pi 3 to listen to internet radio streams (e.g. NRK, SR, BBC, etc.). After this commit audio quality is deteriorated (strange noises). I've tried mpg123 and moc. -- Herbert Hi, How many channels does your audio device have? What sample rates are you using? What happens if you lower the vchanrate? dmesg ? What are the following sysctl values? dev.pcm.x.rec.vchanrate: 48000 dev.pcm.x.play.vchanrate: 48000 x is 0 or 1. --HPS ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339388 - head/sys/dev/usb/controller
On Tue, 16 Oct 2018 20:47:13 +0200, Hans Petter Selasky wrote: > > Author: hselasky > Date: Tue Oct 16 18:47:13 2018 > New Revision: 339388 > URL: https://svnweb.freebsd.org/changeset/base/339388 > > Log: > Fix for reception of large full speed isochronous frames via the transaction > translator, when using the DWC OTG USB controller driver. Make sure to > re-try > getting the complete split packets until a DATA0 packet is received. Larger > isochronous frames may be split into multiple MDATA packets terminated > by a single DATA0 packet. > > PR: 230434 > MFC after: 3 days > Approved by:re (gjb) > Sponsored by: Mellanox Technologies > > Modified: > head/sys/dev/usb/controller/dwc_otg.c Hei, I use a Sound Blaster Play 2 USB soundcard on a Raspberry Pi 2 and a Raspberry Pi 3 to listen to internet radio streams (e.g. NRK, SR, BBC, etc.). After this commit audio quality is deteriorated (strange noises). I've tried mpg123 and moc. -- Herbert ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339388 - head/sys/dev/usb/controller
Author: hselasky Date: Tue Oct 16 18:47:13 2018 New Revision: 339388 URL: https://svnweb.freebsd.org/changeset/base/339388 Log: Fix for reception of large full speed isochronous frames via the transaction translator, when using the DWC OTG USB controller driver. Make sure to re-try getting the complete split packets until a DATA0 packet is received. Larger isochronous frames may be split into multiple MDATA packets terminated by a single DATA0 packet. PR: 230434 MFC after:3 days Approved by: re (gjb) Sponsored by: Mellanox Technologies Modified: head/sys/dev/usb/controller/dwc_otg.c Modified: head/sys/dev/usb/controller/dwc_otg.c == --- head/sys/dev/usb/controller/dwc_otg.c Tue Oct 16 18:17:07 2018 (r339387) +++ head/sys/dev/usb/controller/dwc_otg.c Tue Oct 16 18:47:13 2018 (r339388) @@ -1458,6 +1458,8 @@ dwc_otg_host_data_rx(struct dwc_otg_softc *sc, struct /* check if we are complete */ if (td->tt_xactpos == HCSPLT_XACTPOS_BEGIN) { goto complete; + } else if (td->hcsplt != 0) { + goto receive_pkt; } else { /* get more packets */ goto busy; @@ -1516,8 +1518,10 @@ receive_pkt: if (td->hcsplt != 0) { delta = td->tt_complete_slot - sc->sc_last_frame_num - 1; if (td->tt_scheduled == 0 || delta < DWC_OTG_TT_SLOT_MAX) { - td->state = DWC_CHAN_ST_WAIT_C_PKT; - goto busy; + if (td->ep_type != UE_ISOCHRONOUS) { + td->state = DWC_CHAN_ST_WAIT_C_PKT; + goto busy; + } } delta = sc->sc_last_frame_num - td->tt_start_slot; if (delta > DWC_OTG_TT_SLOT_MAX) { @@ -1563,12 +1567,23 @@ receive_pkt: 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) { + /* continously buffer */ + if (sc->sc_last_frame_num & 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); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"