Re: [RFC 3/4] OMAP3: McBSP: Add interface for transmit FIFO state query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> what went wrong? (the pcm pointer w/dma pos never missed that
> greatly)
> Very unlikely that an IRQ just happened to come in between the
> register reads..with that frequency (> 1/50)

Just to make sure:

+void omap_mcbsp_buffstat(unsigned int id, unsigned int *xbuffstat,
+				unsigned int *rbuffstat)
+{
+	struct omap_mcbsp *mcbsp;
+
+	if (!(cpu_is_omap2430() || cpu_is_omap34xx()))
+		return;
+
+	if (!omap_mcbsp_check_valid_id(id)) {
+		printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
+		return;
+	}
+
+	mcbsp = id_to_mcbsp_ptr(id);
+	*xbuffstat = OMAP_MCBSP_READ(mcbsp->io_base, XBUFFSTAT);
+	*rbuffstat = OMAP_MCBSP_READ(mcbsp->io_base, RBUFFSTAT);
+}

see, the above is not trusted. However, it's 100% trusted to read off
the timestamps recorded at DMA IRQ callback. (and at that time the buffer
has just been filled up.).


- Eero
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux