[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] Bug in ALSA write error handling?

From: Simon Morlat
Subject: Re: [Linphone-developers] Bug in ALSA write error handling?
Date: Tue, 16 May 2006 10:39:38 +0200
User-agent: KMail/1.9.1


Thanks for noticing those few problems.
I'll not merge the patch since this part of code has been completely rewritten 
in development branch (see mediastreamer2 in cvs).
However I'll attempt to add the missing error recovery code in this branch in 
a different way.


Le Lundi 15 Mai 2006 17:47, Greg Farrell a écrit :
> Hi,
>     I've been running into problems reliably controlling linphonec
> programatically
> via a fifo socket. It would sometimes fail to write to ALSA's output
> device.
> I tracked this down to
> mediastreamer/alsacard.c/ __alsa_card_write()
> This method writes data to the output device using snd_pcm_writei().
> The problem I'm experiencing is that it doesn't seem to handle any
> errors more
> serious than EPIPE. If a more serious error like EBADFD (which I've seen
> ocassionally)
> occurs then linphone will not recover and the output device will be
> useless for the
> duration of the rest of the phone call.
> Instead would it be reasonable for linphone to close the output device
> and then re-open
> it on serious error. This is what I've changed the code to do for myself
> and it makes linphone
> much more reliable in my situation.
> There is also a similar problem in
> alsa_card_can_read(AlsaCard)
> where the input device can be in state
> meaning that an overrun has occured. Linphone does not catch this and
> hence does not
> recover from this state. ALSA will not I believe recover from this state
> itself, it expects the
> application using it to do so via a snd_pcm_drain() call.
> Both these problems are fixed in the attached patches. They're not
> particularly elegant as they're
> just a fix for the problem here. I'm hoping that if this really is a
> problem they'll help you fix it.
> linphone_alsa_write_recovery is against a recent 1.3.4 source.
> alsaxrun.patch was not written by myself
> but by a colleague and is against an old 0.12 branch, although the code
> has scarely changed in 1.3.4.
>    thanks for Linphone,
>          Greg

reply via email to

[Prev in Thread] Current Thread [Next in Thread]