ODROID C2 with HifiShield+ and 7" Touch Display

Hello everyone,

I’m trying to build an internet radio and spotify client using volumio. For this I want to use following hardware:

  • ODROID C2 with 8GB eMMC
  • HiFi Shield+ (Hardkernel)
  • 7" capacitive touch display type C from waveshare
  • Edimax WiFi stick
  • Volumio 2.344 for ODROID C2

However, after installing volumio I stumbled in to several problems:

  1. The volume can not be changed. After setting the volume in the web interface to e.g. 50% the system sets it back to 100%.
  2. The touch plugin does not work. During installation it gets stuck at the step Disabling Kiosk service (I waited more than half an hour…). However, if I reboot the system the display shows the frontend of volumio but the touch function is not working.

I also tried to realize this with a raspberry pi 3 type B and the HifiBerry DAC+ and in this setting everything works fine. However, this system is very slow. Booting takes about the 1 minute and 20 seconds whereas the ODROID C2 only needs 35 seconds to boot. For 1 minute boot time is too long, so that is no option for me.

Does anyone have any idea what I could do to get this run with ODROID C2?
I would really be grateful for some help.

Thanks!

I’ve had a good search through the forum and I can’t see anything relevant to your situation. You might have more success with a larger audience on the HardKernel forums? Let us know how you get on though please.

The HiFi Shield+ seems to be using PCM5102 DAC chip and it doesn’t have hardware volume control. You will have to select software volume control to get that to work.

Hallo.

You have to adapt “boot.ini” accordingly:

[code]ODROIDC2-UBOOT-CONFIG

Possible screen resolutions

Uncomment only a single Line! The line with setenv written.

At least one mode must be selected.

Custom modeline!

To use custom modeline you need to disable all the below resolutions

and setup your own!

For more information check our wiki:

http://odroid.com/dokuwiki/doku.php?id=en:c2_hdmi_autosetting

Example below:

setenv m “custombuilt”

setenv modeline “1920,1200,154000,74040,60,1920,1968,2000,2080,1200,1202,1208,1235,1,0,1”

480 Lines (720x480)

setenv m “480i60hz” # Interlaced 60Hz

setenv m “480i_rpt” # Interlaced for Rear Projection Televisions 60Hz

setenv m “480p60hz” # 480 Progressive 60Hz

setenv m “480p_rpt” # 480 Progressive for Rear Projection Televisions 60Hz

576 Lines (720x576)

setenv m “576i50hz” # Interlaced 50Hz

setenv m “576i_rpt” # Interlaced for Rear Projection Televisions 50Hz

setenv m “576p50hz” # Progressive 50Hz

setenv m “576p_rpt” # Progressive for Rear Projection Televisions 50Hz

720 Lines (1280x720)

setenv m “720p50hz” # 50Hz

setenv m “720p60hz” # 60Hz

1080 Lines (1920x1080)

setenv m “1080i60hz” # Interlaced 60Hz

setenv m “1080p60hz” # Progressive 60Hz

setenv m “1080i50hz” # Interlaced 50Hz

setenv m “1080p50hz” # Progressive 50Hz

setenv m “1080p24hz” # Progressive 24Hz

4K (3840x2160)

setenv m “2160p30hz” # Progressive 30Hz

setenv m “2160p25hz” # Progressive 25Hz

setenv m “2160p24hz” # Progressive 24Hz

setenv m “smpte24hz” # Progressive 24Hz SMPTE

setenv m “2160p50hz” # Progressive 50Hz

setenv m “2160p60hz” # Progressive 60Hz

setenv m “2160p50hz420” # Progressive 50Hz with YCbCr 4:2:0 (Requires TV/Monitor that supports it)

setenv m “2160p60hz420” # Progressive 60Hz with YCbCr 4:2:0 (Requires TV/Monitor that supports it)

VESA modes

setenv m “640x480p60hz”

setenv m “800x480p60hz”

setenv m “800x600p60hz”

setenv m “1024x600p60hz”

setenv m “1024x768p60hz”

setenv m “1280x800p60hz”

setenv m “1280x1024p60hz”

setenv m “1360x768p60hz”

setenv m “1440x900p60hz”

setenv m “1600x900p60hz”

setenv m “1680x1050p60hz”

setenv m “1600x1200p60hz”

setenv m “1920x1200p60hz”

setenv m “2560x1080p60hz”

setenv m “2560x1440p60hz”

setenv m “2560x1600p60hz”

setenv m “3440x1440p60hz”

HDMI BPP Mode

setenv m_bpp “32”

setenv m_bpp “24”

setenv m_bpp “16”

HDMI DVI/VGA modes

Uncomment only a single Line! The line with setenv written.

At least one mode must be selected.

setenv vout “dvi”

setenv vout “vga”

HDMI HotPlug Detection control

Allows you to force HDMI thinking that the cable is connected.

true = HDMI will believe that cable is always connected

false = will let board/monitor negotiate the connection status

setenv hpd “true”

setenv hpd “false”

Default Console Device Setting

setenv condev “console=ttyS0,115200n8 console=tty0” # on both

Meson Timer

1 - Meson Timer

0 - Arch Timer

Using meson_timer improves the video playback however it breaks KVM (virtualization).

Using arch timer allows KVM/Virtualization to work however you’ll experience poor video

setenv mesontimer “1”

Server Mode (aka. No Graphics)

Setting nographics to 1 will disable all video subsystem

This mode is ideal of server type usage. (Saves ~300Mb of RAM)

setenv nographics “0”

Monitor output

Controls if HDMI PHY should output anything to the monitor

setenv monitor_onoff “false” # true or false

CPU Frequency / Cores control

###########################################

WARNING!!! WARNING!!! WARNING!!!

Before changing anything here please read the wiki entry:

http://odroid.com/dokuwiki/doku.php?id=en:c2_set_cpu_freq

MAX CPU’s

setenv maxcpus “1”

setenv maxcpus “2”

setenv maxcpus “3”

setenv maxcpus “4”

MAX Frequency

setenv max_freq “2016” # 2.016GHz

setenv max_freq “1944” # 1.944GHz

setenv max_freq “1944” # 1.944GHz

setenv max_freq “1920” # 1.920GHz

setenv max_freq “1896” # 1.896GHz

setenv max_freq “1752” # 1.752GHz

setenv max_freq “1680” # 1.680GHz

setenv max_freq “1656” # 1.656GHz

setenv max_freq “1536” # 1.536GHz

###########################################

Boot Arguments

if test “${m}” = “custombuilt”; then setenv cmode “modeline=${modeline}”; fi

setenv bootargs “imgpart=/dev/mmcblk0p2 imgfile=/volumio_current.sqsh rootwait ro ${condev} no_console_suspend hdmimode=${m} ${comde} m_bpp=${m_bpp} vout=${vout} fsck.repair=yes net.ifnames=0 elevator=noop disablehpd=${hpd} max_freq=${max_freq} maxcpus=${maxcpus} monitor_onoff=${monitor_onoff}”

Booting

setenv loadaddr “0x11000000”
setenv dtb_loadaddr “0x1000000”
setenv initrd_loadaddr “0x13000000”

fatload mmc 0:1 ${initrd_loadaddr} uInitrd
fatload mmc 0:1 ${loadaddr} Image
fatload mmc 0:1 ${dtb_loadaddr} meson64_odroidc2.dtb
fdt addr ${dtb_loadaddr}

if test “${mesontimer}” = “0”; then fdt rm /meson_timer; fdt rm /cpus/cpu@0/timer; fdt rm /cpus/cpu@1/timer; fdt rm /cpus/cpu@2/timer; fdt rm /cpus/cpu@3/timer; fi
if test “${mesontimer}” = “1”; then fdt rm /timer; fi

if test “${nographics}” = “1”; then fdt rm /reserved-memory; fdt rm /aocec; fi
if test “${nographics}” = “1”; then fdt rm /meson-fb; fdt rm /amhdmitx; fdt rm /picdec; fdt rm /ppmgr; fi
if test “${nographics}” = “1”; then fdt rm /meson-vout; fdt rm /mesonstream; fdt rm /meson-fb; fi
if test “${nographics}” = “1”; then fdt rm /deinterlace; fdt rm /codec_mm; fi

booti ${loadaddr} ${initrd_loadaddr} ${dtb_loadaddr}
[/code]

With me it works so perfectly

@brachiopode that was the post we needed … tyvm :slight_smile:

Hi guys,

thank you for your responses.

@KKMan:
I did not realize that the HiFi Shield+ has no hardware volume setup control. However, if I set the Mixer Type to software the system freezes and I have to restart it. After restart, the Mixer Type is set to none again. Anyhow, if I can solve this problem by using the HiFi Shield 2 or another soundcard that is fine for me.

@brachiopode:
I already used an adapted boot.ini. And the display works already. What does not work is the touch function. Unfortunately my odroid doesn’t start up with your boot.ini. I do not know the reason. The only differences I can see is the HDMI BPP Mode.

Here a snippet of your boot.ini

[code]# HDMI BPP Mode

setenv m_bpp “32”

setenv m_bpp “24”

setenv m_bpp “16”[/code]

And here a snippet of my boot.ini

[code]# HDMI BPP Mode
setenv m_bpp “32”

setenv m_bpp “24”

setenv m_bpp “16”[/code]

The rest is identical. Maybe I will flash my the eMMC again and try it from scratch.

@chsims1:
I already had look at Hardkernel forums and I also have found a thread about pretty much the same problem regardin touch functionality:
https://forum.odroid.com/viewtopic.php?t=24651
However, I could not get it running on my system, yet. Don’t know what I am doing wrong. The good news is that this problem seems to be already addressed to volumio and there will be an update with a new release as I read this thread correctly. Anyhow, I would like to get this running already without new software release.

the Odroid Image has a few boot.ini’s for various Hardkernel displays (VU5/VU7/VU7+)
As the display was already working, you had it figured out.

boot.ini is irrelevant for the touch part, expect perhaps for the disable_VU7 part.
The HK displays need a corresponding hid touch driver, this display also gets connected to the usb otg port.
Our image uses the hid driver which was inserted into the Volumio-specific kernel.

As for the waveshare display, you should check the Hardkernel forum as chsims1 suggested.
There are some discussion regarding waveshare, perhaps you can get help there.

Hallo rusty.

Maybe a silly question. If you have connected the monitor only with HDMI. For the touch function, the monitor must also be connected via the Micro USB socket.

Greeting: Hans

The disable_VU7 part in the boot.ini was a good hint I think. If I understand this right, the following snippets show that the dwav_usb_mt driver is loaded for the touch screen, which is intended vor the vu7 display and does not work with the waveshare display.

volumio@volumio:~$ lsusb -t /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=dwav_usb_mt, 12M ...

volumio@volumio:~$ dmesg|grep 'usb\|hid' ... [ 5.695450] input: WaveShare WaveShare Touchscreen as /devices/platform/dwc2_a/usb2/2-1/2-1:1.0/input/input2 [ 5.701668] dwav_usb_mt 2-1:1.0: ODROID VU7 MultiTouch(800x480) ...
With Ubuntu and disable_VU7 set to “true” in boot.ini a hid-multitouch driver is loaded:

odroid@odroid64:~$ dmesg|grep 'usb\|hid' ... [ 11.277563] input: WaveShare WaveShare Touchscreen as /devices/platform/dwc2_a/usb2/2-1/2-1:1.0/0003:0EEF:0005.0001/input/input2 [ 11.277848] hid-multitouch 0003:0EEF:0005.0001: input,hidraw0: USB HID v1.11 Device [WaveShare WaveShare Touchscreen] on usb-dwc2_a-1/input0 ...

However, adding the line

setenv disable_vu7 "true" to boot.ini has no effect with volumio. It seems like this software switch, as it is available for android and ubuntu for the odroid c2, is not implemented in volumio. So now I need to find out how to load the correct driver for the display but I could not find the answer, yet.

Hello again.

I discussed this problem in the Hardkernel forum. This is the answer I got there:

https://forum.odroid.com/viewtopic.php?f=138&t=30683

Is there a possibility volumio is updated to the official Kernel sometime?
If yes, what is the time frame we are talking about?

Hi,
this could be, I have not pulled the kernel from the Hardkernel repo for ages.
There was never a real reason for it, because nothing big “audio”-related ever changed.
So now there is a reason to.
According to Murphy’s law I just built a new version yesterday, of course without Hardkernel changes.
Need to schedule a new build.

Meanwhile I will move this topic to the Community Portings Odroid section and follow up there

Edit: not working the way I wanted

So, will leave it here for the time being.

@rusty: Time frame? :laughing:
Sorry, we never give time frames unless nearly finished.
Your are talking to volunteers with jobs and family.
Consider it done when finished :mrgreen:

OK, thank you again for your help.
I’m already grateful, that you plan to resolve this issue. That is already a big help for me.
I did not want to act pushy.