Re: [Linrad] pulseaudio

215 views
Skip to first unread message

Leif Asbrink

unread,
Mar 27, 2013, 9:58:33 PM3/27/13
to lin...@googlegroups.com
Hello Pf,

This is not a known issue. Generally I think it is a good idea to
avoid pulseaudio because it adds instability and needless delay
but it should not cause a misbehaviour so something is probably
not right in Linrad. I will try to reproduce your findings.

It is a long time since I looked at these things. How do I
explicitly tell Linux to use pulseaudio?

73

Leif / SM5BSZ


On Wed, 27 Mar 2013 13:56:54 -0700 (PDT)
ik5pvx <ik5...@gmail.com> wrote:

> Hello,
> I've noticed that if I try to use pulseaudio as sound devices, I can't exit from the main screen anymore. Pressing X terminates the audio processing but then the program remains stuck. Even pressing ESC does nothing at that point.
> Using portaudio instead lets me use the menu normally.
>
> Is this a known issue?
>
> linrad 3.47, compiled on debian wheezy at 64 bits.
>
>
> Thanks
>
> Pf, ik5pvx
>
> --
> You received this message because you are subscribed to the Google Groups "Linrad" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linrad+un...@googlegroups.com.
> To post to this group, send email to lin...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>


--
Leif Asbrink <le...@sm5bsz.com>

Pierfrancesco Caci

unread,
Mar 28, 2013, 2:52:00 AM3/28/13
to lin...@googlegroups.com
Well, the fresh debian wheezy install came with it already installed. These are the packages that I see installed here:

ii  gstreamer0.10-pulseaudio:amd64                0.10.31-3+nmu1                     amd64        GStreamer plugin for PulseAudio
ii  libcanberra-pulse:amd64                       0.28-6                             amd64        PulseAudio backend for libcanberra
ii  libpulse-dev:amd64                            2.0-6                              amd64        PulseAudio client development headers and libraries
ii  libpulse-mainloop-glib0:amd64                 2.0-6                              amd64        PulseAudio client libraries (glib support)
ii  libpulse0:amd64                               2.0-6                              amd64        PulseAudio client libraries
ii  pulseaudio                                    2.0-6                              amd64        PulseAudio sound server
ii  pulseaudio-module-gconf                       2.0-6                              amd64        GConf module for PulseAudio sound server
ii  pulseaudio-module-x11                         2.0-6                              amd64        X11 module for PulseAudio sound server
ii  pulseaudio-module-zeroconf                    2.0-6                              amd64        Zeroconf module for PulseAudio sound server
ii  pulseaudio-utils                              2.0-6                              amd64        Command line tools for the PulseAudio sound server
ii  vlc-plugin-pulse                              2.0.3-5                            amd64        PulseAudio plugin for VLC
ii  paprefs                                       0.9.10-1                           amd64        PulseAudio Preferences
ii  pavucontrol                                   1.0-1                              amd64        PulseAudio Volume Control

You'll have to explicitly add pavucontrol and paprefs as they're not part of the default install.

I thus get pulseaudio running in user mode when I log in, and it automatically restarts if killed:

 2865 ?        S<l    7:36 /usr/bin/pulseaudio --start --log-target=syslog
 2873 ?        S      0:00 /usr/lib/pulseaudio/pulse/gconf-helper

That said, in linrad I say Yes to the questions about portaudio, and then "pulse" is listed among the choices.
Then enter one of the modes, and if you have pavucontrol already running you'll see another application running as playback and recording. Select the appropriate hardware there and it will be remembered afterwards.

Besides some glitches now and then (i.e. sometimes I have to "pkill pulseaudio" to get the sound interface listed again), it works and allows me to pipe the audio to fldigi for further decoding if I wish so. I can't comment on delays, as this is a whole new thing for me and I have no f* clue about what I'm doing, if that wasn't clear from my questions :-)

Pf


 Pierfrancesco Caci, ik5pvx

Leif Asbrink

unread,
Mar 29, 2013, 8:10:38 AM3/29/13
to lin...@googlegroups.com
Hello Pierfrancesco,

