linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Takashi Iwai <tiwai@suse.de>
Cc: Jiada Wang <jiada_wang@mentor.com>,
	alsa-devel@alsa-project.org, apape@de.adit-jv.com,
	linux-kernel@vger.kernel.org, Mark_Craske@mentor.com
Subject: Re: [alsa-devel] [PATCH 1/3 v1] ALSA: usb-audio: more tolerant packetsize
Date: Thu, 1 Dec 2016 12:50:39 +0100	[thread overview]
Message-ID: <c503960d-7a94-c9ef-d98a-72945c2a44a9@ladisch.de> (raw)
In-Reply-To: <s5heg1r28rp.wl-tiwai@suse.de>

Takashi Iwai wrote:
> Clemens Ladisch wrote:
>> Takashi Iwai wrote:
>>> [...]
>>> In the commit mentioned above, we changed the logic to take +25%
>>> frequency as the basis, and it my *reduce* if ep->maxpacksize is lower
>>> than that.
>>>
>>> OTOH, if ep->maxpacksize is sane, we can rely on it rather than the
>>> implicit +25% frequency.  That said, maybe we can check
>>> ep->maxpacksize whether it fits within the expected range, then adapt
>>> it, or take +25% freq as fallback?
>>
>> You are describing how the current code behaves.  The +25% limit _is_
>> what the code takes as the expected range.
>
> Well, the question is what is the "sane" range.  +25% doesn't fit for
> some devices.

The USB audio specification _requires_ that there is as little jitter
as possible.

It's no surprise that some device violates the specification.  But
we don't know what the actual error is; whether we could adjust the
packet size for this particular device only, or increase the limit
for all devices, or use a completely different workaround.

> If maxpacksize fits without +100% as this patch suggests, can we rely
> on it instead?

The packet size affect the following computations, like the number of
packets per URB.  I don't know how bad the effects would be.


Regards,
Clemens

  reply	other threads:[~2016-12-01 11:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-30  7:59 [PATCH 0/3 v1] usb-misc fix Jiada Wang
2016-11-30  7:59 ` [PATCH 1/3 v1] ALSA: usb-audio: more tolerant packetsize Jiada Wang
2016-11-30  8:54   ` Takashi Iwai
2016-12-01  7:04     ` Jiada Wang
2016-12-01  7:41   ` [alsa-devel] " Clemens Ladisch
2016-12-01  8:58     ` Takashi Iwai
2016-12-01 11:16       ` Clemens Ladisch
2016-12-01 11:23         ` Takashi Iwai
2016-12-01 11:50           ` Clemens Ladisch [this message]
     [not found]     ` <58400B3A.7080806@mentor.com>
2016-12-01 12:15       ` Clemens Ladisch
2016-11-30  7:59 ` [PATCH 2/3 v2] ALSA: usb-audio: avoid setting of sample rate multiple times on bus Jiada Wang
2016-11-30  8:51   ` Takashi Iwai
2016-12-01  7:07     ` Jiada Wang
2016-11-30 10:45   ` Takashi Sakamoto
2016-11-30 22:19     ` Takashi Sakamoto
2016-12-05  7:32     ` Jiada Wang
2016-12-05  9:58       ` Takashi Sakamoto
2016-11-30  7:59 ` [PATCH 3/3 v3] ALSA: usb-audio: fix race in snd_usb_endpoint_stop Jiada Wang
2016-11-30  9:00   ` Takashi Iwai
2016-12-05 10:10     ` Jiada Wang
2016-12-05 10:30       ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c503960d-7a94-c9ef-d98a-72945c2a44a9@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=Mark_Craske@mentor.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=apape@de.adit-jv.com \
    --cc=jiada_wang@mentor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).