Skip to contentSkip to conversation

Jack-Alsa plugin - problems

DISCUSSION Ed Wildgoose 2 participants 4 messages Jan 5, 2004 – Jan 7, 2004

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 9 lines

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

#2 lore raw
Quoted 8 lines
Quoted 3 lines

"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

#3 lore raw

Jack-Alsa plugin - problems (does it work at all?!)

In reply to Ed Wildgoose
Quoted 6 lines

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

Quoted 11 lines

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

Quoted 10 lines

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

Quoted 2 lines

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.

Quoted 4 lines

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

Quoted 2 lines

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