Linux sound card questions

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

Linux sound card questions

mcody
I have been "playing " with Quisk on occasion since version 3.6.2 and I have had some success in getting it to work with my setup in receive mode only.  I am now wanting to get serious about resolving some outstanding issues and using Quisk for a portable SDR transceiver and there are some  issues I'm trying to resolve.

First, here is my setup:
Computer: Toshiba Satellite L355D-S7825 laptop with AMD Turion 64 X2 Dual-Core, 2.0 GHz, 1 MB L2 Cache, 2 GB RAM, Running Kubuntu Linux 10.04 LTS and with Alsa sound system.
External Sound Card: Creative Soundblaster X-Fi Surround 5.1 Pro USB Audio System with THX (model SB1095), which is capable of 96,000 sps and 24-bit resolution
SDR "front end" AVALA-01 (similar to Genesis G40) with QRP2000 USB frequency generator with key line control

As mentioned above, I have been successful in getting Quisk to work with this configuration using the Soundblaster USB device for sound capture (name_of_sound_capt) and microphone play (name_of_mic_play). The sound card internal to the laptop is set up to be the sound player (name_of_sound_play) and microphone input (microphone_name).

My first problem is that I have not been able to use a sample rate (sample_rate) of 96000. If I do, the received sound "stutters", which I gather may mean that processing underflow is occurring. if the sample rate is 48000, the sound does not "stutter". I find this hard to understand with a dual-core processor, though. Is there some setting in .quisk_conf.py to overcome such a problem? Would using Portaudio instead of Alsa help resolve this problem? If so, what is the proper setup procedure? I've had problems using Portaudio in the past.

The second problem is that I have no indication that the Soundblaster USB device is actually sampling with 24-bit resolution. I do not know if this is an Alsa issue or a Quisk issue. I've done some research on the Alsa Sound System, but I have not discovered anything definitive regarding selection of sound device resolution. Does Quisk attempt to use the highest sample resolution available on a sound device? Is there a configuration setting in .quisk_conf.py that handles this issue? Would using Portaudio instead of Alsa help resolve this issue?

The third problem is with transmitting. While the AVALA-01 does key-up (via control from the QRP2000), it does not appear that anything is actually being transmitter from the Soundblaster USB device.  I am not sure that I have my .quisk_conf.py file configured correctly. I am including it below for inspection and suggested corrections.

Thanks for any help you can provide.

73,

Mac / AE5PH

Start of .quisk_conf.py

# -*- coding: utf-8 -*-
# The default hardware module was already imported.  Import a different one here.
# import quisk_hardware_fixed as quisk_hardware

#import sys

# Import the default Hardware module.  You can import a different module in
# your .quisk_conf.py.
from softrock import hardware_usb as quisk_hardware
from softrock import widgets_tx   as quisk_widgets

# In ALSA, soundcards have these names.  The "hw" devices are the raw
# hardware devices, and should be used for soundcard capture.
#name_of_sound_capt = "hw:0"
#name_of_sound_capt = "hw:1"
#name_of_sound_capt = "plughw"
#name_of_sound_capt = "plughw:1"
#name_of_sound_capt = "default"

#sample_rate = 48000 # ADC hardware sample rate in Hertz works well
##sample_rate = 96000 # Audio output does not want to work at 96 ksps.
##name_of_sound_capt = "hw:1,0" # Works with reduced audio level.
#name_of_sound_capt = "portaudio:(hw:1,0)" # Port audio does not appear to work well under any setting.
##name_of_sound_capt = "plughw" # Works very well, as it is using the built-in sound card.
#name_of_sound_capt = "plughw:1" # Provides higher audio levels.
#name_of_sound_play = name_of_sound_capt # Use the same device for play back
#channel_i = 0 # Soundcard index of in-phase channel:  0, 1, 2, ...
#channel_q = 1 # Soundcard index of quadrature channel:  0, 1, 2, ...

