Article 6J708 ALSA - PCM Underrun Issue

ALSA - PCM Underrun Issue

by
Ravichandra
from LinuxQuestions.org on (#6J708)
We're encountering a PCM underrun issue in Interleaved Mode while playing a single-channel audio through Alsa-lib. The error message "(snd_pcm_recover) underrun occurred" is being displayed when writing data to the speaker.

Here's what we've attempted so far:
  1. Successfully played the same audio using aplay.
  2. Generated complete buffers from text-to-speech engine and played them without issues using alsa-lib.
The problem arises when we simultaneously generate audio buffers from a Text-to-Speech Conversion engine and feed the data to the speaker through alsa-lib. PCM underrun occurs intermittently in this scenario.

We are using a sampling rate of 22kHz. Are there any specific ALSA configurations or settings that can be adjusted to prevent PCM underrun in this context?
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments