Genio 510/700-EVK

Overview

On Genio 510-EVK, there are 5 playback hardware and 5 capture hardware.

On Genio 700-EVK, there are 4 playback hardware and 4 capture hardware.

The difference between Genio 510-EVK and Genio 700-EVK is that Genio 510-EVK has I2S pin out while Genio 700-EVK doesn’t.

../../../../_images/sw_rity_app-dev_audio_evk_afe_g510.svg

Genio 510-EVK audio data route diagram

../../../../_images/sw_rity_app-dev_audio_evk_afe_g700.svg

Genio 700-EVK audio data route diagram

Definitions of data pin channels

Data Pin Name

Number of Channels

DMIC1_DAT

2

DMIC2_DAT

2

PCM_DO

2

PCM_DI

2

I2SIN_D0

2

I2SO2_D[0-3]

2

AUD_DAT_MOSI[0-1]

1

AUD_DAT_MISO[0-1]

1

HDMITX

8

DPTX

8

AU_HPL

1

AU_HPR

1

AU_LOL

1

AU_VIN1

1

AU_VIN0

1

Note

On Genio 700-EVK, I2S is accessible exclusively through test points, whereas on Genio 510-EVK, General Purpose Input/Output pins are available for I2S connectivity. Apart from the I2S section, the audio parts of the G510 and G700 are the same, so they are documented in the same page.

  • Playback

    • Earphone-Out Jack

    • Speaker-Out Jack

    • PCM Out

    • HDMI/DP Audio Out

    • I2S Out

  • Capture

    • PCM In

    • Earphone-In Jack

    • AMIC In

    • DMIC In

    • I2S In

Genio 510/700-EVK board provides a 3.5mm Earphone jack which has both playback and capture functions. Another 3.5mm Speaker jack for line out which has no built-in audio amplifier. PCM interface is used for the transmission of audio-digital signals. Genio 510/700-EVK board was designed with one analog microphone and two digital microphones.

For the position of the earphone jack, speaker jack, HDMI/DP port, DMIC, and AMIC, please refer to Board Top View.

../../../../_images/sw_rity_app-dev_audio_evk_route-g700-2.svg

The route between the hardware and the device nodes

  • pcmC0D0p plays the sound to Earphone-Out Jack or Speaker-Out Jack.

  • pcmC0D2p plays the sound to PCM Out.

  • pcmC0D5p plays the sound to either HDMI Audio Out or DP Audio Out.

  • pcmC0D6p plays the sound to I2S Out.

  • pcmC0D8c records the voice from PCM In.

  • pcmC0D10c records the voice from Earphone-In Jack or AMIC In.

  • pcmC0D14c records the voice from DMIC In.

  • pcmC0D11c records the voice from I2S In.

Audio Interfaces

The audio system provides audio data exchange between the device and external audio components. Audio interfaces play a crucial role in enabling high-quality sound recording and playback. This section aims to offer a thorough guide to the integrated audio interface on the EVK.

The following table will detail the interfaces accessible on the Genio 510/700-EVK, and specify if the software is supported.

Genio 510/700-EVK Audio Interfaces

Audio Interfaces

Channel Count

Dai-Link Name

Genio 510-EVK

Genio 700-EVK

I2SO2

8

ETDM2_OUT_BE

V (Pin Header)

V (Audio DTB Pad)

I2S IN

2

ETDM2_IN_BE

V (Pin Header)

V (Audio DTB Pad)

PMIC DL

2

ADDA_BE

V (MT6365 PMIC)

V (MT6365 PMIC)

PMIC UL

2

ADDA_BE

V (MT6365 PMIC)

V (MT6365 PMIC)

PDM1

2

DMIC_BE

V

V

PDM2

2

DMIC_BE

V

V

PDM3

2

DMIC_BE

V

V

PDM4

2

DMIC_BE

V

V

PCM (with SRC)

2

PCM1_BE

V (Pin Header)

V (Pin Header)

HDMITX

8

ETDM3_OUT_BE

V

V

DPTX

8

DPTX_BE

V

V

Note

For information about if the software is supported, please refer to the release notes.

MT6365 Audio CODEC Interfaces on Genio 510/700-EVK

Audio Interfaces

Channel Count

Genio 510-EVK

Genio 700-EVK

ACCDET

NA

X

X

Playback (Earphone)

2

V

V

Playback (Speaker)

1

V

V

Record (Earphone)

2

V

V

Record (AMIC)

1

V

V

Playback

Earphone Jack Speaker

By default, the Genio 510/700-EVK board plays the audio to the earphone jack speaker.

Run the provided command to verify that the sound output is coming from the earphone jack:

amixer -c mt8390evk cset name='HP Mux' 'Audio Playback'

Please make sure to set LOL Mux to open before using the earphone jack. Otherwise, there will be noise when playing music.

You can use aplay to play the music through the earphone jack.

aplay is a command-line sound file player for the ALSA sound card driver. For more details about aplay, please refer to aplay.

aplay -D jack_speaker sample.wav

You can adjust the gain of the earphone jack. The range of the value is from 0 to 30. The value 0 represents the maximum volume and the value 30 represents the minimum volume.

Use the following command to control the volume:

amixer -c mt8390evk cset name='Headset Volume' 30
amixer -c mt8390evk cset name='Headset Volume' 0

Speaker Jack Speaker

The default setting of HP Mux works for earphone jack playback. HP Mux is a mixer switch for the earphone jack and speaker jack. It has 5 cases in HP Mux:

  • Item #0 Open

  • Item #1 LoudSPK Playback

  • Item #2 Audio Playback

  • Item #3 Test Mode

  • Item #4 HP Impedance

You should set HP Mux Open when using speaker jack playback.

amixer -c mt8390evk cset name='HP Mux' 'Open'
amixer -c mt8390evk cset name='LOL Mux' 'Playback_L_DAC'

Please make sure to set HP Mux to open before using the speaker jack. Otherwise, there will be noise when playing music.

Use aplay to play the music through the speaker jack.

aplay -D jack_speaker sample.wav

PCM Out

Use aplay to play the music through the PCM interface.

aplay -D pcm_out sample.wav

HDMI/DP Speaker

  • Only HDMI playback

    To enable audio playback from a HDMI device, please first enable the HDMI_OUT_MUX.

    amixer -c mt8390evk cset name='HDMI_OUT_MUX' on
    amixer -c mt8390evk cset name='DPTX_OUT_MUX' off
    

    After using it, turn off the HDMI_OUT_MUX.

    amixer -c mt8390evk cset name='HDMI_OUT_MUX' off
    

    Use aplay to play the music via an HDMI device.

    aplay -D hdmi_dp_out sample.wav
    
  • Only DP playback

    The default configuration for Genio 510/700-EVK is to enable HDMI and disable DP. If you want to use DP audio, you need to load the dtbo file to enable DP.

    To enable audio playback from a DP device, please first enable the DPTX_OUT_ MUX.

    amixer -c mt8390evk cset name='DPTX_OUT_MUX' on
    amixer -c mt8390evk cset name='HDMI_OUT_MUX' off
    

    After using it, turn off the DPTX_OUT_MUX.

    amixer -c mt8390evk cset name='DPTX_OUT_MUX' off
    

    Use aplay to play the music via the DP device.

    aplay -D hdmi_dp_out sample.wav
    
  • HDMI + DP playback

    If you want to use HDMI and DP devices at the same time, remember to load the display-hdmidp.dtbo file and enable both the HDMI_OUT_MUX and DPTX_OUT_MUX.

    amixer -c mt8390evk cset name='HDMI_OUT_MUX' on
    amixer -c mt8390evk cset name='DPTX_OUT_MUX' on
    

Warning

When there are no HDMI or DP devices connected to the platform, the corresponding MUX should be set to off.

I2S Out

Use aplay to output I2S signal, the platform uses eTDM out2 interface for I2S output by default.

aplay -D i2s_out sample.wav

Capture

PCM In

To record voice through the PCM interface, use the following command. The recorded file will be named sample.wav.

arecord -D pcm_in -c 2 -r 48000 -f S32_LE -d 10 sample.wav

Earphone Jack Microphone

