summaryrefslogtreecommitdiffstats
path: root/binding/CMakeLists.txt
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2017-12-21 20:13:52 -0500
committerScott Murray <scott.murray@konsulko.com>2017-12-21 20:13:52 -0500
commit62518e9fdefa82a8d454e3dbcc28fd2efdc08fa0 (patch)
tree71426b7560d371983b9bcaa8f324b80372922aa5 /binding/CMakeLists.txt
parent55fddbb3186412f61fb8b8ea57b76a74f392d30b (diff)
Add conditionally compilable support for the Si4689 radio on the M3ULCB Kingfisher infotainment board. The codebase has been refactored to allow multiple radio implementations, and when Kingfisher support is enabled, the binding will first look for a USB RTL-SDR adapter, then fallback to the Kingfisher Si4689 if one is not found. This allows easily switching to a RTL-SDR adapter if this initial Kingfisher support encounters issues. The back end implementation relies on a patched version of the "si_ctl" utility from Cogent Embedded's Kingfisher BSP changes. The modifications to it add FM band plan selection and scanning threshold tweaking for poor radio environments. Audio output is achieved by looping the radio's PulseAudio source to the appropriate sink depending on 4A or non-4A operation. For 4A compatibility, the PulseAudio source is created if it does not exist, which currently is the case due to PulseAudio's udev module being disabled when 4A is enabled. Additionally, the FM band plan for Japan has been corrected to go to 95 MHz, and a README.md file has been added documenting the optional configuration that can be done via /etc/xdg/AGL.conf for band plan selection and scanning sensitivity. Change-Id: I204906fed741d917fc3b8be962deadb4e59989db Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Diffstat (limited to 'binding/CMakeLists.txt')
-rw-r--r--binding/CMakeLists.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/binding/CMakeLists.txt b/binding/CMakeLists.txt
index 8f339e4..d0d23ed 100644
--- a/binding/CMakeLists.txt
+++ b/binding/CMakeLists.txt
@@ -21,12 +21,18 @@
PROJECT_TARGET_ADD(radio-binding)
# Define project Targets
- add_library(${TARGET_NAME} MODULE
+ set(radio_SOURCES
radio-binding.c
radio_output.c
radio_impl_rtlsdr.c
rtl_fm.c
convenience/convenience.c)
+ if(HAVE_KINGFISHER)
+ set(radio_SOURCES ${radio_SOURCES} radio_impl_kingfisher.c)
+ add_definitions(-DHAVE_KINGFISHER)
+ endif()
+
+ add_library(${TARGET_NAME} MODULE ${radio_SOURCES})
# Binder exposes a unique public entry point
SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES
@@ -42,4 +48,3 @@ PROJECT_TARGET_ADD(radio-binding)
# installation directory
INSTALL(TARGETS ${TARGET_NAME}
LIBRARY DESTINATION ${BINDINGS_INSTALL_DIR})
-