Commit 1e52d240 authored by Pavlov Konstantin's avatar Pavlov Konstantin

Fix alsa audio output on intel ICH8 with alsa 1.0.14 (maybe even 1.0.14+).

This fixes those annoying messages:
[00000307] main audio output debug: audio output is starving (38397), playing silence
[00000307] alsa audio output debug: recovered from buffer underrun
and sound becomes just fine.
Tested on 32bit and x86_64 systems.
parent bd7e2cb5
......@@ -816,6 +816,10 @@ static void ALSAFill( aout_instance_t * p_aout )
/* Here the device should be either in the RUNNING state.
* p_status is valid. */
snd_pcm_sframes_t delay = snd_pcm_status_get_delay( p_status );
if( delay == 0 )/* sometimes snd_pcm_status_get_delay() returns 0 */
if( snd_pcm_delay( p_sys->p_snd_pcm, &delay ) < 0 )
delay = 0;
int i_bytes = snd_pcm_frames_to_bytes( p_sys->p_snd_pcm, delay );
next_date = mdate() + ( (mtime_t)i_bytes * 1000000
/ p_aout->output.output.i_bytes_per_frame
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment