summaryrefslogtreecommitdiffstats
path: root/binding/radio_impl.h
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2020-12-06 16:17:51 -0500
committerScott Murray <scott.murray@konsulko.com>2020-12-07 19:30:15 +0000
commit52f4599b444d13fc1e8ae48f423aaaedcbad3ae0 (patch)
treeb5e35b29826fe3ed2be35194f02394f4fe343a13 /binding/radio_impl.h
parentb4ee1862da56f3ffceb3100ee16ecea7f02fc692 (diff)
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 <scott.murray@konsulko.com> Change-Id: Ic37331a92bae7cc01ee448e69894fa5f49d08a74
Diffstat (limited to 'binding/radio_impl.h')
-rw-r--r--binding/radio_impl.h3
1 files changed, 3 insertions, 0 deletions
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);