[alsa-devel] Problem with aloop

Benjamin van den Hout bvdhout at gmail.com
Fri May 9 14:46:07 CEST 2008

Gustavo da Silva Serra wrote:

>    I am developing an application that captures sound and send it
> through a network, just like a sound server. To test it I am using
> kaffeine with alsa output plugin. After some time playing continuously,
> or if I keep moving the position slider backward and forward, I get
> choppy sound. If I close and reopen the capture stream opened by my
> sound server, the sound is restored to good quality. Sometimes I have to
> reopen many times before I get a good sound. When I use kaffeine oss
> output plugin I don't have this issue. I don't have an audio sound card,
> so I don't know if this is an *aloop* issue.

> Here are some details:
>- RedHat EL 4 kernel 64bit
>- Alsa 1.0.16
>- Xinelib 1.1.12

Hi all,

I'm experiencing the same problem as Gustavo. In my case I have a SIP
client calling to another PC and I'm injecting audio with aplay (or
amarok, no difference there) into that SIP call. About 8/10 times
everything goes well, the other two times the audio that comes out at
the other PC sounds really choppy. Both PC's are on the same local
network so that is probably not the problem.

What I found out is that if I patch aloop-kernel.c in the 'static
struct snd_pcm_hardware snd_card_loopback_info' to have ".formats =
 (SNDRV_PCM_FMTBIT_S8 )," this problem goes away. But then I'm stuck
with 8 bit audio. It sounds a bit like the aloop device sometimes
doesn't properly synchronise the 16 bit (or 32bit, tried that as well)
samples on both PCM devices and things get mis-aligned. I'm quite new
to ALSA so please don't laugh too hard if I'm missing something here

Any input is greatly appreciated!

Kind regards,
Benjamin van den Hout

More information about the Alsa-devel mailing list