/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
/*
 * Copyright (c) 2021 MediaTek Inc.
 */

#ifndef ATSC30_PARSER_ALP_PRIV_PACKET_CUSTOM_1_H
#define ATSC30_PARSER_ALP_PRIV_PACKET_CUSTOM_1_H

#include "alp_priv_packet.h"

enum custom_1_ptp_time_info_flag {
	CUSTOM_1_PTP_TIME_INFO_FLAG_NOT_USED = 0x00,
	CUSTOM_1_PTP_TIME_INFO_FLAG_USE_SEC_MSEC = 0x01,
	CUSTOM_1_PTP_TIME_INFO_FLAG_USE_SEC_MSEC_USEC = 0x02,
	CUSTOM_1_PTP_TIME_INFO_FLAG_USE_SEC_MSEC_USEC_NSEC = 0x03,
};

enum alp_priv_packet_pud_packet_type
alp_priv_packet_custom_1_get_pud_packet_type(const alp_header_t *alp_hdr);

u8 alp_priv_packet_custom_1_parse_plp_id(
		const alp_header_t *hdr);
int alp_priv_packet_custom_1_parse_ptp(
		const alp_header_t *alp_hdr,
		struct time_info *time_info);

u64 alp_priv_packet_custom_1_get_stc_up_bound(u64 frequency);


#endif /* ATSC30_PARSER_ALP_PRIV_PACKET_CUSTOM_1_H */
