Repository navigation
platform: teensy41: add PJRC Teensy 4.1 platform support, Audio PLL scheduling, and UAC2 loopback - #11197
platform: teensy41: add PJRC Teensy 4.1 platform support, Audio PLL scheduling, and UAC2 loopback#11197lgirdwood wants to merge 7 commits into
Conversation
|
@dbaluta ARM SIMD in here. |
|
Thanks @lgirdwood will have a look! |
|
@lgirdwood this looks very promising tested the ARM SIMD instructions on imx8mp with M7 core, looks like the load for simple volume pipeline decreased by at least 30%. Also, looking to borrow an RT to do some more testing. |
7ce7441 to
8e00e42
Compare
8e00e42 to
2996255
Compare
lgirdwood
left a comment
There was a problem hiding this comment.
Pls rebase as sof static pipeline support is now upstream, we need to use teh upstream infra.
| size_t nbyte, | ||
| unsigned int nch) |
There was a problem hiding this comment.
pls make sure this aligns with recent commits like 1fe1b8c for size_t and int usage.
| @@ -0,0 +1,89 @@ | |||
| # Target Platform & SOF Core | |||
There was a problem hiding this comment.
This commit is too large, all the zephyr changes should go to zephyr, this can go to my fork atm and be referenced viw a local west url in this pr.
| @@ -0,0 +1,168 @@ | |||
| #!/usr/bin/env python3 | |||
There was a problem hiding this comment.
the tooling should go into sof-utils
… unsigned int Align drc_arm.c helper signatures and local loop/index variables with commit 1fe1b8c ("audio: drc: use size_t for byte, sample and frame counts"): - Use size_t for byte, division frame, and loop indices (nbyte, div_start, count, i, j, inc). - Use unsigned int for channel counts and indices (nch, ch). - Use bool for boolean flags (is_release, is_releasing, is_bad_db, is_2byte). Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
… builds Allow CONFIG_SOF_FULL_ZEPHYR_APPLICATION targets without CONFIG_USERSPACE (such as single-core ARM Cortex-M microcontrollers) to build cleanly: - Guard generated <zephyr/syscalls/*.h> includes with CONFIG_USERSPACE and map syscall wrappers directly to z_impl_* functions when userspace is disabled. - Set Cortex-M cache line fallback alignment to 32 bytes in rtos/cache.h while preserving 64 bytes for host/POSIX library builds. - Ensure generated sof_versions.h and uuid-registry.h are created and added to include paths before building SOF subdirectories and app. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Wire up NXP i.MX SAI, S/PDIF, ESAI, and MICFIL DAI types in IPC4/IPC3 DAI lookup and DMA device mapping so Zephyr-based NXP i.MX / i.MX RT platforms can instantiate SAI and S/PDIF Copiers in IPC4 pipelines. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
…ine capture - Add CONFIG_ZEPHYR_DOMAIN_AUDIO_TIMER to drive the Zephyr LL scheduling domain directly from hardware DAI DMA period completion callbacks while suppressing SysTick k_timer ticks when audio is active. - Scope eDMA source/destination address increment setup in dai-zephyr.c to NXP i.MX DAI types. - Allow DAI component state transitions in dai_comp_trigger_internal() when CONFIG_STATIC_PIPELINE is enabled alongside IPC4. - Pass (dma_fmt, local_fmt) instead of (local_fmt, dma_fmt) to pcm_get_conversion_function() for capture streams in set_new_local_buffer(). - Reset static pipelines cleanly on XRUN recovery when host IPC stream structures are absent. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
…ipeline bridge - Add the COMP_USB_AUDIO host endpoint component with lock-free SPSC playback/capture ring buffers and asynchronous USB SOF-to-DAI rate estimation for explicit UAC2 feedback. - Extend upstream static_pipeline_uac2.c to bridge Zephyr UAC2 callbacks with COMP_USB_AUDIO ring buffers, support zero-copy UAC2 capture double- buffer replenishment via static_pipeline_uac2_buf_release(), and query the playback rate adjustment for USB feedback. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
…support Temporarily point the Zephyr project remote to https://github.com/lgirdwood/zephyr at revision 16a19aec1550a3f4ded4d825325e75f69d711cd0 (branch feature/teensy41-dai-port) which contains the i.MX RT10xx Audio PLL4 initialization, SAI1/SPDIF DAI Devicetree nodes, Teensy 4 audio pinmux, and eDMA cyclic/ping-pong support while upstream Zephyr PR reviews are pending: 16a19aec155 soc: nxp_imxrt: teensy4: add Audio PLL4 init, DAI DT nodes, and audio pinmux 4e4b0a8fd8c drivers: dai: nxp: add S/PDIF transceiver driver with eDMA ping-pong support 7bf76a034a9 drivers: mcux: support Teensy 4.1 clocking, SAI DAI, and eDMA cyclic mode Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Add Sound Open Firmware platform and board support for PJRC Teensy 4.1
(NXP i.MX RT1062 Cortex-M7 @ 600 MHz):
- src/platform/teensy41/: pure SOF platform initialization, clocks, memory
layout, and upstream static_pipeline descriptor graph (USB Audio <->
Volume <-> S/PDIF or SAI1 I2S Copier).
- zephyr/lib/{alloc.c,dma.c}: static SOF heap and eDMA0 registration.
- app/boards/teensy41.{conf,overlay} & app/src/: Zephyr UAC2 composite
device initialization, HalfKay bootloader soft-reboot request (0xFB),
and upstream static_pipeline startup.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2996255 to
078b9a8
Compare
Summary
Adds Sound Open Firmware (SOF) platform and USB Audio Class 2.0 (UAC2) bridge support for PJRC Teensy 4.1 (
NXP i.MX RT1062Cortex-M7 @ 600 MHz), built directly on top of upstream SOFstatic_pipelineinfrastructure (CONFIG_STATIC_PIPELINE,CONFIG_STATIC_PIPELINE_UAC2) and ARM Cortex-M SIMD optimizations.Review Updates
static_pipelineintegration: Rebased ontomain(1df7dfba5), removed bespokesof_static_pipeline.{c,h}, and wired Teensy 4.1 directly to upstreamsrc/audio/pipeline/static_pipeline_uac2.candsrc/platform/teensy41/teensy41_pipeline_def.c.src/audio/drc/drc_arm.ctype alignment: Aligned byte, frame, channel, and boolean types (size_t,unsigned int,bool) with1fe1b8ca6aef.spdif/sai1_daiDT nodes, Teensy 4 audio pinmux, and SAI1 MCLK direction control out of SOF intolgirdwood/zephyr(feature/teensy41-dai-port@16a19aec155), referenced temporarily inwest.yml, and split SOF into 7 atomic commits.sof-utils: Removedscripts/teensy_*.pyfrom SOF and moved them tothesofproject/sof-utils#5(sof-teensy/).Commit Series
audio: drc: arm: align byte, frame, and channel types with size_t and unsigned intzephyr: build: guard userspace syscalls and support Cortex-M full app buildsipc4: dai: add support for NXP i.MX SAI, SPDIF, ESAI, and MICFIL DAIsaudio: dai-zephyr: support audio timer LL scheduling and static pipeline captureaudio: usb_audio: add USB Audio Class 2.0 host component and static pipeline bridgewest: manifest: temporarily reference Zephyr fork for Teensy 4.1 DAI supportplatform: teensy41: add PJRC Teensy 4.1 platform and board supportHardware Verification
Flashed both Teensy 4.1 boards (
build-teensyaMaster Tx &build-teensybSlave Rx;219,548 BFLASH,240,096 BRAM) and ran end-to-end S/PDIF hardware loopback (sof-utils/sof-teensy/test_teensy_loopback.py --interface spdif):1000.0 Hz, SNR =140.81 dB[PASS]1000.0 Hz, SNR =140.81 dB[PASS]0(>= 70.0 dBtarget)