Audio Codec

Playback: (internal 24 bits Digital to Analog Converter)


 * HPL Headphone Left channel output AO
 * HPR Headphone Right channel output AO
 * HPCOM Headphone amplifier output A
 * HPCOM_FB Headphone amplifier Feedback A
 * HPCOM Headphone amplifier output A
 * HPCOM_FB Headphone amplifier Feedback A
 * HPCOM_FB Headphone amplifier Feedback A

Recorder: (internal 24 bits Analog to Digital Converter)


 * FMINL Audio ADC(24bit) Input for Left channel of FM radio AI
 * FMINR Audio ADC(24bit) Input for Right channel of FM radio AI
 * LINEINL Audio ADC(24bit) Input for Left channel of Line In AI
 * LINEINR Audio ADC(24bit) Input for Right channel of Line In AI
 * MICINL Audio ADC(24bit) Input for Left channel of Microphone AI
 * MICINR Audio ADC(24bit) Input for Right channel of Microphone AI
 * LINEINR Audio ADC(24bit) Input for Right channel of Line In AI
 * MICINL Audio ADC(24bit) Input for Left channel of Microphone AI
 * MICINR Audio ADC(24bit) Input for Right channel of Microphone AI
 * MICINR Audio ADC(24bit) Input for Right channel of Microphone AI
 * MICINR Audio ADC(24bit) Input for Right channel of Microphone AI

micin has an internal pre-amplifier.

Only one 2-channel input port can be used at the same time.

To select the intput port you have to set the mixer control called ADC Input Mux

To change the ADC muxer you have to use the amixer tool from the "alsa-utils" package:

amixer -c <"card"> cset numid=<"control#"> <"input_port">

where:

<"card"> is the card, 0 for the sunxi-codec and 1 for the hdmi audio output

<"input_port"> is the input port from the table

<"control#"> is the control # showed using: aximer contents

To install the alsa-utils from debian based distros: "apt-get install alsa-utils". Inside the package you have the aplay and arecord tools to test it.

Command example to use the linein port:

amixer -c 0 cset numid=16 0

Use "amixer contents" to get the contents and controls of your Alsa driver:

numid=1,iface=MIXER,name='Master Playback Volume' ; type=INTEGER,access=rw--,values=1,min=0,max=63,step=0 : values=51 numid=10,iface=MIXER,name='LineL Switch' ; type=BOOLEAN,access=rw--,values=1 : values=on numid=11,iface=MIXER,name='LineR Switch' ; type=BOOLEAN,access=rw--,values=1 : values=on numid=5,iface=MIXER,name='Line Volume' ; type=BOOLEAN,access=rw--,values=1 : values=on numid=15,iface=MIXER,name='Mic Input Mux' ; type=INTEGER,access=rw--,values=1,min=0,max=15,step=0 : values=0 numid=6,iface=MIXER,name='MicL Volume' ; type=INTEGER,access=rw--,values=1,min=0,max=3,step=0 : values=1 numid=7,iface=MIXER,name='MicR Volume' ; type=INTEGER,access=rw--,values=1,min=0,max=3,step=0 : values=2 numid=16,iface=MIXER,name='ADC Input Mux' ; type=INTEGER,access=rw--,values=1,min=0,max=7,step=0 : values=0 numid=3,iface=MIXER,name='Capture Volume' ; type=INTEGER,access=rw--,values=1,min=0,max=7,step=0 : values=7 numid=2,iface=MIXER,name='Playback Switch' ; type=BOOLEAN,access=rw--,values=1 : values=off numid=4,iface=MIXER,name='Fm Volume' ; type=INTEGER,access=rw--,values=1,min=0,max=7,step=0 : values=3 numid=8,iface=MIXER,name='FmL Switch' ; type=BOOLEAN,access=rw--,values=1 : values=off numid=9,iface=MIXER,name='FmR Switch' ; type=BOOLEAN,access=rw--,values=1 : values=off numid=12,iface=MIXER,name='Ldac Left Mixer' ; type=BOOLEAN,access=rw--,values=1 : values=off numid=14,iface=MIXER,name='Ldac Right Mixer' ; type=BOOLEAN,access=rw--,values=1 : values=off numid=13,iface=MIXER,name='Rdac Right Mixer' ; type=BOOLEAN,access=rw--,values=1 : values=off