Ubuntu 20.04 & wsjtx2.3.0 ALSA audio HW:x,y challenges #AudioIssues #linux


mike.j.kasper@...
 

I've spent WAY to much time trying to get WSJTX to share the audio input.  The primary goal is to get FLDIGI & WSJTX to share an input for decoding, but utilizing the DSNOOP option or trying to directly access the HW audio results in: "Error in Sound Input Requested input audio format is not supported on device".  Only using PLUGHW: "works"

I found that I have a USB microphone that does work with the DSNOOP, but both my radio USB audio card and the internal audio card refuse.  Strange thing is, the USB microphone (snowball) ONLY support S16_LE, while the other cards support other formats.

Audio card details:

Card 0, ID `Digital', name `Shure Digital'
  Device 0, ID `USB Audio', name `USB Audio', 1 subdevices (1 available)
    1..2 channels, sampling rate 8000..48000 Hz
    Sample formats: S8, S16_LE
      Subdevice 0, name `subdevice #0'
Card 1, ID `Snowball', name `Blue Snowball'
  Device 0, ID `USB Audio', name `USB Audio', 1 subdevices (1 available)
    1 channel, sampling rate 8000..48000 Hz
    Sample formats: S16_LE
      Subdevice 0, name `subdevice #0'
Card 2, ID `PCH', name `HDA Intel PCH'
  Device 0, ID `ALC231 Analog', name `ALC231 Analog', 1 subdevices (1 available)
    2 channels, sampling rate 44100..192000 Hz
    Sample formats: S16_LE, S32_LE
      Subdevice 0, name `subdevice #0'

Any pointers on what format wsjtx is asking for and/or why these cards refuse direct hardware (aka requiring PLUGHW)???


Bill Somerville
 

On 27/03/2021 11:04, mike.j.kasper@gmail.com wrote:
I've spent WAY to much time trying to get WSJTX to share the audio input.  The primary goal is to get FLDIGI & WSJTX to share an input for decoding, but utilizing the DSNOOP option or trying to directly access the HW audio results in: "Error in Sound Input Requested input audio format is not supported on device".  Only using PLUGHW: "works"

I found that I have a USB microphone that does work with the DSNOOP, but both my radio USB audio card and the internal audio card refuse.  Strange thing is, the USB microphone (snowball) ONLY support S16_LE, while the other cards support other formats.

Audio card details:

Card 0, ID `Digital', name `Shure Digital'
  Device 0, ID `USB Audio', name `USB Audio', 1 subdevices (1 available)
    1..2 channels, sampling rate 8000..48000 Hz
    Sample formats: S8, S16_LE
      Subdevice 0, name `subdevice #0'
Card 1, ID `Snowball', name `Blue Snowball'
  Device 0, ID `USB Audio', name `USB Audio', 1 subdevices (1 available)
    1 channel, sampling rate 8000..48000 Hz
    Sample formats: S16_LE
      Subdevice 0, name `subdevice #0'
Card 2, ID `PCH', name `HDA Intel PCH'
  Device 0, ID `ALC231 Analog', name `ALC231 Analog', 1 subdevices (1 available)
    2 channels, sampling rate 44100..192000 Hz
    Sample formats: S16_LE, S32_LE
      Subdevice 0, name `subdevice #0'

Any pointers on what format wsjtx is asking for and/or why these cards refuse direct hardware (aka requiring PLUGHW)???
OM,

WSJT-X requests 48,000 Hz 16-bit little endian, but pulseaudio will do the necessary conversion if that is not available in the hardware. Some users have reported that changing the duplex settings of some sound cards is necessary.

73
Bill
G4WJS.


mike.j.kasper@...
 

Bill,
 Thanks for the follow up.  48khz @ 16 was what I thought as well.

After writing this message I figured out what it was complaining about: for whatever reason, the audio subsystem would not allow WSJTX to choose "mono" for the audio channel - if I choose "right" or "left" when connected to the DSNOOP "port" it succeeded.  "Both" is greyed out and not an option.

Thought I'd post just in case anyone else runs across a similar issue.


Bill Somerville
 

On 28/03/2021 14:54, mike.j.kasper@gmail.com wrote:
Bill,
 Thanks for the follow up.  48khz @ 16 was what I thought as well.

After writing this message I figured out what it was complaining about: for whatever reason, the audio subsystem would not allow WSJTX to choose "mono" for the audio channel - if I choose "right" or "left" when connected to the DSNOOP "port" it succeeded. "Both" is greyed out and not an option.

Thought I'd post just in case anyone else runs across a similar issue.
Hi Mike,

"Both" has never been an option for audio input. What would you expect that to do?

73
Bill
G4WJS.


mike.j.kasper@...
 

I didn't expect BOTH to be valid, but I did expect the "mono" option to work the same on the DSNOOP and HW as it does on PLUGHW. 

Obviously (now that I found the "answer")  HW and DSNOOP refuse to go into a single channel mode even though they claim to allow it.  Maybe wsjtx is asking this hardware in the "wrong way?".  The challenge to figuring out what was wrong is the limited and somewhat misleading feedback in the error dialog:
"Error in Sound Input Requested input audio format is not supported on device". 

This led me to believe it was a format issue (aka sample rate or format issue - NOT a channel count issue). 

In the end, I thought I'd share this "discovery" as I hadn't found it in any google searches.

Thanks for the help - it's always quick and helpful!

-Mike
N8RAW


Bill Somerville
 

On 29/03/2021 12:24, mike.j.kasper@... wrote:
I didn't expect BOTH to be valid, but I did expect the "mono" option to work the same on the DSNOOP and HW as it does on PLUGHW. 

Obviously (now that I found the "answer")  HW and DSNOOP refuse to go into a single channel mode even though they claim to allow it.  Maybe wsjtx is asking this hardware in the "wrong way?".  The challenge to figuring out what was wrong is the limited and somewhat misleading feedback in the error dialog:
"Error in Sound Input Requested input audio format is not supported on device". 

This led me to believe it was a format issue (aka sample rate or format issue - NOT a channel count issue). 

In the end, I thought I'd share this "discovery" as I hadn't found it in any google searches.

Thanks for the help - it's always quick and helpful!

-Mike
N8RAW

Hi Mike,

yes format does include channels, all WSJT-X does is check the available formats using the Qt QAudioDeviceInfo::isFormatSupported API, that is an operating system neutral wrapper on the underlying audio sub-system which we do not have direct access to (pulseaudio in this case).

https://doc.qt.io/qt-5/qaudiodeviceinfo.html#isFormatSupported

I was under the impression that a request for a mono stream would at least be satisfied by using the left channel is no specific mono format was available, perhaps that is not so in this case. Surely if the underlying audio stream does not support mono then there should be no problem with you selecting either the left or right channel from a stereo pair of channels.

73
Bill
G4WJS.