Skip to content

Commit 837e745

Browse files
VitekSTfabiobaltieri
authored andcommitted
samples: amp_audio_loopback: Change sample rate and initial block count
Decrease the sample frequency to 16 kHz to accomodate memory constraints. As the SAI driver in RX mode requires more than a certain amount of blocks to be free, change count of those prefilled. Signed-off-by: Vit Stanicek <[email protected]>
1 parent eb09070 commit 837e745

File tree

1 file changed

+2
-2
lines changed
  • samples/boards/nxp/adsp/rtxxx/amp_audio_loopback/remote/src

1 file changed

+2
-2
lines changed

samples/boards/nxp/adsp/rtxxx/amp_audio_loopback/remote/src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#define I2S_RX_NODE DT_ALIAS(i2s_rx)
1515
#define I2S_TX_NODE DT_ALIAS(i2s_tx)
1616

17-
#define SAMPLE_FREQUENCY 48000
17+
#define SAMPLE_FREQUENCY 16000
1818
#define SAMPLE_BIT_WIDTH 16
1919
#define BYTES_PER_SAMPLE sizeof(int16_t)
2020
#define NUMBER_OF_CHANNELS 2
@@ -24,7 +24,7 @@
2424
#define TIMEOUT 1000
2525

2626
#define BLOCK_SIZE (BYTES_PER_SAMPLE * SAMPLES_PER_BLOCK)
27-
#define BLOCK_COUNT (INITIAL_BLOCKS + 2)
27+
#define BLOCK_COUNT (INITIAL_BLOCKS + 4)
2828
K_MEM_SLAB_DEFINE_STATIC(mem_slab, BLOCK_SIZE, BLOCK_COUNT, 4);
2929

3030
static bool configure_streams(const struct device *i2s_dev_rx,

0 commit comments

Comments
 (0)