Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio settings lost between runs of FreeDV and between Stop and Start of modem. #432

Closed
barjac opened this issue Jun 13, 2023 · 22 comments
Closed

Comments

@barjac
Copy link

barjac commented Jun 13, 2023

I see this myself in Linux and have heard several of reports of Windows users seeing the same.

I suspect that this may have come to light recently as a side effect of running FreeDV Reporter in a browser.

I can't be sure but when the modem stops the browser could be grabbing the default audio device, and if a browser is open when attempting to start the modem it could already have grabbed it.
All conjecture at present, however in my case closing the browser fixes it on some occasions.

This is important as I have one amateur friend who has tried to get FreeDV running and has hit this issue. His comment was that it's not worth continuing with until this issue can be fixed. :(

@Tyrbiter
Copy link

I think PR #422 was intended to fix this problem, do you have that included in your current version?

@tmiw
Copy link
Collaborator

tmiw commented Jun 13, 2023

I think PR #422 was intended to fix this problem, do you have that included in your current version?

Yep. I'll see if I can get .11 out tonight.

@barjac
Copy link
Author

barjac commented Jun 13, 2023

I think PR #422 was intended to fix this problem, do you have that included in your current version?

I guess so as the only remaining PR when I pulled master at aa280d1 was #429. I will be testing again tomorrow on the 5366.5 net so if .11 is out I will try it.

I'm not 100% sure I saw this issue though while I was testing that version for the other problem.

@Tyrbiter
Copy link

I'm not 100% sure I saw this issue though while I was testing that version for the other problem.

I definitely have not seen it since PR #422 went in, but a Windows user on the 1.8.10.1 release is quite likely to do so, it's going to be important to get the expected fix out to them quickly.

On Linux you can see what's happening using pavucontrol to monitor what happens with the audio devices.

@barjac
Copy link
Author

barjac commented Jun 13, 2023

I just started FreeDV and all seemed fine. I stopped the modem and tried to re-start and I got the 'Sound Device Removed' error dialogue.
pavucontrol looks correct showing the USB headset as mic in and speakers out. The onboard audio as line in and line out.
Browser was not running but klog was.
All audio settings in FreeDV are now wrong and either blank or 'default' .
Attempting to set them back I find that the USB audio (headset) is missing from the list (because I opened this browser?). On closing FF they re-appear and can be selected. FreeDV Start works and I have a waterfall.
I can now stop and Start the modem at will - go figure!
I also stopped and re-started the browser and klog and it's still all fine again. :(
I will try to find out how to reproduce this reliably.

@tmiw
Copy link
Collaborator

tmiw commented Jun 13, 2023

I just started FreeDV and all seemed fine. I stopped the modem and tried to re-start and I got the 'Sound Device Removed' error dialogue. pavucontrol looks correct showing the USB headset as mic in and speakers out. The onboard audio as line in and line out. Browser was not running but klog was. All audio settings in FreeDV are now wrong and either blank or 'default' . Attempting to set them back I find that the USB audio (headset) is missing from the list (because I opened this browser?). On closing FF they re-appear and can be selected. FreeDV Start works and I have a waterfall. I can now stop and Start the modem at will - go figure! I also stopped and re-started the browser and klog and it's still all fine again. :( I will try to find out how to reproduce this reliably.

Wait, is this with master or with 1.8.10.1?

@barjac
Copy link
Author

barjac commented Jun 13, 2023

Master at aa280d1 without PR #429

freedv-1.8.11-0.20230612.aa280d1.2.mga
This is the currently installed version. ...1.mga was with PR#429 ...2.mga was without the PR#429 patch, so yes absolutely certain.

@barjac
Copy link
Author

barjac commented Jun 13, 2023

