interface: Introduce a method to test supported time stamping modes.
Signed-off-by: Richard Cochran <richardcochran@gmail.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>master
parent
605abc45dd
commit
720c9fa08d
|
@ -47,3 +47,11 @@ bool interface_tsinfo_valid(struct interface *iface)
|
||||||
{
|
{
|
||||||
return iface->ts_info.valid ? true : false;
|
return iface->ts_info.valid ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool interface_tsmodes_supported(struct interface *iface, int modes)
|
||||||
|
{
|
||||||
|
if ((iface->ts_info.so_timestamping & modes) == modes) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
|
@ -82,4 +82,12 @@ void interface_set_name(struct interface *iface, const char *name);
|
||||||
*/
|
*/
|
||||||
bool interface_tsinfo_valid(struct interface *iface);
|
bool interface_tsinfo_valid(struct interface *iface);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests whether an interface supports a set of given time stamping modes.
|
||||||
|
* @param iface The interface of interest.
|
||||||
|
* @param modes Bit mask of SOF_TIMESTAMPING_ flags.
|
||||||
|
* @return True if the time stamping modes are supported, false otherwise.
|
||||||
|
*/
|
||||||
|
bool interface_tsmodes_supported(struct interface *iface, int modes);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue