¿ªÔÆÌåÓý

Re: sBITX v3 : Possibility using wireless headset ...?


 

On Wed, Jan 24, 2024 at 11:23 AM, Paul wrote:
I would like to know the answer to this one too as I would love to be able to use my USB headset with the radio. However, I suspect this may not be easily achievable having had a brief play around as the audio primarily appears to be hardwired to deliver/accept audio to the sockets on the side of the radio or the physical speaker within (Arfan correct me please if I am wrong).
It may be possible using the loopback device capabilities but this seems a little complicated at first glance and needs some clearer description on how to route the audio from maybe one of the loopback devices to the USB or Bluetooth connected device.
?shows the usage of the sound devices from Linux's point of view:



Lines 72/73 show the hardware device is being used in an unconventional way, left channel for the receive path, right channel for the transmit path.

/g/BITX20/topic/103407266#107146?explains more via the documentation which is at?

The Sound System

The details of sound sytem are all hidden in. There are a few things to remember
  1. The sampling rate is fixed at 96,000 samples per second. Each sample read or written to the hardware is a signed 32-bit integer. The audio hardware works in full duplex at all times.
  2. The digital IF is centered on 24 KHz, staritng from 12.5 KHz to 37.5 KHz.
  3. The left channel?is dedicated to receive. It gets its samples from the demodulator (Actually, the downconverter that moves the 40 MHz IF to 24 KHz, which is kind of ¡°audio¡± range, handled by the audio codecs). After processing it writes the samples back to the?speaker.
  4. The right channel?is dedicated to transmit. It gets its samples from the?mic, processes them and writes the transmit signal samples to the right channel.
Since this is the hard-wired setup, this is the starting point to work from.

My first coffee of the day hasn't fully kicked in yet, but my current thinking is this unconventional setup means you can't use conventional methods to attach a headset to the radio.

The 'sbitx' application has opened 'hw0' and there is no device sharing in ALSA.? There is mixing available but that's more overhead and complexity to deal with.

In theory you could use a program like 'sox' ( described in /g/BITX20/topic/103407266#107146?) to fill the role 'wsjt-x' is doing above i.e. take sound to/from a conventional device and read/write it to the loopback devices (hw1 and hw2) in a place where the 'sbitx' application expects it.? ?Or maybe you can configure ALSA/PulseAudio/PipeWire/whatever to do this.? Maybe someone else knows the answer to this, but I don't.

In theory the 'sbitx' application could do in voice mode what it does in digital mode, uses the loopback devices to read/write sound samples from external program/devices, but I don't think it is coded to do that right now.

Note that all this copying of samples within the application is really inefficient. Farhan has said that profiling shows this is where the CPU spends most of its time.? Ideally all these use cases would be examined to see if the could not be done more efficiently.? I think this is measured criticism.? The application works.? It largely does what its manual says it will do.? It stays within the performance envelope of the hardware.? It's just that there could very well be ways to do it more efficiently and provide more functionality without writing much more code.

My immediate approach is to work on getting a PC headset working via the connectors on the side of the radio at the moment using a splitter based approach that is wired from a small project box to house the TRRS connector that most PC headsets can use and the box has the PTT button on it as well. This approach works so far but the audio level on SSB is too low to get the power out of the radio (commented on many times elsewhere in the forum), this I am hoping to solve using a microphone pre-amplifier based on an SSM2167 module that I will fit into the radio, need to find a suitable 4-5v tapping point to power it - to be continued. will perhaps start a separate thread for this one once I have it sorted.? ?I would like to know though if it is possible to use either Bluetooth(built into the pi) or USB type headsets as it will add to the versatility of the radio especially for portable voice communications which is how I would like to primarily use this radio, Paul G0KAO
Until someone decides to investigate the software stuff I just wrote about above and finds, codes, tests and publishes a solution, I think going to external hardware will be needed.

I've been playing with Linux and SDR for a few years now, and I see the same thing over and over again: the radio stuff is easier than one thinks, and the audio stuff is MUCH harder than one thinks.? Most people say "I can play music and record music, it's got to be simple".? No, far from it.

This also supports the stuff I've been saying about the lack of maturity and completeness of the sbitx software and the lack of using best practices.? Wanting to use a wireless headset is a pretty normal thing these days.? ?We've seen inquiries about this for a while now.? It'd be nice if we were using something like Github Issues to track these requests and share ideas on how to satisfy them.? Having stuff show up on groups.io and being kicked around for a while is not a best practice. The afarhan repo has some open Issues but they don't seem to be getting much attention.? Being able to tag Issues as defect reports vs enhancement requests would be nice.? They won't get much attention till a larger developer community forms around this radio, but at least the information would be captured and available if/when someone is available to work on it.
?
--
Regards,
Dave, N1AI

Join [email protected] to automatically receive all group messages.