ALSA Audio Output Devices help!

Post Reply
KnightAzul
Posts: 8
Joined: Sun Sep 22, 2019 5:44 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

ALSA Audio Output Devices help!

Post by KnightAzul » Fri Jun 19, 2020 10:48 pm

Hi,

I wonder if anyone could shed some light on the audio output devices which are listed in CoreELEC for an Odroid C2. I get the following audio output device options:
  • ALSA: Default (AML-M8AUDIO Analog), PCM
  • ALSA: AML-M8AUDIO, PCM
  • ALSA: AML-M8AUDIO, HDMI
  • PULSE: Default, Bluetooth Audio (PULSE AUDIO)
It's the first three ALSA output devices that I am interesting in knowing more about.

The first basic question is: as far as I am aware the only cabled audio out with the Odroid C2 is HDMI, there is no audio jack (maybe there is a combination of GPIO pins which could correspond to audio out) - so why do I get three ALSA output devices? Are they all mapped in hardware to HDMI?

Looking in the Kodi logs I can see the ALSA output devices:

NOTICE: Enumerated ALSA devices:
NOTICE: Device 1
NOTICE: m_deviceName : default
NOTICE: m_displayName : Default (AML-M8AUDIO Analog)
NOTICE: m_displayNameExtra: PCM
NOTICE: m_deviceType : AE_DEVTYPE_PCM
NOTICE: m_channels : FL, FR, UNKNOWN1, LFE, BL, BR, FC, BC, BLOC, BROC
NOTICE: m_sampleRates : 32000,44100,48000,88200,96000,176400,192000
NOTICE: m_dataFormats : AE_FMT_S32NE,AE_FMT_S16NE,AE_FMT_S16LE
NOTICE: m_streamTypes : No passthrough capabilities
NOTICE: Device 2
NOTICE: m_deviceName : sysdefault:CARD=AMLM8AUDIO
NOTICE: m_displayName : AML-M8AUDIO
NOTICE: m_displayNameExtra: PCM
NOTICE: m_deviceType : AE_DEVTYPE_PCM
NOTICE: m_channels : FL, FR, UNKNOWN1, LFE, BL, BR, FC, BC, BLOC, BROC
NOTICE: m_sampleRates : 32000,44100,48000,88200,96000,176400,192000
NOTICE: m_dataFormats : AE_FMT_S32NE,AE_FMT_S16NE,AE_FMT_S16LE
NOTICE: m_streamTypes : No passthrough capabilities
NOTICE: Device 3
NOTICE: m_deviceName : hdmi:CARD=AMLM8AUDIO,DEV=0
NOTICE: m_displayName : AML-M8AUDIO
NOTICE: m_displayNameExtra: HDMI
NOTICE: m_deviceType : AE_DEVTYPE_HDMI
NOTICE: m_channels : FL, FR, BL, BR, FC, LFE, SL, SR
NOTICE: m_sampleRates : 32000,44100,48000,88200,96000,176400,192000
NOTICE: m_dataFormats : AE_FMT_S16NE,AE_FMT_S16LE,AE_FMT_RAW
NOTICE: m_streamTypes : STREAM_TYPE_AC3,STREAM_TYPE_DTSHD,STREAM_TYPE_DTSHD_MA,STREAM_TYPE_DTSHD_CORE,STREAM_TYPE_DTS_1024,STREAM_TYPE_DTS_2048,STREAM_TYPE_DTS_512,STREAM_TYPE_EAC3,STREAM_TYPE_TRUEHD

I have selected each ALSA audio output device in turn in CoreELEC and they all seem play audio fine through the HDMI connection to my TV.

It looks like the first two ALSA output devices:
  • ALSA: Default (AML-M8AUDIO Analog), PCM
  • ALSA: AML-M8AUDIO, PCM
...are exactly the same and have no passthrough capabilities. What are the differences between these two options, and why is there an "analog" option if the only cabled audio out with the Odroid C2 is HDMI?

It looks like the last ALSA output device:
  • ALSA: AML-M8AUDIO, HDMI
...supports slightly different m_channels and m_dataFormats, and has passthrough capabilities with many m_streamTypes - I guess it is the TV which defines what is supported by this HDMI ALSA output device. However, if I have CoreELEC audio set to not allow audio passthrough will this option produce exactly the same audio as the first two ALSA output devices.

Thanks for any help!
KnightAzul

User avatar
cdu13a
Posts: 301
Joined: Tue Jan 20, 2015 3:33 pm
languages_spoken: english
ODROIDs: C1, C2, XU4, HC1, N2
Has thanked: 11 times
Been thanked: 82 times
Contact:

Re: ALSA Audio Output Devices help!

Post by cdu13a » Sat Jun 20, 2020 12:10 pm

So it's been a while since I looked at the audio config for the older s905 devices.

As you suspected the first two PCM entries are the same. The Default just ends up with a duplicate entry. The HDMI output is the proper one to use for HDMI audio out. The reason you get audio out no matter which of the ALSA audio output devices you select is that all audio outputs are setup in a configuration were audio data is shared between all audio outputs. I don't know the reason it is done this way since this configuration has been that way for years and was inherited from LibreELEC when the CoreELEC project was started over 2 years ago.

KnightAzul
Posts: 8
Joined: Sun Sep 22, 2019 5:44 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: ALSA Audio Output Devices help!

Post by KnightAzul » Mon Jun 22, 2020 3:03 am

Thanks for the information! That explains it, I think.

Makes me wonder why Kodi lets you select an audio output device if CoreELEC sends the audio to all devices anyway. Maybe it is just to be able to let the user access the settings for the selected output device in Kodi: number of channels, boost centre channel when downmixing, resample quality, audio passthrough, etc.

I have my Odroid C2 connected to my TV with an HDMI connection and only use the TV speakers for audio. However it seems that selecting the audio output device does make a difference:
  • ALSA: Default (AML-M8AUDIO Analog) - Audio is perfect
  • ALSA: AML-M8AUDIO, HDMI - A very very slight lip synch problem
The Kodi settings for both audio output devices (number of channels, boost centre channel when downmixing, resample quality, audio passthrough, etc.) are exactly the same.

KnightAzul

Post Reply

Return to “CoreELEC/LibreELEC - Kodi Project for C1/C2”

Who is online

Users browsing this forum: No registered users and 1 guest