Skip to contentSkip to conversation

Alsa 32-64 bit issue

DISCUSSION Wolfgang Rosenauer 3 participants 6 messages Jul 2, 2008 – Jul 3, 2008

lore
Share & tools
lore
#0 lore raw

Hi,

I'm new to to this list (and also Alsa) so please forgive me some newbie questions you probably find ;-)

I have an application which does simple PCM output to Alsa. It works so far (if pulseaudio is not used but that's another issue). But if I try to run the app (which is compiled for 32bit) on a 64bit Linux system it fails at snd_pcm_start() with the following error:

"Datenübergabe unterbrochen (broken pipe)"

So is that an app, system or kernel issue? Sound output from other 32bit applications (notably flash) works in general so I guess something in the app is broken?
What could be the issue?

Thanks,
Wolfgang
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#1 lore raw

At Wed, 02 Jul 2008 13:48:18 +0200,

Quoted 6 lines · Wolfgang Rosenauer

Hi,

I'm new to to this list (and also Alsa) so please forgive me some newbie questions you probably find ;-)

Quoted 6 lines

I have an application which does simple PCM output to Alsa. It works so far (if pulseaudio is not used but that's another issue). But if I try to run the app (which is compiled for 32bit) on a 64bit Linux system it fails at snd_pcm_start() with the following error:

"Datenübergabe unterbrochen (broken pipe)"

It means that no data is present on the buffer.

Quoted 4 lines

So is that an app, system or kernel issue? Sound output from other 32bit applications (notably flash) works in general so I guess something in the app is broken?
What could be the issue?

It's a bit hard to guess without the code. Did you check via strace?

Takashi

#2 lore raw

Hi,

Quoted 7 lines · Takashi Iwai

At Wed, 02 Jul 2008 13:48:18 +0200,

Quoted 5 lines · Wolfgang Rosenauer

Hi,

I'm new to to this list (and also Alsa) so please forgive me some newbie questions you probably find ;-)

Quoted 8 lines
Quoted 6 lines

I have an application which does simple PCM output to Alsa. It works so far (if pulseaudio is not used but that's another issue). But if I try to run the app (which is compiled for 32bit) on a 64bit Linux system it fails at snd_pcm_start() with the following error:

"Datenübergabe unterbrochen (broken pipe)"

It means that no data is present on the buffer.

That could perfectly be the case. But that isn't really a 64bit system thing, is it? I admit there is most likely something wrong with the app as it is now :-(
The thing is that we can't guarantee that there are always audio frames in the buffer since we get it as a stream from somewhere else and need to do A/V sync.
Currently we just snd_pcm_start() and only afterwards write to the buffer as the data comes in what as I understood now is not the way it's gonna work?

I've tried to set a sensible start_threshold and just leave out the snd_pcm_start() but that created a very distorted sound output (but no broken pipe indeed).

Wolfgang

#3 lore raw
Quoted 8 lines · Wolfgang Rosenauer
Quoted 7 lines · Takashi Iwai
Quoted 6 lines

I have an application which does simple PCM output to Alsa. It works so far (if pulseaudio is not used but that's another issue). But if I try to run the app (which is compiled for 32bit) on a 64bit Linux system it fails at snd_pcm_start() with the following error:

"Datenübergabe unterbrochen (broken pipe)"

It means that no data is present on the buffer.

ok, I fixed that by not using snd_pcm_start() at all. Thanks for the hint. I still have issues which I find pretty strange though:

The very same application binary always buffer underruns on my x86-64 system while it works (almost) perfectly (at least w/o buffer underruns) on my smaller i586 system.

Anyone can imagine what could cause that?

Thanks,
Wolfgang

#4 lore raw

If I am not wrong, a buffer underrun occurs when a playback application can't feed the audio buffer fast enough. You could adjust /etc/asound.conf according to your sound card, or verify if your application isn't taking too long to write to the audio buffer.

Wolfgang Rosenauer escreveu:

Quoted 38 lines
Quoted 11 lines · Wolfgang Rosenauer
Quoted 9 lines · Takashi Iwai
Quoted 7 lines

I have an application which does simple PCM output to Alsa. It works so far (if pulseaudio is not used but that's another issue). But if I try to run the app (which is compiled for 32bit) on a 64bit Linux system it fails at snd_pcm_start() with the following error:

"Datenübergabe unterbrochen (broken pipe)"

It means that no data is present on the buffer.

ok, I fixed that by not using snd_pcm_start() at all. Thanks for the hint. I still have issues which I find pretty strange though:

The very same application binary always buffer underruns on my x86-64 system while it works (almost) perfectly (at least w/o buffer underruns) on my smaller i586 system.

Anyone can imagine what could cause that?

Thanks,
Wolfgang
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

__________ NOD32 3236 (20080702) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com

#5 lore raw

Hi,

Quoted 4 lines · Gustavo da Silva Serra

If I am not wrong, a buffer underrun occurs when a playback application can't feed the audio buffer fast enough. You could adjust /etc/asound.conf according to your sound card, or verify if your application isn't taking too long to write to the audio buffer.

I found out that it's really the application which doesn't feed the buffer fast enough.
The difference is not the architecture but the sound hardware. The buffer size is just 1016 frames on that sound card which is pretty small.

Wolfgang