Skip to content

Commit 7f45bbe

Browse files
lucien-nxpdanieldegrasse
authored andcommitted
samples: drivers: i2s/i2s_codec: support case on rt700
put __16kHz16bit_stereo_sine_pcm buffer into nocache region Do some settings for rt700 cm33_cpu0 core Signed-off-by: Lucien Zhao <[email protected]>
1 parent 63a7a93 commit 7f45bbe

File tree

5 files changed

+32
-0
lines changed

5 files changed

+32
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#
2+
# Copyright 2025 NXP
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
CONFIG_HEAP_MEM_POOL_SIZE=81920
8+
CONFIG_AUDIO_CODEC=y
9+
CONFIG_DMA_TCD_QUEUE_SIZE=4
10+
CONFIG_SAMPLE_FREQ=16000
11+
CONFIG_USE_DMIC=n
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
* Copyright 2025 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&sai0 {
8+
mclk-output;
9+
};

samples/drivers/i2s/i2s_codec/sample.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ tests:
66
platform_allow:
77
- mimxrt595_evk/mimxrt595s/cm33
88
- mimxrt1170_evk@B/mimxrt1176/cm7
9+
- mimxrt700_evk/mimxrt798s/cm33_cpu0
910
harness: console
1011
harness_config:
1112
type: one_line

samples/drivers/i2s/i2s_codec/src/sine.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
77
#ifndef SINE_H_
88
#define SINE_H_
99

10+
#if CONFIG_NOCACHE_MEMORY
11+
#define __NOCACHE __attribute__((__section__(".nocache")))
12+
#elif defined(CONFIG_DT_DEFINED_NOCACHE)
13+
#define __NOCACHE __attribute__((__section__(CONFIG_DT_DEFINED_NOCACHE_NAME)))
14+
#else /* CONFIG_NOCACHE_MEMORY */
15+
#define __NOCACHE
16+
#endif /* CONFIG_NOCACHE_MEMORY */
17+
18+
unsigned char __16kHz16bit_stereo_sine_pcm[] __NOCACHE;
1019
unsigned char __16kHz16bit_stereo_sine_pcm[] = {
1120
0x00, 0x00, 0x00, 0x00, 0x08, 0x0b, 0x08, 0x0b, 0xbb, 0x15, 0xbb, 0x15, 0xc9, 0x1f, 0xc9,
1221
0x1f, 0xe4, 0x28, 0xe4, 0x28, 0xc8, 0x30, 0xc8, 0x30, 0x38, 0x37, 0x38, 0x37, 0x03, 0x3c,
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Raise DMA TCD Queue size, as this is required by the I2S SAI driver
2+
CONFIG_DMA_TCD_QUEUE_SIZE=4

0 commit comments

Comments
 (0)