Re: [linux-audio-user] Which kernel for low latency and kernel 2.6.1-mm# problems

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-user] Which kernel for low latency and kernel 2.6.1-mm# problems
From: Takashi Iwai (tiwai_AT_suse.de)
Date: Thu Jan 22 2004 - 12:15:34 EET


At Wed, 21 Jan 2004 15:24:22 -0800,
Andrew Morton wrote:
>
>
> Takashi, it would be really, really useful if we could modify the ALSA
> drivers to identify at interrupt time when an underrun has occurred and to
> drop a stack dump at that point. Would that be possible? Something like:
>
> foo_interrupt()
> {
> ...
> if (there is no audio left to play) {
> if (sysctl_debug_audio_underruns) {
> printk("audio underrun!\n");
> dump_stack();
> }
> }
> ...
> }
>
> The backtrace will tell us what the kernel was doing when it should have
> been context switching instead. People can set the sysctl and send angry
> emails to kernel developers.
>
> Is this possible?

sure, we have already the underrun/overrun detection in the ALSA
common PCM layer (sound/core/pcm_lib.c: snd_pcm_update_hw_ptr_post).
just adding the code like above should work.

Takashi


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Thu Jan 22 2004 - 12:15:28 EET