All of lore.kernel.org
 help / color / mirror / Atom feed
* Problems with snd_pcm_wait(..)
@ 2010-01-11 11:38 Markus Luttenberger
  2010-01-11 11:45 ` Jaroslav Kysela
  2010-01-11 11:48 ` Markus Luttenberger
  0 siblings, 2 replies; 3+ messages in thread
From: Markus Luttenberger @ 2010-01-11 11:38 UTC (permalink / raw)
  To: alsa-devel

Hey,


I tried to implement a callback functionality with ALSA based on the 
example given at 
http://www.cs.utk.edu/~vose/linux/equalarea.com/alsa-audio.html#interruptex. 
Especially the while-loop is basically the same in my program. However, 
it doesn't work. I can trace the program to snd_pcm_wait(..) which just 
waits endlessly.

The whole thing is called within a thread. The thread is still 
accessible from elsewhere in the pogram. It's just the 
snd_pcm_wait(..)-function which does not return although a time-out of 
1000 ms is given.

If I don't wait for the device I get the following assertion:
pcm.c:1079: snd_pcm_writei: Assertion `size == 0 || buffer' failed.

Any ideas what could be wrong?




greetings..
..Markus

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

* Re: Problems with snd_pcm_wait(..)
  2010-01-11 11:38 Problems with snd_pcm_wait(..) Markus Luttenberger
@ 2010-01-11 11:45 ` Jaroslav Kysela
  2010-01-11 11:48 ` Markus Luttenberger
  1 sibling, 0 replies; 3+ messages in thread
From: Jaroslav Kysela @ 2010-01-11 11:45 UTC (permalink / raw)
  To: Markus Luttenberger; +Cc: alsa-devel

On Mon, 11 Jan 2010, Markus Luttenberger wrote:

> Hey,
>
>
> I tried to implement a callback functionality with ALSA based on the
> example given at
> http://www.cs.utk.edu/~vose/linux/equalarea.com/alsa-audio.html#interruptex.
> Especially the while-loop is basically the same in my program. However,
> it doesn't work. I can trace the program to snd_pcm_wait(..) which just
> waits endlessly.

Which device you're using? If PulseAudio is in path, there is a bug fixed 
recently:

https://bugzilla.redhat.com/show_bug.cgi?id=534130

 					Jaroslav

-----
Jaroslav Kysela <perex@perex.cz>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.

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

* Re: Problems with snd_pcm_wait(..)
  2010-01-11 11:38 Problems with snd_pcm_wait(..) Markus Luttenberger
  2010-01-11 11:45 ` Jaroslav Kysela
@ 2010-01-11 11:48 ` Markus Luttenberger
  1 sibling, 0 replies; 3+ messages in thread
From: Markus Luttenberger @ 2010-01-11 11:48 UTC (permalink / raw)
  To: alsa-devel

Markus Luttenberger schrieb:
> I tried to implement a callback functionality with ALSA based on the 
> example given at 
> http://www.cs.utk.edu/~vose/linux/equalarea.com/alsa-audio.html#interruptex. 
> Especially the while-loop is basically the same in my program. However, 
> it doesn't work. I can trace the program to snd_pcm_wait(..) which just 
> waits endlessly.

Oops, I overlooked something obvious (I set the 
snd_pcm_sw_params_set_avail_min(..) to the wrong value). Ignore my 
question, sorry.


greetings..
..Markus

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

end of thread, other threads:[~2010-01-11 11:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-11 11:38 Problems with snd_pcm_wait(..) Markus Luttenberger
2010-01-11 11:45 ` Jaroslav Kysela
2010-01-11 11:48 ` Markus Luttenberger

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.