/* omap_get_dma_chain_src_pos - Get the source position of the ongoing DMA in chain  */
int omap_get_dma_chain_src_pos(int chain_id)
/* omap_get_dma_chain_src_pos - Get the source position of the ongoing DMA in chain  */
int omap_get_dma_chain_src_pos(int chain_id)
{
	int lch;
	int *channels;
	if (unlikely((chain_id < 0 || chain_id >= dma_lch_count))) {
		printk(KERN_ERR "Invalid chain id\n");
		return -EINVAL;
	}
	if (dma_linked_lch[chain_id].linked_dmach_q == NULL) {
		printk(KERN_ERR "Chain doesn't exists\n");
		return -EINVAL;
	}
	channels = dma_linked_lch[chain_id].linked_dmach_q;
	lch = channels[dma_linked_lch[chain_id].q_head];
	return dma_read(CSAC(lch));
}