adafruit / adafruit/Adafruit_Learning_System_Guides

cant stream audio with DMA without blocking code in TLV320_Audio_Playback_Arduino example

Open
#3,115 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
1.1k
Forks
806
Avg merge
16h 52m
Merged PRs (30d)
11

Description

I and using TLV320_Audio_Playback_Arduino example and it works but unfortunately it seems to only send one byte at a time to i2s interface in a loop and it blocks the whole code till audio finishes playing.

I tried removing the for look and sending entire buffer but .write seems like it can handle it and it still blocks code.

It would be very helpful if someone could update this example with non-blocking code where pointer to array can be passed with length so DMA can do the magic instead of cpu getting over loaded and/or blocked...

Maybe the i2s library being used is a poor implementation and we need to use a different one?

Any help would be great.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the TLV320_Audio_Playback_Arduino example and inspect its playback loop and I2S .write usage. Check whether the I2S library supports passing a buffer and length through DMA without blocking; done means the example can play audio while other code continues running.

Written by the indexing model from the issue text.

Assessment

Tech stack
arduino, c
Domain
embedded-iot
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.