Posted: February 09, 2012 02:55 by cpratt
While looking into OCAP_RI-598, we realized the mpeos_mediaTune() events are not clearly documented and don't capture the assumptions the RI is currently coded to. Additionally, it was discovered that fast tunes were requiring a TUNE_UNSYNC to be sent after TUNE_STARTED, which should not be required.
Here's the clarifications I'd like to add:
Change to mpeos_media.h: (vs trunk revision 29494)
@@ -51,11 +51,33 @@ // // Events arising from a tune request. // -#define MPE_TUNE_STARTED 0x09 // Tuning attempt begins. -#define MPE_TUNE_FAIL 0x03 // Tuning attempt was unsuccessful. -#define MPE_TUNE_ABORT 0x04 // Tuner becomes untuned. -#define MPE_TUNE_SYNC 0x02 // Tuner becomes tuned and synced -#define MPE_TUNE_UNSYNC 0x0E // Tuner becomes tuned and unsynced +#define MPE_TUNE_STARTED 0x09 // Tuning attempt begins. This must be sent after any + // mpeos_mediaTune() that returns MPE_SUCCESS and before + // any other events. Note: mpeos_mediaTune() will not + // be called for the same tuner between the time that + // mpeos_mediaTune() is called and MPE_TUNE_STARTED is + // received. +#define MPE_TUNE_SYNC 0x02 // Tuner is tuned and synced. This indicates the + // tuner is tuned to the frequency specified in + // mpeos_mediaTune() and is able to process the transport + // stream or analog data. This may be indicated at any + // time after MPE_TUNE_STARTED (including after + // MPE_TUNE_UNSYNC). +#define MPE_TUNE_UNSYNC 0x0E // Tuner is tuned and not synced. This indicates the + // tuner is tuned to the frequency specified in + // mpeos_mediaTune() but was not able to access/process + // the transport stream or analog data. Note that this + // should only be indicated after a reasonable amount of + // time has passed attempting to achieve synchronization. + // This may be indicated at any time after + // MPE_TUNE_STARTED (including after MPE_TUNE_SYNC). +#define MPE_TUNE_FAIL 0x03 // Tuner failed. This indicates the tune failed due to + // an internal platform failure to acquire/maintain the + // frequency/modulation specified in mpeos_mediaTune(). + // No events may follow until the next mpeos_mediaTune(). +#define MPE_TUNE_ABORT 0x04 // Deprecated. Handled the same as MPE_TUNE_FAIL for + // backwards compatibility. +
Note that we intend to remove the signaling of TUNE_UNSYNC from the MPEOS/RI's implementation of mpeos_mediaTune() implementation. It's redundant to signal this event immediately after MPE_TUNE_STARTED as the tuner is presumed UNSYNCED until MPE_TUNE_SYNC is returned.
We would like MPE_TUNE_UNSYNC to be more authoritative so that the reception of this message can be used to unblock pending SI requests. But this certainly depends upon more discretionary signaling of the event. So please let us know if your RI port is sending MPE_TUNE_UNSYNC indiscriminately.