Re: USB headset mic: slightly "robotic" voice when plugged into a usb 3.0 port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 09, 2012 at 02:44:52PM -0400, Alan Stern wrote:
> On Wed, 9 May 2012, Sarah Sharp wrote:
> 
> > It looks like the Fresco Logic host controller is correctly reporting
> > short transfers for bulk endpoints, just not isochronous endpoints.
> > 
> > Alan, do you know which USB devices might have interrupt IN endpoints
> > that are likely to send short packets?
> 
> I can't think of any common examples.
> 
> Anyway, I just checked the xHCI spec.  As far as I can see, it doesn't
> directly require that a transfer TRB's completion code be set to Short
> Packet when the ISP flag isn't set.  So it may be a mistake to rely on
> that -- presumably you don't set ISP for ischronous transfers.

The xHCI driver does set ISP for all TRBs for an isochronous IN
endpoint, see drivers/usb/host/xhci-ring.c:xhci_queue_isoc_tx()

                        /* Only set interrupt on short packet for IN EPs */
                        if (usb_urb_dir_in(urb))
                                field |= TRB_ISP;

Otherwise we won't get an event when a short packet occurs.  Since we
set ISP on all isoc TRBs, the host should have set the completion code
to Short Packet.

> On the other hand, the spec does say that if IOC is set then the
> resulting Transfer Event TRB will have its completion code set to Short
> Packet.  And it also says that the completion code of the Transfer
> Event TRB will be the same as the completion status of the originating
> TRB.  But this wouldn't apply to TDs before the last in an isochronous
> transfer.

The IOC flag is set for the last TRB of every TD that comprises the
entire isochronous URB frame list.  We need an event on the event ring
for each TD in the frame list, which is why we need IOC set.  However,
we set the BEI flag (Block Event Interrupt) for xHCI 1.0 hosts.  That
means xHCI 1.0 hosts will place the event for each TD on the event ring,
but it won't generate an interrupt until the event for the last TD in
the URB frame list is placed on the event ring.

Basically, I still think the Fresco Logic host is broken. :)

Sarah Sharp
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux