Allwinner T507 Audio System: DMA Channel, Audio Hub Configuration and Test Guide

Allwinner T507 Audio System: DMA Channel, Audio Hub Configuration and Test Guide

This information offers a concise overview of the audio system on the Allwinner T507 platform, masking the DMA switch mechanism, Audio Hub configuration strategies, and generally used audio testing instruments. It is meant to assist builders rapidly arrange and validate audio performance.

When a DMA channel sound card records or performs digital audio, it makes use of the DMA channel to switch audio knowledge between itself and RAM with out CPU intervention to enhance the information switch fee and CPU utilization.

T507 Audio System
T507 Audio System: DMA Channel, Audio Hub Configuration and Test Guide

Audio codec, Audio Hub, DMIC, OWA(One Wire Audio)

Audio codec: Built-in module with digital-to-analog conversion to transform audio digital indicators to analog indicators.

Audio Hub: T507-specific module integrates fundamental audio enter and output capabilities and particular {hardware} mixing capabilities. The mixing operate has three enter terminals and 4 x I2S, which might full the blending of three channels of information. The combined knowledge is output by HDMI, I2S0, I2S2 and I2S3.

T507 Audio System: DMA Channel, Audio Hub Configuration and Test Guide

T507 Audio System: DMA Channel, Audio Hub Configuration and Test Guide

Audio Path Configuration
To view the present audio system node on the system:

root@forlinx:/# cat /proc/asound/playing cards
0 [audiocodec ]: audiocodec – audiocodec //codec corresponding card0
audiocodec
1 [sndahub ]: sndahub – sndahub //audio_hub corresponding card1
sndahub
2 [sndhdmi ]: sndhdmi – sndhdmi //hdmi corresponding card2
sndhdmi
3 [sndwm89603001a ]: sndwm8960_3-001 – sndwm8960.3-001a //8960 corresponding card3
sndwm8960.3-001a

root@forlinx:/proc/asound# cat gadgets
0: [ 0] : management //system 0
16: [ 0- 0]: digital audio playback
24: [ 0- 0]: digital audio seize
32: [ 1] : management //system 1
33: : timer
48: [ 1- 0]: digital audio playback //APBIF_TXDIF0 play hub_device 0
49: [ 1- 1]: digital audio playback //APBIF_TXDIF1 play hub_device 1
50: [ 1- 2]: digital audio playback //APBIF_TXDIF2 play hub_device 2
56: [ 1- 0]: digital audio seize //APBIF0 play hub_device 0
57: [ 1- 1]: digital audio seize //APBIF1 play hub_device 1
58: [ 1- 2]: digital audio seize //APBIF2 play hub_device 2
64: [ 2] : management //system 2
80: [ 2- 0]: digital audio playback
96: [ 3] : management //system 3
112: [ 3- 0]: digital audio playback

120: [ 3- 0]: digital audio seize
Audio_hub Default Configuration
Default i2s3 configuration

root@forlinx:/# tinymix -D 1
Mixer identify: ‘sndahub’
Number of controls: 26
ctl sort num identify worth
0 ENUM 1 ahub audio format Function null
1 BOOL 1 I2S0IN Switch Off
2 BOOL 1 I2S0OUT Switch Off
3 BOOL 1 I2S1IN Switch Off
4 BOOL 1 I2S1OUT Switch On
5 BOOL 1 I2S2IN Switch Off
6 BOOL 1 I2S2OUT Switch Off
7 BOOL 1 I2S3IN Switch On
8 BOOL 1 I2S3OUT Switch On
9 BOOL 1 DAM0IN Switch Off
10 BOOL 1 DAM1IN Switch Off
11 BOOL 1 DAM0OUT Switch Off
12 BOOL 1 DAM1OUT Switch Off
13 ENUM 1 APBIF0 Src Select NONE
14 ENUM 1 APBIF1 Src Select I2S3_TXDIF
15 ENUM 1 APBIF2 Src Select NONE
16 ENUM 1 I2S0 Src Select NONE
17 ENUM 1 I2S1 Src Select APBIF_TXDIF0
18 ENUM 1 I2S2 Src Select NONE
19 ENUM 1 I2S3 Src Select APBIF_TXDIF1
20 ENUM 1 DAM0Chan0 Src Select NONE
21 ENUM 1 DAM0Chan1 Src Select NONE
22 ENUM 1 DAM0Chan2 Src Select NONE
23 ENUM 1 DAM1Chan0 Src Select NONE
24 ENUM 1 DAM1Chan1 Src Select NONE
25 ENUM 1 DAM1Chan2 Src Select NONE
I2s0 Recommended Configuration

tinymix -D 1 1 1 //Open enter for i2s0
tinymix -D 1 2 1 //Open output for i2s0
tinymix -D 1 7 0 //Close i2s3 enter
tinymix -D 1 8 0 //Close i2s3 output
tinymix -D 1 14 I2S0_TXDIF
tinymix -D 1 16 APBIF_TXDIF1
tinymix -D 1 19 NONE
I2s2 Recommended Configuration

tinymix -D 1 1 1 //Open enter for i2s2
tinymix -D 1 6 1 //Open output for i2s0
tinymix -D 1 7 0 //Close i2s3 enter
tinymix -D 1 8 0 //Close i2s3 output
tinymix -D 1 14 I2S2_TXDIF
tinymix -D 1 18 APBIF_TXDIF1
tinymix -D 1 19 NONE
The configuration of audio channels will have an effect on the usage of check routines:

Before conducting the playback check, please insert the ready 3.5mm headphones into the HeadPhone interface. To play sound by the speaker, insert the pin wires of the ready speaker (SPK_RP and SPK_LN) into the P32 or P31 interface.

T507 Audio System: DMA Channel, Audio Hub Configuration and Test Guide

Introduction to Testing Tools

  1. alsa – utils: These are normal ALSA instruments that make the most of the alsa – lib normal library. Commonly used instruments embody amixer, aplay, arecord, alsaconf, and many others.

  2. tinyalsa: It is a simplified model of alsa – lib. It offers fundamental interfaces for PCM and management, and the interfaces can be utilized as wanted. Commonly used instruments are tinymix, tinyplay, tinycap.

T507 Audio Test Tool
The alsa-utils normal ALSA instrument makes use of the alsa-lib normal library. Commonly used are amixer, aplay, arecord, alsaconf

tinyalsa is a simplified model of alsa-lib. It offers the fundamental interfaces for PCM and management, which can be utilized on demand. Commonly used instruments are tinymix, tinyplay, tinycap1

  1. codec (LINEOUT)

solely DAC, no ADC. Therefore, it could possibly solely play, not document, and audio _ hub will not be used.Play instructions use aplay or tinyplay

aplay -Dhw:0,0 mic.wav

  1. For the 8960 (exterior audio chip), its I2S sign passes by the audio_hub, which is a module distinctive to Allwinner. Audio recording utilizing this.

Audio_hub (with the 8960):

root@forlinx:tinycap_ahub mic.wav -aD 1 -ad 1 -D 3 -d 0 -t 30 -b 16 -c 2 -p 1024
Usage: tinycap_ahub file.wav [-aD ahub card] [-ad ahub device] [-D card] [-d device][-c channels] [-r rate] [-b bits] [-p period_size] [-n n_periods] [-t seconds]
Audio_hub play (8960):

root@forlinx:tinyplay_ahub mic.wav -aD 1 -ad 1 -D 3
Usage: tinyplay_ahub file.wav [-aD ahub card] [-ad ahub device] [-D card] [-d device] [-p period_size] [-n n_periods]

HI-FI News

through DEV Community: react https://dev.to/t/react

May 29, 2025 at 11:27AM