Hear-it! Solution Kit
R12UZ0012EG0110 Rev. 1.10
Page 27 of 34
Apr 03, 2017
6.2
Audio Streaming Sample
6.2.1
Operation
After reset, the sample sets up the display and begins streaming of audio from the selected input channel to the
output. The user can switch between the available FIR filter profiles by pressing the button SW3. The pot R43
can be used to control the volume of the speaker (and headphones if fitted). Visual indication of status and
volume are shown on the display.
6.2.2
PCM Data Transfer – Audio Streaming Sample
16-bit PCM data is generated by the CODEC from the input source and transferred to the receive buffer from
the RX231 SSI(rx) peripheral by DMAC channel 1. The received data is then passed through the DSP filter to
the transmit buffer. This data is then transmitted to the CODEC by DMAC0 and the RX231 SSI(tx) peripheral
for output to speaker/line-out. The sampling frequency for the PCM data is set to 24kHz.
In order to achieve seamless playback each buffer is divided into 3 sub-blocks. The data being transferred into
a buffer is always being placed into a different sub-block to the data being transferred out of the buffer to the
next stage. In this way a continuous supply of data can be maintained.
Figure 6-4 shows this transfer graphically and Table 6-2 shows the operations in progress at each step.
Figure 6-4 : Audio Streaming Mode Buffer Processing Overview
Step
DMAC1 operation
DSP filter operation
DMAC0 operation
1
data read into rx buffer (c)
rx buffer (b) to tx buffer (b)
tx buffer (a) to CODEC
2
data read into rx buffer (a)
rx buffer (c) to tx buffer (c)
tx buffer (b) to CODEC
3
data read into rx buffer (b)
rx buffer (a) to tx buffer (a)
tx buffer (c) to CODEC
Table 6-2 : Audio Streaming Mode Buffer Operations
PCM data transfer between the MCU and the audio Codec is handled by the SSI module and two DMAC
channels. The SSITX empty and SSIRX full interrupts trigger DMAC0 and DMAC1 channels respectively. The
process is illustrated in Figure 6-5.
(a)
Rx Buffer
(a)
Tx Buffer
CODEC
OUT
DSP Filter
Operation
DMAC0 (SSI)
1
2
3
(b)
(b)
1
3
1
(c)
(c)
2
DMAC1 (SSI)
CODEC
IN
3
2
Caution:
Headphones should be connected to the 3.5mm line-out connector CN5. Connector CN6 is designed to
connect to a speaker only. It is not recommended to attach headphones to speaker connection CN6, as
damage to the headphones may occur. Refer to section 4.2.6 for further information.
Summary of Contents for RX231
Page 34: ...RX231 Group R12UZ0012EG0110 ...