ODROID C2 User manual

2023/09/02 10:14 1/8 Quick installation guide to enable the I2S audio output on Ubuntu.
ODROID Wiki - https://wiki.odroid.com/
Quick installation guide to enable the I2S audio output on
Ubuntu.
HiFi-shield & HiFi-Shield+
The Hifi-Shield Plus provides both stereo RCA connectors and a 3.5mm stereo jack (all gold-plated) to
connect to external amplifiers and other audio equipment. An S/PDIF Optical output is also available.
Via TI's high-end PCM5102 DAC chip(known as Burr-Brown), it supports 16, 24, 32 bit audio formats
with minimal distortion (-93dB) and ideal dynamics (110dB+), plus amazing sampling rates of 384kHz
with odroid-c1. (up to 192KHz with odroid-c2)
ODROID-C1+/C2
Assemble the C2 with the Hifi-Shield, attach a USB keyboard, USB mouse and HDMI monitor,
then power up the system.
Update the System: sudo apt-get update && sudo apt-get dist-upgrade
To ensure that the Hifi-Shield kernel modules are loaded on Terminal.
target
odroid@odroid64:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ODROIDHDMI [ODROID-HDMI], device 0: I2S.27 dit-hifi-0 []
Subdevices: 0/1
Subdevice #0: subdevice #0
odroid@odroid64:~$
odroid@odroid64:~$ sudo modprobe snd-soc-pcm5102
odroid@odroid64:~$ sudo modprobe snd-soc-odroid-dac
odroid@odroid64:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ODROIDHDMI [ODROID-HDMI], device 0: I2S.27 dit-hifi-0 []
Subdevices: 1/1

Last update: 2020/04/23 16:56 accessory:sound:hifi_shield https://wiki.odroid.com/accessory/sound/hifi_shield?rev=1587628619
https://wiki.odroid.com/ Printed on 2023/09/02 10:14
Subdevice #0: subdevice #0
card 1: ODROIDDAC [ODROID-DAC], device 0: I2S.27 pcm5102-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
odroid@odroid64:~$
If you have to load the driver every time whenever your ODROID-C2 starts, simply you can
register the driver into /etc/modules
target
odroid@odroid64:~$ su
Password: /* root password is "odroid" */
root@odroid64:/home/odroid# echo "snd-soc-pcm5102" >> /etc/modules
root@odroid64:/home/odroid# echo "snd-soc-odroid-dac" >> /etc/modules
root@odroid64:/home/odroid# exit
exit
odroid@odroid64:~$
This adds one line at end of the file, /etc/modules, and load the driver on boot automatically.
Create /etc/asound.conf with the following content:
pcm.!default {
type hw card 1
}
ctl.!default {
type hw card 1
}
Reboot again.
Check, if the sound card is enabled with “aplay -l”:
target
odroid@odroid64:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ODROIDHDMI [ODROID-HDMI], device 0: I2S.27 dit-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: ODROIDDAC [ODROID-DAC], device 0: I2S.27 pcm5102-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
odroid@odroid64:~$
To test, connect an amplifier to the 3.5mm or RCA lineout jack on the Hifi-Shield, and then run:
Applications → Sound & Video → Sound → Hardware Tab & Output Tab select “ODROID-DAC”

2023/09/02 10:14 3/8 Quick installation guide to enable the I2S audio output on Ubuntu.
ODROID Wiki - https://wiki.odroid.com/
If you want to use the Optical output on Hifi-Shield Plus model, select “ODROID-HDMI”.
ODROID-C4
Assemble the C4 with the Hifi-Shield, attach a USB keyboard, USB mouse and HDMI monitor,
then power up the system.
To enable the sound card, you need to modify the DT(Device Tree) file.
Install required packages and make a backup DTB file.
target
root@odroid:~$ sudo apt-get install device-tree-compiler
root@odroid:~$ cp /media/boot/meson64_odroidc4.dtb
/media/boot/meson64_odroidc4.dtb.org
Change the DTB file to enable the I2C-bus and pcm5102a codec driver.
target
root@odroid:~$ fdtget /media/boot/meson64_odroidc4.dtb /pcm5102a status
disabled
root@odroid:~$ fdtput -t s /media/boot/meson64_odroidc4.dtb /pcm5102a
status "okay"
root@odroid:~$ fdtget /media/boot/meson64_odroidc4.dtb /pcm5102a status
okay
root@odroid:~$
Change the DTB file for sound card. Then reboot.
target
root@odroid:~$ fdtget /media/boot/meson64_odroidc4.dtb /odroid_hifi
status
disabled
root@odroid:~$ fdtput -t s /media/boot/meson64_odroidc4.dtb
/odroid_hifi status "okay"
root@odroid:~$ fdtget /media/boot/meson64_odroidc4.dtb /odroid_hifi
status
okay
root@odroid:~$ reboot
You can see that the sound card is enabled.
target
root@odroid:~$ aplay -l

