From d4fb6eb7a4648b74f930af667f9231226e4ce208 Mon Sep 17 00:00:00 2001 From: Ehsan Takalloo Date: Mon, 14 Sep 2020 16:18:47 +0430 Subject: Add support for tuning to alternative frequency -Add a new verb for handling alternative frequency. -Add a new structure (station_quality_t) and use it for sharing quality parameters. -Make tef665x implementations compatible with new structure. -Update README.md file to cover new verbs. Change-Id: Id78e3b9aa8896eca9ef44222657f21246de9914f Signed-off-by: Ehsan Takalloo --- binding/radio_impl.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'binding/radio_impl.h') diff --git a/binding/radio_impl.h b/binding/radio_impl.h index 2867d7f..8f1ee94 100644 --- a/binding/radio_impl.h +++ b/binding/radio_impl.h @@ -40,6 +40,34 @@ typedef enum { STEREO } radio_stereo_mode_t; +/* + * AF_update + * true if quality belongs to an alternative frequency + * + * time_stamp + * if time_stamp is zero, quality data won't be valid + * reliability depending on time stamp + * it takes some time after tuning to get valid quality data + * + * rssi + * (signed) + * level detector result(RF input level) + * + * usn + * FM ultrasonic noise detector (relative usn detector result) + * + * bandwidth + * IF bandwidth + */ +typedef struct +{ + bool af_update; + uint16_t time_stamp; + int16_t rssi; + uint16_t usn; + uint16_t bandw; +} station_quality_t; + typedef struct { char *name; @@ -86,6 +114,9 @@ typedef struct { char * (*get_rds_info)(void); + station_quality_t * (*get_quality_info)(void); + + void (*set_alternative_frequency)(uint32_t frequency); } radio_impl_ops_t; #endif /* _RADIO_IMPL_H */ -- cgit 1.2.3-korg