Audio: Volumio for Odroid N2

Post Reply
User avatar
gkkpch
Posts: 288
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
Has thanked: 0
Been thanked: 0
Contact:

Audio: Volumio for Odroid N2

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!
Last edited by gkkpch on Mon Apr 15, 2019 1:29 am, edited 2 times in total.

User avatar
tobetter
Posts: 3664
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 26 times
Been thanked: 114 times
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: 288
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
Has thanked: 0
Been thanked: 0
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: 288
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
Has thanked: 0
Been thanked: 0
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: 3664
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 26 times
Been thanked: 114 times
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: 84
Joined: Tue May 21, 2013 10:46 am
languages_spoken: english
ODROIDs: ODROID
Has thanked: 0
Been thanked: 6 times
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 20 times

User avatar
gkkpch
Posts: 288
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
Has thanked: 0
Been thanked: 0
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: 288
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
Has thanked: 0
Been thanked: 0
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: 288
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
Has thanked: 0
Been thanked: 0
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: 3664
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 26 times
Been thanked: 114 times
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: 288
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
Has thanked: 0
Been thanked: 0
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: 288
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
Has thanked: 0
Been thanked: 0
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: 6543
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 50 times
Been thanked: 15 times
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: 288
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
Has thanked: 0
Been thanked: 0
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: 3664
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 26 times
Been thanked: 114 times
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: 84
Joined: Tue May 21, 2013 10:46 am
languages_spoken: english
ODROIDs: ODROID
Has thanked: 0
Been thanked: 6 times
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: 288
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
Has thanked: 0
Been thanked: 0
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: 3664
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 26 times
Been thanked: 114 times
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: 288
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
Has thanked: 0
Been thanked: 0
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: 288
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
Has thanked: 0
Been thanked: 0
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.

User avatar
gkkpch
Posts: 288
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
Has thanked: 0
Been thanked: 0
Contact:

Re: Volumio for Odroid N2 (WIP)

Unread post by gkkpch » Tue Apr 02, 2019 7:54 pm

cap00k wrote:
Wed Mar 13, 2019 5:46 pm
...

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, )
...
with the latest kernel version, this appears to have changed again, I get:

Code: Select all

card 0: AMLAUGESOUND [AML-AUGESOUND], device 0: SPDIF-B-dummy dummy-0 []
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: AMLAUGESOUND [AML-AUGESOUND], device 1: TDM-C-T9015-audio-hifi T9015-audio-hifi-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
This is a little complicated, it means every time the device sequence changes I have to have Volumio's Alsa Card configuration modified as well.

elatllat
Posts: 1351
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 5 times
Been thanked: 18 times
Contact:

Re: Volumio for Odroid N2 (WIP)

Unread post by elatllat » Wed Apr 03, 2019 2:33 am

The kernel has had "Persistent block device naming" for a while, there must be way do it in alsa ("name:dummy-0" instead of "card:0,device:0")

cap00k
Posts: 84
Joined: Tue May 21, 2013 10:46 am
languages_spoken: english
ODROIDs: ODROID
Has thanked: 0
Been thanked: 6 times
Contact:

Re: Volumio for Odroid N2 (WIP)

Unread post by cap00k » Wed Apr 03, 2019 6:44 pm

Sorry gkkpch,
We changed it to problem of setting default-sink of pulseaudio
We will keep this setting.
I apologize for the inconvenience.

User avatar
gkkpch
Posts: 288
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
Has thanked: 0
Been thanked: 0
Contact:

Re: Volumio for Odroid N2 (WIP)

Unread post by gkkpch » Wed Apr 03, 2019 6:56 pm

elatllat wrote:
Wed Apr 03, 2019 2:33 am
The kernel has had "Persistent block device naming" for a while, there must be way do it in alsa ("name:dummy-0" instead of "card:0,device:0")
That would be really cool, but 'm not aware of anything like that.
As we are doing Volumio for a number of different devices, often with different kernels, incl. the old 3.4.y/ 3.10.y/ 3.14.y, this would not really help us just now.
We map the card names per device to "pretty" audio output names, with this we will be ok as long as the alsa name setting is "stable" for a given device (which @cap00k now promised for the N2).

