[riot-notifications] [RIOT-OS/RIOT] drivers/periph_common: dac: add dac_play() (#13908)

benpicco notifications at github.com
Mon Nov 9 19:17:35 CET 2020


> - (How) Can the application detect that it ran into an underflow?

If `dac_dds_is_playing()` returns `false` when it's our turn to fill the buffer, we know an underrun occurred.

> - If dac_dds_set_cb is allowed to be called while playing (as "on the fly" implies), it'll need atomics or a critical section around writing that.

added

> - DMA operation will probably be specific to the chips and need more than just a generic DMA peripheral -- but we can still go there in time

Yea that's why I initially put this to `periph/` so we can have a per-cpu implementation overwriting the generic one.
However, there we can't depend on periodic timers 'only if no CPU implementation exists.
The whole mess with `rtt_rtc` showed that we currently have no mechanism for 'feature may be provided by CPU or as a software fallback', so I just moved it to a module instead.

> - If a full format switch is called for (as would be the case when enabling gapless playback, even though where most needed, gapless is between like-formatted data anyway), can the API (or can it be extended to -- I'd be happy with a rough roadmap) do that in a double-buffered fashion? 

That sure could be done, but I'd rather avoid making the implementation more complex 'just in case'.
I don't expect switching between formats to be a thing that will occur often.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/13908#issuecomment-724186234
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201109/e593b2ff/attachment-0001.htm>


More information about the notifications mailing list