afarhan / sbitx

170 stars 61 forks source link

Enhancement: Ability to use a USB or Bluetooth Headset for audio modes i.e. SSB #84

Open g0kao opened 9 months ago

g0kao commented 9 months ago

It would be really useful to be able to consistently use a suitable headset, either a USB or a Bluetooth type with the SBITX for phone modes such as SSB especially in a portable operating environment where surrounding noise levels may be particularly high making it difficult to hear the audio out of the radio speaker. Yes it is possible to use hardwired headphones to solve the speaker audio but there are additional benefits to being able to simply plug in a readily available USB headset or pair with a Bluetooth headset that may be readily available for both audio input as well as output. Current microphone output into the radio for SSB based on the supplied microphone is too low and requires significant effort to resolve (I am currently working on this solution). Turning the mic gain up raises the noise levels on the audio which degrades the transmitted audio and at low powers audio quality is a significant issue if not right. I have both types of headset available and happy to help towards testing and implementation of a suitable approach, I am investigating this already but thought it useful to raise via this approach to get help/inspiration

g0kao commented 9 months ago

just some initial testing, this is not scientific, it is not meant to be as it is a practical approach that a typical user might do: No modifications, as delivered SBITX tests:

  1. Audio inputs and outputs currently set to audio-injector-pi-soundcard So without any changes I power up the unit and start the sbitx application, audio is heard from the radio speaker. Note that audio level needs to be set to at least 74 for a comfortable minimum listening level, Audio almost disappears at a level of 50 making it unusable for normal listening down near this level. Note that on FT8 the audio level can be reduced to 0(zero) without affecting the inbuilt FT8 decoding capability suggesting that digital modes take their audio input from a different point in the rx audio circuitry. Now connect USB headset (Jabra Evolve 30 II in my case), connected while radio app running, Speaker audio set to 63 listening to the FT8 tones on 20m, nothing heard in the USB headset. Adjust both H/S and sbit volume controls, no change. Headset connected to a USB 3 port(blue port)
  2. Audio Output changed to the USB headset While sbitx app running, changed audio settings(speaker in menu bar) to USB headset for output, just testing output to headset at this stage. No apparent change in audio. Stop radio app and check audio output settings and restart sbitx app doing this as there is a detection routine within the app to detect audio devices no change detected. Reboot the radio without making any further changes, audio now being heard at a reduced volume level in the headset, Headset volume control set to maximum. Audio heard louder on the radio speaker at the same time. Headset connected to physical port on side of radio normal volume similar to speaker volume. The audio in the USB headset is ok but could do with being a bit louder to cope with a noisy operating environment. It is an improvement over the fitted speaker though. Stopped the sbitx app, opened a terminal window and ran this command to my USB device identified using the aplay -l command: speaker-test -Dplughw:CARD=II,DEV=0 -c 1 -t wav Nearly deafened me!! I had not changed the volume control on my headset before playing the test sound. Early indication from this is that the audio volume output from the radio app needs investigating as the quality and volume of the audio is not great for a radio to be listened to in non digital modes.

Moved USB H/S to USB 2 port(Black Port) and restarted sbitx app, no noticeable difference as expected but needed to test as user could connect headset to any available port.

Played the speaker test to the radio sound card to compare: speaker-test -Dplughw:CARD=audioinjectorpi,DEV=0 -c 1 -t wav very noticeable difference in volume and quality of sound from the speaker compared to the sound injected from the radio, not expecting BBC quality from the radio but needs to be improved from where it is in terms of quality and volume.

This bit needs handling as a separate issue from the desire to use a different device for input and output audio.

drexjj commented 5 months ago

sBitx Toolbox now includes USB Headset functionality with the current sBitx software on both 32 bit and 64 bit OS. https://github.com/drexjj/sBITX-toolbox and https://github.com/drexjj/sBITX-toolbox64