User avatar
gkkpch
Posts: 288
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
Has thanked: 0
Been thanked: 0
Contact:

Re: Volumio for Odroid N2 (WIP)

Unread post by gkkpch » Wed Apr 03, 2019 6:57 pm

cap00k wrote:
Wed Apr 03, 2019 6:44 pm
Sorry gkkpch,
We changed it to problem of setting default-sink of pulseaudio
We will keep this setting.
I apologize for the inconvenience.
No problem, we've fixed it.
Thanks for your quick response.

User avatar
gkkpch
Posts: 288
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
Has thanked: 0
Been thanked: 0
Contact:

Re: Volumio for Odroid N2 (WIP)

Unread post by gkkpch » Thu Apr 04, 2019 4:42 am

There are still issues with USB Audio, stopping us from releasing.

When connecting a mediocre XMOS usb audio device to a working XU4 volumio device with kernel 4.14.y
(or various other devices with perhaps different kernels) I get something like:

Code: Select all

[  173.955713] usb 3-1.1: new high-speed USB device number 3 using xhci-hcd
[  174.060298] usb 3-1.1: New USB device found, idVendor=20b1, idProduct=000a
[  174.065727] usb 3-1.1: New USB device strings: Mfr=1, Product=3, SerialNumber=0
[  174.073093] usb 3-1.1: Product: HIFI-Ref
[  174.076907] usb 3-1.1: Manufacturer: XMOS 
[  174.109829] snd_usb_audio: unknown parameter 'nrpacks' ignored
[  174.288734] usbcore: registered new interface driver snd-usb-audio
(ignore the nrpacks issue, solved, not related)
or with a specific. dsd-capable device like Khadas Toneboard:

Code: Select all

174.288734] usbcore: registered new interface driver snd-usb-audio
[  393.936608] usb 3-1.1: USB disconnect, device number 3
[  428.403567] usb 3-1.1: new high-speed USB device number 4 using xhci-hcd
[  428.508169] usb 3-1.1: New USB device found, idVendor=20b1, idProduct=000a
[  428.513592] usb 3-1.1: New USB device strings: Mfr=1, Product=3, SerialNumber=0
[  428.520878] usb 3-1.1: Product: Khadas Tone Control
[  428.525725] usb 3-1.1: Manufacturer: XMOS
However, the N2 does not seem to recognise any of them properly:
Mediocre XMOS

Code: Select all

[  759.576953] usb 1-1.2: new high-speed USB device number 6 using xhci-hcd
[  759.874368] usb 1-1.2: Unsupported device
Khadas

Code: Select all

[  477.207754] usb 1-1.2: new high-speed USB device number 5 using xhci-hcd
[  478.027605] usb 1-1.2: Unsupported device
Funny enough, alsa does recognise (example Khadas):

Code: Select all

volumio@volumio-n2:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: AMLAUGESOUND [AML-AUGESOUND], device 0: SPDIF-B-dummy dummy-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: AMLAUGESOUND [AML-AUGESOUND], device 1: TDM-C-T9015-audio-hifi T9015-audio-hifi-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
card 1: Control [Khadas Tone Control], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
but playback soon fails, only returns after hard reset.

I'm stuck with this as I have not seen this from any other arm board and/or kernel so far, therefore have no idea where to start looking.
Could you guys please verify with connecting an XMOS device (or any other) and have a look?

User avatar
odroid
Site Admin
Posts: 31322
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 47 times
Been thanked: 180 times
Contact:

Re: Volumio for Odroid N2 (WIP)

Unread post by odroid » Thu Apr 04, 2019 9:18 am

To narrow down root causes, please try an OTG-to-Host cable with the micro-USB port something like this.
https://www.hardkernel.com/shop/usb2-0-otg-cable/