Last update: 2020/04/23 16:56 accessory:sound:hifi_shield https://wiki.odroid.com/accessory/sound/hifi_shield?rev=1587628619
https://wiki.odroid.com/ Printed on 2023/09/02 10:14
**** List of PLAYBACK Hardware Devices ****
card 0: ODROIDHDMI [ODROID-HDMI], device 0: SPDIF-dit-hifi dit-hifi-0
[]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: ODROIDHiFi [ODROID-HiFi], device 0: TDM-B-pcm5102a-hifi
pcm5102a-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
root@odroid:~#
To test, connect an amplifier to the 3.5mm or RCA lineout jack on the Hifi-Shield, and then run:
Applications → Sound & Video → Sound → Hardware Tab & Output Tab select “ODROID-HIFI”
If you want to use the Optical output on Hifi-Shield Plus model, select “ODROID-HDMI”.
HiFi-shield2
The Hifi-Shield 2 provides stereo RCA connectors to connect to external amplifiers and other audio
equipment. An S/PDIF Optical output is also available. Via TI's high-end PCM5242 DAC chip(known as
Burr-Brown), it supports 16, 24, 32 bit audio formats with minimal THD+N ratio (0.002%) and ideal
dynamics (116dB+), plus amazing sampling rates of 384kHz with odroid-c1. (up to 192KHz with
odroid-c2) Volume control via I2C interface is great feature to keep the great audio quality with
various audio output volume.
ODROID-C1+/C2
Assemble the C2 with the Hifi-Shield2, attach a USB keyboard, USB mouse and HDMI monitor,
then power up the system.
Update the System: sudo apt-get update && sudo apt-get dist-upgrade
To ensure that the Hifi-Shield2 kernel modules are loaded on Terminal.
target
odroid@odroid64:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****

2023/09/02 10:14 5/8 Quick installation guide to enable the I2S audio output on Ubuntu.
ODROID Wiki - https://wiki.odroid.com/
card 0: ODROIDHDMI [ODROID-HDMI], device 0: I2S dit-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
odroid@odroid64:~$ su
Password: /* root password is "odroid" */
root@odroid64:/home/odroid# modprobe aml_i2c
root@odroid64:/home/odroid# modprobe snd_soc_pcm512x
root@odroid64:/home/odroid# modprobe snd_soc_pcm512x_i2c
root@odroid64:/home/odroid# echo pcm5242 0x4c > /sys/class/i2c-
adapter/i2c-1/new_device
root@odroid64:/home/odroid# modprobe snd-soc-odroid-dac2
root@odroid64:/home/odroid# aplay -l
**** List of PLAYBACK Hardware Devices ***
card 0: ODROIDHDMI [ODROID-HDMI], device 0: I2S dit-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: ODROIDDAC2 [ODROID-DAC2], device 0: I2S pcm512x-hifi-0 []
Subdevices: 0/1
Subdevice #0: subdevice #0
root@odroid64:/home/odroid#
To test, connect an amplifier to the RCA out jack on the Hifi-Shield2, and then run:
Applications → Sound & Video → Sound → Hardware Tab & Output Tab select “ODROID-DAC2”
If you want to use the Optical output select “ODROID-HDMI”.
You want to add the Hifi-Shield2 sound_card on ODROID-C2 at boot by editing /etc/rc.local.
target
odroid@odroid64:~$ sudo nano /etc/rc.local
if [ -f /aafirstboot ]; then /aafirstboot start ; fi
echo Loading HiFi-Shield2 module
modprobe aml_i2c
modprobe snd-soc-pcm512x
modprobe snd-soc-pcm512x-i2c
echo pcm5242 0x4c > /sys/class/i2c-adapter/i2c-1/new_device
modprobe snd-soc-odroid-dac2
amixer -c 1 sset Analogue 0
amixer -c 1 sset Digital 201
amixer -c 1 sset Deemphasis on
echo Done.
exit 0
^G Get Help ^O Write Out ^W Where Is ^K Cut Text ^J Justify ^C Cur
Pos
^X Exit ^R Read File ^\ Replace ^U Uncut Text^T To Linter ^_ Go
To Line

Last update: 2020/04/23 16:56 accessory:sound:hifi_shield https://wiki.odroid.com/accessory/sound/hifi_shield?rev=1587628619
https://wiki.odroid.com/ Printed on 2023/09/02 10:14
Add the following at the bottom of the page above exit 0. ^x exit and save the file. Reboot your
ODROID-C2.
Create /etc/asound.conf with the following content:
pcm.!default {
type hw card 1
}
ctl.!default {
type hw card 1
}
Reboot again.
Check, if the sound card is enabled with “aplay -l”:
target
odroid@odroid64:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ODROIDHDMI [ODROID-HDMI], device 0: I2S dit-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: ODROIDDAC2 [ODROID-DAC2], device 0: I2S pcm512x-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
odroid@odroid64:~$
ODROID-C4
Assemble the C4 with the Hifi-Shield2, attach a USB keyboard, USB mouse and HDMI monitor,
then power up the system.
To enable the sound card, you need to modify the DT(Device Tree) file.
Install required packages and make a backup DTB file.
target
root@odroid:~$ sudo apt-get install device-tree-compiler
root@odroid:~$ cp /media/boot/meson64_odroidc4.dtb
/media/boot/meson64_odroidc4.dtb.org
Change the DTB file to enable the I2C-bus and pcm5242 codec driver.
target
root@odroid:~$ fdtget /media/boot/meson64_odroidc4.dtb
/soc/cbus@ffd00000/i2c@1d000 status

2023/09/02 10:14 7/8 Quick installation guide to enable the I2S audio output on Ubuntu.
ODROID Wiki - https://wiki.odroid.com/
disabled
root@odroid:~$ fdtput -t s /media/boot/meson64_odroidc4.dtb
/soc/cbus@ffd00000/i2c@1d000 status "okay"
root@odroid:~$ fdtput -t s /media/boot/meson64_odroidc4.dtb
/soc/cbus@ffd00000/i2c@1d000/pcm5242 status "okay"
root@odroid:~$ fdtget /media/boot/meson64_odroidc4.dtb
/soc/cbus@ffd00000/i2c@1d000 status
okay
root@odroid:~$ fdtget /media/boot/meson64_odroidc4.dtb
/soc/cbus@ffd00000/i2c@1d000/pcm5242 status
okay
root@odroid:~$
Change the DTB file to enable [ODROID-HIFI2] sound card. Then reboot.
target
root@odroid:~$ fdtget /media/boot/meson64_odroidc4.dtb /odroid_hifi2
status
disabled
root@odroid:~$ fdtput -t s /media/boot/meson64_odroidc4.dtb
/odroid_hifi2 status "okay"
root@odroid:~$ fdtget /media/boot/meson64_odroidc4.dtb /odroid_hifi2
status
okay
root@odroid:~$ reboot
You can see that the sound card is enabled.
target
root@odroid:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
**** List of PLAYBACK Hardware Devices ****
card 0: ODROIDHDMI [ODROID-HDMI], device 0: SPDIF-dit-hifi dit-hifi-0
[]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: ODROIDHiFi2 [ODROID-HiFi2], device 0: TDM-B-pcm512x-hifi
pcm512x-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
root@odroid:~#
To test, connect an amplifier to the RCA lineout jack on the Hifi-Shield, and then run:
Applications → Sound & Video → Sound → Hardware Tab & Output Tab select “ODROID-HIFI2”
If you want to use the Optical output on Hifi-Shield Plus model, select “ODROID-HDMI”.

Last update: 2020/04/23 16:56 accessory:sound:hifi_shield https://wiki.odroid.com/accessory/sound/hifi_shield?rev=1587628619
https://wiki.odroid.com/ Printed on 2023/09/02 10:14
Hifi Shield and Hifi Shield 2 sound cards cannot be activated at the same time.
Because they share I2S port.
Please use only one of them.
If above guide is not comfortable for you, try this alternative easy solution made
by Fourdee (DietPi OS image author).
http://forum.odroid.com/viewtopic.php?f=118&t=24415
The volume level control is available only on the RCA line-out output of HiFi-
Shield 2.
The SPDIF optical output level is always maximum because it is a simple I2S
bypass.
From:
https://wiki.odroid.com/ - ODROID Wiki
Permanent link:
https://wiki.odroid.com/accessory/sound/hifi_shield?rev=1587628619
Last update: 2020/04/23 16:56
Other manuals for C2
1
This manual suits for next models
3
Table of contents
Popular Computer Hardware manuals by other brands

INNOSILICON
INNOSILICON A6 LTCMaster user manual

Star Lake
Star Lake THOR100-X4-D7E user manual

Panasonic
Panasonic Panaboard UB-5310 operating instructions

head rush technologies
head rush technologies PRIME quick start guide

Renesas
Renesas SKP16C62P user manual

Alfa Network
Alfa Network Wifi Camp Pro Mini Booklet