[alsa-devel] Alsa 32-64 bit issue
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
At Wed, 02 Jul 2008 13:48:18 +0200, Wolfgang Rosenauer wrote:
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)"
It means that no data is present on the buffer.
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
Hi,
Takashi Iwai wrote:
At Wed, 02 Jul 2008 13:48:18 +0200, Wolfgang Rosenauer wrote:
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)"
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
Wolfgang Rosenauer wrote:
Takashi Iwai wrote:
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
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:
Wolfgang Rosenauer wrote:
Takashi Iwai wrote:
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 Alsa-devel@alsa-project.org 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
Hi,
Gustavo da Silva Serra wrote:
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
participants (3)
-
Gustavo da Silva Serra
-
Takashi Iwai
-
Wolfgang Rosenauer