24bit / 192kHz output on C4 with Shield 2

Post Reply
dual-o
Posts: 13
Joined: Wed Jul 03, 2019 12:12 am
languages_spoken: english, german
ODROIDs: C2, C4, N2, N2+, H2
Location: Germany
Has thanked: 0
Been thanked: 1 time
Contact:

24bit / 192kHz output on C4 with Shield 2

Post by dual-o »

Hello,

I have installed the Shield 2 on my Odroid C4 successfully.
At the moment I run mopidy and toslink output to AVR.

I find out that I have not output signal with Hi-Res Flacs with 24bit / 192kHz.
Flacs play very well:
  • 16 bit and 44,1 kHz sampling rate
  • 24 bit and 88,2 kHz sampling rate
  • 24 bit and 96 kHz sampling rate
Only 24bit /192kHz files have no output. (Checked the input signal on my AVR)
Just for tests... on a nvidia shield the same file can be played over hdmi.

Has anybody tested the Odroidc4 + Shield 2 with 24bit/192kHz flacs?

Thanks in advanced

User avatar
odroid
Site Admin
Posts: 38159
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2045 times
Been thanked: 1221 times
Contact:

Re: 24bit / 192kHz output on C4 with Shield 2

Post by odroid »

Which OS and Kernel version do you use?

dual-o
Posts: 13
Joined: Wed Jul 03, 2019 12:12 am
languages_spoken: english, german
ODROIDs: C2, C4, N2, N2+, H2
Location: Germany
Has thanked: 0
Been thanked: 1 time
Contact:

Re: 24bit / 192kHz output on C4 with Shield 2

Post by dual-o »

Ohhh sorry the newest Ubuntu from the odroid page.

User avatar
odroid
Site Admin
Posts: 38159
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2045 times
Been thanked: 1221 times
Contact:

Re: 24bit / 192kHz output on C4 with Shield 2

Post by odroid »

As far as I remember, we used 'aplay' command line to test 192Khz/24bit output function.
We will test it again and let you know results.

dual-o
Posts: 13
Joined: Wed Jul 03, 2019 12:12 am
languages_spoken: english, german
ODROIDs: C2, C4, N2, N2+, H2
Location: Germany
Has thanked: 0
Been thanked: 1 time
Contact:

Re: 24bit / 192kHz output on C4 with Shield 2

Post by dual-o »

Thanks for the fast reply. Looking forward for a solution :)

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

Re: 24bit / 192kHz output on C4 with Shield 2

Post by cap00k »

Hi,
I tested it on ubuntu-20.04-4.9-mate-odroid-c4-hc4-20210128.img
I didn't install mpd, I tested it using Quod Libet apps.
I modified the config.ini file to enable hifishield2 dtbo, and modified Quod Libet file->preferences->Playback->Output pipeline:: "alsasink device=hw:1,0".

The information of the tested file is as follows.
Screenshot at 2021-05-06 06-46-10.png
Screenshot at 2021-05-06 06-46-10.png (95.76 KiB) Viewed 1153 times
Screenshot at 2021-05-06 06-45-42.png
Screenshot at 2021-05-06 06-45-42.png (101.88 KiB) Viewed 1153 times
Both played well.

Code: Select all

odroid@odroid:~$ cat /proc/asound/card1/pcm0p/sub0/hw_params 
access: RW_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 192000 (192000/1)
period_size: 1920
buffer_size: 32768
Can I share the files I used for testing?

dual-o
Posts: 13
Joined: Wed Jul 03, 2019 12:12 am
languages_spoken: english, german
ODROIDs: C2, C4, N2, N2+, H2
Location: Germany
Has thanked: 0
Been thanked: 1 time
Contact:

Re: 24bit / 192kHz output on C4 with Shield 2

Post by dual-o »

Thanks for Testing.
my alsaoutput config is "alsasink device=hw:0,0" because of TOSLINK output. Can you test the toslink output with your setup?

When I play 24bit / 192kHz this is my debug output ... (no input signal on my AVR). The format: S16_LE seems strange to me

Code: Select all

sudo cat /proc/asound/card0/pcm0p/sub0/hw_params
access: RW_INTERLEAVED
format: S16_LE
subformat: STD
channels: 2
rate: 192000 (192000/1)
period_size: 1920
buffer_size: 38400

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

Re: 24bit / 192kHz output on C4 with Shield 2

Post by cap00k »

ok,
I replaced it with "alsasink device=hw:0,0" and tested it.
I was able to reproduce the issue.
Can you build the kernel?
Apply the following to build the kernel and test it.
If this patch fixes it, it will be reflected in the kernel update.

