Genio 1200-demo

Overview

On Genio 1200-demo, there are 4 playback hardware and 3 capture hardware.

  • Playback
    • Headset-Out Jack

    • HDMI Audio Out

    • DP Audio Out

    • I2S Out

  • Capture
    • Headset-In Jack

    • I2S In

    • DMIC In

For the position of the headset jack and HDMI/DP, please refer to Board Top View. For the position of I2S In/Out and DMIC In, please refer to Pin Header. The default routing is shown below. There are 3 playback nodes and 3 capture nodes.

../../../../_images/sw_rity_app-dev_i1200_audio_route.png

The route between hardware and device node

  • pcmC0D0p plays the sound to Headset-Out Jack.

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

  • pcmC0D6p plays the sound to 8-ch I2S Out.

  • pcmC0D10c records the voice from Headset-In Jack.

  • pcmC0D11c records the voice from 2-ch I2S In.

  • pcmC0D14c records the voice from 8-ch DMIC In.

Playback

Headset Jack Speaker

By default, the Genio 1200-demo board plays the audio to the headset jack speaker. To play the music through the jack, you can use either gst-play-1.0 or aplay.

gst-play-1.0 is a tool used to test basic playback using the GStreamer element playbin. For more details about gst-play-1.0, please refer to gst-play-1.0.

gst-play-1.0 sample.mp3

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

There is a gain control for the headset output. You can use the control to adjust the volume:

# Max volume
amixer -c mt8195demo cset name='Headset Volume' 0
numid=343,iface=MIXER,name='Headset Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=30,step=0
: values=0,0
| dBscale-min=-22.00dB,step=1.00dB,mute=0
# Min volume
amixer -c mt8195demo cset name='Headset Volume' 30
numid=343,iface=MIXER,name='Headset Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=30,step=0
: values=0,0
| dBscale-min=-22.00dB,step=1.00dB,mute=0

HDMI/DP Speaker

You can play the audio to the HDMI and DP. In this case, the device will need to be specified explicitly as follows:

aplay -D hdmi_dp_out sample.wav

Note

By default, Genio 1200-demo enables HDMI and disables DP. If you want to use DP audio, please load the dtbo to enable DP.

I2S Output

You can play the audio to the I2S Output. The I2S Output port is an 8-channel interface on the Pin Header. In this case, the device will need to be specified explicitly as follows:

aplay -D i2s_out sample.wav

Capture

Headset Jack Microphone

By default, the Genio 1200-demo board records the voice from the headset jack microphone. The following command is an example that will start a mono record with 48KHz sampling rate and signed 32bits bit format:

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

I2S Input

You can record the voice from the I2S Input. The I2S Input port is a 2-channel interface on the Pin Header. In this case, the device will need to be specified explicitly as follows:

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

Digital Microphone

You can record the voice from the DMIC port. The DMIC port is an 8-channel interface on the Pin Header. In this case, the device will need to be specified explicitly as follows:

arecord -D dmic -r 48000 -f S32_LE -c 8 sample.wav

Loopback Test

There’s a loopback audio test that directly transfers the input voice to the output audio. For example:

To transfer headset-in jack to headset-out jack:

arecord -D jack_mic -r 48000 -f S32_LE | aplay -D jack_speaker -r 48000 -f S32_LE