nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches
audio_datapath.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021, PACKETCRAFT, INC.
3 *
4 * SPDX-License-Identifier: LicenseRef-PCFT
5 */
6
7#ifndef _AUDIO_DATAPATH_H_
8#define _AUDIO_DATAPATH_H_
9
10#include <zephyr/kernel.h>
11#include <stdint.h>
12#include <stdbool.h>
13#include <data_fifo.h>
14
15#include "sw_codec_select.h"
16
26int audio_datapath_tone_play(uint16_t freq, uint16_t dur_ms, float amplitude);
27
32
40int audio_datapath_pres_delay_us_set(uint32_t delay_us);
41
47void audio_datapath_pres_delay_us_get(uint32_t *delay_us);
48
62void audio_datapath_stream_out(const uint8_t *buf, size_t size, uint32_t sdu_ref_us, bool bad_frame,
63 uint32_t recv_frame_ts_us);
64
74int audio_datapath_start(struct data_fifo *fifo_rx);
75
82
89
90#endif /* _AUDIO_DATAPATH_H_ */
int audio_datapath_pres_delay_us_set(uint32_t delay_us)
Set the presentation delay.
int audio_datapath_start(struct data_fifo *fifo_rx)
Start the audio datapath module.
void audio_datapath_tone_stop(void)
Stops tone playback.
void audio_datapath_pres_delay_us_get(uint32_t *delay_us)
Get the current presentation delay.
void audio_datapath_stream_out(const uint8_t *buf, size_t size, uint32_t sdu_ref_us, bool bad_frame, uint32_t recv_frame_ts_us)
Input an audio data frame which is processed and outputted over I2S.
int audio_datapath_tone_play(uint16_t freq, uint16_t dur_ms, float amplitude)
Mixes a tone into the I2S TX stream.
int audio_datapath_init(void)
Initialize the audio datapath module.
int audio_datapath_stop(void)
Stop the audio datapath module.
Data first-in first-out library header.
Definition data_fifo.h:34