Code: Select all

diff --git a/sound/soc/codecs/spdif_transmitter.c b/sound/soc/codecs/spdif_transmitter.c
index eff9219d0a7c..9ac394c77f54 100644
--- a/sound/soc/codecs/spdif_transmitter.c
+++ b/sound/soc/codecs/spdif_transmitter.c
@@ -26,8 +26,8 @@
 
 #define STUB_RATES     SNDRV_PCM_RATE_8000_192000
 #define STUB_FORMATS   (SNDRV_PCM_FMTBIT_S16_LE | \
-                       SNDRV_PCM_FMTBIT_S20_3LE | \
-                       SNDRV_PCM_FMTBIT_S24_LE)
+                       SNDRV_PCM_FMTBIT_S24_LE | \
+                       SNDRV_PCM_FMTBIT_S32_LE)
 
 static const struct snd_soc_dapm_widget dit_widgets[] = {
        SND_SOC_DAPM_OUTPUT("spdif-out"),
Attachments
spdif-bit-depth.zip
(460 Bytes) Downloaded 20 times

dual-o
Posts: 13
Joined: Wed Jul 03, 2019 12:12 am
languages_spoken: english, german
ODROIDs: C2, C4, N2, N2+, H2
Location: Germany
Has thanked: 0
Been thanked: 1 time
Contact:

Re: 24bit / 192kHz output on C4 with Shield 2

Post by dual-o »

I've never done this before. Do you have a good doc for this?
Anyway a kernel update on Odroid's side would be nice.

thanks for your tests and work!

User avatar
odroid
Site Admin
Posts: 38159
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2045 times
Been thanked: 1221 times
Contact:

Re: 24bit / 192kHz output on C4 with Shield 2

Post by odroid »

dual-o wrote:
Sat May 08, 2021 10:10 pm
I've never done this before. Do you have a good doc for this?
https://wiki.odroid.com/odroid-c4/softw ... d-c4ubuntu

dual-o
Posts: 13
Joined: Wed Jul 03, 2019 12:12 am
languages_spoken: english, german
ODROIDs: C2, C4, N2, N2+, H2
Location: Germany
Has thanked: 0
Been thanked: 1 time
Contact:

Re: 24bit / 192kHz output on C4 with Shield 2

Post by dual-o »

I've done the kernel build, thanks for the help.
This is the debug output, but still no sound

Code: Select all

root@odroid-audio:~# cat /proc/asound/card0/pcm0p/sub0/hw_params 
access: RW_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 192000 (192000/1)
period_size: 1920
buffer_size: 32768
My AVR gives me a "unknown Input Signal" too

dual-o
Posts: 13
Joined: Wed Jul 03, 2019 12:12 am
languages_spoken: english, german
ODROIDs: C2, C4, N2, N2+, H2
Location: Germany
Has thanked: 0
Been thanked: 1 time
Contact:

Re: 24bit / 192kHz output on C4 with Shield 2

Post by dual-o »

can I do some more testing to get any process on this issue?

gkkpch
Posts: 328
Joined: Mon Feb 25, 2013 11:47 pm
languages_spoken: english, dutch, german
ODROIDs: Odroid N2, Odroid C2, Odroid XU4, Odroid-C1+, Odroid-C1, Odroid-X2, HiFi Shield, HiFi Shield+, HiFi Shield 2
Location: Switzerland
Has thanked: 3 times
Been thanked: 15 times
Contact:

Re: 24bit / 192kHz output on C4 with Shield 2

Post by gkkpch »

@odroid/ cap00k: never tested this with 24/192 flac, I must admit.
Will set up a test for Volumio OS (kernel 4.9.241) to verify (and help testing)

Edit
Confirmation that it does not work with Volumio either...

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

Re: 24bit / 192kHz output on C4 with Shield 2

Post by cap00k »

Thanks for testing and checking.
I will try to solve this problem as soon as possible.

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

Re: 24bit / 192kHz output on C4 with Shield 2

Post by cap00k »

hi,
Tested with a file downloaded from here (24/192KHz).
http://www.2l.no/hires/index.html?

However, all downloaded files has no problems in both HDMI output and SPDIF output.
I used the latest Ubuntu image, and the kernel with the above patches applied.
Can you share the test conditions and the files you used for your tests?

Post Reply

Return to “I2S Devices (HiFi Shield DAC and Stereo Boom Bonnet Kit)”

Who is online

Users browsing this forum: No registered users and 1 guest