Re: [RFC] disabling ALSA period interrupts

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

 



2010/5/12 pl bossart <bossart.nospam@xxxxxxxxx>

> > Some care would need to be taken with regards to detecting xruns.
> > I think the alsa code currently uses the interrupt callback to detect
> this.
> > I have seen a Windows 7 machine happily loop the audio buffer
> > uncontrollably, so I assume it has problems detecting xruns as well.
>
> When the PulseAudio timer fires, the use of snd_pcm_avail() will force
> a call to .pointer and will detect underflows. PulseAudio modilfies
> its watermark when underflows occur so that more time is allocated to
> refilling the ring buffer.
> There are probably some cases I didn't plan for, but on paper I don't
> really see a show-stopper here.
>

Refer to your patch "add rewind-safeguard parameter"

http://git.0pointer.de/?p=pulseaudio.git;a=commit;h=4df443bbe682055a41e7c2248877dcc7682a69b8

you mention glitch occur because application cannot rewind appl pointer to
hardware ptr.

In another word, app ptr must be 128/256 bytes ahead of hardware ptr at any
time to prevent glitch occur. this mean that the glitch was due to DMA brust
size since "PulseAudio modilfies its watermark when underflows occur".
_______________________________________________
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