[alsa-devel] Noise in begnning of alsa application

Takashi Iwai tiwai at suse.de
Mon Jan 21 22:07:14 CET 2019


On Mon, 21 Jan 2019 19:07:09 +0100,
Pavel Hofman wrote:
> 
> 
> Dne 21. 01. 19 v 18:46 Chakravarthi Pradeep napsal(a):
> > On Wed, Jan 16, 2019 at 5:07 PM Chakravarthi Pradeep <doubleq7 at gmail.com> wrote:
> >>
> >> I have ALSA driver for capture device which works fine with VLC. when
> >> I try to capture and render using own application having some issues.
> >> When I start play, it has some noise in beginning and audio is
> >> discontinuous in between. Discontinuous means, some audio frame are
> >> getting dropped in between. cut cut sound for sine wave. I have tried
> >> snd_pcm_drop and snd_pcm_drain but no use. Kindly suggest how to
> >> remove the starting noise in ALSA.
> 
> I have experienced the same issue, with ice172 driver. IMO part of the
> first period when opening the stream contains samples from the
> previous run. In one of my my projects I have to drop initial samples
> in order to get correct and stable results from FFT analysis.
> 
> I do not know if the problem is in the driver, alsa-lib or if the
> application (in my case the SDL library) uses alsa-lib API
> incorrectly. To tell the truth I did not investigate details and
> "fixed" it by dropping the initial samples.

It's likely a driver-specific problem, but still wondering how it
happens.  Does the whole first period contain the previous samples, or
just a few beginning samples?

Also is it on the x86 PC, or on other architecture?


thanks,

Takashi


More information about the Alsa-devel mailing list