add function to remove infoframe base on the packet type.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
static void imx_hdp_audio_shutdown(struct device *dev, void *data)
{
+ struct imx_hdp *hdmi = dev_get_drvdata(dev);
+ state_struct *state = &hdmi->state;
+
+ CDN_API_InfoframeRemovePacket(state, 0x1, 0x84);
}
static int imx_hdp_audio_get_eld(struct device *dev, void *data, uint8_t *buf, size_t len)
return CDN_OK;
}
+
+CDN_API_STATUS CDN_API_InfoframeRemovePacket(state_struct *state, u8 entry_id, u8 packet_type)
+{
+ /* invalidate entry */
+ if (cdn_apb_write
+ (state,
+ BANK_OFFSET | ADDR_SOURCE_PIF | (SOURCE_PIF_PKT_ALLOC_REG << 2),
+ 0x20000 | F_PKT_ALLOC_ADDRESS(entry_id) | F_PACKET_TYPE(packet_type)))
+ return CDN_ERR;
+ if (cdn_apb_write
+ (state,
+ BANK_OFFSET | ADDR_SOURCE_PIF | (SOURCE_PIF_PKT_ALLOC_WR_EN << 2),
+ F_PKT_ALLOC_WR_EN(1)))
+ return CDN_ERR;
+
+ return CDN_OK;
+}
u8 entry_id, u8 packet_len,
u32 *packet, u8 packet_type);
CDN_API_STATUS CDN_API_InfoframeRemove(state_struct *state, u8 entry_id);
+CDN_API_STATUS CDN_API_InfoframeRemovePacket(state_struct *state, u8 entry_id, u8 packet_type);
#endif