All of lore.kernel.org
 help / color / mirror / Atom feed
* Jack-Alsa plugin - problems
@ 2004-01-05 11:29 Ed Wildgoose
  2004-01-05 14:02 ` Paul Davis
  2004-01-07 14:21 ` Jack-Alsa plugin - problems (does it work at all?!) Ed Wildgoose
  0 siblings, 2 replies; 4+ messages in thread
From: Ed Wildgoose @ 2004-01-05 11:29 UTC (permalink / raw)
  To: alsa-devel

Hi, I'm having some problems getting the alsa input into Jack working
correctly.

The soundcard is an RME96/8 PAD, Alsa from Kernel 2.6 pre9, and Jack version
0.91.1 - I'm firing up Jackd with:

jackd -R -t 2000 -d alsa -d rme96 -r 44100 -p 1024 -n 8 -m -zs -H -M &

...and I have an asound config (below) which lets me play sounds correctly
with something like: aplay -D jackplug blah.wav

However, trying to use either xmms, mplayer or mythtv with the same alsa
device just seems to leave the app "hanging" and not doing anything, and
attempts to fastforward in mplayer and mythtv (which presumably causes the
alsa layer in each app to try and pause then reopen the sound layer) causes
the error:

"You cannot set callbacks on an active client
cannot connect alsaP:out_000
 to alsa_pcm:playback_1"

No sound comes out...

Is this an alsa issue, sound card driver problem or something else?  Apart
from aplay (which does work) are there any other things I should try to test
the alsa-jack plugin?  Just for reference at least some native jack apps
seem to be working fine, although I haven't tried the xmms-jack plugin yet.

Can anyone please help with some debugging ideas here.  I'm really keen to
get Jack working as it seems to be the best way to integrate Brutefir in
order to do some fancy room correction effects (note: Brutefir is not active
in the failed tests above, just to remove some variables...)

Thanks all

/etc/asoundrc.conf

        pcm.rme96 {
                type hw
                card 0
        }

        ctl.rme96 {
                type hw
                card 0
        }

#    pcm.!default {
#       type plug
#       slave.pcm "jackplug"
#    }

        pcm.jackplug {
                type plug
                slave { pcm "jack" }
        }

        pcm.jack {
                type jack
                playback_ports {
                       0 alsa_pcm:playback_1
                       1 alsa_pcm:playback_2
                }
                capture_ports {
                       0 alsa_pcm:capture_1
                       1 alsa_pcm:capture_2
                }
        }



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click

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

* Re: Jack-Alsa plugin - problems
  2004-01-05 11:29 Jack-Alsa plugin - problems Ed Wildgoose
@ 2004-01-05 14:02 ` Paul Davis
  2004-01-05 17:28   ` Ed Wildgoose
  2004-01-07 14:21 ` Jack-Alsa plugin - problems (does it work at all?!) Ed Wildgoose
  1 sibling, 1 reply; 4+ messages in thread
From: Paul Davis @ 2004-01-05 14:02 UTC (permalink / raw)
  To: Ed Wildgoose; +Cc: alsa-devel

>However, trying to use either xmms, mplayer or mythtv with the same alsa
>device just seems to leave the app "hanging" and not doing anything, and
>attempts to fastforward in mplayer and mythtv (which presumably causes the
>alsa layer in each app to try and pause then reopen the sound layer) causes
>the error:
>
>"You cannot set callbacks on an active client
>cannot connect alsaP:out_000
> to alsa_pcm:playback_1"

if these clients really do call snd_pcm_close() when ffwd'ing, then
there must be some mistake in the ALSA JACK plug, because it should
close the client down. if they do not call snd_pcm_close() then i am
not sure what the ALSA JACK plug might be doing.

in short, its a problem with the interaction between the design of
these apps and the ALSA JACK plug. JACK clients are supposed to run
continuously. these apps don't do that, it appears, and they are
triggering some problem with the JACK plug. 

--p




-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click

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

* Re: Jack-Alsa plugin - problems
  2004-01-05 14:02 ` Paul Davis
