All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* configuration space never flattened? Bug?
@ 2004-04-29 19:56 Erik Inge Bolsø
  2004-04-30  9:41 ` Clemens Ladisch
  0 siblings, 1 reply; 3+ messages in thread
From: Erik Inge Bolsø @ 2004-04-29 19:56 UTC (permalink / raw
  To: alsa-devel

I'm having trouble doing snd_pcm_hw_params_can_pause() on a certain pcm,
even though it has already (hopefully?) been fixed to one config by
snd_pcm_hw_params()... snd_pcm_hw_params has been called, at least. How
can I check?

fileja {
        type file
        file /tmp/alsa
        slave.pcm null
}

Program: latest xine

Error message:

xine: pcm.c:2604: snd_pcm_hw_params_can_pause: Assertion `params && params->info != ~0U' failed.

... commenting out the offending call and hardcoding success Seems To Work
(TM) but is of course a hack at best.

(BTW. Using this pcm definition, named pipe /tmp/alsa and ecasound reading
from the named pipe, I now have multichannel ladspa plugins working on the
sound stream from xine. Not-at-all in sync with video, but better than
nothing :)

--
Erik I. Bolsø | email: <knan at mo.himolde.no>
The UNIX philosophy basically involves giving you enough rope to
hang yourself.  And then a couple of feet more, just to be sure.


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click

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

* Re: configuration space never flattened? Bug?
  2004-04-29 19:56 configuration space never flattened? Bug? Erik Inge Bolsø
@ 2004-04-30  9:41 ` Clemens Ladisch
  2004-05-03 18:07   ` Erik Inge Bolsø
  0 siblings, 1 reply; 3+ messages in thread
From: Clemens Ladisch @ 2004-04-30  9:41 UTC (permalink / raw
  To: Erik Inge Bolsø; +Cc: alsa-devel

Erik Inge Bolsø wrote:
> I'm having trouble doing snd_pcm_hw_params_can_pause() on a certain pcm,
> even though it has already (hopefully?) been fixed to one config by
> snd_pcm_hw_params()... snd_pcm_hw_params has been called, at least. How
> can I check?
>
> fileja {
>         type file
>         file /tmp/alsa
>         slave.pcm null
> }
>
> xine: pcm.c:2604: snd_pcm_hw_params_can_pause: Assertion `params && params->info != ~0U' failed.

Apparently, the null pcm doesn't initialize params->info.

The patch below should help.


HTH
Clemens

-- 
Index: alsa-lib/src/pcm/pcm_null.c
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/src/pcm/pcm_null.c,v
retrieving revision 1.50
diff -u -r1.50 pcm_null.c
--- alsa-lib/src/pcm/pcm_null.c	17 Mar 2004 11:48:15 -0000	1.50
+++ alsa-lib/src/pcm/pcm_null.c	30 Apr 2004 09:38:09 -0000
@@ -276,6 +276,9 @@
 {
 	int err = snd_pcm_hw_refine_soft(pcm, params);
 	params->fifo_size = 0;
+	params->info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID |
+		       SNDRV_PCM_INFO_INTERLEAVED |
+		       SNDRV_PCM_INFO_RESUME | SNDRV_PCM_INFO_PAUSE;
 	return err;
 }






-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id66&op=click

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

* Re: configuration space never flattened? Bug?
  2004-04-30  9:41 ` Clemens Ladisch
@ 2004-05-03 18:07   ` Erik Inge Bolsø
  0 siblings, 0 replies; 3+ messages in thread
From: Erik Inge Bolsø @ 2004-05-03 18:07 UTC (permalink / raw
  To: Clemens Ladisch; +Cc: alsa-devel

On Fri, 30 Apr 2004, Clemens Ladisch wrote:
>Erik Inge Bolsø wrote:
>> I'm having trouble doing snd_pcm_hw_params_can_pause() on a certain pcm,
>> even though it has already (hopefully?) been fixed to one config by
>> snd_pcm_hw_params()... snd_pcm_hw_params has been called, at least. How
>> can I check?
>>
>> fileja {
>>         type file
>>         file /tmp/alsa
>>         slave.pcm null
>> }
>>
>> xine: pcm.c:2604: snd_pcm_hw_params_can_pause: Assertion `params && params->info != ~0U' failed.
>
>Apparently, the null pcm doesn't initialize params->info.
>
>The patch below should help.

Yep, works fine. Thanks!

--
Erik I. Bolsø | email: <knan at mo.himolde.no>
The UNIX philosophy basically involves giving you enough rope to
hang yourself.  And then a couple of feet more, just to be sure.


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click

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

end of thread, other threads:[~2004-05-03 18:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-29 19:56 configuration space never flattened? Bug? Erik Inge Bolsø
2004-04-30  9:41 ` Clemens Ladisch
2004-05-03 18:07   ` Erik Inge Bolsø

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.