esp-sdr-zephyr
Raw I/Q receive and transmit on the ESP32-S3/C6 Wi-Fi radio, for Zephyr
Loading...
Searching...
No Matches
Loop playback

Functions

int esp_sdr_tx_loop_begin (enum esp_sdr_rate rate)
 Take the radio and switch the front end to TX at the selected step.
uint32_t * esp_sdr_tx_loop_buf (int bank, size_t *words)
int esp_sdr_tx_loop_start (int bank, size_t count)
 (Re)start looping over the first count words of bank.
void esp_sdr_tx_loop_halt (void)
 Stop playback at once; the session stays open.
void esp_sdr_tx_loop_end (void)
 Stop playback, back to RX, release the radio.

Detailed Description

Gapless playback of prepared banks at the DAC rate: the engine replays the first count words of one bank back to back until halted. While it plays one bank, the CPUs may write the other (CONFIG_ESP_SDR_BANK1), then restart on it. A session holds the radio from esp_sdr_tx_loop_begin() to esp_sdr_tx_loop_end(), so receive calls wait meanwhile.

Function Documentation

◆ esp_sdr_tx_loop_begin()

int esp_sdr_tx_loop_begin ( enum esp_sdr_rate rate)

Take the radio and switch the front end to TX at the selected step.

Return values
0on success.
-EINVALfor an unsupported rate.
-EAGAINif esp_sdr_init() has not run.

◆ esp_sdr_tx_loop_buf()

uint32_t * esp_sdr_tx_loop_buf ( int bank,
size_t * words )
Returns
Bank bank (0 to ESP_SDR_BANKS - 1) and its size in words through words, NULL if there is no such bank. Write it with esp_sdr_tx_word() words only while the engine plays another bank or is halted.

◆ esp_sdr_tx_loop_start()

int esp_sdr_tx_loop_start ( int bank,
size_t count )

(Re)start looping over the first count words of bank.

Restarting cuts the running pass; playback of the new one starts at once.

Return values
0on success.
-EINVALfor a bad bank or count (ESP_SDR_SAMPLES_MIN to ESP_SDR_SAMPLES_MAX).