samples/drivers/i2s/echo/README.html · samples/drivers/i2s/echo/README.rst 공식 원문 ↗

Zephyr 3.7.0 · Samples · Drivers · I2S

I2S Echo

WM8731 CODEC에서 RX·TX stream을 함께 구동해 echo effect를 만듭니다.

Official pathsamples/drivers/i2s/echo/README.html
Source filesamples/drivers/i2s/echo/README.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

본문 기준: Zephyr 3.7.0 LTS3 · 이후 유지보수 패치는 별도입니다.

Part 1

요약·해설

공유·분리 I2S node label, 두 Nordic board overlay와 button 동작을 보존합니다.

Codec

WM8731

Streams

RX · TX

Controls

Button 1 · 2

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 968437D8E9EC56A0A7989C3E49E81C434E60F6C0F858C5BD2804C3B6E3EB748C
.. zephyr:code-sample:: i2s-echo
   :name: I2S echo
   :relevant-api: i2s_interface

   Process an audio stream to add an echo effect.

Overview
********

This sample demonstrates how to use an I2S driver in a simple processing of
an audio stream. It configures and starts both the RX and TX streams and then
mixes the original signal with its delayed form that is buffered, providing
a simple echo effect.

Requirements
************

The sample uses the WM8731 audio CODEC that can be found, for example,
on the Audio Codec Shield, but it can be easily adapted to use other
CODECs. The I2S device to be used by the sample is specified by defining
a devicetree node label named ``i2s_rxtx`` or separate node labels ``i2s_rx``
and ``i2s_tx`` if separate I2S devices are to be used for the RX and TX
streams.

This sample has been tested on :ref:`nrf52840dk_nrf52840` (nrf52840dk/nrf52840)
and :ref:`nrf5340dk_nrf5340` (nrf5340dk/nrf5340/cpuapp), using the Audio Codec
Shield, and provides overlay files for both of these boards.

More information about the used shield and the CODEC itself can be found here:

- `Audio Codec Shield`_
- `WM8731`_

Building and Running
********************

The code can be found in :zephyr_file:`samples/drivers/i2s/echo`.

To build and flash the application:

.. zephyr-app-commands::
   :zephyr-app: samples/drivers/i2s/echo
   :board: nrf52840dk/nrf52840
   :goals: build flash
   :compact:

Press Button 1 to toggle the echo effect and Button 2 to stop the streams.

.. _Audio Codec Shield: http://wiki.openmusiclabs.com/wiki/AudioCodecShield
.. _WM8731: https://www.cirrus.com/products/wm8731/

Part 3

한국어 전문 번역

개요

이 sample은 간단한 audio stream 처리에서 I2S driver를 사용하는 방법을 보여줍니다. RX와 TX stream을 모두 구성하고 시작한 다음, original signal과 buffer에 저장해 지연시킨 signal을 섞어 간단한 echo effect를 만듭니다.

요구 사항

Sample은 Audio Codec Shield 등에서 찾을 수 있는 WM8731 audio CODEC을 사용하지만 다른 CODEC에도 쉽게 맞출 수 있습니다. RX와 TX stream에 같은 I2S device를 사용한다면 i2s_rxtx라는 devicetree node label로 지정합니다. 서로 다른 I2S device를 사용한다면 i2s_rx와 i2s_tx label을 각각 정의합니다.

이 sample은 Audio Codec Shield를 사용한 nrf52840dk/nrf52840과 nrf5340dk/nrf5340/cpuapp에서 시험됐으며 두 board용 overlay 파일을 제공합니다.

사용한 shield와 CODEC에 관한 자세한 정보는 다음 자료에서 확인할 수 있습니다.

Build와 실행

Code는 samples/drivers/i2s/echo에서 찾을 수 있습니다.

Application을 build하고 flash하려면 다음 명령을 사용합니다.

west build -b nrf52840dk/nrf52840 samples/drivers/i2s/echo
west flash

Button 1을 눌러 echo effect를 켜거나 끄고, Button 2를 눌러 stream을 중단합니다.

Source

출처

영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.