开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Re: SBITX v3 - Ability to use a Headset for phone modes


Paul
 

I may have some success, there is a caveat in that the master volume control doesn't work, yet to adjust USB volume, however my Jabra Evolve USB headset has an inline volume control, the ALSA mixer also allows volume adjustment. The modification also appears to mute the radio speaker but for now having rx audio out via USB headset when sbitx starts is a modest win I think. While writing this I tried unplugging the USB headset to see if audio returned to the speaker, it didn't, it didn't return following a reboot until I reconnected the USB headset. So not quite the win I had hoped but some progress in a small way.

I finally dipped my toe into the code, first time modifying code for a very long time, the modification is to sbitx_sound.c. If you want to try this noting that you will lose speaker audio with this mod, then insert the following lines of code after line 1054 in the original sbitx_sound.c file AFTER BACKING UP THE ORIGINAL FILE FIRST:

// New code to add playback out to a second Loopback device plughw:3,0 which will be used to?
//play audio out to a USB audio device e.g. USB Headset though actually may not need loopback, could go direct to?
//snd_usb_audio (plughw:5,0) this would be better
for (i = 0; i < 10; i++){
if(sound_start_play("plughw:5,0") == 0) #assumption is that USB headset is card 5 in the aplay -l interface list
break;
fprintf(stderr, "*Error opening USB Play device");
delay(1000);
printf("Retrying the sound system %d\n", i);
}
if (i == 10){
fprintf(stderr, "*Error opening USB Play device - Aborting");
return NULL;
}

I went straight for USB direct connection rather than use a Loopback interface described in my comments in my code update and it worked.
Just for clarity the next original line of code after this should read:
sound_thread_continue = 1;
to make sure the new code is inserted into the right place.

Once the code has been updated and saved, you will need to rebuild the sbitx application using the command ./build sbitx within a terminal window after changing to the sbitx directory with the cd sbitx command.

Assuming you have inserted the code correctly and not received any errors from the build process you can start the sbitx app with your usb headset connected.

I looked at other areas of modification, this one seemed the lowest impact and more logical, Still work to do to get it right?

Regards
Paul G0KAO

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