We will try to find a USB 2.0 high-speed sound card to reproduce the issue.

cap00k
Posts: 84
Joined: Tue May 21, 2013 10:46 am
languages_spoken: english
ODROIDs: ODROID
Has thanked: 0
Been thanked: 6 times
Contact:

Re: Volumio for Odroid N2 (WIP)

Unread post by cap00k » Thu Apr 04, 2019 5:54 pm

@gkkpch,
This is because CONFIG_USB_ANNOUNCE_NEW_DEVICES in the N2 defconfig is disabled.
It does not mean that the sound card is not recognized.

Code: Select all

CONFIG_USB_ANNOUNCE_NEW_DEVICES:

 Say Y here if you want the USB core to always announce the
 idVendor, idProduct, Manufacturer, Product, and SerialNumber
 strings for every new USB device to the syslog.  This option is 
 usually used by distro vendors to help with debugging and to 
 let users know what specific device was added to the machine 
 in what location.

 If you do not want this kind of information sent to the system
 log, or have any doubts about this, say N here.

 Symbol: USB_ANNOUNCE_NEW_DEVICES [=n] 
 Type  : boolean                
 Prompt: USB announce new devices 
   Location: 
     -> Device Drivers 
       -> USB support (USB_SUPPORT [=y]) 
         -> Support for Host-side USB (USB [=y])
   Defined at drivers/usb/core/Kconfig:4  
   Depends on: USB_SUPPORT [=y] && USB [=y]
I have enabled CONFIG_USB_ANNOUNCE_NEW_DEVICES and tried connecting two types of USB sound cards.

1'st XMOS usb audio device, I get something like:

Code: Select all

[   37.118649] usb 1-1.4: new high-speed USB device number 6 using xhci-hcd
[   37.243026] usb 1-1.4: New USB device found, idVendor=20b1, idProduct=2013
[   37.243033] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   37.243036] usb 1-1.4: Product: XMOS USB Audio 2.0
[   37.243038] usb 1-1.4: Manufacturer: XMOS 
[   37.243040] usb 1-1.4: SerialNumber: 0000
2'nd USB Audio Adapter, https://www.hardkernel.com/shop/usb-audio-adapter/

Code: Select all

[  180.990550] usb 1-1.3: new full-speed USB device number 7 using xhci-hcd
[  181.115254] usb 1-1.3: New USB device found, idVendor=0d8c, idProduct=000c
[  181.115261] usb 1-1.3: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[  181.115264] usb 1-1.3: Product: C-Media USB Headphone Set 
It is an ALSA device list when two uab-audio are connected.

Code: Select all

root@odroid:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: AMLAUGESOUND [AML-AUGESOUND], device 0: SPDIF-B-dit-hifi dit-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: AMLAUGESOUND [AML-AUGESOUND], device 1: TDM-C-T9015-audio-hifi T9015-audio-hifi-1 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: AMLAUGESOUND [AML-AUGESOUND], device 2: SPDIF-dit-hifi dit-hifi-2 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: X20 [XMOS USB Audio 2.0], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Set [C-Media USB Headphone Set], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
I've tried playing a wave file through an XMOS USB audio with aplay.

Code: Select all

root@odroid:~# aplay -Dhw:1,0 /media/usb/44100-2ch-Lost\ Stars.wav 
Playing WAVE '/media/usb/44100-2ch-Lost Stars.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
aplay: set_params:1299: Sample format non available
Available formats:
- S32_LE
root@odroid:~# aplay -Dplughw:1,0 /media/usb/44100-2ch-Lost\ Stars.wav                                                                                
Playing WAVE '/media/usb/44100-2ch-Lost Stars.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo

cap00k
Posts: 84
Joined: Tue May 21, 2013 10:46 am
languages_spoken: english
ODROIDs: ODROID
Has thanked: 0
Been thanked: 6 times
Contact:

Re: Volumio for Odroid N2 (WIP)

