[mythtv] live TV stuttering

Michael T. Dean mtdean at thirdcontact.com
Wed Apr 7 02:21:27 EDT 2004


Hamish Moffatt wrote:

>On Tue, Apr 06, 2004 at 05:55:21PM +0100, Ed Wildgoose wrote:
>  
>
>>Clear as mud?  Your mileage may vary and perhaps you can't ever cleanly 
>>switch between 48Khz and 32Khz audio modes...?  In my case it is only a 
>>problem if I start up with a 32Khz mode.
>>    
>>
>...
>
>For reference I'm using the i810 audio driver on an nForce2 motherboard.
>
These two statements triggered a thought.  I don't use DVB, but I use an 
nForce2 MB.  Unfortunately, it's not on my Myth box, so I can't test 
these theories for you.

The ALSA website's Wiki for the nForce i8x0 sound card ( 
http://www.alsa-project.org/alsa-doc/doc-php/template.php?company=Nvidia&card=nForce&chip=NM2360&module=intel8x0 
) has several posts on configuring the "dmix" plugin via the .asoundrc 
to do "direct" software mixing of audio signals (i.e. so sounds from 
processes aren't queued when another process is using the sound card).  
One from CIMLinux (Tue, 25 Nov 2003), shows an .asoundrc for SP/DIF 
output which uses the dmix plugin.

If you're using an .asoundrc like these, you've got some experimenting 
to do... ;)  The dmix plugin _only_ supports 48000Hz, format S16, 2 
channel, 125000 period_time configurations and for any other 
configuration, you must explicitly specify values in the slave 
definition ( see 
http://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html#pcm_plugins_dmix 
).  Long story short, my understanding is that this means you would need

a) a different slave device defined for each audio configuration you're 
using (i.e. 48KHz, 32KHz, etc.) and ensure that Myth switches to the 
appropriate device depending on the input signal (but based on the posts 
I've seen about how to specify an ALSA device, it sounds like this would 
require significant changes to Myth), or

b) to use a plug plugin ( 
http://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html#pcm_plugins_plug 
) to convert channels, rates, and formats as appropriate.  (However, I 
think this would still require multiple device definitions and Myth's 
switching appropriately.)

I had all sorts of problems using the dmix plugins--from slow playback 
with stuttering to "chipmunk" playback (watching a movie at 1.5x with 
sound frequency shifted proportionally) depending on the input source 
(and its audio stream) I used (DVD, CD, QuickTime, etc.).  When I 
stopped using the dmix stuff and used the hardware devices directly 
(i.e. "hw:0,1" or an alias), all my troubles disappeared.  (Although 
sometimes I consider going back to "fast-forward" viewing so I can watch 
my shows without wasting so much time. :)

I may be completely wrong--this may have nothing to do with your 
symptoms--but as new as ALSA 0.9/1.x API is, it seems there is a lot of 
confusion over how to create a proper .asoundrc.  I'll be the first to 
admit I'm confused...

HTH.

Mike


More information about the mythtv-dev mailing list