|
I set audio for my Orange pi zero 2 just like the way I have done on Oramge Pi Zero.
1) add analog-codec at by sudo nano /boot/armbianEnv.txt for overlay= as follow. overlay=analog-codec
2) sudo nano /etc/asound.conf, enter followings : here, card 1 = HDMI audio, card 0 = analog audio
pcm.!default {
type hw
card 0
device 0
}
ctl.!default {
type hw
card 0
}
3) on sudo nano /etc/rc.local
// Outcome Control
# enable line out on jack connector (IMPORTANT)
/usr/bin/amixer -c 0 cset numid=4 on
# Set line out volume to maximum (0-31)
/usr/bin/amixer -c 0 cset numid=3 31
# Setting the DAC volume (master PCM channel) (0-63)
/usr/bin/amixer -c 0 cset numid=1 63
# Enable DAC to be routed to output (analog pcm) (on/off)
/usr/bin/amixer -c 0 cset numid=10 on
// Microphone Input Control
# Microphone settings
#mic1 (internal) volume 0-7
/usr/bin/amixer -c 0 cset numid=7 7
#mic1 CAPTURE switch (on/off) - this will let you use the microphone
/usr/bin/amixer -c 0 cset numid=18 on
#mic1 (input) boost (0-7, 1 recommended)
/usr/bin/amixer -c 0 cset numid=8 1
#mic1 (internal) playback loop switch (direct route to output) (on/off) LEAVE IT OFF to avoid feedback loop between internal microphone and speakers !!!
/usr/bin/amixer -c 0 cset numid=13 off
#mic2 volume 0-7
/usr/bin/amixer -c 0 cset numid=5 7
#mic2 CAPTURE switch (on/off) - this will let you use the microphone
/usr/bin/amixer -c 0 cset numid=19 on
#mic2 boost (0-7, 1 recommended)
/usr/bin/amixer -c 0 cset numid=6 1
#mic2 playback loop switch (direct route to output) (on/off)
/usr/bin/amixer -c 0 cset numid=14 off
====================================================================
Above setting enabled my Orange Pi Zero for analog sound for stereo. However, it didn't work on Orange Pi Zero 2. It only displays as "analog mono".
|
|