Unread post by cap00k » Thu Apr 04, 2019 6:03 pm

Code: Select all

[  759.874368] usb 1-1.2: Unsupported device
This message is due to AMLOGIC's USB debugging code.
https://github.com/hardkernel/linux/blo ... 2225-L2228

User avatar
gkkpch
Posts: 288
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
Has thanked: 0
Been thanked: 0
Contact:

Re: Volumio for Odroid N2 (WIP)

Unread post by gkkpch » Fri Apr 05, 2019 4:23 pm

@cap00k: ah, that explains why the alsa configuration works.
I'll re-compile the kernel and hope this helps narrowing down the issue.
@odroid: that is worth a try, otg cable should not be a problem, I should have a few.

User avatar
gkkpch
Posts: 288
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
Has thanked: 0
Been thanked: 0
Contact:

Re: Volumio for Odroid N2

Unread post by gkkpch » Sat Apr 06, 2019 7:18 am

All that ends well...
Most issues have been resolved, ready for release :D :D

I uploaded the latest Volumio version to
https://oph.mdrjr.net/gkkpch/Volumio-2. ... n2.img.zip
It will be on our forum's community portings, section Odroid/ Odroid N2, as a newly supported Volumio version.

Notes
This version supports audio formats up to 32bit/384kHz on Headphones/ Line Out.
SPDIF Audio Out remains untested as I have not had time (and urge) yet to solder the pins on the J7 header.
HDMI Audio Out should be okay.

DSD formats will work too on Line Out/ Headphones, but only with the resampler.
Please refer to the playback options and activate the resampler with 32bit/ 384kHz.
Appears to work well.

For USB Audio: this has been tested with everything up to 32bit/384kHz, including DSD64/ DSD128/ DSD256
Deactivate the resampler!

(DAC:standalone Khadas Tone Board)

DSD Support

This is what we currently have on the N2 kernel with DSD Support:
With the patched kernel versions, most XMOS, Thesycon and Mytek devices will be detected in a generic way.
So in case the device has a vendor ID 0x20b1, 0x152a or 0x25ce then DSD-direct is supported.
That is why they are not explicitly mentioned in the following list of devices with DSD-direct capabilities:

With altsetting 2:

Code: Select all

iFi Audio micro/nano iDSD
AURALiC VEGA
Wyred 4 Sound DAC-2 DSD
Matrix Audio X-SPDIF 2
Matrix Audio X-Sabre
Matrix Audio Mini-i Pro
OPPO HA-1
OPPO Sonica
OPPO UDP-205
LH Labs VI DAC Infinity
Pro-Ject Pre Box S2 Digital
With altsetting 3:

Code: Select all

SMSL D1 DAC
Encore mDSD
Hegel HD12 DSD
NuPrime DAC-10
Furutech ADL Stratos
NuPrime Audio DAC-9 
Bryston BDA3 
Gustard DAC-X20U 
Denafrips Ares DAC 
DIYINHK DSD DXD 384kHz USB to I2S/DSD 
Lsounds I2SoverUSB
Eastern El. MiniMax Tube DAC Supreme 
Aune X1S 32BIT/384 DSD DAC
Unison Research Unico CD Due
CH Precision C1 DAC
Singxer F-1 converter board 
OPPO HA-2
HDTA Serenade DSD 
M2Tech Young MkIII 
PS Audio NuWave DAC
Audiolab M-DAC+
W4S DAC-2v2SE 
Mutec MC3+ USB
MSB Technology
Amanero - Combo384 
T+A DAC8DSD-V2.0, MP1000E-V2.0, MP2000R-V2.0, MP2500R-V2.0, MP3100HV-V2.0 
T+A USB HD Audio 1
T+A USB HD Audio 2

User avatar
odroid
Site Admin
Posts: 31322
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 47 times
Been thanked: 180 times
Contact:

Re: Volumio for Odroid N2

Unread post by odroid » Sat Apr 06, 2019 9:14 am

