ALSA: aloop: Add 'hrtimer' option to timer_source
The snd-aloop driver currently defaults to using the system jiffies
timer (struct timer_list). On systems configured with a low timer
interrupt frequency (e.g., CONFIG_HZ=250), the jiffies resolution
(4ms per tick) is insufficient for precise audio timing. For
example, a 10ms audio period requires 2.5 jiffies ticks, causing
timing jitter that leads to capture underruns.
Introduce "hrtimer" as a supported timer_source option. When
timer_source="hrtimer" is set, aloop uses high-resolution timers
(hrtimer) to drive period updates. This provides nanosecond-level
accuracy regardless of CONFIG_HZ and operates independently of other
hardware audio cards.
Signed-off-by: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Link: https://patch.msgid.link/20260705125941.1203871-1-yuhsuan@chromium.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 file changed