@ 2004-01-05 17:28   ` Ed Wildgoose
  0 siblings, 0 replies; 4+ messages in thread
From: Ed Wildgoose @ 2004-01-05 17:28 UTC (permalink / raw)
  To: Paul Davis; +Cc: alsa-devel

> >"You cannot set callbacks on an active client
> >cannot connect alsaP:out_000
> > to alsa_pcm:playback_1"
>
> if these clients really do call snd_pcm_close() when ffwd'ing, then
> there must be some mistake in the ALSA JACK plug, because it should
> close the client down. if they do not call snd_pcm_close() then i am
> not sure what the ALSA JACK plug might be doing.

I can check the code, but I suspect that they dont call pcm_close.  I think
the channel is paused and new data loaded.

However, the point is slightly moot.  Nothing at all comes out, the app
appears to hang, and in the case of mplayer, it only gets these errors after
the delay gets so large that overflows occur and mplayer obviously shuffles
forward a bit to get back in sync.  It appears that JACK is not accepting
anything from the alsa client and they are just blocking.

Neither mplayer, xmms, or mythtv can get anything into Jack as far as I can
tell.  There is nothing in the Jack log though...



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click

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

* Jack-Alsa plugin - problems (does it work at all?!)
  2004-01-05 11:29 Jack-Alsa plugin - problems Ed Wildgoose
  2004-01-05 14:02 ` Paul Davis
@ 2004-01-07 14:21 ` Ed Wildgoose
  1 sibling, 0 replies; 4+ messages in thread
From: Ed Wildgoose @ 2004-01-07 14:21 UTC (permalink / raw)
  To: alsa-devel



> Hi, I'm having some problems getting the alsa input into Jack working
> correctly.
>
> The soundcard is an RME96/8 PAD, Alsa from Kernel 2.6 pre9, and Jack
version
> 0.91.1 - I'm firing up Jackd with:
>
> jackd -R -t 2000 -d alsa -d rme96 -r 44100 -p 1024 -n 8 -m -zs -H -M &
>
> ...and I have an asound config (below) which lets me play sounds correctly
> with something like: aplay -D jackplug blah.wav
>
> However, trying to use either xmms, mplayer or mythtv with the same alsa
> device just seems to leave the app "hanging" and not doing anything, and
> attempts to fastforward in mplayer and mythtv (which presumably causes the
> alsa layer in each app to try and pause then reopen the sound layer)
causes
> the error:
>
> "You cannot set callbacks on an active client
> cannot connect alsaP:out_000
>  to alsa_pcm:playback_1"
>
> No sound comes out...
>
> Is this an alsa issue, sound card driver problem or something else?  Apart
> from aplay (which does work) are there any other things I should try to
test
> the alsa-jack plugin?  Just for reference at least some native jack apps
> seem to be working fine, although I haven't tried the xmms-jack plugin
yet.
>
> Can anyone please help with some debugging ideas here.  I'm really keen to
> get Jack working as it seems to be the best way to integrate Brutefir in
> order to do some fancy room correction effects (note: Brutefir is not
active
> in the failed tests above, just to remove some variables...)
>

I've still not got this working *at all*.  I have switched in a new RME 9632
card to compare, and upgraded the drivers on my 2.6.1mm2 kernel to the
latest tarball 1.0rc2 versions.

Still the same issue.  Every app just sits there hanging or making no sound
when you ask it to play to the jackplug pcm device.  Most recently I
installed alsaplayer and the same happens here - it's own native jack output
layer works a treat, but the alsa output to the jack output just plays
silence (although it doesn't seem to hang the app now...)

I did spot one problem in that I hadn't created a ctl device for my pcm
originally, but my new asoundrc is below and this doesn't play anything...

Does someone have this working *at all* on their system? Could you please
demonstrate your asoundrc and list your soundcard make/model and versions of
drivers.

Thanks

        pcm.rme96 {
                type hw
                card 0
        }

        ctl.rme96 {
                type hw
                card 0
        }

        pcm.jackplug {
                type plug
                slave { pcm "jack" }
        }

        ctl.jackplug {
                type hw
                card 0
        }

        pcm.jack {
                type jack
                playback_ports {
                       0 alsa_pcm:playback_1
                       1 alsa_pcm:playback_2
                }
                       capture_ports {
                       0 alsa_pcm:capture_1
                       1 alsa_pcm:capture_2
               }
        }

        ctl.jack {
                type hw
                card 0
        }



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click

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

end of thread, other threads:[~2004-01-07 14:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-05 11:29 Jack-Alsa plugin - problems Ed Wildgoose
2004-01-05 14:02 ` Paul Davis
2004-01-05 17:28   ` Ed Wildgoose
2004-01-07 14:21 ` Jack-Alsa plugin - problems (does it work at all?!) Ed Wildgoose

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.