All of lore.kernel.org
 help / color / mirror / Atom feed
* Alsa 32-64 bit issue
@ 2008-07-02 11:48 Wolfgang Rosenauer
  2008-07-02 12:15 ` Takashi Iwai
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Rosenauer @ 2008-07-02 11:48 UTC (permalink / raw)
  To: alsa-devel

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
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Alsa 32-64 bit issue
  2008-07-02 11:48 Alsa 32-64 bit issue Wolfgang Rosenauer
@ 2008-07-02 12:15 ` Takashi Iwai
  2008-07-02 12:40   ` Wolfgang Rosenauer
  0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2008-07-02 12:15 UTC (permalink / raw)
  To: Wolfgang Rosenauer; +Cc: alsa-devel

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Alsa 32-64 bit issue
  2008-07-02 12:15 ` Takashi Iwai
@ 2008-07-02 12:40   ` Wolfgang Rosenauer
  2008-07-02 18:42     ` Wolfgang Rosenauer
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Rosenauer @ 2008-07-02 12:40 UTC (permalink / raw)
  To: tiwai; +Cc: alsa-devel

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Alsa 32-64 bit issue
  2008-07-02 12:40   ` Wolfgang Rosenauer
@ 2008-07-02 18:42     ` Wolfgang Rosenauer
  2008-07-02 19:07       ` Gustavo da Silva Serra
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Rosenauer @ 2008-07-02 18:42 UTC (permalink / raw)
  To: alsa-devel

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Alsa 32-64 bit issue
  2008-07-02 18:42     ` Wolfgang Rosenauer
@ 2008-07-02 19:07       ` Gustavo da Silva Serra
  2008-07-03 11:28         ` Wolfgang Rosenauer
  0 siblings, 1 reply; 6+ messages in thread
From: Gustavo da Silva Serra @ 2008-07-02 19:07 UTC (permalink / raw)
  To: Wolfgang Rosenauer; +Cc: alsa-devel

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
>
>
>
>   

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Alsa 32-64 bit issue
  2008-07-02 19:07       ` Gustavo da Silva Serra
@ 2008-07-03 11:28         ` Wolfgang Rosenauer
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Rosenauer @ 2008-07-03 11:28 UTC (permalink / raw)
  To: Gustavo da Silva Serra; +Cc: alsa-devel

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-07-03 11:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-02 11:48 Alsa 32-64 bit issue Wolfgang Rosenauer
2008-07-02 12:15 ` Takashi Iwai
2008-07-02 12:40   ` Wolfgang Rosenauer
2008-07-02 18:42     ` Wolfgang Rosenauer
2008-07-02 19:07       ` Gustavo da Silva Serra
2008-07-03 11:28         ` Wolfgang Rosenauer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.