[pulseaudio-discuss] strange pulse / jack behaviour

Richard Bown richard at g8jvm.com
Tue Oct 30 02:17:58 PDT 2012


On Tue, 30 Oct 2012 11:16:18 +1100
Patrick Shirkey <pshirkey at boosthardware.com> wrote:

> 
> On Tue, October 30, 2012 8:54 am, Patrick Shirkey wrote:
> >
> > On Tue, October 30, 2012 8:22 am, Patrick Shirkey wrote:
> >>
> >> It looks like the real issue is that the packager for jackd2
> >> didn't compile with dbus support.
> >>
> >> I'll see if I can track them down and discuss with them on why they are
> >> doing that. Unless someone here knows already.
> >>
> >
> > I can see that jackdbus support was compiled into jackd2 from the
> > dependencies for the package and I can also see that
> > module-jackdbus-connect is loaded with
> >
> >     pacmd list-modules
> >
> > So, any thoughts on why the dbus module is not kicking in?
> >
> > pulseaudio 2.0
> > jackdmp 1.9.9 (jackd2)
> >
> >
> 
> 
> Enabling the "enable dbus" setting in the "misc" tab for qjackctl allows
> module-jackdbus-detect to do it's thing except now I get this error:
> 
> ++++
> Failed to acquire device name : Audio0 error : Method "RequestRelease"
> with signature "i" on interface "org.freedesktop.ReserveDevice1" doesn't
> exist
> Audio device hw:0 cannot be acquired..
> ++++
> 
> 
> It seems there are no definitive solutions for this online so perhaps
> someone here can enlighten me?
> 
> 
> --
> Patrick Shirkey
That looks like something is using that device.
run 
aplay -l and look for the ALSA name of the device you are using
run 
pactl list module short
Identify the module by the ALSA name 

then
pactl unload-module < module number >

Also when starting jackd  try using hw:<ALSA NAME> instead of a number
when your system starts your audio devices will not always have the same device
number, BUT they will always have the same ALSA name.

see below

#############################################################################
#! /bin/bash                                                                #
#  READ THIS
#  run aplay -l and in the line below |grep M66| replace the ALSA name of your card
#  so it reads | grep <Alsa card name>. EXACTLY as shown in aplay -l
#
## Unload the pulseaudio module for your audio card
Card='device_id="'
# example :get the ALSA card number for M-Audio D66 card
	S1=`aplay -l|grep M66|grep -v grep |awk '{print $2}'| sed 's/\:$//'`
	 if [ ! $S1 == 0 ]; then
		  echo " ALSA Card Number=" $S1;device=$Card$S1
	 fi
	  	
 	mod=`pactl list short modules| grep $device |awk '{print $1}'`
 
         if [ ! $mod == 0 ]; then  pactl unload-module $mod
                echo "Module" $mod " has been unloaded"
         else 
              echo  "no module to unload"
	                 
         fi

sleep 1
###################################################################
# Check if jackd is running and kill it before starting a new jack session

    TMP=`ps -ef | grep jackd | grep -v grep | wc -l`
    if [ ! $TMP == 0 ]; then
	killall jackd
        echo "jackd is still running. Stopping stale daemon..."
    fi
###  replace M66 with your ALSA card name
$JACKD -R -t 9999 -d alsa -r 48000 -C hw:M66 -P hw:M66 -n 4 -p 1024 &

sleep 1

### Check for existing Jack sink/ source PA modules ######################

TMP=`pactl list modules | grep jack-sink | grep -v grep | wc -l`
    if [  $TMP == 0 ]; then
      echo "loading module-jack-sink.."
      /usr/bin/pactl load-module module-jack-sink channels=2
    fi
TMP=`pactl list modules | grep jack-source | grep -v grep | wc -l`
    if [  $TMP == 0 ]; then
      echo "loading module-jack-source."
      /usr/bin/pactl load-module module-jack-source channels=2
    fi
/usr/bin/pacmd set-default-sink jack_out
sleep 1
###########################################################################
### Start your application here, like the example below
# Start WSJT
#    echo "> Starting wsjt..."
#     cd $WSJT
#      python wsjt.py &
#	WSJT_PID=`ps ef |grep 'python wsjt.py'|grep -v grep | awk '{print $1}'`
#       if [ $WSJT_PID ] ; then
#         echo $WSJT_PID > /tmp/wsjt.pid
#         echo "  Succeeded.  wsjt PID is $WSJT_PID"
#       else
#         echo "  Failed"
#      exit 1
#    fi
##########################################################################
#    Start Qjackctl

/usr/bin/qjackctl &
##########################################################################
#  Example of connecting jack ports , Declare JACKC and your application
#  at the start of the script
# Connect the jack ports sdr-core to sdr-shell
#    echo "> Connecting dttsp to jack..."#
#    sleep 1
#    echo "  sdr-$DTTSP_PID:ol -> system:playback_1"
#    $JACKC sdr-$DTTSP_PID:ol system:playback_1
#    echo "  sdr-$DTTSP_PID:or -> system:playback_2"
#    $JACKC sdr-$DTTSP_PID:or system:playback_2
#    echo "  sdr-$DTTSP_PID:ol -> system:playback_3"
#    $JACKC sdr-$DTTSP_PID:ol system:playback_3
#    echo "  sdr-$DTTSP_PID:or -> system:playback_4"
#
#
#    $JACKC  system:capture_1 sdr-$DTTSP_PID:ir 
#    echo "  sdr-$DTTSP_PID:ir -> system:capture_1"
#    $JACKC  system:capture_2 sdr-$DTTSP_PID:il 
#    echo "  sdr-$DTTSP_PID:il -> system:capture_2"



Make sure you are in jackusers and audio groups

HTH

-- 
-- 
Best wishes / 73
Richard Bown

e-mail: richard at g8jvm.com  




 Mail now hosted by SimplyMailSolutions 
Please avoid using old e-mail address of richard.bown at blueyonder.co.uk

nil carborundum a illegitemis
##################################################################################
Ham Call G8JVM . OS Fedora FC17 x86_64 on a Dell Insiron N5030 laptop
Maidenhead QRA: IO82SP38, LAT. 52 39.720' N LONG. 2 28.171 W ( degs+mins )
QRV VHF 6mtrs 200W, 4 mtrs 150W, 2mtrs 350W, 70cms 200W
Microwave 23 cms 140W, 13 cms 100W, 6 cms 0W & 3cms 5W
################################################################################## 




More information about the pulseaudio-discuss mailing list