Nice!
Glad to hear this initial release can support the DSD formats up to 256. :o

User avatar
gkkpch
Posts: 288
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
Has thanked: 0
Been thanked: 0
Contact:

Re: Volumio for Odroid N2

Unread post by gkkpch » Sun Apr 07, 2019 5:51 am

We now have an official Odroid Community release.

volumio-2.569-2019-04-06-odroidn2

Changelog:
- First version, boots from SD and eMMC
- Supports myVolumio with Tidal and Qobuz

Known issues:
- Will not boot from SPI, hangs while starting the kernel.
Likely due to the use of our initramfs
- We're not "Roon Ready" yet, but are working on it.

If someone knows or suggests a way to solve the SPI issues, allowing multiboot including Volumio, that would be super super cool.
I would be prepared putting a lot of (test) time in!

Goldman256
Posts: 1
Joined: Sat Jun 01, 2019 6:48 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Audio: Volumio for Odroid N2

Unread post by Goldman256 » Sat Jun 01, 2019 6:50 pm

The original Raspberry Pi was the first mass-market 'single board' computer that kicked off a small computing revolution in terms of hardware interaction via GPIO, experimental monitoring, automation, and robotics projects, etc.

elatllat
Posts: 1351
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 5 times
Been thanked: 18 times
Contact:

Re: Audio: Volumio for Odroid N2

Unread post by elatllat » Mon Jun 03, 2019 3:46 am

@odroid can we get https://wiki.odroid.com/odroid-n2/os_images/third_party filled in, or move some of the non-OS threads out of viewforum.php?f=179 ?

User avatar
n2qcn
Posts: 30
Joined: Sat Dec 01, 2018 12:38 pm
languages_spoken: english
ODROIDs: H2 N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Audio: Volumio for Odroid N2

Unread post by n2qcn » Mon Jun 03, 2019 4:11 am

volumio-2.569-2019-04-06-odroidn2 booted well on an eMMC once I figured out the HDMI to DVI-D converter wasn't passing an image. Tested HDMI and Dragonfly black output but will use the headphone into an amp with hardware volume and the DAC mixer long term. The linear ramp starting at 20 worked best as the natural curve yielded a tiny workable range.

Tried to install the touch display plugin and got this error:

Code: Select all

Setting up keyboard-configuration (1.123) ...
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
debconf: falling back to frontend: Readline
Configuring keyboard-configuration
----------------------------------

Please select the layout matching the keyboard for this machine.
which after finding https://volumio.github.io/docs/User_Manual/SSH.html was able to

Code: Select all

sudo dpkg --configure -a
then used the webGUI to uninstall and reinstall the touch display plugin and it worked as expected (and is kinda cool!)

am also getting these errors ever minute

Code: Select all

Jun 02 16:14:48 volumio volumio[3527]: Invalid card number.
might it be related to the enumeration of the auto devices:

Code: Select all

**** List of PLAYBACK Hardware Devices ****
card 0: AMLAUGESOUND [AML-AUGESOUND], device 0: SPDIF-B-dummy dummy-0 []
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: AMLAUGESOUND [AML-AUGESOUND], device 1: TDM-C-T9015-audio-hifi T9015-audio-hifi-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
but by far most annoying thing is the loud pop switching between sources (pandora/WebRadio Stations/TuneIn) and rebooting. Enough to put my TPA3250 amp into protection mode.

Is there a way to auto mute between sources?

User avatar
n2qcn
Posts: 30
Joined: Sat Dec 01, 2018 12:38 pm
languages_spoken: english
ODROIDs: H2 N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Audio: Volumio for Odroid N2

Unread post by n2qcn » Mon Jun 03, 2019 5:12 am

hmm, can't seem to get the hardware mixer type with the LineOut any longer. perhaps my testing was clouded by an external Dragonfly DAC and browser cache?

What's the preferred way to use volume on a N2 with volumio?

Post Reply

Return to “Other OS”

Who is online

Users browsing this forum: No registered users and 2 guests