From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Devin Heitmueller <dheitmueller@kernellabs.com>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH 01/10] alsa_stream: port changes made on xawtv3
Date: Wed, 07 Sep 2011 09:49:50 -0300 [thread overview]
Message-ID: <4E67686E.8000502@redhat.com> (raw)
In-Reply-To: <CAGoCfiw7vjprc_skYYAXy9sTA7zkYEWtzXy9tEmJD+q8aazPog@mail.gmail.com>
Em 07-09-2011 00:37, Devin Heitmueller escreveu:
> On Tue, Sep 6, 2011 at 11:29 PM, Mauro Carvalho Chehab
> <mchehab@redhat.com> wrote:
>>> Basically the above starts at the *maximum* capture resolution and
>>> works its way down. One might argue that this heuristic makes more
>>> sense anyway - why *wouldn't* you want the highest quality audio
>>> possible by default (rather than the lowest)?
>>
>> That change makes sense to me. Yet, you should try to disable pulseaudio
>> and see what's the _real_ speed that the audio announces. On Fedora,
>> just removing pulsaudio-oss-plugin (or something like that) is enough.
>>
>> It seems doubtful that my em2820 WinTV USB2 is different than yours.
>> I suspect that pulseaudio is passing the "extra" range, offering to
>> interpolate the data.
>
> I disabled pulseaudio and the capture device is advertising the exact
> same range (8-48 KHz). Seems to be behaving the same way as well.
Hmm... just checked with WinTV USB2:
[ 3.819236] msp3400 15-0044: MSP3445G-B8 found @ 0x88 (em28xx #0)
While this device uses snd-usb-audio, it is a non-AC97 adapter. So,
we may expect it to be different from yours.
Its A/D works at a fixed rate of 32 kHZ, according with MSP34x5G datasheet,
so snd-usb-audio is working properly here.
> So while I'm usually willing to blame things on Pulse, this doesn't
> look like the case here.
That's good. One less problem to deal with.
>>> Even with that patch though, I hit severe underrun/overrun conditions
>>> at 30ms of latency (to the point where the audio is interrupted dozens
>>> of times per second).
>>
>> Yes, it is the same here: 30ms on my notebook is not enough for WinTV
>> USB2 (it is OK with HVR-950).
>>
>>> Turned it up to 50ms and it's much better.
>>> That said, of course such a change would impact lipsync, so perhaps we
>>> need to be adjusting the periods instead.
>>
>> We've added a parameter for that on xawtv3 (--alsa-latency). We've parametrized
>> it at the alsa stream function call. So, all it needs is to add a new parameter
>> at tvtime config file.
>
> Ugh. We really need some sort of heuristic to do this. It's
> unreasonable to expect users to know about some magic parameter buried
> in a config file which causes it to start working.
Agreed, but still it makes sense to allow users to adjust, as extra delays
might be needed on really slow machines.
> Perhaps a counter
> that increments whenever an underrun is hit, and after a certain
> number it automatically restarts the stream with a higher latency. Or
> perhaps we're just making some poor choice in terms of the
> buffers/periods for a given rate.
>
> Devin
>
next prev parent reply other threads:[~2011-09-07 16:34 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-06 15:29 [PATCH 01/10] alsa_stream: port changes made on xawtv3 Mauro Carvalho Chehab
2011-09-06 15:29 ` [PATCH 02/10] Fix make dist target Mauro Carvalho Chehab
2011-09-06 15:29 ` [PATCH 03/10] Backport mixer-alsa patch from Fedora Mauro Carvalho Chehab
2011-09-06 15:29 ` [PATCH 04/10] Properly document alsa mixer Mauro Carvalho Chehab
2011-09-06 15:29 ` [PATCH 05/10] Ignore auto-generated files Mauro Carvalho Chehab
2011-09-06 15:29 ` [PATCH 06/10] Backport UVC fix from Fedora Mauro Carvalho Chehab
2011-09-06 15:29 ` [PATCH 07/10] Add mkinstalldirs Mauro Carvalho Chehab
2011-09-06 15:29 ` [PATCH 08/10] Use a saner way to disable screensaver Mauro Carvalho Chehab
[not found] ` <1315322996-10576-9-git-send-email-mchehab@redhat.com>
2011-09-06 15:29 ` [PATCH 10/10] tvtime: Bump to version 1.0.3 Mauro Carvalho Chehab
2011-09-06 15:40 ` [PATCH 01/10] alsa_stream: port changes made on xawtv3 Mauro Carvalho Chehab
2011-09-06 16:24 ` Devin Heitmueller
2011-09-06 18:19 ` Hans de Goede
2011-09-06 18:35 ` Michael Krufky
2011-09-06 18:43 ` Hans de Goede
2011-09-06 19:11 ` Michael Krufky
2011-09-06 18:41 ` Devin Heitmueller
2011-09-06 19:12 ` Mauro Carvalho Chehab
2011-09-06 21:18 ` Devin Heitmueller
2011-09-06 21:50 ` Mauro Carvalho Chehab
2011-09-06 18:40 ` Mauro Carvalho Chehab
2011-09-07 2:58 ` Devin Heitmueller
2011-09-07 3:20 ` Devin Heitmueller
2011-09-07 3:29 ` Mauro Carvalho Chehab
2011-09-07 3:37 ` Devin Heitmueller
2011-09-07 3:42 ` Devin Heitmueller
2011-09-07 4:06 ` Devin Heitmueller
2011-10-07 1:59 ` tvtime at linuxtv.org Mauro Carvalho Chehab
2011-10-07 13:38 ` Devin Heitmueller
2011-10-07 15:18 ` Mauro Carvalho Chehab
2011-09-07 6:29 ` [PATCH 01/10] alsa_stream: port changes made on xawtv3 Hans de Goede
2011-09-07 12:49 ` Mauro Carvalho Chehab [this message]
2011-09-07 3:23 ` 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=4E67686E.8000502@redhat.com \
--to=mchehab@redhat.com \
--cc=dheitmueller@kernellabs.com \
--cc=linux-media@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.