I made a fresh install of 64 bit Debian Wheezy today. The
standard install does not even include gcc:-(
It seems ./configure --with-help points properly to the
commands needed to install gcc, make and portaudio.
After that I can run ./xlinrad64, select portaudio
and pulse for input.

I see no errors - but I do not get what I want. When asking
for 96 kHz I do get 96 kHz - but the soundcard is set to
sample at 48 kHz or possibly 44.1 kHz and pulseaudio is
doing the rate conversion which is totally meaningless:-(

With portaudio and pulse for output my system crashes
on a call to Pa_IsFormatSupported() It seems to me that
it has to be due to a bug in pulse or possibly portaudio.
(That was with native ALSA for input.)

I do not know anything about pulse, I just selected the device
which is present by default. I did not install pavucontrol and
paprefs, I do not know what they are supposed to do.

It seems to me that pulse is not yet stable. Use snd-aloop
to send audio from Linrad to other applications, or use jack.

If you give me the commands I need to get pulse running
the way you are running it I will make a new attempt
(If it is not too complicated...)

73

Leif

Edson W. R. Pereira

unread,
Mar 29, 2013, 8:36:44 AM3/29/13
to lin...@googlegroups.com

Hello Lief,

I have tried using pulseaudio for SDR work and could never get it to do what I wanted. It tends to do things the way it wants. I gave up on pulse a while back and today I use only jack. It works very well for all my needs, is mature and stable, and has a number of decent tools. Portaudio interfaces with jack just fine.

73,

-- Edson PY2SDR

Michael Durkin

unread,
Mar 29, 2013, 10:14:13 AM3/29/13
to lin...@googlegroups.com
you need to change the default sound sampling in
nano /etc/pulse/daemon.conf

default-sample-rate = 192000

the way i remember it ... I just have a 44100 card so i dont use it that much ...
nor do i know how to force sound card sampling from command .... but im sure you can.

Mike KC7NOA

Pierfrancesco Caci

unread,
Mar 30, 2013, 4:20:33 PM3/30/13
to lin...@googlegroups.com

Hello Leif,

On Fri, Mar 29, 2013 at 1:10 PM, Leif Asbrink <le...@sm5bsz.com> wrote:
Hello Pierfrancesco,

I made a fresh install of 64 bit Debian Wheezy today. The
standard install does not even include gcc:-(


well yes, you need "apt-get install build-essentials" for that, not everyone needs or wants a developement environment by default.
 
It seems ./configure --with-help points properly to the
commands needed to install gcc, make and portaudio.
After that I can run ./xlinrad64, select portaudio
and pulse for input.

I see no errors - but I do not get what I want. When asking
for 96 kHz I do get 96 kHz - but the soundcard is set to
sample at 48 kHz or possibly 44.1 kHz and pulseaudio is
doing the rate conversion which is totally meaningless:-(

I've noticed that pulse does rate conversion too. Incidentally, this allows me to use WSJT which wants 11 kHz with a cheap usb sound dongle that only does 48 kHz.
 

With portaudio and pulse for output my system crashes
on a call to Pa_IsFormatSupported() It seems to me that
it has to be due to a bug in pulse or possibly portaudio.
(That was with native ALSA for input.)

To clarify, the problem I have is that the program becomes unresponsive when trying to enter the menu from one of the operational modes, e.g I'm in Normal CW, and press X.
I've been able reproduce the problem with these combinations:

Input = pulse, Output = disabled => problem happens randomly, maybe every other time
input = alsa native , output = pulse => problem happens rarely, maybe once ever 20 times
input = alsa via portaudio, output = pulse => problem happens rarely, maybe once every 20 times
input = pulse, output = pulse => problem happens always (or almost always)


 

I do not know anything about pulse, I just selected the device
which is present by default. I did not install pavucontrol and
paprefs, I do not know what they are supposed to do.

pavucontrol is like a mixer. it wil let you match a physical device with the software accessing it, and it will present you with a volume control, which is remembered across sessions.

paprefs is mostly for loading additional features, I had to use it to allow fldigi to access pulse natively via the tcp/ip socket

I don't know much more about pulse than that.
 

It seems to me that pulse is not yet stable. Use snd-aloop
to send audio from Linrad to other applications, or use jack.

my experience with jack has been frustrating, I couldn't find a decent documentation about what things do and what the various names are. This was a couple years ago, I may give it another shoot, maybe.
I don't know snd-aloop at all, will research it.
 

If you give me the commands I need to get pulse running
the way you are running it I will make a new attempt
(If it is not too complicated...)

These are the 2 processes that I have, automatically restarted when they are killed:

28372 ?        S<l    0:07 /usr/bin/pulseaudio --start --log-target=syslog
28382 ?        S      0:00 /usr/lib/pulseaudio/pulse/gconf-helper

I have no idea what actually starts them, I guess it's some binding in the desktop environment (there is an entry labeled "start pulseaudio" in the session and startup configurartion) . I'm *not* running it as a system daemon, as that is actually discouraged. They run with my userid.

Please note that I won't be able to do practical tests for the next 2 weeks.

Pf



--
 Pierfrancesco Caci, ik5pvx

Leif Asbrink

unread,
Apr 2, 2013, 9:52:13 PM4/2/13
to lin...@googlegroups.com
Hello Pierfrancesco,

> > With portaudio and pulse for output my system crashes
> > on a call to Pa_IsFormatSupported() It seems to me that
> > it has to be due to a bug in pulse or possibly portaudio.
> > (That was with native ALSA for input.)
> >
>
> To clarify, the problem I have is that the program becomes unresponsive
> when trying to enter the menu from one of the operational modes, e.g I'm in
> Normal CW, and press X.
Yes, this is clear, but I can not reach that far on my system
because pulse crashes already in the setup in a way that is not
because of a Linrad bug.

The fact that pulse can not be selected for output due to a bug
or possibly due to my ignorance in not knowing something
I have to configure before trying pulse is discouraging.

> I've been able reproduce the problem with these combinations:
>
> Input = pulse, Output = disabled => problem happens randomly, maybe every
> other time
I have tried to reproduce this. After MANY times pressing X on the
SSB processing screen I have not seen a single error.

> input = alsa native , output = pulse => problem happens rarely, maybe once
> ever 20 times
> input = alsa via portaudio, output = pulse => problem happens rarely, maybe
> once every 20 times
> input = pulse, output = pulse => problem happens always (or almost always)
I can not try this because a bug in pulse does not allow me to set up pulse
for output:-(

> pavucontrol is like a mixer. it wil let you match a physical device with
> the software accessing it, and it will present you with a volume control,
> which is remembered across sessions.
>
> paprefs is mostly for loading additional features, I had to use it to allow
> fldigi to access pulse natively via the tcp/ip socket
>
> I don't know much more about pulse than that.
I did not try to invoke those programs. I also did not tell
pulse what hardware to use. There are four soundcards in the
computer.

> > It seems to me that pulse is not yet stable. Use snd-aloop
> > to send audio from Linrad to other applications, or use jack.
> >
>
> my experience with jack has been frustrating, I couldn't find a decent
> documentation about what things do and what the various names are. This was
> a couple years ago, I may give it another shoot, maybe.
> I don't know snd-aloop at all, will research it.
>
> > If you give me the commands I need to get pulse running
> > the way you are running it I will make a new attempt
> > (If it is not too complicated...)
> >
>
> These are the 2 processes that I have, automatically restarted when they
> are killed:
>
> 28372 ? S<l 0:07 /usr/bin/pulseaudio --start --log-target=syslog
> 28382 ? S 0:00 /usr/lib/pulseaudio/pulse/gconf-helper
>
> I have no idea what actually starts them, I guess it's some binding in the
> desktop environment (there is an entry labeled "start pulseaudio" in the
> session and startup configurartion) . I'm *not* running it as a system
> daemon, as that is actually discouraged. They run with my userid.

This does not help. If there is a simple sequence of commands
that would bring my fresh wheezy install with Linrad to the
state of your system I could give it a try - but I am not interested
in spending a lot of time trying to learn the details of pulse.

73

Leif / SM5BSZ

Reply all
Reply to author
Forward
0 new messages