# AVALA-01 SDR sound device (Sound Blaster X-Fi Surround 5.1 Pro USB) configuration.
#name_of_sound_capt="portaudio:(hw:1,0)" # Connects to AVALA-01 baseband RX audio output.
#name_of_mic_play="portaudio:(hw:1,0)" # Connects to AVALA-01 baseband TX audio input.
name_of_sound_capt="hw:1" # Connects to AVALA-01 baseband RX audio output.
name_of_mic_play="hw:1" # Connects to AVALA-01 baseband TX audio input.
sample_rate = 48000 # As noted above, 48 ksps works well.
#sample_rate = 96000 # Audio output does not want to work at 96 ksps.
mic_playback_rate = sample_rate
mic_out_volume = 1.0 # This value may need to be lowered.
channel_i = 1 # Soundcard index of in-phase channel:  0, 1, 2, ...
channel_q = 0 # Soundcard index of quadrature channel:  0, 1, 2, ...

# Operator audio (internal sound device) configuration.
#name_of_sound_play="portaudio:(hw:0,0)" # Speaker/headphone for operator.
#microphone_name="portaudio:(hw:0,0)" # Microphone for operator.
name_of_sound_play="hw:0" # Speaker/headphone for operator.
microphone_name="hw:0" # Microphone for operator.
mic_sample_rate = 48000 # Can this be decreased to 8 ksps? No!
#mic_sample_rate = 96000 # Can this be decreased to 8 ksps? No!
playback_rate = mic_sample_rate

# The program polls the soundcard or SDR-IQ for data every data_poll_usec microseconds.
# A lower time reduces latency; a higher time is less taxing on the hardware.
if sys.platform == "win32":
  data_poll_usec = 20000 # poll time in microseconds
else:
  data_poll_usec = 7050 # poll time in microseconds (originally 7500)

# latency_millisecs determines how many samples are in the soundcard play buffer.
# A larger number makes it less likely that you will run out of samples to play,
# but increases latency.  It is OK to suffer a certain number of play buffer
# underruns in order to get lower latency.

#latency_millisecs = 150 # latency time in milliseconds
latency_millisecs = 150 # latency time in milliseconds

# Vendor and product ID's for the QRP2000
usb_vendor_id = 0x16c0
usb_product_id = 0x05dc
# Thanks to Ethan Blanton, KB8OJH, for this patch for the Si570 (many SoftRock's):
# If you are using a DG8SAQ interface to set a Si570 clock directly, set
# this to True.  Complex controllers which have their own internal
# crystal calibration do not require this.
si570_direct_control = True
# This is the Si570 startup frequency in Hz.  114.285MHz is the typical
# value from the data sheet; you can use 'usbsoftrock calibrate' to find
# the value for your device.
#si570_xtal_freq = 114285000
#si570_xtal_freq = 114426735
si570_xtal_freq = 114257943

# The "DGTL" mode mostly acts like USB, but it sends received audio to an external
# program that can decode digital modes, and receives audio to transmit.
# The only program currently supported is Fldigi.  Set Fldigi to USB, XML-RPC control.
digital_xmlrpc_url = "http://localhost:7362" # URL for control by XML-RPC
# Input audio from an external program for use with mode DGTL.  The input must be
# stereo at 48000 sps, and you must set mic_sample_rate to 48000 also.
digital_input_name = "" # device name for transmit audio
# digital_input_name = 'hw:Loopback,0'
# Output audio to an external program for use with mode DGTL.  The output is
# stereo at the same sample rate as the radio sound playback.
digital_output_name = "" # device name for received audio
# digital_output_name = digital_input_name

# If you use the microphone feature, the mic_channel_I and Q are the two capture
# microphone channels.  Quisk uses a monophonic mic, so audio is taken from the I
# channel, and the Q channel is (currently) ignored.  It is OK to set the same
# channel number for both, and this is necessary for a USB mono mic.  The mic sample rate
# should be 48000 to enable DGTL and the sound recorder to work, but 8000 can be used.
# Mic samples can be sent to an Ethernet device (use tx_ip and name_of_mic_play = "")
# or to a sound card (use name_of_mic_play="hw:1" or other device).
# If mic samples are sent to a sound card for Tx, the samples are tuned to the audio
# transmit frequency, and are set to zero unless the key is down.
# If there is no mic (microphone_name = ""), it is still possible to transmit CW,
# and you should set mic_playback_rate to the I/Q receive capture rate.

# Microphone capture:
#microphone_name = "" # Name of microphone capture device (or "hw:1")
#mic_sample_rate = 48000 # Microphone capture sample rate in Hertz, should be 48000, can be 8000
#mic_channel_I = 0 # Soundcard index of mic capture audio channel
#mic_channel_Q = 0 # Soundcard index of ignored capture channel
# Microphone samples sent to soundcard:
#name_of_mic_play = "" # Name of play device if mic I/Q is sent to a sound card
#mic_playback_rate = 48000 # Playback rate must be a multiple 1, 2, ... of mic_sample_rate
#mic_play_chan_I = 0 # Soundcard index of mic I play channel
#mic_play_chan_Q = 1 # Soundcard index of mic Q play channel
#mic_out_volume = 0.7 # Microphone output volume (after all processing) as a fraction 0.0 to 0.7
# Microphone samples sent to UDP:
#tx_ip = "" # Transmit IP address for mic sent to UDP (or "192.168.2.195")
#tx_audio_port = 0 # UDP port for mic samples (or 0x553B)
# Microphone audio processing:
# The original audio processing used mic_clip = 4.0; mic_preemphasis = -1.0
# For no mic audio processing, use mic_clip = 1.0; mic_preemphasis = 0.0
#mic_clip = 3.0 # Mic amplitude clipping; larger numbers give more clipping
#mic_preemphasis = 0.6 # Mic pre-emphasis 0.0 (none) to 1.0; or -1.0 for a Butterworth filter

End of .quisk_conf.py
Reply | Threaded
Open this post in threaded view
|

Re: Linux sound card questions

mcody
I dislike having to reply to my own postings, but I have made some progress on my own.  I have been able to get the Soundblaster USB working at 96,000 sps, although with some shortcomings. The received audio sounds a little raspy. About every six or seven seconds there is a "pop" that appears to be either a sampling underflow or overflow issue.  To get this far, I've have had to get PulseAudio running and change a significant to a number of configuration values.  While I have listed my complete .quisk_conf.py file at the end of my post, here is a summary of the changes I have made:

name_of_sound_capt="portaudio:(hw:1,0)" # Connects to AVALA-01 baseband RX audio output.
name_of_mic_play="portaudio:(hw:1,0)" # Connects to AVALA-01 baseband TX audio input.
sample_rate = 96000 # Audio output does not want to work at 96 ksps.
mic_playback_rate = sample_rate
name_of_sound_play="portaudio:(hw:0,0)" # Speaker/headphone for operator.
microphone_name="portaudio:(hw:0,0)" # Microphone for operator.
mic_sample_rate = 48000 # Can this be decreased to 8 ksps? No!
data_poll_usec = 200000 # poll time in microseconds (originally 7050)
latency_millisecs = 600 # latency time in milliseconds
graph_refresh = 10 # update the graph at this rate in Hertz
fft_size_multiplier = 10

I don't know why PulseAudio works better than Alsa. From what I've read, Alsa is preferred. I am confused why the very high data poll value seems to help. Overall, I am not satisfied, due to the receiver sound quality and persistent popping. I still have not been successful in getting transmit to work properly. After a lot of searching on the Internet, I've had little luck in finding definitive information on getting Quisk to support transmit. It seems that various control options that should appear on the user interface when transmit support is enabled are not there.  It would be helpful to be shown what settings should be made in .quisk_conf.py to enable the transmit features.

73,

Mac / AE5PH

> Start of .quisk_conf.py

# -*- coding: utf-8 -*-
# The default hardware module was already imported.  Import a different one here.
# import quisk_hardware_fixed as quisk_hardware

#import sys

# Import the default Hardware module.  You can import a different module in
# your .quisk_conf.py.
from softrock import hardware_usb as quisk_hardware
from softrock import widgets_tx   as quisk_widgets

# In ALSA, soundcards have these names.  The "hw" devices are the raw
# hardware devices, and should be used for soundcard capture.
#name_of_sound_capt = "hw:0"
#name_of_sound_capt = "hw:1"
#name_of_sound_capt = "plughw"
#name_of_sound_capt = "plughw:1"
#name_of_sound_capt = "default"

#sample_rate = 48000 # ADC hardware sample rate in Hertz works well
##sample_rate = 96000 # Audio output does not want to work at 96 ksps.
##name_of_sound_capt = "hw:1,0" # Works with reduced audio level.
#name_of_sound_capt = "portaudio:(hw:1,0)" # Port audio does not appear to work well under any setting.
##name_of_sound_capt = "plughw" # Works very well, as it is using the built-in sound card.
#name_of_sound_capt = "plughw:1" # Provides higher audio levels.
#name_of_sound_play = name_of_sound_capt # Use the same device for play back
#channel_i = 0 # Soundcard index of in-phase channel:  0, 1, 2, ...
#channel_q = 1 # Soundcard index of quadrature channel:  0, 1, 2, ...

# AVALA-01 SDR sound device (Sound Blaster X-Fi Surround 5.1 Pro USB) configuration.
name_of_sound_capt="portaudio:(hw:1,0)" # Connects to AVALA-01 baseband RX audio output.
name_of_mic_play="portaudio:(hw:1,0)" # Connects to AVALA-01 baseband TX audio input.
#name_of_sound_capt="hw:1" # Connects to AVALA-01 baseband RX audio output.
#name_of_mic_play="hw:1" # Connects to AVALA-01 baseband TX audio input.
#sample_rate = 48000 # As noted above, 48 ksps works well.
sample_rate = 96000 # Audio output does not want to work at 96 ksps.
mic_playback_rate = sample_rate
mic_out_volume = 1.0 # This value may need to be lowered.
channel_i = 1 # Soundcard index of in-phase channel:  0, 1, 2, ...
channel_q = 0 # Soundcard index of quadrature channel:  0, 1, 2, ...

# Operator audio (internal sound device) configuration.
name_of_sound_play="portaudio:(hw:0,0)" # Speaker/headphone for operator.
microphone_name="portaudio:(hw:0,0)" # Microphone for operator.
#name_of_sound_play="hw:0" # Speaker/headphone for operator.
#microphone_name="hw:0" # Microphone for operator.
#mic_sample_rate = 48000 # Can this be decreased to 8 ksps? No!
mic_sample_rate = 48000 # Can this be decreased to 8 ksps? No!
playback_rate = mic_sample_rate
#mic_playback_rate = 96000 # Playback rate must be a multiple 1, 2, ... of mic_sample_rate
mic_channel_I = 0 # Soundcard index of mic capture audio channel
mic_channel_Q = 0 # Soundcard index of ignored capture channel
mic_out_volume = 0.7 # Microphone output volume (after all processing) as a fraction 0.0 to 0.7
# Microphone audio processing:
# The original audio processing used mic_clip = 4.0; mic_preemphasis = -1.0
# For no mic audio processing, use mic_clip = 1.0; mic_preemphasis = 0.0
mic_clip = 3.0 # Mic amplitude clipping; larger numbers give more clipping
mic_preemphasis = 0.6 # Mic pre-emphasis 0.0 (none) to 1.0; or -1.0 for a Butterworth filter

# The program polls the soundcard or SDR-IQ for data every data_poll_usec microseconds.
# A lower time reduces latency; a higher time is less taxing on the hardware.
if sys.platform == "win32":
  data_poll_usec = 20000 # poll time in microseconds
else:
  data_poll_usec = 200000 # poll time in microseconds (originally 7050)

# latency_millisecs determines how many samples are in the soundcard play buffer.
# A larger number makes it less likely that you will run out of samples to play,
# but increases latency.  It is OK to suffer a certain number of play buffer
# underruns in order to get lower latency.

#latency_millisecs = 150 # latency time in milliseconds
latency_millisecs = 600 # latency time in milliseconds

# The graph_refresh is the frequency at which the graph is updated,
# and should be about 5 to 10 Hertz.  Higher rates require more processor power.

graph_refresh = 10 # update the graph at this rate in Hertz

# The fft_size is the width of the data on the screen (about 800 to
# 1200 pixels) times the fft_size_multiplier.  Multiple FFTs are averaged
# together to achieve your graph refresh rate.  If fft_size_multiplier is
# too small you will get many fft errors.  You can specify fft_size_multiplier,
# or enter a large number (use 9999) to maximize it, or enter zero to let
# quisk calculate it for you.  Look for fft_size_multiplier in quisk.py.
# If your hardware can change the decimation, there are further compilcations.
# The FFT size is fixed, and only the average count can change to adjust the
# refresh rate.

fft_size_multiplier = 10

