HiFi Shields with Odroid C4

Hello,

Does CoreELEC 9.2.2 support HardKernel’s HiFi Shield (and HiFi Shield+) with the Odroid C4?

Booting up, I only see the following 4 options (under either aplay -l on the command line or in the gui for audio choices):

  • card 0: AMLAUGESOUND [AML-AUGESOUND], device 0: SPDIF-B-dummy dummy-0 []
  • card 0: AMLAUGESOUND [AML-AUGESOUND], device 1: TDM-B-T9015-audio-hifi T9015-audio-hifi-1 []
  • card 0: AMLAUGESOUND [AML-AUGESOUND], device 2: SPDIF-dummy dummy-2 []
  • card 0: AMLAUGESOUND [AML-AUGESOUND], device 3: TDM-C-dummy dummy-3 []

Looking at

https://wiki.odroid.com/accessory/sound/hifi_shield

implies that both are compatible with the C4, but the C4 install directions given require one to edit the Device Tree.

Thoughts or suggestions?

Thanks in advance!
Matt

[edit: wording]

Support for the HiFi Shields has not been added yet.

Does the 9.2.3 release include support for the shields? I couldn’t discern whether this part of the release announcement:

Fixed S/PDIF output on ODROID-C4

implied support.

Thanks!
Matt

No, full support for the HiFi shield is not yet included in CoreELEC, that’s just for S/PDIF.

HiFi Shield Plus, HiFi Shield 2 support will be added soon for the ODROID-C4.

I will post here to let you know as soon as it is added.

1 Like

Thanks. These little boards and the SoCs are quite amazing, and I appreciate having CoreELEC to drive them!

Any word on this?

Tonight’s Nightly build will have basic Support for the HiFi Shields on the C4.

In Settings > System > Audio
Change audio output device to ALSA:AML-AUGESOUND, PCM

Nothing else required, and this will work with all the Odroid HiFi Shields, the Odroid Boom Bonnet, and a few other 3rd party I2S DAC.

There is one main limitation and that is the HiFi Shield 2 won’t be able to use it’s Hardware volume control. So basically the same situation as with the the support for this board on the Odroid-C2.

Thanks for the quick response!

Trying nightly_20200708 with an Odroid C4 and HiFi Shield+, it is working!

There are some differences, though, compared with the behavior of the release CE on Odroid C2. Let me explain how I have that setup first…

With ALSA: AML-M8AUDIO, HDMI as the selected audio device, setup for 5.1 channels with all available bypass choices enabled, the Odroid C2 is always

  • sending 2.0 audio to the optical S/PDIF output of the shield, and
  • sending 2.0 audio to the analog (RCA) output of the shield, and
  • sending audio (2.0 or greater) to the HDMI output (which is connected to an AVR) for both bypass (movies) and multi-channel audio files.

Significantly, for multi-channel (5.1) flac playback, the HDMI output gets 5.1 audio and the S/PDIF and RCA outputs appear to get downmixed 2.0 audio. (Well, I haven’t actually verified whether they get a stereo downmix or just the left and right channels from the multi-channel flac. They do continue to get something, though.)

Ok, now to the behavior of the nightly build…

  • With ALSA: AUGESOUND, HDMI or HDMI Multi Ch selected, audio is only going to HDMI. Nothing appears to be reaching the S/PDIF or the RCA outputs.

  • With ALSA: AUGESOUND, S/PDIF selected, audio is reaching the optical S/PDIF and HDMI, and not the RCA outputs.

  • With ALSA: AUGESOUND, PCM selected, 2.0 audio is reaching both the optical S/PDIF and RCA outputs. The behavior of HDMI audio is a bit odder, though. Bypass audio (a DTS track from a movie) gets sent (all channels) to HDMI, but multi-channel flac is not. Multi-channel flac appears to only be sent to HDMI as 2.0 audio, independent of whether Kodi is setup as 2.0 or 5.1.

So, the HiFi shield is definitely alive and working in the recent nightly builds.

I don’t know if the behavior differences described above are all as intended (just due to changes from the last-released CE and C2 versus C4 changes) or if it’s still a work in-progress.

The existing behavior for the Odroid C2 – in which all outputs get something meaningful and both multi-channel audio and bypass audio gets to HDMI – is pretty ideal.

Thanks!
Matt

Note 1: I think there was some difference in behavior between selecting the default choice versus the AUGESOUND, PCM option, but I didn’t keep good enough notes on that topic. I can repeat experiments there if it would be useful.

Note 2: I should probably also note that it’s a HiFi Shield2 currently connected to the older Odroid C2. I didn’t want to disassemble that unit until things were healthier for the C4. I can do so if the change in boards would trigger different behavior.

EDITS: notes

