nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches
audio_system.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
16#ifndef _AUDIO_SYSTEM_H_
17#define _AUDIO_SYSTEM_H_
18
19#include <stddef.h>
20#include <stdbool.h>
21#include <stdint.h>
22#include <zephyr/net_buf.h>
23
24#include "audio_defines.h"
25
26#define VALUE_NOT_SET 0
27
32
40
47
59
69
82int audio_system_config_set(uint32_t encoder_sample_rate_hz, uint32_t encoder_bitrate,
83 uint32_t decoder_sample_rate_hz);
84
93int audio_system_encoder_num_ch_set(uint32_t locations);
94
102int audio_system_decode(struct net_buf *audio_frame);
103
108
113
120
127
132#endif /* _AUDIO_SYSTEM_H_ */
Globally accessible audio related defines.
int audio_system_encoder_num_ch_set(uint32_t locations)
Set the number of channels for the encoder based on the given audio locations.
bool audio_system_encoder_is_started(void)
Check if the encoder thread is currently enabled to execute.
void audio_system_stop(void)
Stop all activities related to audio.
int audio_system_decoder_num_ch_get(void)
Get number of decoder channels.
int audio_system_init(void)
Initialize the audio system.
int audio_system_encode_test_tone_set(uint32_t freq)
Toggle a test tone on and off.
void audio_system_encoder_stop(void)
Stop the encoder thread from executing.
int audio_system_decode(struct net_buf *audio_frame)
Decode data and then add it to TX FIFO buffer.
void audio_system_encoder_start(void)
Start the execution of the encoder thread.
int audio_system_encode_test_tone_step(void)
Step through different test tones.
int audio_system_config_set(uint32_t encoder_sample_rate_hz, uint32_t encoder_bitrate, uint32_t decoder_sample_rate_hz)
Set the sample rates for the encoder and the decoder, and the bit rate for encoder.
void audio_system_start(void)
Initialize and start both HW and SW audio codec.