diff --git a/mythtv/.cppcheck-suppress b/mythtv/.cppcheck-suppress
index dc308804357..b2fb8cf855f 100644
--- a/mythtv/.cppcheck-suppress
+++ b/mythtv/.cppcheck-suppress
@@ -9,7 +9,6 @@
*:*/filters/*
*:*/html/*
*:*/libs/libmythfreemheg/*
-*:*/libs/libmythfreesurround/*
*:*/libs/libmythmpeg2/*
*:*/libs/libmythtv/visualisations/goom/*
*:*/programs/mythbackend/serviceHosts/*
diff --git a/mythtv/CMakeLists.txt b/mythtv/CMakeLists.txt
index 9d5c0a22db3..e4b159a374a 100644
--- a/mythtv/CMakeLists.txt
+++ b/mythtv/CMakeLists.txt
@@ -246,7 +246,6 @@ set_target_properties(
mythbase
mythdvdnav
mythfreemheg
- mythfreesurround
mythmetadata
mythmpeg2
mythprotoserver
diff --git a/mythtv/docs/doxygen-architecture-document.cpp b/mythtv/docs/doxygen-architecture-document.cpp
index 27cb5a43f4c..dbe17d477d9 100644
--- a/mythtv/docs/doxygen-architecture-document.cpp
+++ b/mythtv/docs/doxygen-architecture-document.cpp
@@ -97,8 +97,7 @@ There are also a few simple \ref testing "testing shortcuts".
and some old UI widgets are implemented by libmyth.
This library depends on libav*, \ref libmythbase "libmythbase",
- \ref libmythui "libmythui", \ref libmythupnp "libmythupnp"
- and libmythfreesurround.
+ \ref libmythui "libmythui", and \ref libmythupnp "libmythupnp".
Any changes to this library's ABI may trigger a %MythTV binary version
change because the plugins depend on it.
@@ -155,16 +154,6 @@ There are also a few simple \ref testing "testing shortcuts".
This library does not depend on any of our libraries.
-
libmythfreesurround
- Support for some multi-channel audio transforms.
-
- This library does not depend on any of our libraries.
-
- libmythnvctrl
- Interface between X-windows and NVidia drivers.
-
- This library does not depend on any of our libraries.
-
The libmythmpeg2 library appears redundant with the system libsamplerate, but
libmpeg2 decodes MPEG-2 more quickly than ffmpeg on some systems, and
diff --git a/mythtv/libs/CMakeLists.txt b/mythtv/libs/CMakeLists.txt
index ccaa184cbb8..ae88a9ae824 100644
--- a/mythtv/libs/CMakeLists.txt
+++ b/mythtv/libs/CMakeLists.txt
@@ -1,5 +1,4 @@
add_subdirectory(libmythbase)
-add_subdirectory(libmythfreesurround)
add_subdirectory(libmythservicecontracts)
if(TARGET mythtv_mheg)
add_subdirectory(libmythfreemheg)
diff --git a/mythtv/libs/libmyth/CMakeLists.txt b/mythtv/libs/libmyth/CMakeLists.txt
index 538fc348fcb..5861fdaea83 100644
--- a/mythtv/libs/libmyth/CMakeLists.txt
+++ b/mythtv/libs/libmyth/CMakeLists.txt
@@ -43,6 +43,8 @@ set(AUDIO_HEADERS_NOT_INSTALLED
audio/audiooutputdownmix.h
audio/audiooutputgraph.h
audio/audiooutputnull.h
+ audio/freesurround.h
+ audio/freesurround_decoder.h
audio/pink.h
audio/spdifencoder.h)
@@ -68,6 +70,8 @@ add_library(
audio/audiooutpututil.cpp
audio/audiosettings.cpp
audio/eldutils.cpp
+ audio/freesurround.cpp
+ audio/freesurround_decoder.cpp
audio/pink.cpp
audio/spdifencoder.cpp
audio/volumebase.cpp
@@ -178,7 +182,6 @@ target_link_libraries(
PUBLIC mythbase
mythui
mythupnp
- mythfreesurround
mythbluray
PkgConfig::LIBAVCODEC
PkgConfig::LIBAVFORMAT
diff --git a/mythtv/libs/libmyth/audio/audiooutputbase.cpp b/mythtv/libs/libmyth/audio/audiooutputbase.cpp
index 8c311f40234..8fddd9aa3d7 100644
--- a/mythtv/libs/libmyth/audio/audiooutputbase.cpp
+++ b/mythtv/libs/libmyth/audio/audiooutputbase.cpp
@@ -22,12 +22,12 @@
#include "libmythbase/compat.h"
#include "libmythbase/mythconfig.h"
#include "libmythbase/mythlogging.h"
-#include "libmythfreesurround/freesurround.h"
#include "audiooutputbase.h"
#include "audiooutputdigitalencoder.h"
#include "audiooutputdownmix.h"
#include "audiooutpututil.h"
+#include "freesurround.h"
#include "spdifencoder.h"
// AC3 encode currently disabled for Android
diff --git a/mythtv/libs/libmythfreesurround/freesurround.cpp b/mythtv/libs/libmyth/audio/freesurround.cpp
similarity index 97%
rename from mythtv/libs/libmythfreesurround/freesurround.cpp
rename to mythtv/libs/libmyth/audio/freesurround.cpp
index b85cd0d0c7b..ce6b9775fb0 100644
--- a/mythtv/libs/libmythfreesurround/freesurround.cpp
+++ b/mythtv/libs/libmyth/audio/freesurround.cpp
@@ -16,6 +16,7 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#include "freesurround.h"
#include
#include
@@ -29,14 +30,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include
#include