Volumio for Odroid N2 (WIP)

Post Reply
User avatar
gkkpch
Posts: 281
Joined: Mon Feb 25, 2013 11:47 pm
languages_spoken: english, dutch, german
ODROIDs: Odroid-C1+, Odroid-C1+ HiFi shield, Odroid-C1, Odroid-X2
Location: Switzerland
Contact:

Volumio for Odroid N2 (WIP)

Unread post by gkkpch » Mon Feb 25, 2019 12:13 am

The N2 arrived early this week but there was no time to use it until today.
I built a first version "Volumio for Odroid N2" (WIP), in case someone wants to play with it:
https://oph.mdrjr.net/gkkpch/
Pls. be careful with headphones, see below :mrgreen:

- Kernel configuration: needed to add "CONFIG_FHANDLE=y" to get systemd working properly.
I suggest HK makes this option default
- Built u-boot from the repo (without changes)
- Tested with eMMC and SD (using UUIDs for the different partitions)
- eth0 and wlan0 (RTL8812AU, incl. AP Mode) are both working

Though Volumio seems to work OK, there are some Issues with the alsa configuration.
It seems somewhat "broken, alsamixer (and amixer) aren't working, as there are no mixer defaults.
So the image has no volume control!

User avatar
tobetter
Posts: 2807
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Contact:

Re: Volumio for Odroid N2 (WIP)

Unread post by tobetter » Mon Feb 25, 2019 12:39 am

@ghkpch, thank you for your great contribution, "CONFIG_FHANDLE" will be included.

User avatar
gkkpch
Posts: 281
Joined: Mon Feb 25, 2013 11:47 pm
languages_spoken: english, dutch, german
ODROIDs: Odroid-C1+, Odroid-C1+ HiFi shield, Odroid-C1, Odroid-X2
Location: Switzerland
Contact:

Re: Volumio for Odroid N2 (WIP)

Unread post by gkkpch » Mon Feb 25, 2019 2:18 am

I just created a new version 0.002 with support for a wide range of USB Audio DSD-capable devices.

@tobetter: please see the patch file for HK kernel 4.9.y on http://oph.mdrjr.net/gkkpch.
This is my backport from 4.19.y, it has been tested on other sbc platforms too.
Others may want to use this, so it would be nice if this gets merged into the HK kernel.

Note: like the C2, Volumio has a 64-bit kernel and a 32-bit rootfs

User avatar
gkkpch
Posts: 281
Joined: Mon Feb 25, 2013 11:47 pm
languages_spoken: english, dutch, german
ODROIDs: Odroid-C1+, Odroid-C1+ HiFi shield, Odroid-C1, Odroid-X2
Location: Switzerland
Contact:

Re: Volumio for Odroid N2 (WIP)

Unread post by gkkpch » Thu Feb 28, 2019 5:06 am

realising this is not top priority yet, the lack of hardware volume control is going to be an issue.
For Volumio, software volumio control is unacceptable as it changes SQ.

I looked at some other images for the N2 (ubuntu minimal, meverics's stretch), they all seem to have the same issue, amixer and alsamixer throw an error

Code: Select all

volumio@volumio-odroid-n2:~$ amixer                                            
amixer: Mixer default load error: Invalid argument
volumio@volumio-odroid-n2:~$ alsamixer
cannot load mixer controls: Invalid argument
volumio@volumio-odroid-n2:~$ 
There is something wrong with the alsa controls configuration, somehow amixer and alsamixer are not able to pick up the defaults.

I did find that mixer controls do work using amixer commands directly:

Code: Select all

volumio@volumio-odroid-n2:~$ amixer cset name='DAC Digital Playback Volume' 220
numid=1,iface=MIXER,name='DAC Digital Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=255,step=0
  : values=220,220
  | dBscale-min=-952.50dB,step=3.75dB,mute=1
@tobetter: were you able to look at the patch mentioned in my previous note?
HK does not have to merge, it just might serve other USB audio N2 users...

-- Gé --

User avatar
tobetter
Posts: 2807
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Contact:

Re: Volumio for Odroid N2 (WIP)

Unread post by tobetter » Thu Feb 28, 2019 5:37 am

gkkpch wrote:realising this is not top priority yet, the lack of hardware volume control is going to be an issue.
For Volumio, software volumio control is unacceptable as it changes SQ.

I looked at some other images for the N2 (ubuntu minimal, meverics's stretch), they all seem to have the same issue, amixer and alsamixer throw an error

Code: Select all

volumio@volumio-odroid-n2:~$ amixer                                            
amixer: Mixer default load error: Invalid argument
volumio@volumio-odroid-n2:~$ alsamixer
cannot load mixer controls: Invalid argument
volumio@volumio-odroid-n2:~$ 
There is something wrong with the alsa controls configuration, somehow amixer and alsamixer are not able to pick up the defaults.

I did find that mixer controls do work using amixer commands directly:

Code: Select all

volumio@volumio-odroid-n2:~$ amixer cset name='DAC Digital Playback Volume' 220
numid=1,iface=MIXER,name='DAC Digital Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=255,step=0
  : values=220,220
  | dBscale-min=-952.50dB,step=3.75dB,mute=1
@tobetter: were you able to look at the patch mentioned in my previous note?
HK does not have to merge, it just might serve other USB audio N2 users...

-- Gé --
Hi, obviously we had looked the patch and it just seems to add USB devices. Since we do not have any of them, we cannot test but will merge. Thank you for the patch. Also let me remind the guy who had worked for alas thing on N2.

Tapatalk wishes you to have fun with ODROID.


cap00k
Posts: 72
Joined: Tue May 21, 2013 10:46 am
languages_spoken: english
ODROIDs: ODROID
Contact:

Re: Volumio for Odroid N2 (WIP)

Unread post by cap00k » Tue Mar 05, 2019 4:28 pm

gkkpch wrote:
Thu Feb 28, 2019 5:06 am
realising this is not top priority yet, the lack of hardware volume control is going to be an issue.
For Volumio, software volumio control is unacceptable as it changes SQ.

I looked at some other images for the N2 (ubuntu minimal, meverics's stretch), they all seem to have the same issue, amixer and alsamixer throw an error

Code: Select all

volumio@volumio-odroid-n2:~$ amixer                                            
amixer: Mixer default load error: Invalid argument
volumio@volumio-odroid-n2:~$ alsamixer
cannot load mixer controls: Invalid argument
volumio@volumio-odroid-n2:~$ 
There is something wrong with the alsa controls configuration, somehow amixer and alsamixer are not able to pick up the defaults.

I did find that mixer controls do work using amixer commands directly:

Code: Select all

volumio@volumio-odroid-n2:~$ amixer cset name='DAC Digital Playback Volume' 220
numid=1,iface=MIXER,name='DAC Digital Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=255,step=0
  : values=220,220
  | dBscale-min=-952.50dB,step=3.75dB,mute=1
@tobetter: were you able to look at the patch mentioned in my previous note?
HK does not have to merge, it just might serve other USB audio N2 users...

-- Gé --
Hi, gkkpch
I noticed that the ALSA simple mixer control does not work with the amixer and alsamixer commands.
So, I have created a patch for troubleshooting.
Please apply the attached patch file and try it again.
Attachments
Mixer-patch.zip
(2.53 KiB) Downloaded 8 times

User avatar
gkkpch
Posts: 281
Joined: Mon Feb 25, 2013 11:47 pm
languages_spoken: english, dutch, german
ODROIDs: Odroid-C1+, Odroid-C1+ HiFi shield, Odroid-C1, Odroid-X2
Location: Switzerland
Contact:

Re: Volumio for Odroid N2 (WIP)

Unread post by gkkpch » Tue Mar 05, 2019 11:02 pm

I can see the mixers with alsamixer and amixer (and Volumio).
Unfortunately, now mixer "DAC Digital" gives no sound at all.

User avatar
gkkpch
Posts: 281
Joined: Mon Feb 25, 2013 11:47 pm
languages_spoken: english, dutch, german
ODROIDs: Odroid-C1+, Odroid-C1+ HiFi shield, Odroid-C1, Odroid-X2
Location: Switzerland
Contact:

Re: Volumio for Odroid N2 (WIP)

Unread post by gkkpch » Wed Mar 06, 2019 7:39 am

The muted sound issue may have other causes.
I just noticed that the kernel version has been bumped to 4.9.160, my original image version was based on 4.9.156.
Tomorrow I will verify anew and report back.

User avatar
gkkpch
Posts: 281
Joined: Mon Feb 25, 2013 11:47 pm
languages_spoken: english, dutch, german
ODROIDs: Odroid-C1+, Odroid-C1+ HiFi shield, Odroid-C1, Odroid-X2
Location: Switzerland
Contact:

Re: Volumio for Odroid N2 (WIP)

Unread post by gkkpch » Wed Mar 06, 2019 11:56 pm

Edit I have to correct, after applying the second patch, a new image only works on a fresh install.
After a reboot, there is no more sound, getting the mute state with amixer shows "unmuted" (value 0)
End edit

@cap00k: decided to do it step-by-step, re-cloned the repo and added the first patch.
This allows setting mute using amixer, but only this way:

Code: Select all

amixer cset name='LINE_OUT mute' on       (or '1')
amixer cset name='LINE_OUT mute' off      (or '0')
But not this way (which is what Volumio uses due to the card number being dynamic))

Code: Select all

amixer -c0 sset 'LINE_OUT mute' on
amixer -c0 sset 'LINE_OUT mute' off
The second patch adds volume control, so briliant, we are nearly there!!!

Something else, I assume that the second device shown by aplay -l is HDMI?
Has that been tested?

Code: Select all

volumio@volumio:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: AMLAUGESOUND [AML-AUGESOUND], device 0: TDM-C-T9015-audio-hifi T9015-audio-hifi-0 []
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: AMLAUGESOUND [AML-AUGESOUND], device 1: SPDIF-B-dummy dummy-1 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: AMLAUGESOUND [AML-AUGESOUND], device 2: SPDIF-dummy dummy-2 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

User avatar
tobetter
Posts: 2807
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Contact:

Re: Volumio for Odroid N2 (WIP)

Unread post by tobetter » Thu Mar 07, 2019 1:55 am

@gkkpch, @cap00k had tested the feature again and he said it's been fixed after updating new BSP from AMLogic, and the updates are uploaded to Hardkernel's Github. Would you please try out the update?
https://github.com/hardkernel/linux/tree/odroidn2-4.9.y

User avatar
gkkpch
Posts: 281
Joined: Mon Feb 25, 2013 11:47 pm
languages_spoken: english, dutch, german
ODROIDs: Odroid-C1+, Odroid-C1+ HiFi shield, Odroid-C1, Odroid-X2
Location: Switzerland
Contact:

Re: Volumio for Odroid N2 (WIP)

Unread post by gkkpch » Thu Mar 07, 2019 7:26 am

keen to check this out next thing tomorrow (CET) , will pull and report back, good to know you and @cap00k are on it.

Regards - Gé

User avatar
gkkpch
Posts: 281
Joined: Mon Feb 25, 2013 11:47 pm
languages_spoken: english, dutch, german
ODROIDs: Odroid-C1+, Odroid-C1+ HiFi shield, Odroid-C1, Odroid-X2
Location: Switzerland
Contact:

Re: Volumio for Odroid N2 (WIP)

Unread post by gkkpch » Thu Mar 07, 2019 8:07 pm

No joy with the latest kernel (4.9.162), it won't compile properly anymore.
Here is an extract of the log, before that I only see some normal compiler warnings, nothing that points to something odd

Code: Select all

  LD      vmlinux
  SORTEX  vmlinux
  SYSMAP  System.map
  OBJCOPY arch/arm64/boot/Image
  Building modules, stage 2.
  MODPOST 1259 modules
ERROR: "trace_android_fs_dataread_wrap" [fs/f2fs/f2fs.ko] undefined!
ERROR: "trace_android_fs_datawrite_wrap" [fs/f2fs/f2fs.ko] undefined!
scripts/Makefile.modpost:107: recipe for target '__modpost' failed
make[1]: *** [__modpost] Error 1
Makefile:1330: recipe for target 'modules' failed
make: *** [modules] Error 2
Saving to odroidn2 on NAS
  INSTALL crypto/async_tx/async_memcpy.ko
cp: cannot stat ‘crypto/async_tx/async_memcpy.ko’: No such file or directory
  INSTALL crypto/async_tx/async_pq.ko
cp: cannot stat ‘crypto/async_tx/async_pq.ko’: No such file or directory
  INSTALL crypto/async_tx/async_raid6_recov.ko
cp: cannot stat ‘crypto/async_tx/async_raid6_recov.ko’: No such file or directory
  INSTALL crypto/async_tx/async_tx.ko
cp: cannot stat ‘crypto/async_tx/async_tx.ko’: No such file or directory
  INSTALL crypto/async_tx/async_xor.ko

User avatar
rooted
Posts: 6435
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Contact:

Re: Volumio for Odroid N2 (WIP)

Unread post by rooted » Thu Mar 07, 2019 9:52 pm

For the time being if you don't need f2fs disable it and it should compile.

Why is an Android filesystem enabled anyway?

User avatar
gkkpch
Posts: 281
Joined: Mon Feb 25, 2013 11:47 pm
languages_spoken: english, dutch, german
ODROIDs: Odroid-C1+, Odroid-C1+ HiFi shield, Odroid-C1, Odroid-X2
Location: Switzerland
Contact:

Re: Volumio for Odroid N2 (WIP)

Unread post by gkkpch » Fri Mar 08, 2019 7:04 am

@rooted, thanks for confirming, that was what i did in the end ...

@tobetter/cap00k, things appear to work perfectly only on first boot, but after a reboot sound is gone.
There is still something odd with the alsa configuration, never seen this before therefore have no idea where to start looking.

For reference you can test with the image on http://oph.mdrjr.net/gkkpch, current version is 0.003
Just select a webradio (e.g.volumio selection, absolut relax) and play. works fine
After a reboot you will notice sound is gone...

User avatar
tobetter
Posts: 2807
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Contact:

Re: Volumio for Odroid N2 (WIP)

Unread post by tobetter » Fri Mar 08, 2019 8:30 am

gkkpch wrote:@rooted, thanks for confirming, that was what i did in the end ...

@tobetter/cap00k, things appear to work perfectly only on first boot, but after a reboot sound is gone.
There is still something odd with the alsa configuration, never seen this before therefore have no idea where to start looking.

For reference you can test with the image on http://oph.mdrjr.net/gkkpch, current version is 0.003
Just select a webradio (e.g.volumio selection, absolut relax) and play. works fine
After a reboot you will notice sound is gone...
That's odd...let us try your image today. And sorry for the error, I was able to build without an error although I don't know if F2FS is required.

Tapatalk wishes you to have fun with ODROID.


cap00k
Posts: 72
Joined: Tue May 21, 2013 10:46 am
languages_spoken: english
ODROIDs: ODROID
Contact:

Re: Volumio for Odroid N2 (WIP)

Unread post by cap00k » Wed Mar 13, 2019 5:46 pm

@gkkpch Sorry for the delay.
I've reviewed the issue of sound is gone after reboot.
I found a problem while save and restore the mixer settings.
kernel update will be released by soon.

Code: Select all

volumio@volumio:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: AMLAUGESOUND [AML-AUGESOUND], device 0: TDM-C-T9015-audio-hifi T9015-audio-hifi-0 []
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: AMLAUGESOUND [AML-AUGESOUND], device 1: SPDIF-B-dummy dummy-1 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: AMLAUGESOUND [AML-AUGESOUND], device 2: SPDIF-dummy dummy-2 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
First device : line-out (3.5pi audio jack)
Second device : spdif to hdmi output
Third device : spdif output (External 7 Pin GPIOA_11, )

To use third device, you must connect the spdif transmitter as in C2.
https://wiki.odroid.com/odroid-c2/appli ... ctor/spdif

User avatar
gkkpch
Posts: 281
Joined: Mon Feb 25, 2013 11:47 pm
languages_spoken: english, dutch, german
ODROIDs: Odroid-C1+, Odroid-C1+ HiFi shield, Odroid-C1, Odroid-X2
Location: Switzerland
Contact:

Re: Volumio for Odroid N2 (WIP)

Unread post by gkkpch » Thu Mar 14, 2019 5:28 pm

Thanks for your support, I will monitorvthe kernel repo and rebuild when the changes have been merged.

For using spdif via a coax connectuon, what would the wiring look like? 2 Wires, one connected to GND and the other one to the spdif pin with a resistor inbetween?

User avatar
tobetter
Posts: 2807
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Contact:

Re: Volumio for Odroid N2 (WIP)

Unread post by tobetter » Thu Mar 14, 2019 5:35 pm

gkkpch wrote:
Thu Mar 14, 2019 5:28 pm
Thanks for your support, I will monitorvthe kernel repo and rebuild when the changes have been merged.

For using spdif via a coax connectuon, what would the wiring look like? 2 Wires, one connected to GND and the other one to the spdif pin with a resistor inbetween?
The kernel branch is updated with two commits for Audio by @cap00k.
[1] https://github.com/hardkernel/linux/com ... 9395756440
[2] https://github.com/hardkernel/linux/com ... c7c16d7b2a

User avatar
gkkpch
Posts: 281
Joined: Mon Feb 25, 2013 11:47 pm
languages_spoken: english, dutch, german
ODROIDs: Odroid-C1+, Odroid-C1+ HiFi shield, Odroid-C1, Odroid-X2
Location: Switzerland
Contact:

Re: Volumio for Odroid N2 (WIP)

Unread post by gkkpch » Thu Mar 14, 2019 9:07 pm

Yes! it appears to work fine with these patches.
Now I will change the Volumio configuration to have AMLAUGESOUND recognized as a multi device sound card, then we will have HDMI and SPDIF out as well.
And fix the IR remote configuration (which is still missing)

User avatar
gkkpch
Posts: 281
Joined: Mon Feb 25, 2013 11:47 pm
languages_spoken: english, dutch, german
ODROIDs: Odroid-C1+, Odroid-C1+ HiFi shield, Odroid-C1, Odroid-X2
Location: Switzerland
Contact:

Re: Volumio for Odroid N2 (WIP)

Unread post by gkkpch » Fri Mar 15, 2019 9:37 pm

@tobetter,

While testing USB Audio with DSD today, I noticed that the following patch has not been applied on HK's 4.9.y
Could you please forward it, I tried it here and it eliminates the popping noise at the start.

Edit: Please wait, I discovered further issues with usb audio, probably not related, but just to make sure.
ALSA: usb-audio: Eliminate noise at the start of DSD playback

I also noticed the driver has a number of issues with different audio formats, especially Hi-Res ones.
When a device does not support DSD, the DSD audio stream should automatically be played over PCM (DoP).
However, with the AML-AUGESOUND card this only works with a lot of white noise (hissing) and low volume. (tested with DSD64 and DSD128).
When I re-sample the tracks to 384kHz/ 32bit, then everything is fine.

Post Reply

Return to “Other OS”

Who is online

Users browsing this forum: No registered users and 1 guest