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

Disable 2020B unless Codec2 provides it. #257

Merged
merged 11 commits into from
Jul 14, 2022
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ message(STATUS "Compilation date = XX${DATE_RESULT}XX")
#
set(FREEDV_VERSION_MAJOR 1)
set(FREEDV_VERSION_MINOR 8)
set(FREEDV_VERSION_PATCH 0)
set(FREEDV_VERSION_PATCH 1)
set(FREEDV_VERSION_SUFFIX "")

set(FREEDV_VERSION ${FREEDV_VERSION_MAJOR}.${FREEDV_VERSION_MINOR}.${FREEDV_VERSION_PATCH})
Expand Down
35 changes: 23 additions & 12 deletions USER_MANUAL.html
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,18 @@ <h1 id="glossary"><span class="header-section-number">15</span> Glossary</h1>
</tbody>
</table>
<h1 id="release-notes"><span class="header-section-number">16</span> Release Notes</h1>
<h2 id="v1.8.0-july-2022"><span class="header-section-number">16.1</span> V1.8.0 July 2022</h2>
<h2 id="v1.8.1-july-2022"><span class="header-section-number">16.1</span> V1.8.1 July 2022</h2>
<ol type="1">
<li>Bugfixes:
<ul>
<li>Disable 2020B unless the installed Codec2 provides it. (PR #257)</li>
</ul></li>
<li>Build system:
<ul>
<li>Update build scripts to use specific Codec2 and LPCNet versions. (PR #257)</li>
</ul></li>
</ol>
<h2 id="v1.8.0-july-2022"><span class="header-section-number">16.2</span> V1.8.0 July 2022</h2>
<ol type="1">
<li>Enhancements:
<ul>
Expand Down Expand Up @@ -613,7 +624,7 @@ <h2 id="v1.8.0-july-2022"><span class="header-section-number">16.1</span> V1.8.0
<li>Disable PulseAudio suspend failure due to interactions with pipewire. (PR #239)</li>
</ul></li>
</ol>
<h2 id="v1.7.0-february-2022"><span class="header-section-number">16.2</span> V1.7.0 February 2022</h2>
<h2 id="v1.7.0-february-2022"><span class="header-section-number">16.3</span> V1.7.0 February 2022</h2>
<ol type="1">
<li>Bugfixes:
<ul>
Expand Down Expand Up @@ -647,7 +658,7 @@ <h2 id="v1.7.0-february-2022"><span class="header-section-number">16.2</span> V1
<li>Windows installer now installs sample .wav files. (PR #182)</li>
</ul></li>
</ol>
<h2 id="v1.6.1-september-2021"><span class="header-section-number">16.3</span> V1.6.1 September 2021</h2>
<h2 id="v1.6.1-september-2021"><span class="header-section-number">16.4</span> V1.6.1 September 2021</h2>
<ol type="1">
<li>Bugfixes:
<ul>
Expand All @@ -665,7 +676,7 @@ <h2 id="v1.6.1-september-2021"><span class="header-section-number">16.3</span> V
</ul></li>
</ol>
<p><em>Note: The PSK Reporter feature beginning in this release is incompatible with versions older than 1.6.1 due to a change in how callsigns are encoded.</em></p>
<h2 id="v1.6.0-august-2021"><span class="header-section-number">16.4</span> V1.6.0 August 2021</h2>
<h2 id="v1.6.0-august-2021"><span class="header-section-number">16.5</span> V1.6.0 August 2021</h2>
<ol type="1">
<li>Bugfixes:
<ul>
Expand Down Expand Up @@ -700,51 +711,51 @@ <h2 id="v1.6.0-august-2021"><span class="header-section-number">16.4</span> V1.6
<li>Created “make dist” target for easy tarball generation. (PR #152)</li>
</ul></li>
</ol>
<h2 id="v1.5.3-april-2021"><span class="header-section-number">16.5</span> V1.5.3 April 2021</h2>
<h2 id="v1.5.3-april-2021"><span class="header-section-number">16.6</span> V1.5.3 April 2021</h2>
<ol type="1">
<li>Simultaneous decode of 2020, 1600 and 700C/D/E (without needing to push Stop first, change the mode and push Start again).</li>
<li>Dynamic switching of the current Tx mode between the aforementioned modes, again without needing to restart the session.</li>
<li>A Tx level slider on the right hand side of the main screen to fine-tune transmit output (to more easily avoid clipping ALC and conflicting with other soundcard ham radio applications).</li>
</ol>
<h2 id="v1.5.2-january-2021"><span class="header-section-number">16.6</span> V1.5.2 January 2021</h2>
<h2 id="v1.5.2-january-2021"><span class="header-section-number">16.7</span> V1.5.2 January 2021</h2>
<ol type="1">
<li>Updates storage for sound card configuration to use device names instead of IDs.</li>
<li>Detects changes to computer sound card configuration and notifies user when devices go away.</li>
</ol>
<h2 id="v1.5.1-january-2021"><span class="header-section-number">16.7</span> V1.5.1 January 2021</h2>
<h2 id="v1.5.1-january-2021"><span class="header-section-number">16.8</span> V1.5.1 January 2021</h2>
<ol type="1">
<li>Experimental support for reporting to <a href="https://pskreporter.info">PSK Reporter</a> added.</li>
<li>Bug fixes with audio configuration to allow mono devices to be used along with stereo ones.</li>
<li>Tweaks to user interface and record/playback functionality to improve usability.</li>
<li>Bug fixes and tweaks to improve voice keyer support.</li>
</ol>
<h2 id="v1.5.0-december-2020"><span class="header-section-number">16.8</span> V1.5.0 December 2020</h2>
<h2 id="v1.5.0-december-2020"><span class="header-section-number">16.9</span> V1.5.0 December 2020</h2>
<ol type="1">
<li>FreeDV 700E, better performance than 700D on fast fading channels</li>
<li>FreeDV 700D/700E clipper to increase average transmit power by 6dB</li>
</ol>
<h2 id="v1.4.3-august-2020"><span class="header-section-number">16.9</span> V1.4.3 August 2020</h2>
<h2 id="v1.4.3-august-2020"><span class="header-section-number">16.10</span> V1.4.3 August 2020</h2>
<ol type="1">
<li>Maintenance Release (no major new features)</li>
<li>Changes to support wxWidgets 3.1 (but Windows versions built against wxWidgets 3.0)</li>
<li>Under the hood - OFDM modem has been refactored, shouldn’t affect freedv-gui operation</li>
</ol>
<h2 id="v1.4.2-july-2020"><span class="header-section-number">16.10</span> V1.4.2 July 2020</h2>
<h2 id="v1.4.2-july-2020"><span class="header-section-number">16.11</span> V1.4.2 July 2020</h2>
<ol type="1">
<li>Maintenance Release (no major new features)</li>
<li>Improved squelch/audio pass through on 700D/2020/2400B</li>
<li>Under the hood - Codec2 library has been refactored, shouldn’t affect freedv-gui operation</li>
<li>Removed Project Horus support (now being maintained outside of Codec2/FreeDV)</li>
</ol>
<h2 id="v1.4-june-october-2019"><span class="header-section-number">16.11</span> V1.4 June-October 2019</h2>
<h2 id="v1.4-june-october-2019"><span class="header-section-number">16.12</span> V1.4 June-October 2019</h2>
<ol type="1">
<li>FreeDV 2020, Project Horus Binary Modes.</li>
<li><a href="http://www.rowetel.com/?p=6824">Improved OFDM Modem Acquisition</a>, this will improve sync time on FreeDV 700D and 2020 on HF fading channels, and can also handle +/- 60 Hz frequency offsets when tuning.</li>
<li>Fixed FreeDV 700C frequency offset bug fix, was losing sync at certain frequency offsets.</li>
<li>Wide bandwidth phase estimation and DPSK for OFDM modes (700D/2020) for fast fading/QO-100 channels (Tools-Options)</li>
<li>Better speech quality on FreeDV 700C/700D with Auto equaliser (Tools-Filter)</li>
</ol>
<h2 id="v1.3-may-2018"><span class="header-section-number">16.12</span> V1.3 May 2018</h2>
<h2 id="v1.3-may-2018"><span class="header-section-number">16.13</span> V1.3 May 2018</h2>
<ul>
<li>FreeDV 700D</li>
</ul>
Expand Down
7 changes: 7 additions & 0 deletions USER_MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,13 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes

# Release Notes

## V1.8.1 July 2022

1. Bugfixes:
* Disable 2020B unless the installed Codec2 provides it. (PR #257)
2. Build system:
* Update build scripts to use specific Codec2 and LPCNet versions. (PR #257)

## V1.8.0 July 2022

1. Enhancements:
Expand Down
Binary file modified USER_MANUAL.pdf
Binary file not shown.
8 changes: 4 additions & 4 deletions build_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ export CODEC2DIR=$FREEDVGUIDIR/codec2
export LPCNETDIR=$FREEDVGUIDIR/LPCNet

# change this when working on combined codec2/freedv-gui changes
CODEC2_BRANCH=master
LPCNET_BRANCH=master
CODEC2_BRANCH=v1.0.3
LPCNET_BRANCH=v0.2
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So if we are checking out codec2 v1.0.3 ... how do we get 2020B?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The user would need to edit this script to use master instead (or link against a Codec2 built manually from it).


# First build and install vanilla codec2 as we need -lcodec2 to build LPCNet
cd $FREEDVGUIDIR
if [ ! -d codec2 ]; then
git clone https://github.com/drowe67/codec2.git
fi
cd codec2 && git checkout $CODEC2_BRANCH && git pull
cd codec2 && git switch - && git pull && git checkout $CODEC2_BRANCH
mkdir -p build_linux && cd build_linux && rm -Rf * && cmake .. && make

# OK, build and test LPCNet
cd $FREEDVGUIDIR
if [ ! -d LPCNet ]; then
git clone https://github.com/drowe67/LPCNet.git
fi
cd $LPCNETDIR && git checkout $LPCNET_BRANCH && git pull
cd $LPCNETDIR && git switch - && git pull && git checkout $LPCNET_BRANCH
mkdir -p build_linux && cd build_linux && rm -Rf *
cmake -DCODEC2_BUILD_DIR=$CODEC2DIR/build_linux ..
make
Expand Down
8 changes: 4 additions & 4 deletions build_osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export FREEDVGUIDIR=${PWD}
export CODEC2DIR=$FREEDVGUIDIR/codec2
export LPCNETDIR=$FREEDVGUIDIR/LPCNet
export HAMLIBDIR=$FREEDVGUIDIR/hamlib
export CODEC2_BRANCH=master
export LPCNET_BRANCH=master
export CODEC2_BRANCH=v1.0.3
export LPCNET_BRANCH=v0.2
export UT_ENABLE=${UT_ENABLE:-0}

# Prerequisite: build dylibbundler
Expand All @@ -35,15 +35,15 @@ cd $FREEDVGUIDIR
if [ ! -d codec2 ]; then
git clone https://github.com/drowe67/codec2.git
fi
cd codec2 && git checkout $CODEC2_BRANCH && git pull
cd codec2 && git switch - && git pull && git checkout $CODEC2_BRANCH
mkdir -p build_osx && cd build_osx && rm -Rf * && cmake -DBUILD_OSX_UNIVERSAL=1 .. && make -j4

# OK, build and test LPCNet
cd $FREEDVGUIDIR
if [ ! -d LPCNet ]; then
git clone https://github.com/drowe67/LPCNet.git
fi
cd $LPCNETDIR && git checkout $LPCNET_BRANCH && git pull
cd $LPCNETDIR && git switch - && git pull && git checkout $LPCNET_BRANCH
mkdir -p build_osx && cd build_osx && rm -Rf *
cmake -DCODEC2_BUILD_DIR=$CODEC2DIR/build_osx -DBUILD_OSX_UNIVERSAL=1 ..
make -j4
Expand Down
8 changes: 4 additions & 4 deletions build_windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ export FREEDVGUIDIR=${PWD}
export CODEC2DIR=$FREEDVGUIDIR/codec2
export LPCNETDIR=$FREEDVGUIDIR/LPCNet

CODEC2_BRANCH=master
LPCNET_BRANCH=master
CODEC2_BRANCH=v1.0.3
LPCNET_BRANCH=v0.2

# First build and install vanilla codec2 as we need -lcodec2 to build LPCNet
cd $FREEDVGUIDIR
git clone https://github.com/drowe67/codec2.git
cd codec2 && git checkout $CODEC2_BRANCH && git pull
cd codec2 && git switch - && git pull && git checkout $CODEC2_BRANCH
mkdir -p $BUILD_DIR && cd $BUILD_DIR && rm -Rf *
$CMAKE .. && make

# OK, build and test LPCNet
cd $FREEDVGUIDIR
git clone https://github.com/drowe67/LPCNet.git
cd $LPCNETDIR && git checkout $LPCNET_BRANCH && git pull
cd $LPCNETDIR && git switch - && git pull && git checkout $LPCNET_BRANCH
mkdir -p $BUILD_DIR && cd $BUILD_DIR && rm -Rf *
$CMAKE -DCODEC2_BUILD_DIR=$CODEC2DIR/$BUILD_DIR ..
make
Expand Down
2 changes: 2 additions & 0 deletions src/freedv_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ static const char* GetCurrentModeStrImpl_(int mode)
return "1600";
case FREEDV_MODE_2020:
return "2020";
#if defined(FREEDV_MODE_2020B)
case FREEDV_MODE_2020B:
return "2020B";
#endif // FREEDV_MODE_2020B
case FREEDV_MODE_800XA:
return "800XA";
case FREEDV_MODE_2400B:
Expand Down
19 changes: 17 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,9 @@ void MainFrame::OnTimer(wxTimerEvent &evt)
m_panelScatter->setNc(g_Nc);
break;
case FREEDV_MODE_2020:
#if defined(FREEDV_MODE_2020B)
case FREEDV_MODE_2020B:
#endif // FREEDV_MODE_2020B
g_Nc = 31;
m_panelScatter->setNc(g_Nc);
break;
Expand All @@ -931,8 +933,11 @@ void MainFrame::OnTimer(wxTimerEvent &evt)
if ((currentMode == FREEDV_MODE_1600) ||
(currentMode == FREEDV_MODE_700D) ||
(currentMode == FREEDV_MODE_700E) ||
(currentMode == FREEDV_MODE_2020) ||
(currentMode == FREEDV_MODE_2020B)) {
(currentMode == FREEDV_MODE_2020)
#if defined(FREEDV_MODE_2020B)
|| (currentMode == FREEDV_MODE_2020B)
#endif // FREEDV_MODE_2020B
) {
m_panelScatter->add_new_samples_scatter(&freedvInterface.getCurrentRxModemStats()->rx_symbols[r][0]);
}
else if (currentMode == FREEDV_MODE_700C) {
Expand Down Expand Up @@ -1478,12 +1483,14 @@ void MainFrame::OnChangeTxMode( wxCommandEvent& event )

g_mode = FREEDV_MODE_2020;
}
#if defined(FREEDV_MODE_2020B)
else if (m_rb2020b->GetValue())
{
assert(isAvxPresent);

g_mode = FREEDV_MODE_2020B;
}
#endif // FREEDV_MODE_2020B

if (freedvInterface.isRunning())
{
Expand Down Expand Up @@ -1536,7 +1543,9 @@ void MainFrame::OnTogBtnOnOff(wxCommandEvent& event)
m_togBtnVoiceKeyer->Enable();

if (g_mode == FREEDV_MODE_2400B || g_mode == FREEDV_MODE_800XA ||
#if defined(FREEDV_MODE_2020B)
g_mode == FREEDV_MODE_2020B || /* note: 2020B don't play well with multi-RX atm */
#endif // FREEDV_MODE_2020B
!wxGetApp().m_boolMultipleRx)
{
m_rb1600->Disable();
Expand All @@ -1546,7 +1555,9 @@ void MainFrame::OnTogBtnOnOff(wxCommandEvent& event)
m_rb800xa->Disable();
m_rb2400b->Disable();
m_rb2020->Disable();
#if defined(FREEDV_MODE_2020B)
m_rb2020b->Disable();
#endif // FREEDV_MODE_2020B
freedvInterface.addRxMode(g_mode);
}
else
Expand Down Expand Up @@ -1575,7 +1586,9 @@ void MainFrame::OnTogBtnOnOff(wxCommandEvent& event)

m_rb800xa->Disable();
m_rb2400b->Disable();
#if defined(FREEDV_MODE_2020B)
m_rb2020b->Disable();
#endif // FREEDV_MODE_2020B
}

// Default voice keyer sample rate to 8K. The exact voice keyer
Expand Down Expand Up @@ -1810,7 +1823,9 @@ void MainFrame::OnTogBtnOnOff(wxCommandEvent& event)
if(isAvxPresent)
{
m_rb2020->Enable();
#if defined(FREEDV_MODE_2020B)
m_rb2020b->Enable();
#endif // FREEDV_MODE_2020B
}
}

Expand Down
9 changes: 8 additions & 1 deletion src/topFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,10 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const
sbSizer_mode->Add(m_rb2400b, 0, wxALIGN_LEFT|wxALL, 1);
m_rb2020 = new wxRadioButton( modeBox, wxID_ANY, wxT("2020"), wxDefaultPosition, wxDefaultSize, 0);
sbSizer_mode->Add(m_rb2020, 0, wxALIGN_LEFT|wxALL, 1);
sbSizer_mode->SetMinSize(wxSize(100,-1));
#if defined(FREEDV_MODE_2020B)
m_rb2020b = new wxRadioButton( modeBox, wxID_ANY, wxT("2020B"), wxDefaultPosition, wxDefaultSize, 0);
sbSizer_mode->Add(m_rb2020b, 0, wxALIGN_LEFT|wxALL, 1);
#endif // FREEDV_MODE_2020B
sbSizer_mode->SetMinSize(wxSize(100,-1));
m_rb1600->SetValue(true);

Expand Down Expand Up @@ -477,7 +478,9 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const
m_rb800xa->MoveBeforeInTabOrder(m_rb1600);
m_rb1600->MoveBeforeInTabOrder(m_rb2400b);
m_rb2400b->MoveBeforeInTabOrder(m_rb2020);
#if defined(FREEDV_MODE_2020B)
m_rb2020->MoveBeforeInTabOrder(m_rb2020b);
#endif // FREEDV_MODE_2020B
m_togBtnOnOff->MoveBeforeInTabOrder(m_togBtnSplit);
m_togBtnSplit->MoveBeforeInTabOrder(m_togBtnAnalog);
m_togBtnAnalog->MoveBeforeInTabOrder(m_togBtnVoiceKeyer);
Expand Down Expand Up @@ -542,7 +545,9 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const
m_rb1600->Connect(wxEVT_RADIOBUTTON, wxCommandEventHandler(TopFrame::OnChangeTxMode), NULL, this);
m_rb2400b->Connect(wxEVT_RADIOBUTTON, wxCommandEventHandler(TopFrame::OnChangeTxMode), NULL, this);
m_rb2020->Connect(wxEVT_RADIOBUTTON, wxCommandEventHandler(TopFrame::OnChangeTxMode), NULL, this);
#if defined(FREEDV_MODE_2020B)
m_rb2020b->Connect(wxEVT_RADIOBUTTON, wxCommandEventHandler(TopFrame::OnChangeTxMode), NULL, this);
#endif // FREEDV_MODE_2020B

m_sliderTxLevel->Connect(wxEVT_SCROLL_TOP, wxScrollEventHandler(TopFrame::OnChangeTxLevel), NULL, this);
m_sliderTxLevel->Connect(wxEVT_SCROLL_BOTTOM, wxScrollEventHandler(TopFrame::OnChangeTxLevel), NULL, this);
Expand Down Expand Up @@ -611,7 +616,9 @@ TopFrame::~TopFrame()
m_rb1600->Disconnect(wxEVT_RADIOBUTTON, wxCommandEventHandler(TopFrame::OnChangeTxMode), NULL, this);
m_rb2400b->Disconnect(wxEVT_RADIOBUTTON, wxCommandEventHandler(TopFrame::OnChangeTxMode), NULL, this);
m_rb2020->Disconnect(wxEVT_RADIOBUTTON, wxCommandEventHandler(TopFrame::OnChangeTxMode), NULL, this);
#if defined(FREEDV_MODE_2020B)
m_rb2020b->Disconnect(wxEVT_RADIOBUTTON, wxCommandEventHandler(TopFrame::OnChangeTxMode), NULL, this);
#endif // FREEDV_MODE_2020B

m_sliderTxLevel->Disconnect(wxEVT_SCROLL_TOP, wxScrollEventHandler(TopFrame::OnChangeTxLevel), NULL, this);
m_sliderTxLevel->Disconnect(wxEVT_SCROLL_BOTTOM, wxScrollEventHandler(TopFrame::OnChangeTxLevel), NULL, this);
Expand Down
5 changes: 4 additions & 1 deletion src/topFrame.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
#include <wx/notebook.h>
#include <wx/listctrl.h>

#include "freedv_api.h" // for FREEDV_MODE_*

///////////////////////////////////////////////////////////////////////////

Expand Down Expand Up @@ -121,8 +122,10 @@ class TopFrame : public wxFrame
wxRadioButton *m_rb1600;
wxRadioButton *m_rb2400b;
wxRadioButton *m_rb2020;
#if defined(FREEDV_MODE_2020B)
wxRadioButton *m_rb2020b;

#endif // FREEDV_MODE_2020B

wxMenuItem* m_menuItemPlayFileToMicIn;
wxMenuItem* m_menuItemRecFileFromRadio;
wxMenuItem* m_menuItemRecFileFromModulator;
Expand Down