Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions example/FVP_Audio/FVP_Audio.csolution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ solution:

# List different hardware targets that are used to deploy the solution.
target-types:
# Arm Corstone-300 targets
- type: SSE-300
board: V2M-MPS3-SSE-300-FVP
device: SSE-300-MPS3
Expand All @@ -33,7 +32,6 @@ solution:
images:
- project-context: FVP_Audio.Debug

# Arm Corstone-310 targets
- type: SSE-310
board: V2M-MPS3-SSE-310
device: SSE-310-MPS3_FVP
Expand All @@ -49,7 +47,6 @@ solution:
images:
- project-context: FVP_Audio.Debug

# Arm Corstone-315 targets
- type: SSE-315
board: SSE-315
device: SSE-315-FVP
Expand All @@ -65,7 +62,6 @@ solution:
images:
- project-context: FVP_Audio.Debug

# Arm Corstone-320 targets
- type: SSE-320
board: SSE-320
device: SSE-320-FVP
Expand Down
15 changes: 12 additions & 3 deletions example/FVP_Audio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,33 @@
The **FVP Audio** project demonstrates the CMSIS-Driver vStream API for handling
audio input and output streams.

It shows how to capture audio samples from an input stream and output them through a audio output stream.
It shows how to capture audio samples from an input stream and output them through
an audio output stream.

## Operation

The application initializes both audio input and output streams and then continuously
captures audio samples from the input stream and copies them directly to the output
stream.

Streaming stops after receiving the `END_OF_STREAM` event or can be configured to
stop after `AUDIO_STREAM_DURATION` seconds.

The example uses CMSIS-RTOS2 for thread management and event-driven processing.

### Configuration

Default configuration expects the following input and output stream format:
Default configuration ([app_config.h](project/app_config.h)) expects the following input
and output stream format:

- 16kHz, 16-bit, 2-channels (stereo)

To change default configuration use configuration defines:
To change the default configuration use the following defines:

- `AUDIO_CHANNELS` - sets the number of channels in a stream
- `AUDIO_SAMPLE_BITS` - sets the number of bits per sample
- `AUDIO_SAMPLE_RATE` - sets the number of samples per second

The default streaming duration is indefinite. To change this, use:

- `AUDIO_STREAM_DURATION` - sets the streaming duration in seconds (0: stream indefinitely)
3 changes: 2 additions & 1 deletion example/FVP_Audio/project/FVP_Audio.cproject.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ project:
- group: Application
files:
- file: app_main.c
- file: app_config.h

- group: Documentation
files:
Expand All @@ -42,5 +43,5 @@ project:
output:
type:
- elf
- bin
- hex
- map
59 changes: 59 additions & 0 deletions example/FVP_Audio/project/app_config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
* Copyright 2026 Arm Limited and/or its affiliates.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the License); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#ifndef APP_CONFIG_H_
#define APP_CONFIG_H_

//-------- <<< Use Configuration Wizard in Context Menu >>> --------------------
//------ With VS Code: Open Preview for Configuration Wizard -------------------


// <o> Stream duration (seconds)
// <i> Defines the streaming duration in seconds.
// <i> Default: 0 (stream indefinitely)
#ifndef AUDIO_STREAM_DURATION
#define AUDIO_STREAM_DURATION 0
#endif

// <h>Audio Configuration
// ======================

// <o> Number of channels <1=>Mono <2=>Stereo
// <i> Defines the number of audio channels in stream.
// <i> Default: 2
#ifndef AUDIO_CHANNELS
#define AUDIO_CHANNELS 2
#endif

// <o> Number of bits per sample <0=>8 <1=>16 <2=>24 <3=>32
// <i> Defines number of bits of information in each sample.
// <i> Default: 16
#ifndef AUDIO_SAMPLE_BITS
#define AUDIO_SAMPLE_BITS 16
#endif

// <o> Sample rate <8000=>8 kHz <16000=>16 kHz <44100=>44.1 kHz <48000=>48 kHz
// <i> Defines the number of samples captured per second.
// <i> Default: 16000
#ifndef AUDIO_SAMPLE_RATE
#define AUDIO_SAMPLE_RATE 16000
#endif

// </h>

#endif /* APP_CONFIG_H_ */
Loading