Choppy Output with Raspberry Pi and Pulseaudio

529 views
Skip to first unread message

Karl Heinz Kremer

unread,
Sep 13, 2018, 7:44:32 AM9/13/18
to Hermes-Lite
I am trying to get Quisk to work with my HL2, but as soon as I select PulseAudio devices for input and output I I end up with choppy audio. I get reasonably good output with the Alsa devices. I need PulseAudio for the digital IO to connect to WSJT-X and Fldigi. Has anybody here gotten this configuration to work? I just started to look into how to cure choppy audio with Pulse in general, but so far nothing has worked. I understand that the Pi may be underpowered for this application.

Thanks,

Karl Heinz - K5KHK

Sid Boyce

unread,
Sep 13, 2018, 8:37:58 AM9/13/18
to herme...@googlegroups.com
I ditched using the 2 Pi 3B's I have as I found them underpowered. I
don't know how much better the Pi 3B+ is.

The more capable Asus Tinkerboard replaced the Pi 3 in the openHPSDR
PiHPSDR,  it even has the Pi GPIO and is a straight swap.
https://www.jeffgeerling.com/blog/2018/asus-tinker-board-compelling-upgrade-raspberry-pi-3-b

I use ODROID-C2's  (3 of them) with USB audio dongles and 7inch
touchscreen screens, mouse, keyboard - 4-core 2GB memory. One is
currently in my standalone HiQSDR running quisk-4.1.22.

Another good SBC is the 8-core 64-bit FriendlyARM nanoPi Fire3 which
worked OK with a 22" LCD but kept going grey screen with a 7" Pi
compatible LCD. As I had one  of their screens used with the nanoPi M3,
I am using that.
It has only one USB port (USB 3.0) which supports a USB 3.0 hub with
mouse, keyboard,  audio dongle, 64GB  USB stick and a 500GB hard drive.
The GPIO is the same as the Pi 3.

It's very quick compared to any of the above boards all of which i have.
https://www.board-db.org/compare/210,118,103/
73 ... Sid.
--
Sid Boyce ... Hamradio License G3VBV, Licensed Private Pilot
Emeritus IBM/Amdahl Mainframes and Sun/Fujitsu Servers Tech Support
Senior Staff Specialist, Cricket Coach
Microsoft Windows Free Zone - Linux used for all Computing Tasks

Steve Haynal

unread,
Sep 13, 2018, 1:35:58 PM9/13/18
to Hermes-Lite
Hi Karl,

For best results with PulseAudio, I change the default sampling rate and width to match the SDR software, usually 48kHz and 16-bit. This way PulseAudio does not need to perform a resampling. Also, you may benefit from tuning the default-fragments and default-fragment-size-msec settings. There are instructions on PulseAudo page or Google for those. Finally, you can take a look at my test RPi image. Although I never tested that with audio, I think it does have some tweaks to PulseAudio for VACs.

Here is a snippet from my /etc/pulse/daemon.conf:

high-priority = yes
nice-level = -11

realtime-scheduling = yes
realtime-priority = 9

; exit-idle-time = 20
; scache-idle-time = 20

; dl-search-path = (depends on architecture)

; load-default-script-file = yes
; default-script-file = /etc/pulse/default.pa

; log-target = auto
; log-level = notice
; log-meta = no
; log-time = no
; log-backtrace = 0

resample-method = speex-float-1
; enable-remixing = yes
; enable-lfe-remixing = no

flat-volumes = no

; rlimit-fsize = -1
; rlimit-data = -1
; rlimit-stack = -1
; rlimit-core = -1
; rlimit-as = -1
; rlimit-rss = -1
; rlimit-nproc = -1
; rlimit-nofile = 256
; rlimit-memlock = -1
; rlimit-locks = -1
; rlimit-sigpending = -1
; rlimit-msgqueue = -1
rlimit-nice = 31
rlimit-rtprio = 9
; rlimit-rttime = 1000000

default-sample-format = s16le
default-sample-rate = 48000
; alternate-sample-rate = 48000
default-sample-channels = 2
; default-channel-map = front-left,front-right

default-fragments = 16
default-fragment-size-msec = 4

; enable-deferred-volume = yes
deferred-volume-safety-margin-usec = 1
; deferred-volume-extra-delay-usec = 0




Here is some VAC settings from my /etc/pulse/default.pa:


load-module module-null-sink sink_name=vac1 rate=48000 channels=1 sink_properties=device.description=Vac1

load-module module-null-sink sink_name=vac2 rate=48000 channels=1 sink_properties=device.description=Vac2

load-module module-virtual-source source_name=loop1_source uplink_sink=loop1_sink



73,

Steve
kf7o

Graeme Jury

unread,
Sep 13, 2018, 8:01:32 PM9/13/18
to Hermes-Lite
Hello Steve,

Thanks for your post. I forgot about the settings although I did already have them from my old SDRShell days and ghpsdr3-alex. This does make a difference when pulse does not resample. I think this info would be a good addition to some setup notes or operation manual.

73, Graeme zl2apv

James Ahlstrom

unread,
Sep 15, 2018, 9:43:46 AM9/15/18
to Hermes-Lite
You do not need to use Pulse for wxjtx. Just use the Alsa loopback device directly.

Jim
N2ADR

Karl Heinz Kremer

unread,
Sep 15, 2018, 4:54:57 PM9/15/18
to James Ahlstrom, Hermes-Lite
Jim,

my experiments with the ALSA loopback device were not successful (but that was a while ago, so things may have changed). I assumed that Quisk needed the PulseAudio system because it creates the PA input and output for digital.

Would you have any information about how to configure the Pi with the ALSA loopback device?

Thanks,

Karl Heinz - K5KHK


> --
> You received this message because you are subscribed to the Google Groups "Hermes-Lite" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to hermes-lite...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

James Ahlstrom

unread,
Sep 15, 2018, 10:17:06 PM9/15/18
to Hermes-Lite
First see if wsjtx can access an alsa device. I am away and cant provide loopback advice. But it is on the web.

Jim N2ADR

Steve Haynal

unread,
Sep 15, 2018, 11:42:48 PM9/15/18
to Hermes-Lite
Hi All,

I have never been able to use wsjt-x under Linux with anything but pulse audio. Wsjt-x uses the Qt libary, including the multimedia portion, and that only supports pulse as far as I understand. It would be great if someone can use only alsa on Linux with wsjt-x and posts how to do it.

73,

Steve
kf7o

Karl Heinz Kremer

unread,
Sep 17, 2018, 8:19:23 AM9/17/18
to Steve Haynal, Hermes-Lite
Jim,

I tried again this weekend for several hours to get the ALSA Loopback device to work with WSJTX and Flidigi - without success. For that, I completely removed Pulseaudio from my system, reset my ALSA configuration and started with the configuration from scratch - no luck.

I can use ALSA in and out to my Yaesu tranceiver, so the ALSA subsystem is working, it’s just the loopback device I cannot get a handle on.

Anything you can add would be appreciated.

John Williams

unread,
Sep 17, 2018, 9:02:32 PM9/17/18
to Karl Heinz Kremer, Steve Haynal, Hermes-Lite
Karl,

Have not been following closely. Are you running WiFi or wired to the HL. What version of PI?

John W9JSW

Sent from my iPhone
Reply all
Reply to author
Forward
0 new messages