Bump… mainly due to this observed behavior:

With ALSA: AUGESOUND, HDMI or HDMI Multi Ch selected, audio is only going to HDMI. Nothing appears to be reaching the S/PDIF or the RCA outputs.

Given the name for that choice, that doesn’t seem like the intended operation, with no output from the shield.

I’m really not sure what you are asking?

Please see my earlier post, in which I described how the various audio settings seem to be working (at least with nightly_20200708.)

For the setting I called out, ALSA:AUGESOUND and (presumably it’s an “and”) HDMI, no audio seems to be getting sent to the HiFi Shield. With that setting, HDMI audio is working, but there’s no output on either the shield’s optical S/PDIF or RCA outputs. The behavior doesn’t seem consistent with the name for that audio mode.

I described a few other behaviors as well, noting that the nightly doesn’t quite behave the same as the released CE and Odroid C2 with a shield:

[With the C2 and] ALSA: AML-M8AUDIO, HDMI as the selected audio device, setup for 5.1 channels with all available bypass choices enabled, the Odroid C2 is always

  • sending 2.0 audio to the optical S/PDIF output of the shield, and
  • sending 2.0 audio to the analog (RCA) output of the shield, and
  • sending audio (2.0 or greater) to the HDMI output (which is connected to an AVR) for both bypass (movies) and multi-channel audio files.

That behavior, having audio (well, 2-channel audio) always present on all outputs, is what I was hoping would also work for the Odroid C4.

So, I’m really just asking whether further changes are in the works for the HiFi shields.

Thanks!
Matt

edit: punctation (and speeeling)

Ok, so you want an option to enable audio output on all outputs at the same time?

by the way
[ALSA: AUGESOUND, HDMI] is meant to be HDMI audio out only.
[ALSA: AUGESOUND, SPDIF] is meant to be SPDIF audio out only.
etc…

Yes, that would be ideal and match how the C2 currently seems to behave. Is that possible with the C4?

The above is surprising to me, mainly because of the C2 behavior!

The string / text for the option names is somewhat confusing, then. For the HDMI-only option, why include the “AUGESOUND” text at all? Seems like it could just be “HDMI”.

Thanks again!
Matt

A few likely obvious observations…

Bypass audio for video playback, naturally, can go just to the selected bypass device. (For me, that would be HDMI, since that’s how the AVR is connected.)

Multi-channel PCM (e.g., 6-channel FLAC) should (for me) go to HDMI as well. The optical S/PDIF and RCA outputs seem like they should get either the raw left and right channels from that or potentially downmixed stereo. (Given the presence of the AVR, I’ve never really played with the downmixing options.)

That’s currently how I’m using the C2 and its Shield anyway.

If you need any tests run, I can certainly help.

Matt

The audio driver for G12*/SM1 (AUGE) works differently than the old MESON driver.
When we originally switched to this kernel, and after getting everything sorted with audio, you had to select the output you wanted audio to be on.
There seems to be a regression, because if you select PCM, you’re not supposed to get sound from any other output. Same goes for HDMI and for SPD/IF. I haven’t had the chance to see what exactly got broke, but it shouldn’t affect you.

For LPCM (AAC/FLAC and everything else that can’t be bitstreamed) you need the Multi-channel PCM HDMI output.
For passthrough\bitstream (at the bottom of the audio page), you need the HDMI output.
Normally, SPD\IF would be used for, well, SPDIF.
And PCM was reserved for Analogue output, like for headphones.

I was wondering how different the audio path was between the C2 and the C4. The above fills things in a little for me.

I’m still somewhat confused regarding desired behavior, though. Was the “2.0 audio to all outputs simultaneously” behavior of C2 intentional or accidental? Is the same behavior desired for C4 but just not possible given the driver change?

I’ll go see if I can educate myself some more by seeing what Google will tell me about G12*/SM1 (AUGE). :slight_smile:

Should you want any changes tested with C4 and either HiFi Shield+ or HiFi Shield2, please let me know. That offer still stands.

Thanks again,
Matt

I think it was intentional.
I don’t know if it’s desired for C4, but since it’s using a newer SoC, which uses the AUGE driver - the behavior is different.
G12 and SM1 are code names for the S905X2/S922X and S905X3 processors, what we currently refer to as “NG” or next generation. Because they’re the next generation products following the S905, S905X/D/W and S912 SoCs which used an older kernel version.

I haven’t learned much about the augesound audio driver itself, but with your pointers I did find

How We Improved AmLogic Support in Mainline Linux - BayLibre and
Linux for Amlogic — Linux for Amlogic Meson https://gitlab.com/pages/sphinx documentation

Lots to read about!

But two channel Flac should be able to be sent from the rca jacks as PCM right? For those that want to go straight into an amp.