diff options
| author | HiFiPHile <[email protected]> | 2026-08-26 16:56:42 +0200 |
|---|---|---|
| committer | HiFiPHile <[email protected]> | 2026-08-27 10:34:33 +0200 |
| commit | 0782fb796d7981c36a3d2a11485596f288dd6bd5 (patch) | |
| tree | 1a97754f4a6f73bc80497e9993078da5176f7be9 /examples/host/audio_host | |
| parent | 4893a14be173e9ab3fadb606222b440ab94e55b4 (diff) | |
audio: allow stopped duplex streams to change rate
Enforce a shared capture/playback sample rate only while the opposite stream is running. This lets both stopped streams be configured in either order while preventing a live shared clock from changing underneath a transfer.
Signed-off-by: HiFiPHile <[email protected]>
Diffstat (limited to 'examples/host/audio_host')
| -rw-r--r-- | examples/host/audio_host/README.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/host/audio_host/README.md b/examples/host/audio_host/README.md index 2b5df7785..326b469e8 100644 --- a/examples/host/audio_host/README.md +++ b/examples/host/audio_host/README.md @@ -116,6 +116,6 @@ Edit `src/tusb_config.h` to modify: ## Notes - While a stream is running, the driver keeps one isochronous transfer in flight and re-submits on completion, so transfers follow the endpoint's `bInterval`. `tuh_audio_capture_cb()` / `tuh_audio_playback_cb()` report each completed transfer; `tuh_audio_err_cb()` reports failures. The example restarts the failed stream automatically 100 ms after the error callback. -- Capture and playback streams in the same Audio Control instance must use the same sample rate. +- Capture and playback streams running concurrently in the same Audio Control instance must use the same sample rate. - `tuh_audio_read()` / `tuh_audio_write()` are non-blocking FIFO operations: they return the number of whole frames actually queued/read (0 when the FIFO is empty/full or the stream is not running), and `tuh_audio_read_available()` / `tuh_audio_write_available()` report the FIFO occupancy in frames. `tuh_audio_write()` only queues data; the playback transfer-completion chain sends it, or sends silence when the FIFO does not contain a complete polling interval without consuming the partial data. - Isochronous transfers require the host to poll `tuh_task()` continuously; the capture FIFO absorbs short scheduling gaps and overwrites the oldest frames when full. |
