Re: Any OSS changes from kernel 2.6.21 to 2.6.23? Something broke.

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

 



Clemens Ladisch wrote:
> Timur Tabi wrote:
>> It turns out that ALSA (when using mplayer to play a divx video file via OSS 
>> emulation) is rapidly sending back-to-back SNDRV_PCM_TRIGGER_STOP and 
>> SNDRV_PCM_TRIGGER_START commands.  Why would it do that?
> 
> To recover from underruns.

I've added some function traces to ALSA, and apparently ALSA is telling the 
driver to STOP when the driver calls snd_pcm_period_elapsed().  Here's a log:

snd_pcm_period_elapsed
snd_pcm_update_hw_ptr_interrupt:232  <- last line of this function
PERIOD	<- printk in the driver's ISR
snd_pcm_period_elapsed
snd_pcm_update_hw_ptr_interrupt:232
snd_pcm_update_hw_ptr_post
xrun
snd_pcm_stop
snd_pcm_action
snd_pcm_action_single
snd_pcm_do_stop
STOP 279 <- command to stop after sub-buffer #279, which is at the end of the period

Unfortunately, very little of the code in sound/core/pcm???.c is documented, so 
I'm having a hard time figuring out what's going on.  Why is ALSA telling the 
driver to stop during a period interrupt?

-- 
Timur Tabi
Linux kernel developer at Freescale
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux