Rewritten pulseaudio driver and network softrock for Quisk

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Rewritten pulseaudio driver and network softrock for Quisk

km4dsj
Hello all,

For my setup, I am using a softrock RXTX connected to a raspberry pi model B with attached "Wolfson Pi" audio card.  The IQ audio is streamed via wifi to my laptop, which is running Quisk.  I encountered a few show stoppers with this setup... Network latency continuously added to the buffer on the Pi side, until it was two seconds long! In an attempt to limit the buffer size with pulse audio, I exposed another bug (alsa or hardware) which resulted in a corrupt audio stream once the buffer overflowed.  The solution I focused on was to rewrite the pulseaudio portion of the quisk object with the asynchronous api.  This has two advantages: More control over latency, and lower resource usage on the network and raspberry pi.  Using the simple api, the Pi and network were over taxed. Tunnel mode in pulseaudio is taxing as well, as the streams run continuously whether there are samples or not.

I also wrote a simple hardware plugin to manage PTT and VFO on the soft rock over the network via usbsoftrock.  Simply run "sudo usbsoftrock -d &" on the pi, and then add the following lines to .quisk_conf.py where the "x"s are replace with the proper IP address of the computer (or pi) attached to the soft rock.

from softrock import hardware_net as quisk_hardware
from softrock import widgets_tx   as quisk_widgets
usbsr_ip_address = "192.168.x.x"  
usbsr_port = 19004

To use the network portion, add the following lines to .quisk_conf.py.  Note: This version will not currently work without show_pulse_audio_devices = FALSE.  I had to disable that option in the code and have not yet reenabled it, so Quisk will choke without it! Obviously change the "x"'s to match the proper IP with the softrock running pulseaudio. This has been tested with pulseaudio 4.0 and up. The name of the remote audio device should be similar to a local device. No tunnel or IP address is needed in the name. Also, note the two modified latency and poll settings. Lower data_poll values eat cpu on the local machine, and 300ms latency is about as low as my wifi can really support without frequent dropouts.

name_of_sound_capt="pulse:alsa_input.platform-snd-rpi-wsp.0.analog-stereo" #example only
show_pulse_audio_devices = False
IQ_Server_IP = "192.168.x.x"
latency_millisecs = 300
data_poll_usec = 20000

To download the code, use git as below.
#git clone https://github.com/gonesurfing/quisk-PA_async.git

Then #make
Then #./quisk

You'll need all the development directories normally needed when building quisk. This is compiling fine on ubuntu 14.04 and 14.10.  I'm currently working on OSX support.

Any feedback or comments appreciated. email is my call sign @gmail.com.

73
Eric
KM4DSJ





Reply | Threaded
Open this post in threaded view
|

Re: Rewritten pulseaudio driver and network softrock for Quisk

kc7noa
is this  still compatible with more recent versions?
Reply | Threaded
Open this post in threaded view
|

Re: Rewritten pulseaudio driver and network softrock for Quisk

kc7noa
Im glad to see that KM4DSJ is still working on this with Jim .....

Question about usbsoftrock over network .... do you need to use that or can the server directly control the Si570(pe0fko) firmware yet?

I would hope that automatic control of hardware could be started when IQ_Server_IP = "your.ip.here" is used in the quisk_conf.py file ... to maybe run the usbsoftrock over server by adding +1 to the last address value ...

pluss Tx audio .... ;)
Reply | Threaded
Open this post in threaded view
|

Re: Rewritten pulseaudio driver and network softrock for Quisk

kc7noa
BUMP ....

Is this still relevant ?
Reply | Threaded
Open this post in threaded view
|

Re: Rewritten pulseaudio driver and network softrock for Quisk

ahlstromjc
Administrator
As far as I know, all Eric's code is in the current version of Quisk.  So you don't need git.

Jim
N2ADR
Reply | Threaded
Open this post in threaded view
|

Re: Rewritten pulseaudio driver and network softrock for Quisk

kc7noa
Is usbsoftrock still needed ?

can the network be specified as the soundcard ?
Reply | Threaded
Open this post in threaded view
|

Re: Rewritten pulseaudio driver and network softrock for Quisk

kc7noa
bumped .... and

i dont remember seeing an option in the new config for radio windows ....

do the line need to be somewhere ?

IQ_Server_IP = "192.168.x.x"

or is remote still only for hermis/lite
Reply | Threaded
Open this post in threaded view
|

KM4DSJ == Rewritten pulseaudio driver and network softrock for Quisk

kc7noa
In reply to this post by km4dsj
Eric .... any chance you have dual booted an image of 16.04 and checked operation of quisk?