From 47d61abc94a8c7140c3950329890d0f71f5714eb Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Sun, 6 Dec 2020 16:17:51 -0500 Subject: Rework hardware probing and RTL-SDR helper startup The lazy startup of the separate helper program for the RTL-SDR backend on playback start was incorrect with respect to the expected behavior the frequency setting verbs. This was not visible during usage by the radio application, but was triggering failures in several tests in the pyagl binding wrapper test suite. To facilitate starting the helper during backend initialization, the probing part of the backend "init" has been split into a separate "probe" function, and all backends have been updated to reflect this change. Logic has been added to enforce that "init" is only called after "probe" has succeeded for a backend, and a comment has been added to radio_impl.h to document this intended behavior. Bug-AGL: SPEC-3717 Signed-off-by: Scott Murray Change-Id: Ic37331a92bae7cc01ee448e69894fa5f49d08a74 --- binding/radio_impl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'binding/radio_impl.h') diff --git a/binding/radio_impl.h b/binding/radio_impl.h index 8f1ee94..3e549ac 100644 --- a/binding/radio_impl.h +++ b/binding/radio_impl.h @@ -71,6 +71,9 @@ typedef struct typedef struct { char *name; + int (*probe)(void); + + /* NOTE: init should return -1 if called before probe has been called and returned success */ int (*init)(void); void (*set_output)(const char *output); -- cgit 1.2.3-korg