diff options
Diffstat (limited to 'broadcastradio/1.1/ITuner.hal')
-rw-r--r-- | broadcastradio/1.1/ITuner.hal | 80 |
1 files changed, 62 insertions, 18 deletions
diff --git a/broadcastradio/1.1/ITuner.hal b/broadcastradio/1.1/ITuner.hal index 751162966..b20c5f4fb 100644 --- a/broadcastradio/1.1/ITuner.hal +++ b/broadcastradio/1.1/ITuner.hal @@ -21,6 +21,45 @@ import @1.0::ITuner; interface ITuner extends @1.0::ITuner { /** + * Tune to a specified program. + * + * For AM/FM, it must be called when a valid configuration has been applied. + * Automatically cancels pending scan, step or tune. + * + * If method returns OK, ITunerCallback.tuneComplete_1_1() MUST be called: + * - once successfully tuned; + * - after a time out; + * - after a full band scan, if no station found. + * + * The tuned field of ProgramInfo should indicate if tuned to a valid + * station or not. + * + * @param program Program to tune to. + * @return result OK if successfully started tunning. + * INVALID_ARGUMENTS if invalid arguments are passed. + * NOT_INITIALIZED if another error occurs. + */ + tuneByProgramSelector(ProgramSelector program) generates (Result result); + + /** + * Cancels announcement. + * + * If it was traffic announcement, trafficAnnouncement(false) callback + * should be called (just like it was ended in a normal way). Similarly for + * emergency announcement. If there was no announcement, then no action + * should be taken. + * + * There is a race condition between calling cancelAnnouncement and the + * actual announcement being finished, so trafficAnnouncement / + * emergencyAnnouncement callback should be tracked with proper locking. + * + * @return result OK if successfully cancelled announcement or there was + * no announcement. + * NOT_INITIALIZED if another error occurs. + */ + cancelAnnouncement() generates (Result result); + + /** * Retrieve current station information. * @return result OK if scan successfully started * NOT_INITIALIZED if another error occurs @@ -45,6 +84,13 @@ interface ITuner extends @1.0::ITuner { * subsequent calls to startBackgroundScan, issuing a single * backgroundScanComplete callback. * + * If a device supports continuous background scanning, it may succeed + * (return OK and call backgroundScanComplete) without any additional + * operation performed. + * + * Foreground scanning may be implemented in the front end app with + * @1.0::ITuner scan operation. + * * @return result OK if the scan was properly scheduled (this does not mean * it successfully finished). * UNAVAILABLE if the background scan is unavailable, @@ -60,10 +106,8 @@ interface ITuner extends @1.0::ITuner { * This call does not trigger actual scan, but operates on the list cached * internally at the driver level. * - * @param filter vendor-specific filter for the stations to be retrieved. - * An empty string MUST result in full list. - * Client application MUST verify vendor/product name - * before setting this parameter to anything else. + * @param vendorFilter vendor-specific filter for the stations to be retrieved. + * An empty vector MUST result in full list for a given tuner. * @return result OK if the list was successfully retrieved. * INVALID_ARGUMENTS if invalid arguments are passed * NOT_READY if the scan is in progress. @@ -72,23 +116,10 @@ interface ITuner extends @1.0::ITuner { * NOT_INITIALIZED if any other error occurs. * @return programList List of stations available for user. */ - getProgramList(string filter) + getProgramList(vec<VendorKeyValue> vendorFilter) generates (ProgramListResult result, vec<ProgramInfo> programList); /** - * Checks, if the analog playback is forced, see setAnalogForced. - * - * The isForced value is only valid if result was OK. - * - * @return result OK if the call succeeded and isForced is valid. - * INVALID_STATE if the switch is not supported at current - * configuration. - * NOT_INITIALIZED if any other error occurs. - * @return isForced true if analog is forced, false otherwise. - */ - isAnalogForced() generates (Result result, bool isForced); - - /** * Forces the analog playback for the supporting radio technology. * * User may disable digital playback for FM HD Radio or hybrid FM/DAB with @@ -104,4 +135,17 @@ interface ITuner extends @1.0::ITuner { * NOT_INITIALIZED if any other error occurs. */ setAnalogForced(bool isForced) generates (Result result); + + /** + * Checks, if the analog playback is forced, see setAnalogForced. + * + * The isForced value is only valid if result was OK. + * + * @return result OK if the call succeeded and isForced is valid. + * INVALID_STATE if the switch is not supported at current + * configuration. + * NOT_INITIALIZED if any other error occurs. + * @return isForced true if analog is forced, false otherwise. + */ + isAnalogForced() generates (Result result, bool isForced); }; |