Subject: Re: audio fail
To: Iain Hibbert <>
From: Jared D. McNeill <>
List: tech-kern
Date: 09/24/2006 10:01:48
On 24-Sep-06, at 8:39 AM, Iain Hibbert wrote:

> Hi,
>    I find a lack in the audio(4) layer with regards to bluetooth  
> audio -
> the way I worked it was that if the bluetooth device goes out of  
> range or
> turns off or whatever, the connection is lost and btsco(4) returns an
> error from the start_input()/start_output() functions - currently this
> error does not get propagated to userland but is lost in the interrupt
> handler, and the audio layer continues looping without realising  
> that it
> has occurred (eg in audio_read() or audio_write())
> The attached patch does seem to handle the problem, and when using
> audioplay/audiorecord in conjunction with bthset(1) it fails  
> cleanly as
> the connection is lost.
> Would this be the correct way to handle this?

This seems reasonable to me. Now, it doesn't help 95% of audio  
drivers (who use trigger_input/output instead of start_input/output),  
but it's a start :)