[mythtv] ALSA Sound Driver Question

Ed W lists at wildgooses.com
Wed Jun 1 08:57:50 UTC 2005

Paul Volkaerts wrote:

>Came across the following ALSA issue porting Mythphone to use Myth's
>audiooutput class...
>The "fragment size" is fixed at 4096 bytes, which means I need to feed the
>audio output with 4096 bytes before it will begin playing. At telephony
>rates this equates to 250ms, which is far too long a delay to insert into a
>phone call (I currently use around 40ms).
>Would someone like to offer to make this configurable?  I am happy to do it
>myself but want to give the code-ownder first shout.  

I added in a variable when you open up the audio device so that you can 
specify the use.  I think it's got TV and Audio as the only options in 
the enum right now. 

I thought that it would be useful for exactly what you describe where 
you want "Phone" to mean that you drop the audio buffers right down.  
Actually I thought I was going to need to do the same for the Music 
player as well

Is that enough?  Just hook into the audio output "OpenDevice" code and 
do something sensible in response to this variable.  It's going to be 
output device dependent of course, but let people fix the various audio 
devices themselves I guess

It's on my Todo list to try and make the Audio code full duplex so that 
I can finish integrating some echo cancellation into your phone app and 
use it for a speaker phone setup in my front room.  Very short of time 
right now though (small baby...)

Ed W

More information about the mythtv-dev mailing list