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

SSB Modulator input source issue #2336

Closed
drom opened this issue Nov 17, 2024 · 13 comments · Fixed by #2357
Closed

SSB Modulator input source issue #2336

drom opened this issue Nov 17, 2024 · 13 comments · Fixed by #2357
Assignees
Labels

Comments

@drom
Copy link

drom commented Nov 17, 2024

SDRangel: v7.22.4, v7.22.3, v7.22.2, v7.22.1
OS: Linux OpenSuse Tumbleweed
SDR Device: PlutoSDR

All work great on RX.
On TX + SSB modulator: Connecting any Audio input source. SSB modulator shows -150dB and don't show any movement.

image

All was working fine on version v7.21.3

@drom drom changed the title SSB Modulator connection to microphone SSB Modulator input source issue Nov 17, 2024
@drom
Copy link
Author

drom commented Nov 20, 2024

I am using pipewire . Can it be related? Should I try pulseaudio?

@srcejon
Copy link
Collaborator

srcejon commented Nov 21, 2024

I am using pipewire . Can it be related? Should I try pulseaudio?

Worth a try.

@drom
Copy link
Author

drom commented Nov 21, 2024

did not helped :(

@drom
Copy link
Author

drom commented Nov 24, 2024

Switching between modulators I could get WFM Modulator working once. But All other (Audio sourced) modulators don't work. NFM, AM, SSB

@drom
Copy link
Author

drom commented Nov 24, 2024

When adding SSB Modulator I am getting this errors:

2024-11-24 22:06:17.683 (W) libpng warning: iCCP: known incorrect sRGB profile
2024-11-24 22:06:17.683 (W) libpng warning: iCCP: too many profiles
2024-11-24 22:06:17.693 (W) AudioDeviceManager::removeAudioSource: audio FIFO 0x562ba446c678 not found
2024-11-24 22:06:17.693 (W) AudioDeviceManager::removeAudioSource: audio FIFO 0x562ba446c678 not found

@srcejon
Copy link
Collaborator

srcejon commented Nov 25, 2024

On Windows, it's working with Qt6, but not working with Qt5.

It goes wrong, I think, because AMModBaseband::applySettings calls AMModSource::applyChannelSettings setting channelSampleRate to 0. Then AMModBaseband::handleData is called, and the thread locks up.

With Qt6, although the channelSampleRate is set to 0, before AMModBaseband::handleData is called, AMModBaseband::handleMessage: gets a DSPSignalNotification with the correct channel sample rate.

Why is channelSampleRate set to 0? Because m_channelizer->setBasebandSampleRate is only set when AMModBaseband gets a DSPSignalNotification, and it currently never gets one. This is because AMMod gets the DSPSignalNotification while not running, and it only forwards if running.

What I suspect we should do is send a DSPSignalNotification notification in AMMod::start(). That is what all of the demods do. Eg in AMDemod::start:

m_thread->start();

DSPSignalNotification *dspMsg = new DSPSignalNotification(m_basebandSampleRate, m_centerFrequency);
m_basebandSink->getInputMessageQueue()->push(dspMsg);

AMDemodBaseband::MsgConfigureAMDemodBaseband *msg = AMDemodBaseband::MsgConfigureAMDemodBaseband::create(m_settings, true);
m_basebandSink->getInputMessageQueue()->push(msg);

m_running = true;

Unrelated, but m_feedbackAudioSampleRate is uninitialised:

2024-11-25 13:23:48.148 (W) AMModSource::applyFeedbackAudioSampleRate: invalid sample rate -842150451

@srcejon srcejon added the bug label Nov 25, 2024
@srcejon srcejon self-assigned this Nov 25, 2024
srcejon added a commit to srcejon/sdrangel that referenced this issue Nov 25, 2024
@jamesa5771
Copy link

I have had the same issue too with audio inputs on SSB it will also not output CW but will just about do a tone but seems to be tempramental

@drom
Copy link
Author

drom commented Nov 28, 2024

@srcejon can we cut a release that I can try?

@MihaiRF
Copy link

MihaiRF commented Dec 6, 2024

Hello. I have the same problem when trying to use the microphone input in the SSB modulator. It worked before, now it doesn't.
Configuration: Linux Mint 22 (Ubuntu 24.04), HackRF card, SDRangel 7.22.5

@drom
Copy link
Author

drom commented Dec 10, 2024

The issue exists in v7.22.5

@srcejon
Copy link
Collaborator

srcejon commented Dec 10, 2024

Just tried again, and while 7.22.5 is fixed for File Output, Test Output and Audio Output, it's not working on USRP (don't have a Pluto or HackRF), so a problem still remains.

@srcejon
Copy link
Collaborator

srcejon commented Dec 10, 2024

Looks like there's another bug as well, introduced by the Sonar Fixes patch, when m_channelSampleRate is greater than m_audioSampleRate. Easy fix though.

@drom
Copy link
Author

drom commented Dec 11, 2024

Lets hope for new release soon 🤞

@drom drom mentioned this issue Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants