[mythtv] [PATCH] audiooutputalsa

John Patrick Poet john at BlueSkyTours.com
Wed Aug 18 01:30:58 EDT 2004

David George wrote:

> This patch addresses a couple of issues with audiooutputalsa and has 
> some cleanups and additional debugging to help anyone troubleshooting 
> alsa issues on their system.
> Currently if WriteAudio fails it closes pcm_handle.  This patch adds 
> the ability to try to open an audio file handle again.  If the re-open 
> fails it will then then return the same as it previously did.  This 
> was discovered when I was troubleshooting audio problems on an HDTV 
> stream.  AudioOutputAlsa::Reconfigure was reworked a little to support 
> this.
> Currently if the audiolen was the same as the fragment size the audio 
> thread would sit there waiting for more data.  I didn't really see the 
> point in waiting so when there are 4096 bytes waiting to be sent, send 
> it.
> Currently if the audio rates don't match the logs would show mismatch 
> but the second arg wasn't the mismatched rate.  This is a resend of a 
> patch I sent on July 13th.
> Patch to log error if snd_pcm_hw_params_malloc fails.  It stills works 
> the same as it currently does, except now logs an error to notify you.
> Added pcm_handle = NULL; after a snd_pcm_close(pcm_handle) in 
> AudioOutputAlsa::Reconfigure.
> Remove unused variable "written" in WriteAudio.
> Log warning that snd_pcm_delay return is meaningless unless alsa is in 
> the running state.
> Cleaned up a couple of non-4space indents.
> Thats about it for this one.
> Thanks,
> David

This appears to have fixed my problem with the audio cutting out.  Thank 


More information about the mythtv-dev mailing list