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

Mic tx iq audio fix #2007

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions firmware/application/apps/ui_mictx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,14 +371,6 @@ MicTXView::MicTXView(
receiver_model.set_rf_amp(v);
};

radio::set_tx_max283x_iq_phase_calibration(iq_phase_calibration_value);
field_tx_iq_phase_cal.set_range(0, hackrf_r9 ? 63 : 31); // max2839 has 6 bits [0..63], max2837 has 5 bits [0..31]
field_tx_iq_phase_cal.set_value(iq_phase_calibration_value);
field_tx_iq_phase_cal.on_change = [this](int32_t v) {
iq_phase_calibration_value = v;
radio::set_tx_max283x_iq_phase_calibration(iq_phase_calibration_value);
};

options_gain.on_change = [this](size_t, int32_t v) {
mic_gain_x10 = v;
configure_baseband();
Expand Down Expand Up @@ -590,6 +582,20 @@ MicTXView::MicTXView(
// Trigger receiver to update modulation.
if (rx_enabled)
receiver_model.set_squelch_level(receiver_model.squelch_level());

radio::set_tx_max283x_iq_phase_calibration(iq_phase_calibration_value);
field_tx_iq_phase_cal.set_range(0, hackrf_r9 ? 63 : 31); // max2839 has 6 bits [0..63], max2837 has 5 bits [0..31]
field_tx_iq_phase_cal.on_change = [this](int32_t v) {
if (rx_enabled) { // here it's necessary to stop and start audio if it was in use to adjust DMA and fix no audio output after iq modification
gullradriel marked this conversation as resolved.
Show resolved Hide resolved
rxaudio(false);
}
iq_phase_calibration_value = v;
radio::set_tx_max283x_iq_phase_calibration(iq_phase_calibration_value);
if (rx_enabled) {
rxaudio(true);
}
};
field_tx_iq_phase_cal.set_value(iq_phase_calibration_value);
}

MicTXView::MicTXView(
Expand Down
Loading