From: Clemens Ladisch <clemens@ladisch.de>
To: Mauro Carvalho Chehab <m.chehab@samsung.com>,
Devin Heitmueller <dheitmueller@kernellabs.com>
Cc: Takashi Iwai <tiwai@suse.de>,
alsa-devel@alsa-project.org,
Mauro Carvalho Chehab <mchehab@infradead.org>,
Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [alsa-devel] [PATCH 1/3] sound: Add a quirk to enforce period_bytes
Date: Wed, 18 Jun 2014 10:20:59 +0200 [thread overview]
Message-ID: <53A14BEB.1060403@ladisch.de> (raw)
In-Reply-To: <20140616120544.10ef75f4.m.chehab@samsung.com>
Mauro Carvalho Chehab wrote:
> Let's see the au0828 case:
> 48 kHz, 2 bytes/sample, 2 channels, 256 maxpacksize, 1 ms URB
> interval (bInterval = 1).
>
> In this case, there is 192 bytes per 1ms period.
The device's clock and the bus clock are not synchronized, so there will
be _approximately_ 192 bytes per USB frame.
> Let's assume that the period was set to 3456, with corresponds to
> a latency of 18 ms.
>
> In this case, as NUM_URBS = 12,
There is no symbol named NUM_URBS.
> it means that the transfer buffer will be set to its maximum value of
> 3072 bytes per URB pack (12 * 256)
The number of URBs is not the same as the number of packets per URB.
> and the URB transfer_callback will be called on every 16 ms.
It will be called once per millisecond.
> So, what
... definitely not ...
> happens is:
>
> - after 16 ms, the first 3072 bytes arrive. The next
> packet will take another 16ms to arrive;
> - after 2 ms, underrun, as the period_size was not
> filled yet.
Regards,
Clemens
next prev parent reply other threads:[~2014-06-18 8:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-14 16:16 [PATCH 0/3] Auvitek au0828 fixups Mauro Carvalho Chehab
2014-06-14 16:16 ` [PATCH 1/3] sound: Add a quirk to enforce period_bytes Mauro Carvalho Chehab
2014-06-16 7:39 ` [alsa-devel] " Clemens Ladisch
2014-06-16 13:22 ` Devin Heitmueller
2014-06-16 15:05 ` Mauro Carvalho Chehab
2014-06-18 8:20 ` Clemens Ladisch [this message]
2014-06-16 14:21 ` Mauro Carvalho Chehab
2014-06-16 14:38 ` Alexander E. Patrakov
2014-06-16 16:24 ` Mauro Carvalho Chehab
2014-06-16 17:16 ` Alexander E. Patrakov
2014-06-16 18:59 ` Mauro Carvalho Chehab
2014-06-16 19:04 ` Devin Heitmueller
2014-06-16 19:22 ` Mauro Carvalho Chehab
2014-06-18 8:21 ` Clemens Ladisch
2014-06-14 16:16 ` [PATCH 2/3] sound: simplify au0828 quirk table Mauro Carvalho Chehab
2014-06-14 16:16 ` [PATCH 3/3] sound: Update au0828 quirks table Mauro Carvalho Chehab
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=53A14BEB.1060403@ladisch.de \
--to=clemens@ladisch.de \
--cc=alsa-devel@alsa-project.org \
--cc=dheitmueller@kernellabs.com \
--cc=linux-media@vger.kernel.org \
--cc=m.chehab@samsung.com \
--cc=mchehab@infradead.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