# Vendor and product ID's for the QRP2000
usb_vendor_id = 0x16c0
usb_product_id = 0x05dc
# Thanks to Ethan Blanton, KB8OJH, for this patch for the Si570 (many SoftRock's):
# If you are using a DG8SAQ interface to set a Si570 clock directly, set
# this to True.  Complex controllers which have their own internal
# crystal calibration do not require this.
si570_direct_control = True
# This is the Si570 startup frequency in Hz.  114.285MHz is the typical
# value from the data sheet; you can use 'usbsoftrock calibrate' to find
# the value for your device.
#si570_xtal_freq = 114285000
#si570_xtal_freq = 114426735
si570_xtal_freq = 114257943

# The "DGTL" mode mostly acts like USB, but it sends received audio to an external
# program that can decode digital modes, and receives audio to transmit.
# The only program currently supported is Fldigi.  Set Fldigi to USB, XML-RPC control.
digital_xmlrpc_url = "http://localhost:7362" # URL for control by XML-RPC
# Input audio from an external program for use with mode DGTL.  The input must be
# stereo at 48000 sps, and you must set mic_sample_rate to 48000 also.
digital_input_name = "" # device name for transmit audio
# digital_input_name = 'hw:Loopback,0'
# Output audio to an external program for use with mode DGTL.  The output is
# stereo at the same sample rate as the radio sound playback.
digital_output_name = "" # device name for received audio
# digital_output_name = digital_input_name

# If you use the microphone feature, the mic_channel_I and Q are the two capture
# microphone channels.  Quisk uses a monophonic mic, so audio is taken from the I
# channel, and the Q channel is (currently) ignored.  It is OK to set the same
# channel number for both, and this is necessary for a USB mono mic.  The mic sample rate
# should be 48000 to enable DGTL and the sound recorder to work, but 8000 can be used.
# Mic samples can be sent to an Ethernet device (use tx_ip and name_of_mic_play = "")
# or to a sound card (use name_of_mic_play="hw:1" or other device).
# If mic samples are sent to a sound card for Tx, the samples are tuned to the audio
# transmit frequency, and are set to zero unless the key is down.
# If there is no mic (microphone_name = ""), it is still possible to transmit CW,
# and you should set mic_playback_rate to the I/Q receive capture rate.

# Microphone capture:
#microphone_name = "" # Name of microphone capture device (or "hw:1")
#mic_sample_rate = 48000 # Microphone capture sample rate in Hertz, should be 48000, can be 8000
#mic_channel_I = 0 # Soundcard index of mic capture audio channel
#mic_channel_Q = 0 # Soundcard index of ignored capture channel
# Microphone samples sent to soundcard:
#name_of_mic_play = "" # Name of play device if mic I/Q is sent to a sound card
#mic_playback_rate = 48000 # Playback rate must be a multiple 1, 2, ... of mic_sample_rate
#mic_play_chan_I = 0 # Soundcard index of mic I play channel
#mic_play_chan_Q = 1 # Soundcard index of mic Q play channel
#mic_out_volume = 0.7 # Microphone output volume (after all processing) as a fraction 0.0 to 0.7
# Microphone samples sent to UDP:
#tx_ip = "" # Transmit IP address for mic sent to UDP (or "192.168.2.195")
#tx_audio_port = 0 # UDP port for mic samples (or 0x553B)
# Microphone audio processing:
# The original audio processing used mic_clip = 4.0; mic_preemphasis = -1.0
# For no mic audio processing, use mic_clip = 1.0; mic_preemphasis = 0.0
#mic_clip = 3.0 # Mic amplitude clipping; larger numbers give more clipping
#mic_preemphasis = 0.6 # Mic pre-emphasis 0.0 (none) to 1.0; or -1.0 for a Butterworth filter

> End of .quisk_conf.py
Reply | Threaded
Open this post in threaded view
|

Re: Linux sound card questions

ahlstromjc
Administrator
I can not find anything wrong with either of your two configurations, the ALSA one or the Portaudio one.  The 200 millisec time on the Portaudio setup can't be right.  I would go back to the ALSA version.

The first step should be to fix the 96000 sample rate problem.  First set the microphone capture and play devices to the null string ""; that is, turn off the microphone.  Set the sample rate to 96000, and adjust the data_poll_usec to some values between 5000 and 20000.  Adjust latency_millisecs to some values between 50 and 200.  This should work.  If it fails, turn off the USB control and just try to receive noise from the sound card.  If you can't make this work, something is very wrong.  There may be another sound process accessing the card, or perhaps the SB1095 won't capture at 96000, but only play at that rate.  Another explanation is that the sample clock (the SB1095) and the play clock are running at too different a rate.  Test by both capturing and playing the sound on the SB1095.  Or the ALSA driver could be defective.

As to the 24-bit sampling question, Quisk requests samples of 32 bits, and it is up to the sound card to return its full resolution.  Anyway, noise is the limiting factor when attempting to sample at 24 bits.

The point of turning off the microphone and USB is that they are using the same thread, and so can interfere with each other.  Once you can capture at 96000, we can add back the USB, and last the microphone.

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

Re: Linux sound card questions

mcody
Jim,

Thanks for your reply. I did as you suggested.  Reception at 96000 sps is working well with the following changed values:

name_of_sound_capt="hw:1"
name_of_mic_play=""
name_of_sound_play="hw:0"
microphone_name=""
data_poll_usec = 7000
latency_millisecs = 150

I also allowed graph_refresh and fft_size_multiplier to be their default values according to quisk_conf_defaults.py.  I didn't have to turn off USB control of the QRP2000 (if I understand what you meant by "turning off the USB control" correctly). Of course I cannot transmit.  I hope that it is not the inability of the SB1095 to play sound at 96000 sps.  I can live with 48000 sps, but I was hoping to have a wider spectrum window.   What's next?

73,

Mac / AE5PH
Reply | Threaded
Open this post in threaded view
|

Re: Linux sound card questions

ahlstromjc
Administrator
Next is to set microphone_name to your sound device, but leave name_of_mic_play as "".  This will read sound from the mic, but not play it.  Radio sound at 96000 sample rate should not be affected.  If something goes wrong, check for errors on the config screen, and let me know which sound device is giving errors.  If you are feeling brave, you can set DEBUG_IO in quisk.h to 1.  Recall that all sound uses the same thread, so a mic capture problem can cause a radio sound play problem.


There is no question that the SB1095 can play at 96000; the question is whether it can capture at 96000.  Many manufacturers will advertise a 96000 rate 24-bit card and neglect to mention that that is the play rate but the capture rate is different.

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

Re: Linux sound card questions

magun
In reply to this post by mcody
I tried to use the same Creative USB card as mentioned above with the following setup:

#name_of_sound_capt = "alsa:Xonar" #  
name_of_sound_capt = "hw:4,0"        # Creative USB
#name_of_sound_play = "alsa:USB" # Aureon USB
name_of_sound_play = "hw:4,0" #  Creative USB
sample_rate = 96000

# Microphone:
#microphone_name = "alsa:USB" # Name of microphone capture device
#name_of_mic_play  = "alsa:Xonar" # Name of play device if mic I/Q is sent to a sound card

There was the radio spectrum visible with the right bandwidth. However I had no audio output signal.
I then noticed that there was no Alsa audio level control available, as mentioned in the ALSA documentation. Could it be that the output level of the Creative USB is set to 0 and can not be changed? This would be essential if one wants to uses mic_play with the Creative USB.

Mac, I wonder, if you found a way to set the output level of the Creative USB.

Andreas (HB9EHI)


Reply | Threaded
Open this post in threaded view
|

Re: Linux sound card questions

mcody
This post was updated on .
In reply to this post by ahlstromjc
Jim,

I set microphone_name="hw:0" and kept name_of_mic_play="". All continues to work well. Listened to SSB voice chatter on 20 meters and 40 meters and WWV with AM. There are some errors on "Play radio sound" and some "FFT errors", but I think they may have occurred during context switches.

The specifications for the SB1095 indicate support for 24-bit/96000 sps for stereo and 16 bit/48000 sps for surround. Hopefully the Alsa driver knows when to select stereo versus surround.

EDIT

I went for broke and set name_of_mic_play="hw:1". When I start Quisk, it sometimes plays no audio and the spectrograph and waterfall displays never display anything. In those cases, all I can do is halt the program. If audio does play, there are occasional popping sounds and the spectrograph and waterfall displays do update. A segmentation fault then occurs, usually within a few seconds of starting the program. Looking at the Config display, I see errors occurring for both the "Play radio sound" (hw:0) and "Play microphone sound" (hw:1) entries. Usually more errors occur for the "Play radio sound" entry. The segmentation fault usually occurs at an increment of the number of "Play radio sound" errors, though I can't be 100% sure of that.

