diff --git a/CHANGES.md b/CHANGES.md index 0c74bd9..9a24498 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -16,9 +16,9 @@ The following Git repository is required: ## Platforms tested -* Mac mini 2023 Apple Silicon (M2 Pro), macOS 14.4, Xcode 15.3 Command Line Tools -* MacBook Air 13" Apple Silicon (M1) 2020, macOS 14.4, Xcode 15.3 Command Line Tools -* Ubuntu 22.04.4 LTS x86\_64, gcc 12.3.0 +* Mac mini 2023 Apple Silicon (M2 Pro), macOS 14.4.1, Xcode 15.3 Command Line Tools +* MacBook Air 13" Apple Silicon (M1) 2020, macOS 14.4.1, Xcode 15.3 Command Line Tools +* Ubuntu 24.04 LTS x86\_64, gcc 13.2.0 * Raspberry Pi 4 with Raspberry Pi OS 64bit Lite (Debian Bookworm) ## Features under development @@ -38,6 +38,12 @@ Intel Mac hardware is no longer supported by airspy-fmradion, although the autho ## Changes (including requirement changes) +* 20240424-0: Made the following changes: + * [Add libairspyhf latest version document.](https://github.com/jj1bdx/airspy-fmradion/pull/80) + * Airspy HF+ Firmware R3.0.7 and R4.0.8 both work OK on libairspyhf 1.6.8. + * For the Firmware R4.0.8, use libairspy 1.8 to have full compatibility. + * [Use shared libraries for airspy, airspyhf, and rtl-sdr.](https://github.com/jj1bdx/airspy-fmradion/pull/79) + * Tested `airspy_set_packing()` for Airspy R2, but this increased CPU usage on Apple Silicon M2 Pro, so the change was not incorporated. * 20240316-0: Made the following changes: * Raspberry Pi 4 with Raspberry Pi OS 64bit lite is now officially tested. * *Note well: Raspberry Pi OS 32bit is not supported*. diff --git a/CMakeLists.txt b/CMakeLists.txt index 18da3d4..cd81dfa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,14 +54,14 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") HINTS /usr/local/include/libairspy /opt/homebrew/include/libairspy ${PKG_AIRSPY_INCLUDE_DIRS}) find_library( - AIRSPY_LIBRARY libairspy.a HINTS /usr/local/lib /opt/homebrew/lib - ${PKG_AIRSPY_LIBRARY_DIRS}) + AIRSPY_LIBRARY libairspy.dylib + HINTS /usr/local/lib /opt/homebrew/lib ${PKG_AIRSPY_LIBRARY_DIRS}) set(AIRSPY_INCLUDE_OPTION "-I/usr/local/include -I/opt/homebrew/include") else() find_path(AIRSPY_INCLUDE_DIR airspy.h HINTS ${PKG_AIRSPY_INCLUDE_DIRS}) - find_library(AIRSPY_LIBRARY libairspy.a + find_library(AIRSPY_LIBRARY libairspy.so HINTS ${PKG_AIRSPY_LIBRARY_DIRS}) set(AIRSPY_INCLUDE_OPTION "") endif() @@ -79,15 +79,15 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") /opt/homebrew/include/libairspyhf ${PKG_AIRSPYHF_INCLUDE_DIRS}) find_library( - AIRSPYHF_LIBRARY libairspyhf.a + AIRSPYHF_LIBRARY libairspyhf.dylib HINTS /usr/local/lib /opt/homebrew/lib ${PKG_AIRSPYHF_LIBRARY_DIRS}) set(AIRSPYHF_INCLUDE_OPTION "-I/usr/local/include -I/opt/homebrew/include") else() - find_path(AIRSPYHF_INCLUDE_DIR airspyhf.h HINT - ${PKG_AIRSPYHF_INCLUDE_DIRS}) - find_library(AIRSPYHF_LIBRARY libairspyhf.a HINT - ${PKG_AIRSPYHF_LIBRARY_DIRS}) + find_path(AIRSPYHF_INCLUDE_DIR airspyhf.h + HINTS ${PKG_AIRSPYHF_INCLUDE_DIRS}) + find_library(AIRSPYHF_LIBRARY libairspyhf.so + HINTS ${PKG_AIRSPYHF_LIBRARY_DIRS}) set(AIRSPYHF_INCLUDE_OPTION "") endif() message( @@ -98,8 +98,13 @@ message( # Find RTL-SDR library. pkg_check_modules(PKG_RTLSDR librtlsdr) find_path(RTLSDR_INCLUDE_DIR rtl-sdr.h HINTS ${PKG_RTLSDR_INCLUDE_DIRS}) -find_library(RTLSDR_LIBRARY librtlsdr.a - HINTS ${PKG_RTLSDR_LIBRARY_DIRS}) +if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + find_library(RTLSDR_LIBRARY librtlsdr.dylib + HINTS ${PKG_RTLSDR_LIBRARY_DIRS}) +else() + find_library(RTLSDR_LIBRARY librtlsdr.so + HINTS ${PKG_RTLSDR_LIBRARY_DIRS}) +endif() message( STATUS "librtlsdr ${PKG_RTLSDR_VERSION}: ${RTLSDR_INCLUDE_DIR}, ${RTLSDR_LIBRARY}" @@ -312,8 +317,9 @@ target_link_libraries( ${EXTRA_LIBS} cmake_git_version_tracking) -target_link_libraries(sfmbase ${SNDFILE_LIBRARY} ${AIRSPY_LIBRARIES} - ${AIRSPYHF_LIBRARIES} ${RTLSDR_LIBRARIES}) +target_link_libraries( + sfmbase ${SNDFILE_LIBRARY} ${AIRSPY_LIBRARY} ${AIRSPYHF_LIBRARY} + ${RTLSDR_LIBRARY} ${LIBUSB_LIBRARY}) # Installation diff --git a/README.md b/README.md index d02d64d..f1f6439 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # airspy-fmradion -* Version 20240316-0 +* Version 20240424-0 * For macOS (Apple Silicon) and Linux ## Contributing diff --git a/libairspyhf.md b/libairspyhf.md new file mode 100644 index 0000000..d183013 --- /dev/null +++ b/libairspyhf.md @@ -0,0 +1,41 @@ +# libairspyhf and Airspy HF+ firmware versions + +## Airspy HF+ firmware version details + +* See [Airspy HF+ Firmware changelog](https://airspy.com/downloads/hfplus_changelog.txt) for the details. + +## libairspy version compatibility with Airspy HF+ firmware versions + +* R3.0.7 and R4.0.8 both work OK on libairspyhf 1.6.8. +* For R4.0.8, use libairspy 1.8 to have full compatibility. + +## For macOS Homebrew + +To install the latest libairspyhf: + +```sh +brew install airspyhf --HEAD + +``` + +## pkgconfig precedence + +You may need to add precedence of `/usr/local/lib/pkg-config` for `PKG_CONFIG_PATH` when building airspy-fmradion, as: + +``` +export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:${PKG_CONFIG_PATH}" +``` + +## libairspyhf 1.8 udev rules for Linux + +You have to modify `/etc/udev/rules.d/52-airspyhf.rules` as: + +``` +ATTR{idVendor}=="03eb", ATTR{idProduct}=="800c", SYMLINK+="airspyhf-%k", TAG+="uaccess", MODE="660", GROUP="plugdev" +``` + +Otherwise Airspy HF+ device will not be recognized when plugged in. + +See [GitHub issue airspy/airspyhf#46](https://github.com/airspy/airspyhf/issues/46) for the details. + +[End of memorandum] diff --git a/main.cpp b/main.cpp index 1083775..dabda4c 100644 --- a/main.cpp +++ b/main.cpp @@ -48,7 +48,7 @@ // define this for enabling coefficient monitor functions // #undef COEFF_MONITOR -#define AIRSPY_FMRADION_VERSION "20240316-0" +#define AIRSPY_FMRADION_VERSION "20240424-0" // Flag to set graceful termination // in process_signals() @@ -342,29 +342,28 @@ int main(int argc, char **argv) { #endif // LIBSNDFILE_MP3_ENABLED const struct option longopts[] = { - {"modtype", optional_argument, nullptr, 'm'}, - {"devtype", optional_argument, nullptr, 't'}, - {"quiet", required_argument, nullptr, 'q'}, - {"config", optional_argument, nullptr, 'c'}, - {"dev", required_argument, nullptr, 'd'}, - {"mono", no_argument, nullptr, 'M'}, - {"raw", required_argument, nullptr, 'R'}, - {"float", required_argument, nullptr, 'F'}, - {"wav", required_argument, nullptr, 'W'}, - {"wavfloat", required_argument, nullptr, 'G'}, - {"play", optional_argument, nullptr, 'P'}, - {"pps", required_argument, nullptr, 'T'}, - {"pilotshift", no_argument, nullptr, 'X'}, - {"usa", no_argument, nullptr, 'U'}, - {"filtertype", optional_argument, nullptr, 'f'}, - {"squelch", required_argument, nullptr, 'l'}, - {"multipathfilter", required_argument, nullptr, 'E'}, - {"ifrateppm", optional_argument, nullptr, 'r'}, + {"modtype", optional_argument, nullptr, 'm'}, + {"devtype", optional_argument, nullptr, 't'}, + {"quiet", required_argument, nullptr, 'q'}, + {"config", optional_argument, nullptr, 'c'}, + {"dev", required_argument, nullptr, 'd'}, + {"mono", no_argument, nullptr, 'M'}, + {"raw", required_argument, nullptr, 'R'}, + {"float", required_argument, nullptr, 'F'}, + {"wav", required_argument, nullptr, 'W'}, + {"wavfloat", required_argument, nullptr, 'G'}, + {"play", optional_argument, nullptr, 'P'}, + {"pps", required_argument, nullptr, 'T'}, + {"pilotshift", no_argument, nullptr, 'X'}, + {"usa", no_argument, nullptr, 'U'}, + {"filtertype", optional_argument, nullptr, 'f'}, + {"squelch", required_argument, nullptr, 'l'}, + {"multipathfilter", required_argument, nullptr, 'E'}, + {"ifrateppm", optional_argument, nullptr, 'r'}, #if defined(LIBSNDFILE_MP3_ENABLED) - {"mp3fmaudio", required_argument, nullptr, 'C'}, + {"mp3fmaudio", required_argument, nullptr, 'C'}, #endif // LIBSNDFILE_MP3_ENABLED - {nullptr, no_argument, nullptr, 0} - }; + {nullptr, no_argument, nullptr, 0}}; int c, longindex;