Re: [PATCH v4 5/5] usb: gadget: f_uac2: send reasonably sized packets

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

 



On 08/27/2014 06:08 AM, Jassi Brar wrote:
> On Wed, Aug 27, 2014 at 3:23 AM, Daniel Mack <zonque@xxxxxxxxx> wrote:

>> +               uac2->p_interval = (1 << (ep_desc->bInterval - 1)) * factor;
>> +               req_len = rate / uac2->p_interval;
>>
> +                  if (opts->p_srate % uac2->p_interval)
> +                      req_len += fsz;
> .....
> 
>> +               uac2->p_residue = 0;
>>         } else {
>>                 dev_err(dev, "%s:%d Error!\n", __func__, __LINE__);
>>                 return -EINVAL;
>> @@ -1128,7 +1188,7 @@ afunc_set_alt(struct usb_function *fn, unsigned intf, unsigned alt)
>>
>>                         req->zero = 0;
>>                         req->context = &prm->ureq[i];
>> -                       req->length = prm->max_psize;
>> +                       req->length = req_len;
>>                         req->complete = agdev_iso_complete;
>>                         req->buf = prm->rbuf + i * req->length;
>>
>  .... otherwise req[0]->buf might overlap req[1]->buf's first frame
> for when we need to send an extra frame.

Hmm? The first USB_XFERS packets will only contain zeros, and we're only
preparing those here. For every successive packet, the length is
recalculated and the audio material is copied in accordingly before the
requets is requeued. What buffers should overlap here?


Daniel
--
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