All of lore.kernel.org
 help / color / mirror / Atom feed
* snd_pcm_delay() bug
@ 2004-05-15 18:46 Ronald S. Bultje
  0 siblings, 0 replies; 3+ messages in thread
From: Ronald S. Bultje @ 2004-05-15 18:46 UTC (permalink / raw)
  To: alsa-devel

Hi,

for both my ALI 5451 and my Audigy 2 NX, snd_pcm_delay() sometimes
returns (in the second argument pointer) ridiculously high values in the
range of 2^32/bytes_per_sample (in my case, 16bitLE/stereo, that comes
down to roughly 1,1E9). I'm guessing there's some kind of
signed/unsigned or 32/64bit integer bug in this function? Is this a
known bug? Is there a fix?

Ronald


-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click

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

* snd_pcm_delay() bug
@ 2004-05-15 19:17 Ronald S. Bultje
  2004-05-16  2:06 ` James Courtier-Dutton
  0 siblings, 1 reply; 3+ messages in thread
From: Ronald S. Bultje @ 2004-05-15 19:17 UTC (permalink / raw)
  To: alsa-devel

Hi,

for both my ALI 5451 and my Audigy 2 NX, snd_pcm_delay() sometimes
returns (in the second argument pointer) ridiculously high values in the
range of 2^32/bytes_per_sample (in my case, 16bitLE/stereo, that comes
down to roughly 1,1E9). I'm guessing there's some kind of
signed/unsigned or 32/64bit integer bug in this function? Is this a
known bug? Is there a fix?

Ronald


-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click

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

* Re: snd_pcm_delay() bug
  2004-05-15 19:17 snd_pcm_delay() bug Ronald S. Bultje
@ 2004-05-16  2:06 ` James Courtier-Dutton
  0 siblings, 0 replies; 3+ messages in thread
From: James Courtier-Dutton @ 2004-05-16  2:06 UTC (permalink / raw)
  To: Ronald S. Bultje; +Cc: alsa-devel

Ronald S. Bultje wrote:
> Hi,
> 
> for both my ALI 5451 and my Audigy 2 NX, snd_pcm_delay() sometimes
> returns (in the second argument pointer) ridiculously high values in the
> range of 2^32/bytes_per_sample (in my case, 16bitLE/stereo, that comes
> down to roughly 1,1E9). I'm guessing there's some kind of
> signed/unsigned or 32/64bit integer bug in this function? Is this a
> known bug? Is there a fix?
> 
> Ronald
> 

after calling snd_pcm_delay(), call snd_pcm_state() and make sure it is 
in RUNNING state, otherwise, values returned from snd_pcm_delay() are 
meaningless.

Cheers
James


-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click

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

end of thread, other threads:[~2004-05-16  2:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-15 19:17 snd_pcm_delay() bug Ronald S. Bultje
2004-05-16  2:06 ` James Courtier-Dutton
  -- strict thread matches above, loose matches on Subject: below --
2004-05-15 18:46 Ronald S. Bultje

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.