Mac / AE5PH
Reply | Threaded
Open this post in threaded view
|

Re: Linux sound card questions

mcody
In reply to this post by magun
Andreas,

I am using a second card for received sound output, not the SB1095. I am striving to set up an SDR for voice communications. I am uncertain about the sound output control situation with the SB1095.  I'll have to look into that further. Wish I could be more helpful.

Mac / AE5PH
Reply | Threaded
Open this post in threaded view
|

Re: Linux sound card questions

DJ6OA
Hello Mac,

I had a similar problem under Ubuntu 12.4 and QUISK-3.6.10 with my Peaberry V.1 which has two built-in USB soundcards.

It was impossible to get any sound output from the two built-in USB soundcards of the Peaberry with an EeePC900 while the same .quisk_config.py works flawlessly with only portaudio on my home PC.

By chance and after a lot of experiments, I found the following .quisk_config.py which at a first glance may look strange since it uses both portaudio and alsa, but is fully operative on SSB receive and transmit

arecord and aply show the following (USB devices are forced to start as Card #3, and as you may see, the two USB devices of the Peaberry are recognized as only one card, but two devices.)

This may perhaps may give you ideas for further experimentation

73, Rainer
DJ6OA


**** Liste der Hardware-Geräte (PLAYBACK) ****

Karte 3: SDR [Peaberry SDR], Gerät 0: USB Audio [USB Audio]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 3: SDR [Peaberry SDR], Gerät 1: USB Audio [USB Audio #1]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0

**** Liste der Hardware-Geräte (CAPTURE) ****

Karte 3: SDR [Peaberry SDR], Gerät 0: USB Audio [USB Audio]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 3: SDR [Peaberry SDR], Gerät 1: USB Audio [USB Audio #1]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0


The final version of .quisk_conf.py working on the EeePC is as follows:

from softrock import hardware_usb_new as quisk_hardware
from softrock import widgets_tx as quisk_widgets

si570_direct_control = True
si570_xtal_freq = 114343000
usb_vendor_id = 0x16c0
usb_product_id = 0x05d

key_poll_msec =100

sample_rate = 48000
playback_rate = 48000
latency_millisecs = 200

name_of_sound_capt = "hw:3,0"
name_of_sound_play = "portaudio:(hw:3,1)"

channel_i = 1
channel_q = 0

mic_sample_rate = 48000 # Microphone capture sample rate in Hertz, should be 48000, can be 8000
microphone_name = "hw:3,1" # Name of microphone capture device
mic_channel_I = 0 # Soundcard index of mic capture audio channel
mic_channel_Q = 0 # Soundcard index of ignored capture channel

# Microphone samples sent to soundcard:
name_of_mic_play = "portaudio:(hw:3,0)" # Name of play device if CW or mic I/Q is sent to a sound card
# name_of_mic_play = "hw:3,0"
mic_playback_rate = 48000 # Playback rate must be a multiple 1, 2, ... of mic_sample_rate
mic_play_chan_I = 1 # Soundcard index of mic I play channel
mic_play_chan_Q = 0 # Soundcard index of mic Q play channel
mic_out_volume = 0.4 # Transmit sound output volume (after all processing) as a fraction 0.0 to 1.0

button_font_size = 9





Reply | Threaded
Open this post in threaded view
|

Re: Linux sound card questions

mcody
Rainer,

Your suggestion was right on the nose!  These are the changes I made to my quisk_conf.py file:

name_of_sound_capt="hw:1" # Connects to AVALA-01 baseband RX audio output via SB1095.
name_of_mic_play="hw:1" # Connects to AVALA-01 baseband TX audio input via SB1095.
name_of_sound_play="portaudio:(hw:0,0)" # Speaker/headphone for operator.
microphone_name="portaudio:(hw:0,0)" # Microphone for operator.
latency_millisecs = 150                # latency time in milliseconds

I also tried latency_millisecs = 200, which I will switch back to using, as I received absolute no latency errors during my testing with that value. Bravo! Now its on to transmit testing, which will have to wait until tomorrow. It is bed time...

73,

Mac / AE5PH