From: Jiada Wang <jiada_wang@mentor.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: perex@perex.cz, alsa-devel@alsa-project.org,
apape@de.adit-jv.com, Mark_Craske@mentor.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3 v1] ALSA: usb-audio: more tolerant packetsize
Date: Thu, 1 Dec 2016 16:04:26 +0900 [thread overview]
Message-ID: <14a10709-4d7d-1b51-f754-92c722c115d2@mentor.com> (raw)
In-Reply-To: <s5hwpfl2vre.wl-tiwai@suse.de>
Hello Takashi
On 11/30/2016 05:54 PM, Takashi Iwai wrote:
> On Wed, 30 Nov 2016 08:59:21 +0100,
> Jiada Wang wrote:
>>
>> From: Andreas Pape <apape@de.adit-jv.com>
>>
>> since commit 57e6dae1087bbaa6b33d3dd8a8e90b63888939a3 the expected packetsize is always limited to
>
> Please use a form with 12 chars SHA ID plus the commit subject, e.g.
> 1234567890ab ("blah blah...")
I will update changelog as you have suggested in v2.
>
>> nominal + 25%. It was discovered, that some devices have a much higher jitter
>> in used packetsizes than 25% which would result in BABBLE condition and dropping of packets.
>> A better solution is so assume the jitter to be the nominal packetsize:
>> -one nearly empty packet followed by a almost double sized one.
>
> The increase of the max frequency is supposedly OK.
> A remaining question is whether this should be included in stable
> kernel. It fixes in one side, but it's quite untested in another
> side. Maybe we queue this for 4.10, and later on notify to stable
> maintainer once when it's confirmed to work and be harmless.
>
>
this makes sense to me
Thanks,
Jiada
> thanks,
>
> Takashi
>
>>
>> Signed-off-by: Andreas Pape <apape@de.adit-jv.com>
>> Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
>> ---
>> sound/usb/endpoint.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
>> index c470251..2f592dd 100644
>> --- a/sound/usb/endpoint.c
>> +++ b/sound/usb/endpoint.c
>> @@ -632,8 +632,8 @@ static int data_ep_set_params(struct snd_usb_endpoint *ep,
>> ep->stride = frame_bits >> 3;
>> ep->silence_value = pcm_format == SNDRV_PCM_FORMAT_U8 ? 0x80 : 0;
>>
>> - /* assume max. frequency is 25% higher than nominal */
>> - ep->freqmax = ep->freqn + (ep->freqn >> 2);
>> + /* assume max. frequency is double than nominal */
>> + ep->freqmax = ep->freqn * 2;
>> /* Round up freqmax to nearest integer in order to calculate maximum
>> * packet size, which must represent a whole number of frames.
>> * This is accomplished by adding 0x0.ffff before converting the
>> --
>> 2.9.3
>>
>>
next prev parent reply other threads:[~2016-12-01 7:04 UTC|newest]
Thread overview: 23+ 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 [this message]
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
2016-12-01 11:36 ` Jiada Wang
2016-12-01 12:15 ` [alsa-devel] " Clemens Ladisch
2016-12-02 5:53 ` Jiada Wang
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=14a10709-4d7d-1b51-f754-92c722c115d2@mentor.com \
--to=jiada_wang@mentor.com \
--cc=Mark_Craske@mentor.com \
--cc=alsa-devel@alsa-project.org \
--cc=apape@de.adit-jv.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--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).