Jump to content

Fine tuning ALSA for your sound card: Difference between revisions

From Rivendell Wiki
imported>WaybackImport
Imported via HTML fallback (before-primary)
 
imported>ImportBot
Imported from scrape
 
Line 1: Line 1:
Q: When I last  checked out RD six months ago (DB and audio on playback pc, using M-Audio sound card and on board sound), there was a varying delay/gap when segueing - perhaps in  the order of 50-150ms. Why is this?
'''Q:''' When I last  checked out RD six months ago (DB and audio on playback pc, using M-Audio sound card and on board sound), there was a varying delay/gap when segueing - perhaps in  the order of 50-150ms. Why is this?


A: Ah, ALSA.  There are some tuning knobs in rd.conf(5) that could significantly improve this; specifically, see the 'PeriodSize=' parameter in the [Alsa] section.  That file ships with a very conservative number for this setting so we don't xrun on setups with poor realtime performance.  Lowering it will reduce playout latency at the cost of demanding better RT performance.  At some point as you lower it, you'll start getting xruns (often audible, but can also be seen in the syslog); you generally want this set at a value just  
 
'''A:''' Ah, ALSA.  There are some tuning knobs in rd.conf(5) that could significantly improve this; specifically, see the 'PeriodSize=' parameter in the [Alsa] section.  That file ships with a very conservative number for this setting so we don't xrun on setups with poor realtime performance.  Lowering it will reduce playout latency at the cost of demanding better RT performance.  At some point as you lower it, you'll start getting xruns (often audible, but can also be seen in the syslog); you generally want this set at a value just  
above that point.  On well-tuned hardware with a preemptive kernel and an ICE2712-based card, I've been able to get this as low as 64 frames/period.
above that point.  On well-tuned hardware with a preemptive kernel and an ICE2712-based card, I've been able to get this as low as 64 frames/period.


Line 10: Line 11:
Paravel Systems
Paravel Systems


For more information also see Wiki page: [/index.php/Garbled_audio,_alsa_error_32:_Broken_pipe,_Xrun_errors Garbled audio, alsa error 32: Broken pipe, Xrun errors]
Retrieved from "[[Fine_tuning_ALSA_for_your_sound_card|http://wiki.rivendellaudio.org/index.php?title=Fine_tuning_ALSA_for_your_sound_card&oldid=38]]"


For more information also see Wiki page: [[Garbled audio, alsa error 32: Broken pipe, Xrun errors]]

Latest revision as of 10:18, 9 May 2026

Q: When I last checked out RD six months ago (DB and audio on playback pc, using M-Audio sound card and on board sound), there was a varying delay/gap when segueing - perhaps in the order of 50-150ms. Why is this?


A: Ah, ALSA. There are some tuning knobs in rd.conf(5) that could significantly improve this; specifically, see the 'PeriodSize=' parameter in the [Alsa] section. That file ships with a very conservative number for this setting so we don't xrun on setups with poor realtime performance. Lowering it will reduce playout latency at the cost of demanding better RT performance. At some point as you lower it, you'll start getting xruns (often audible, but can also be seen in the syslog); you generally want this set at a value just above that point. On well-tuned hardware with a preemptive kernel and an ICE2712-based card, I've been able to get this as low as 64 frames/period.

Frederick F. Gleason, Jr.

Chief Developer

Paravel Systems


For more information also see Wiki page: Garbled audio, alsa error 32: Broken pipe, Xrun errors