I just came in and restarted the machine and started FreeDV only. Audio configs all gone again. It was all closed down cleanly before I took the dog for a walk :(
Bed time now. 73

@tmiw
Copy link
Collaborator

tmiw commented Jun 14, 2023

I'm going to work on releasing .11 now because as @Tyrbiter mentioned, the issue fixed in #422 is way more visible (I was even able to duplicate on macOS). The other issue @barjac mentioned can probably wait until we can get more reliable steps to reproduce.

BTW @barjac, just to make sure, it was built with PulseAudio/pipewire, right? Not PortAudio? I haven't heard of nearly as many issues happening with the former.

@barjac
Copy link
Author

barjac commented Jun 14, 2023 via email

@Tyrbiter
Copy link

Does mageia use, or is it intending to use, pipewire @barjac ?

@barjac
Copy link
Author

barjac commented Jun 14, 2023 via email

@barjac
Copy link
Author

barjac commented Jun 14, 2023

Build fails without PortAudio:

-- Package 'portaudio-2.0', required by 'virtual:world', not found
CMake Error at CMakeLists.txt:346 (message):
portaudio library not found.
On Linux systems try installing:
portaudio-devel (RPM based systems)

@tmiw
Copy link
Collaborator

tmiw commented Jun 14, 2023

Build fails without PortAudio:

-- Package 'portaudio-2.0', required by 'virtual:world', not found CMake Error at CMakeLists.txt:346 (message): portaudio library not found. On Linux systems try installing: portaudio-devel (RPM based systems)

You'll need to pass "pulseaudio" to build_linux.sh, which basically uses the following for cmake:

cmake -DUSE_PULSEAUDIO=1 ...

Am I correct in assuming that since PipeWire still relies on PulseAudio libs that FreeDV built against PA will still be happy in a PW system? Barry

Correct.

@barjac
Copy link
Author

barjac commented Jun 14, 2023

-DUSE_PULSEAUDIO=1 fixed it, thanks.
Package build completed OK so will test after a re-boot to my clean system.

All looks OK now. Tested Stop/Start modem. Stop/Start FreeDV with and without browser/klog and re-boot without losing settings :)

Thanks Mooneer for thinking of that!

@Tyrbiter
Copy link

On 14/06/2023 09:37, Brian wrote: Does mageia use, or is it intending to use, pipewire @barjac https://github.com/barjac ?
Am I correct in assuming that since PipeWire still relies on PulseAudio libs that FreeDV built against PA will still be happy in a PW system?

It's fine on Fedora 38, and has been in general since Fedora 34 when pipewire became the default. I had one problem with wireplumber that took some time to resolve but it's all been working nicely since then. Massive development work has been happening but mostly around the edges rather than core library code. I rarely do git builds of pipewire or wireplumber these days, I just update the distro packages.

Fedora has a pipewire-pulse package so I would expect Mageia to take the same route. I hope it all just works, the early adopters have had all the pain :-/

@barjac
Copy link
Author

barjac commented Jun 14, 2023

Fedora has a pipewire-pulse package so I would expect Mageia to take the same route. I hope it all just works, the early adopters have had all the pain :-/

We had all sorts of conflicts with Pipewire which hopefully the new Mageia tool sorts out now. I must make a new Mga9 installation for testing all the amateur packages with Pipewire to be sure it works as expected.
/OT
Where is the report frequency list stored in freedv? Should it not be user editable somewhere in the configs for those who use it and want to add special frequencies?

@Tyrbiter
Copy link

Where is the report frequency list stored in freedv? Should it not be user editable somewhere in the configs for those who use it and want to add special frequencies?

Currently the frequencies for the drop-down list are at topFrame.cpp:461

@barjac
Copy link
Author

barjac commented Jun 14, 2023

Where is the report frequency list stored in freedv? Should it not be user editable somewhere in the configs for those who use it and want to add special frequencies?

Currently the frequencies for the drop-down list are at topFrame.cpp:461

So definitely not user adjustable. It's just that I see lots of odd frequencies in use on Reporter around the world, so if people are going to use the hamlib feature to set frequencies, then I would think that they would like to be able to add their favourite club net frequency etc.
Maybe the hard coded 'Master' list with a configurable list which adds user frequencies in sort order to the master and somehow identifies these in the list with maybe a * to remind users that these are not 'official'. Just my $0.02.

@Tyrbiter
Copy link

I'm sure this will change, the work in progress is being dealt with in this PR:

#434

@tmiw will almost certainly include some user suggestions into the feature.

@tmiw
Copy link
Collaborator

tmiw commented Jun 14, 2023

That might be another PR as it's not quite related to the QSY feature, but will keep that in mind.

@tmiw
Copy link
Collaborator

tmiw commented Jul 5, 2023

Going to close this issue since the main problem seems to be resolved. The additional frequency list feature should be discussed in #460.

@tmiw tmiw closed this as completed Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants