Skip to content

Commit 37a4f90

Browse files
committed
tests: audio: dmic_api: enable frdm_mcxn236 PDM test
enable frdm_mcxn236 PDM test Signed-off-by: Zhaoxiang Jin <[email protected]>
1 parent 7d95464 commit 37a4f90

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Copyright 2025 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
aliases {
9+
dmic-dev = &pdm;
10+
};
11+
};
12+
13+
&pdm {
14+
status = "okay";
15+
16+
channel0: pdm-channel@0 {
17+
status = "okay";
18+
};
19+
20+
channel1: pdm-channel@1 {
21+
status = "okay";
22+
};
23+
};

tests/drivers/audio/dmic_api/src/main.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ static const struct device *dmic_dev = DEVICE_DT_GET(DT_ALIAS(dmic_dev));
2727
#define BYTES_PER_SAMPLE sizeof(int16_t)
2828
#define SLAB_ALIGN 4
2929
#define MAX_SAMPLE_RATE 48000
30+
#elif DT_HAS_COMPAT_STATUS_OKAY(nxp_pdm)
31+
#define PDM_CHANNELS 2
32+
#define SAMPLE_BIT_WIDTH 24
33+
#define BYTES_PER_SAMPLE 3
34+
#define SLAB_ALIGN 4
35+
#define MAX_SAMPLE_RATE 16000
3036
#else
3137
#error "Unsupported DMIC device"
3238
#endif

0 commit comments

Comments
 (0)