By default, the Genio 510/700-EVK board records the voice from the earphone jack microphone. The default setting of PGA_L_Mux: AIN1 is used for headset recording, but PGA_L_Mux is also used by AMIC.

Run the following command to set the PGA_L_Mux:

amixer -c mt8390evk cset name='PGA_L_Mux' 'AIN1'

The range of the Headset volume value from small to loud is 0 to 4.

amixer -c mt8390evk cset name='PGA1 Volume' 3

The following command is an example that will start a mono record with a 48KHz sampling rate and signed 32-bit format:

arecord -D jack_mic -r 48000 -f S32_LE -d 10 sample.wav

Digital Microphone

You can record the voice from the DMIC port.

Here is an example command that records a 10-second file named sample.wav using DMIC:

arecord -D dmic -c 2 -r 48000 -f S32_LE -d 10 sample.wav

Analog Microphone

To record voice from the AMIC port, you should change the default setting of PGA_L_Mux from AIN1 to AIN0.

amixer -c mt8390evk cset name='PGA_L_Mux' 'AIN0'

The range of the AMIC volume value from small to loud is 0 to 4.

Volume setting:

amixer -c mt8390evk cset name='PGA1 Volume' 3

The following command is an example that will record a 10 seconds file using AMIC:

arecord -D amic -r 48000 -f S32_LE -d 10 sample.wav

I2S In

To record voice through the I2S interface, please use the following command.

arecord -D i2s_in -c 2 -r 48000 -f S32_LE -d 10 sample.wav

AFE Interconnection

This section will provide a more detailed explanation of the audio data transmission path between the SoC and external codec for each audio devices.

The Audio Front-End of the SoC plays a critical role in managing audio functions. This chapter aims to familiarize you with the AFE interconnections on the SoC, highlighting how the audio components collaborate to process and output sound.

By default, the platform has configured the audio data transmission paths within the AFE for each audio device. Users generally do not need to modify these settings unless there are special circumstances. It is important to ensure that the switches on the path are turned on before use.

If the user needs it, they can also see all the pre-configured paths and all the replaceable paths in the platform driver.

Earphone Playback

The platform is equipped with a 3.5mm Earphone Jack that supports stereo audio playback.

Complete Route: MEMIF DL2 -> Mix Engine -> PMIC Interface -> Audio DAC -> HPL/HPR Mux -> Headset Volume Control -> Earphone

../../../../_images/sw_rity_app-dev_audio_evk_headphone_playback_g700.svg

Earphone playback audio data complete route

The data pathway in the Mix Engine has been pre-configured. The DL2 memory interface is connected to I070 and I071 by default.

Please verify whether the input and output components for the earphone playback in the Mix Engine have been connected.

amixer -c mt8390evk cset name='O176 I070 Switch' on
amixer -c mt8390evk cset name='O177 I071 Switch' on

The audio data will be transmitted to the PMIC via the PMIC DL interface. After the data enters the PMIC, it first goes into the DAC, which converts the digital signal into the analog signal.

A mixer control called DAC In Mux is used to determine if the audio data should pass through the DAC. Set it to Normal Path for general use.

amixer -c mt8390evk cset name='DAC In Mux' Normal Path

Next, the audio data output from the DAC will be sent to both the HP Mux and the LOL Mux. HP Mux and LOL Mux are used to select whether to output audio through earphone or speaker.

To use earphone playback, you need to set the HP Mux as Audio Playback and set the LOL Mux as Open:

amixer -c mt8390evk cset name='HP Mux' 'Audio Playback'
amixer -c mt8390evk cset name='LOL Mux' 'Open'

After choosing earphone as the audio playback device, you can adjust the hardware gain using the Headset Volume mixer control.

amixer -c mt8390evk cset name='Headset Volume' 4

Speaker Playback

The platform has a 3.5mm Speaker Jack that supports mono audio playback.

Complete Route: MEMIF DL2 -> Mix Engine -> PMIC Interface -> Audio DAC -> LOL Mux -> Lineout Volume -> Speaker

../../../../_images/sw_rity_app-dev_audio_evk_speaker_playback_g700.svg

Speaker playback audio data complete route

The speaker playback and earphone playback use the same data source. The DL2 memory interface is connected to I070 and I071 by default.

amixer -c mt8390evk cset name='O176 I070 Switch' on
amixer -c mt8390evk cset name='O177 I071 Switch' on

The audio data will be transmitted to the PMIC via the PMIC DL interface. In the PMIC, the audio data output from the DAC will be sent to both the HP Mux and the LOL Mux.

The default settings of HP Mux and LOL Mux are configured for earphone playback. To use speaker playback, you need to set the HP Mux as Open and set the LOL Mux as Playback_L_DAC.

amixer -c mt8390evk cset name='HP Mux' 'Open'
amixer -c mt8390evk cset name='LOL Mux' 'Playback_L_DAC'

After choosing the speaker as the audio playback device, you can adjust the hardware gain using the Lineout Volume mixer control.

amixer -c mt8390evk cset name='Lineout Volume' 4

HDMI Playback

The platform supports up to 8-channel HDMI Audio output.

Regarding HDMI and DP devices, the platform has implemented a Jack Control feature to detect whether HDMI or DP has been connected to the platform. Therefore, please ensure that the corresponding device is connected to the platform before starting the configuration adaptation.

Complete Route: MEMIF DL10 -> afe_conn_hdmi -> ETDM_OUT3 Interface -> HDMI device

../../../../_images/sw_rity_app-dev_audio_evk_hdmi_playback_g700.svg

HDMI playback audio data complete route

HDMI audio playback defaults to using DL10 and is connected to the eTDM_out3 interface.

The HDMI audio and DP audio are both output from the same AFE memory interface in the SoC. However, they are controlled separately by the HDMI_OUT_MUX and DPTX_OUT_MUX.

To use HDMI audio, please ensure that HDMI_OUT_MUX is connected.

amixer -c mt8390evk cset name='HDMI_OUT_MUX' on

DP Playback

The platform supports up to 8-channel DP Audio output.

Regarding HDMI and DP devices, the platform has implemented a jack control feature to detect whether HDMI or DP has been connected to the platform. Therefore, please ensure that the corresponding device is connected to the platform before starting the configuration adaptation.

Complete Route: MEMIF DL10 -> afe_conn_hdmi -> DPTX Interface -> DP device

../../../../_images/sw_rity_app-dev_audio_evk_dp_playback_g700.svg

DP playback audio data complete route

DP audio playback defaults to using DL10 and is connected to the DPTX interface.

To use DP audio, please ensure that DPTX_OUT_MUX is connected.

amixer -c mt8390evk cset name='DPTX_OUT_MUX' on

PCM Playback

Complete Route: MEMIF DL6 -> Mix Engine -> PCM interface -> PCM pins

../../../../_images/sw_rity_app-dev_audio_evk_pcm_playback_g700.svg

PCM playback audio data complete route

The PCM playback is a two-channel output. The DL6 memory interface is connected to I000 and I001 by default.

Please confirm if the components for PCM playback in the Mix Engine have been connected.

amixer -c mt8390evk cset name='O000 I000 Switch' on
amixer -c mt8390evk cset name='O001 I001 Switch' on

The platform has configured GPIO pins for PCM use, and for details on how to connect the hardware, please refer to Raspberry Pi HAT.

Note

To enable PCM output on Genio 510-EVK, please set jumper J4217 to Raspberry Pi.

I2S Playback

The platform supports 8-channel I2S audio playback, this feature is particularly useful for applications that require multi-channel audio output.

Complete Route: MEMIF DL11 -> Mix Engine -> ETDM_OUT2 Interface-> I2S pin

../../../../_images/sw_rity_app-dev_audio_evk_i2s_playback_g700.svg

I2S playback audio data complete route

The DL11 memory interface is default connected to I022~I029, and then the audio data comes out from AFE and is then connected to the eTDM_out2 interface.

amixer -c mt8390evk cset name='O048 I022 Switch' on
amixer -c mt8390evk cset name='O049 I023 Switch' on
amixer -c mt8390evk cset name='O050 I024 Switch' on
amixer -c mt8390evk cset name='O051 I025 Switch' on
amixer -c mt8390evk cset name='O052 I026 Switch' on
amixer -c mt8390evk cset name='O053 I027 Switch' on
amixer -c mt8390evk cset name='O054 I028 Switch' on
amixer -c mt8390evk cset name='O055 I029 Switch' on

Configure the clock source for the eTDM interface, where a1sys and a2sys respectively represent the clock sources generated from APLL1 and APLL2 for 48 KHz and 44.1 KHz sample rate.

amixer -c mt8390evk cset name='ETDM_OUT2_Clock_Source' a1sys_a2sys

Genio 510-EVK has set up the I2S pin on the board. For more details, please refer to Genio 510-EVK’s schematic.

Headset Capture

The headset captures audio in mono format, recording the voice from the headset device connected to the Earphone Jack.

Complete Route: Headset -> AU_VIN1 -> PGA Mux -> PGA0 -> ADC0 -> PMIC UL Interface -> Mix Engine -> MEMIF UL4

../../../../_images/sw_rity_app-dev_audio_evk_headset_capture_g700.svg

Headset capture audio data complete route

The UL4 memory interface is initially connected to O034 and O035, and then the AFE will be connected to the PMIC UL interface.

Please confirm if the components for headset capture in the Mix Engine have been connected.

amixer -c mt8390evk cset name='O034 I168 Switch' on
amixer -c mt8390evk cset name='O035 I169 Switch' on

The PGA_L_Mux controls whether the audio signals input to the PMIC come from the headset or the analog microphone.

To utilize headset capture, you must set the PGA_L_Mux to AIN1.

amixer -c mt8390evk cset name='PGA_L_Mux' 'AIN1'

PGA Gain refers to the hardware gain for capturing audio from the headset and AMIC. To control the volume, you can adjust the PGA1 Volume, which has a range of 0 to 4:

amixer -c mt8390evk cset name='PGA1 Volume' 4

Analog Microphone Capture

On the Genio 510-EVK and Genio 700-EVK, there is a default analog microphone that can record mono audio.

Complete Route: mic -> AU_VIN0 -> PGA Mux -> PGA0 -> ADC0 -> PMIC Interface -> Mix Engine -> MEMIF UL4

../../../../_images/sw_rity_app-dev_audio_evk_amic_capture_g700.svg

Analog Microphone capture audio data complete route

The AMIC and Headset conflict because they both use the same audio data transmission path, so only one of them can be selected for use at a time.

The UL4 memory interface is initially connected to O034 and O035, and then the AFE will be connected to the PMIC UL interface.

Please confirm if the components for AMIC capture in the Mix Engine have been connected.

amixer -c mt8390evk cset name='O034 I168 Switch' on
amixer -c mt8390evk cset name='O035 I169 Switch' on

The default setting for PGA_L_Mux is AIN1 for headset capture. To enable AMIC capture, you should change the PGA_L_Mux setting to AIN0.

amixer -c mt8390evk cset name='PGA_L_Mux' 'AIN0'

You can adjust the PGA1 Volume to control the volume. This mixer control enables users to adjust the hardware gain of AMIC, which ranges from 0 to 4.

amixer -c mt8390evk cset name='PGA1 Volume' 4

Digital Microphone Capture

The platform by default has two DMICs, so it supports stereo recording.

Complete Route: mic -> DMIC interface -> Mix Engine -> MEMIF UL9

../../../../_images/sw_rity_app-dev_audio_evk_dmic_capture_g700.svg

Digital Microphone capture audio data complete route

The UL9 memory interface is by default connected to O002 and O003 on the AFE. Please confirm if the components for DMIC capture in the Mix Engine have been connected.

amixer -c mt8390evk cset name='O002 I004 Switch' on
amixer -c mt8390evk cset name='O003 I006 Switch' on

The default setting for DMIC is clock nomo mode, which means each DMIC component is connected to one clock.

To enable DMIC clock mono mode, additional configuration needs to be done in the DTS file. Additionally, the corresponding connection path should also be set up. For details, you can refer to the DMIC porting guide.

Regarding the volume of DMIC recording, it can be adjusted through the DMIC hardware gain. Please enable the DMIC hardware gain using the following command.

amixer -c mt8390evk cset name='DMIC1_HW_GAIN_EN' on
amixer -c mt8390evk cset name='DMIC2_HW_GAIN_EN' on

This is an example of increasing the volume by setting the current gain to 0 dB and then adjusting the target gain to 10 dB.

amixer -c mt8390evk cset name='DMIC1_HW_GAIN_CURRENT' 524288
amixer -c mt8390evk cset name='DMIC2_HW_GAIN_CURRENT' 524288
amixer -c mt8390evk cset name='DMIC1_HW_GAIN_TARGET' 1657944
amixer -c mt8390evk cset name='DMIC2_HW_GAIN_TARGET' 1657944

Please refer to the DMIC porting guide for additional information about DMIC hardware gain.

PCM Capture

The platform supports two channels of PCM audio capture.

Complete Route: PCM pins -> PCM interface -> Mix Engine -> MEMIF UL2

../../../../_images/sw_rity_app-dev_audio_evk_pcm_capture_g700.svg

PCM capture audio data complete route

By default, PCM capture uses the UL2 memory interface and is connected to O040 and O041 on the AFE. The audio data comes in from the PCM interface and then passes through I002 and I003 into the AFE.

Please confirm whether the components for PCM capture in the Mix Engine have been connected.

amixer -c mt8390evk cset name='O040 I002 Switch' on
amixer -c mt8390evk cset name='O041 I003 Switch' on

The platform has configured GPIO pins for PCM use, and for details on how to connect the hardware, please refer to Raspberry Pi HAT.

Note

To enable PCM input on Genio 510-EVK, please set jumper J4216 to Raspberry Pi.

I2S Capture

The platform supports two channels of I2S audio capture.

Complete Route: I2S pin -> eTDM in2 interface -> Mix Engine -> MEMIF UL5

../../../../_images/sw_rity_app-dev_audio_evk_i2s_capture_g700.svg

I2S capture audio data complete route

The platform by default uses the eTDM_in2 interface to receive audio data, which then enters the AFE through I012 and I013, and is subsequently routed from O036 and O037 to the UL5 memory interface.

Please confirm whether the components for I2S capture in the Mix Engine have been connected.

amixer -c mt8390evk cset name='O036 I012 Switch' on
amixer -c mt8390evk cset name='O037 I013 Switch' on

Configure the clock source for the eTDM interface, where a1sys and a2sys respectively represent the clock sources generated from APLL1 and APLL2 for 48 KHz and 44.1 KHz sample rate.

amixer -c mt8390evk cset name='ETDM_IN2_Clock_Source' a1sys_a2sys

For using I2S capture on the platform, it is necessary to consider whether the playback side is in master mode or slave mode and adjust the configuration accordingly. The playback end and capture end must be in different modes; otherwise, serious noise will occur. For detailed operations, please refer to the eTDM porting guide.

Genio 510-EVK has set up the I2S pin on the board. For more details, please refer to Genio 510-EVK’s schematic.

Audio DSP

Introduction

The Audio Digital Signal Processor (ADSP) is a specialized microprocessor designed for processing audio signals in real time. ADSPs perform complex audio processing tasks such as filtering, equalization, compression, noise reduction, and effects like reverb and echo. ADSPs are also designed to be highly efficient in power consumption and processing speed, making them ideal for use in IoT devices and various other applications.

The Genio boards utilize Cadence’s Xtensa HiFi4 and HiFi5 DSPs, which leverage the Sound Open Firmware (SOF) framework, an open-source project aimed at providing an efficient and flexible firmware stack for audio DSPs.

Supported Platforms and ADSP Specifications

Platform

SoC

ADSP Architecture

Cores/Clocks

DRAM

SRAM

Genio 1200

MT8395

Xtensa HiFi4

1 @ 220 MHz - 720 MHz

16 MB

256 KB

Genio 700

MT8390

Xtensa HiFi5

1 @ 260 MHz - 800 MHz

17 MB

512 KB

Genio 510

MT8370

Xtensa HiFi5

1 @ 260 MHz - 800 MHz

17 MB

512 KB

On Genio 510-EVK, there are 2 playback hardware and 2 capture hardware for the Audio DSP.

../../../../_images/sw_rity_app-dev_audio_evk_sof_g510.svg

Genio 510-EVK audio data route

On Genio 700-EVK, there are 2 playback hardware and 2 capture hardware for the Audio DSP.

../../../../_images/sw_rity_app-dev_audio_evk_sof_g700.svg

Genio 700-EVK ADSP audio data route

Earphone Playback using ADSP on Genio 510/700

Complete Route: SOF_DL2/SOF_DL3 -> Mix Engine -> PMIC Interface -> Audio DAC -> HPL/HPR Mux -> Headset Volume Control -> Earphone

../../../../_images/sw_rity_app-dev_audio_evk_sof_headphone_playback_g700.svg

Genio 510/700 ADSP earphone playback route

Headset Capture using ADSP on Genio 510/700

Complete Route: Headset -> AU_VIN1 -> PGA Mux -> PGA0 -> ADC0 -> PMIC UL Interface -> Mix Engine -> SOF_UL4/SOF_UL5

../../../../_images/sw_rity_app-dev_audio_evk_sof_headset_capture_g700.svg

Genio 510/700 ADSP headset capture route

Usage

To use audio DSP, flash the image onto Genio 510/700-EVK with audio-sof.dtbo.

genio-flash --load-dtbo audio-sof.dtbo

Genio 510/700-EVK supports DSP playback of headphones, and supports DSP capture of headset & DMIC.

  • DSP Playback

    The two PCM device nodes, hw:0,16 and hw:0,17, are linked to the SOF_DL2 and SOF_DL3, both connected to the DSP headphone playback.

    root@genio-510-evk:~# aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: sofmt8370evk [sof-mt8370-evk], device 16: SOF_DL2 (*) []
        Subdevices: 1/1
        Subdevice #0: subdevice #0
    card 0: sofmt8370evk [sof-mt8370-evk], device 17: SOF_DL3 (*) []
        Subdevices: 1/1
        Subdevice #0: subdevice #0
    

    The following is an example of using DSP headphone playback.

    aplay -D hw:0,16 -c 2 -f S16_LE -r 48000 test.wav
    

    This is a GStreamer DSP headphones playback test. A sine wave of 440 Hz will be played through the headphones.

    gst-launch-1.0 audiotestsrc freq=440 ! audioconvert ! audioresample ! alsasink device=hw:0,17
    

    You can adjust the volume of the DSP headphone playback by controlling the ADDA_DL_Gain mixer control. ADDA_DL_Gain has a range from 0 to 65535.

    root@genio-510-evk:~# amixer -c 0 sset 'ADDA_DL_GAIN' 50000
    Simple mixer control 'ADDA_DL_GAIN',0
        Capabilities: volume volume-joined
        Playback channels: Mono
        Capture channels: Mono
        Limits: 0 - 65535
        Mono: 50000 [76%]
    
  • DSP Capture

    The hw:0,18 is linked to the SOF_UL4, connected to the DSP headset capture; and the hw:0,19 is linked to the SOF_UL5, connected to the DSP DMIC capture.

    root@genio-510-evk:~# arecord -l
    **** List of CAPTURE Hardware Devices ****
    card 0: sofmt8370evk [sof-mt8370-evk], device 18: SOF_UL4 (*) []
        Subdevices: 1/1
        Subdevice #0: subdevice #0
    card 0: sofmt8370evk [sof-mt8370-evk], device 19: SOF_UL5 (*) []
        Subdevices: 1/1
        Subdevice #0: subdevice #0
    

    The following is an example of DSP headset capture.

    arecord -D hw:0,18 -c 2 -f S16_LE -r 48000 -d 10 test_headset.wav
    

    The following is an example of DSP DMIC capture.

    arecord -D hw:0,19 -c 2 -f S16_LE -r 48000 -d 10 test_dmic.wav
    
  • Loopback test

    This test involves using GStreamer for loopback testing. Speak into the microphone of the headset, and you should be able to hear your voice from headphones.

    gst-launch-1.0  alsasrc device=hw:0,18 ! audio/x-raw,rate=48000 ! alsasink device=hw:0,16