Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cubox-i4: SPDIF audio is the only option #555

Closed
321liftoff opened this issue Jun 11, 2014 · 11 comments
Closed

Cubox-i4: SPDIF audio is the only option #555

321liftoff opened this issue Jun 11, 2014 · 11 comments

Comments

@321liftoff
Copy link

HDMI audio is no longer an option; the only device available within XBMC is "imx-spdif Analog" The ALSA devices don't seem to be read in correctly anymore. The following is a snippet from the early part of the log:

08:12:40 T:1957339728 NOTICE: load settings...
08:12:40 T:1957339728 ERROR: PulseAudio: Failed to connect context
08:12:40 T:1957339728 NOTICE: PulseAudio might not be running. Context was not created.
08:12:40 T:1957339728 NOTICE: Found 1 Lists of Devices
08:12:40 T:1957339728 NOTICE: Enumerated ALSA devices:
08:12:40 T:1957339728 NOTICE: Device 1
08:12:40 T:1957339728 NOTICE: m_deviceName : @
08:12:40 T:1957339728 NOTICE: m_displayName : Default (imx-spdif Analog)
08:12:40 T:1957339728 NOTICE: m_displayNameExtra:
08:12:40 T:1957339728 NOTICE: m_deviceType : AE_DEVTYPE_PCM
08:12:40 T:1957339728 NOTICE: m_channels : FL,FR
08:12:40 T:1957339728 NOTICE: m_sampleRates : 32000,44100,48000
08:12:40 T:1957339728 NOTICE: m_dataFormats : AE_FMT_S24NE4L,AE_FMT_S16NE,AE_FMT_S16LE

The log used to do this:
13:07:03 T:1956671488 NOTICE: load settings...
13:07:03 T:1956671488 ERROR: PulseAudio: Failed to connect context
13:07:03 T:1956671488 NOTICE: PulseAudio might not be running. Context was not created.
13:07:03 T:1956671488 NOTICE: CAESinkALSA::EnumerateDevice data format "AE_FMT_LPCM" on device "sysdefault:CARD=imxhdmisoc" seems to be not supported.
13:07:03 T:1956671488 NOTICE: CAESinkALSA::EnumerateDevice data format "AE_FMT_DTSHD" on device "sysdefault:CARD=imxhdmisoc" seems to be not supported.
13:07:03 T:1956671488 NOTICE: CAESinkALSA::EnumerateDevice data format "AE_FMT_TRUEHD" on device "sysdefault:CARD=imxhdmisoc" seems to be not supported.
13:07:03 T:1956671488 NOTICE: CAESinkALSA::EnumerateDevice data format "AE_FMT_EAC3" on device "sysdefault:CARD=imxhdmisoc" seems to be not supported.
13:07:03 T:1956671488 NOTICE: CAESinkALSA::EnumerateDevice data format "AE_FMT_DTS" on device "sysdefault:CARD=imxhdmisoc" seems to be not supported.
13:07:03 T:1956671488 NOTICE: CAESinkALSA::EnumerateDevice data format "AE_FMT_AC3" on device "sysdefault:CARD=imxhdmisoc" seems to be not supported.
13:07:03 T:1956671488 NOTICE: CAESinkALSA::EnumerateDevice data format "AE_FMT_AAC" on device "sysdefault:CARD=imxhdmisoc" seems to be not supported.
13:07:03 T:1956671488 NOTICE: Found 1 Lists of Devices
13:07:03 T:1956671488 NOTICE: Enumerated ALSA devices:
13:07:03 T:1956671488 NOTICE: Device 1
13:07:03 T:1956671488 NOTICE: m_deviceName : sysdefault:CARD=imxspdif
13:07:03 T:1956671488 NOTICE: m_displayName : imx-spdif
13:07:03 T:1956671488 NOTICE: m_displayNameExtra: S/PDIF
13:07:03 T:1956671488 NOTICE: m_deviceType : AE_DEVTYPE_IEC958
13:07:03 T:1956671488 NOTICE: m_channels : FL,FR
13:07:03 T:1956671488 NOTICE: m_sampleRates : 32000,44100,48000
13:07:03 T:1956671488 NOTICE: m_dataFormats : AE_FMT_AC3,AE_FMT_DTS,AE_FMT_S16NE,AE_FMT_S16LE
13:07:03 T:1956671488 NOTICE: Device 2
13:07:03 T:1956671488 NOTICE: m_deviceName : sysdefault:CARD=imxhdmisoc
13:07:03 T:1956671488 NOTICE: m_displayName : imx-hdmi-soc
13:07:03 T:1956671488 NOTICE: m_displayNameExtra: HDMI
13:07:03 T:1956671488 NOTICE: m_deviceType : AE_DEVTYPE_HDMI
13:07:03 T:1956671488 NOTICE: m_channels : FL,FR
13:07:03 T:1956671488 NOTICE: m_sampleRates : 32000,44100,48000
13:07:03 T:1956671488 NOTICE: m_dataFormats : AE_FMT_LPCM,AE_FMT_DTSHD,AE_FMT_TRUEHD,AE_FMT_EAC3,AE_FMT_DTS,AE_FMT_AC3,AE_FMT_AAC,AE_FMT_S16NE,AE_FMT_S16LE

I do notice many more devices enumerated within ASLA than there used to be:
xbian@cubox ~ $ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
default:CARD=imxspdif
imx-spdif,
Default Audio Device
sysdefault:CARD=imxspdif
imx-spdif,
Default Audio Device
dmix:CARD=imxspdif,DEV=0
imx-spdif,
Direct sample mixing device
dsnoop:CARD=imxspdif,DEV=0
imx-spdif,
Direct sample snooping device
hw:CARD=imxspdif,DEV=0
imx-spdif,
Direct hardware device without any conversions
plughw:CARD=imxspdif,DEV=0
imx-spdif,
Hardware device with all software conversions
default:CARD=imxhdmisoc
imx-hdmi-soc,
Default Audio Device
sysdefault:CARD=imxhdmisoc
imx-hdmi-soc,
Default Audio Device
dmix:CARD=imxhdmisoc,DEV=0
imx-hdmi-soc,
Direct sample mixing device
dsnoop:CARD=imxhdmisoc,DEV=0
imx-hdmi-soc,
Direct sample snooping device
hw:CARD=imxhdmisoc,DEV=0
imx-hdmi-soc,
Direct hardware device without any conversions
plughw:CARD=imxhdmisoc,DEV=0
imx-hdmi-soc,
Hardware device with all software conversions

So someone is changing something. Don't know if it has to do with this activity:
xbmc-imx6/xbmc#68

@mk01
Copy link
Member

mk01 commented Jun 12, 2014

@321liftoff

this is with the version which fixed U: resolution problem?

It was compiled directly from my own devel tree and because I see all the devices (but the logs and names changed - and you are correct, because the HD stuff) I can only assume you got version compiled just between the AudioEngine rework started but not yet all finished.

In few hours there will be new deb generated to DEVEL with already your patch, can you retest then? as even in your xbmc log could be seen that the audio outputs are there, only are not properly enumerated. the correct output should look like:

04:51:39 T:1957306960  NOTICE: Found 1 Lists of Devices
04:51:39 T:1957306960  NOTICE: Enumerated ALSA devices:
04:51:39 T:1957306960  NOTICE:     Device 1
04:51:39 T:1957306960  NOTICE:         m_deviceName      : @
04:51:39 T:1957306960  NOTICE:         m_displayName     : Default (imx-spdif Analog)
04:51:39 T:1957306960  NOTICE:         m_displayNameExtra:
04:51:39 T:1957306960  NOTICE:         m_deviceType      : AE_DEVTYPE_PCM
04:51:39 T:1957306960  NOTICE:         m_channels        : FL,FR
04:51:39 T:1957306960  NOTICE:         m_sampleRates     : 32000,44100,48000
04:51:39 T:1957306960  NOTICE:         m_dataFormats     : AE_FMT_S24NE4L,AE_FMT_S16NE,AE_FMT_S16LE
04:51:39 T:1957306960  NOTICE:     Device 2
04:51:39 T:1957306960  NOTICE:         m_deviceName      : iec958:CARD=imxspdif,DEV=0
04:51:39 T:1957306960  NOTICE:         m_displayName     : imx-spdif
04:51:39 T:1957306960  NOTICE:         m_displayNameExtra: S/PDIF
04:51:39 T:1957306960  NOTICE:         m_deviceType      : AE_DEVTYPE_IEC958
04:51:39 T:1957306960  NOTICE:         m_channels        : FL,FR
04:51:39 T:1957306960  NOTICE:         m_sampleRates     : 32000,44100,48000
04:51:39 T:1957306960  NOTICE:         m_dataFormats     : AE_FMT_AC3,AE_FMT_DTS,AE_FMT_S24NE4L,AE_FMT_S16NE,AE_FMT_S16LE
04:51:39 T:1957306960  NOTICE:     Device 3
04:51:39 T:1957306960  NOTICE:         m_deviceName      : hdmi:CARD=imxhdmisoc,DEV=0
04:51:39 T:1957306960  NOTICE:         m_displayName     : imx-hdmi-soc
04:51:39 T:1957306960  NOTICE:         m_displayNameExtra: HDMI
04:51:39 T:1957306960  NOTICE:         m_deviceType      : AE_DEVTYPE_HDMI
04:51:39 T:1957306960  NOTICE:         m_channels        : FL,FR
04:51:39 T:1957306960  NOTICE:         m_sampleRates     : 32000,44100,48000
04:51:39 T:1957306960  NOTICE:         m_dataFormats     : AE_FMT_LPCM,AE_FMT_DTSHD,AE_FMT_TRUEHD,AE_FMT_EAC3,AE_FMT_DTS,AE_FMT_AC3,AE_FMT_AAC,AE_FMT_
S16NE,AE_FMT_S16LE

@321liftoff
Copy link
Author

Yes, this is with the version that fixed the "U: 1280 x 720" resolution problem. I can't explain how this happened, as the audio was working for me to say that the resolution problem was fixed, but after a couple of power cycles, the audio gave out completely and that's when I discovered that not all the devices were being read correctly. I'll look for the new version and report back.

@belese
Copy link

belese commented Jun 15, 2014

i've got same problem now.

it work again after i follow this :
rabeeh/linux-linaro-stable-mx6-unmaintained-will-be-deleted#4

requires having a correct /usr/share/alsa/cards/imx-hdmi-soc.conf

i've copied this file (was no existant before), and it was working again.

@321liftoff
Copy link
Author

@belese
Thanks for the tip. doing the following fixes it for me, too:

wget http://onse.fi/files/cubox/imx-hdmi-soc.conf
sudo mv imx-hdmi-soc.conf /usr/share/alsa/cards/
sudo service xbmc restart

Also, doing the same for "http://onse.fi/files/cubox/imx-spdif.conf" adds a second SPDIF entry to the list, which I don't use.

Does this mean that XBIAN should include these files by default?

@belese
Copy link

belese commented Jun 16, 2014

As i understand, something has changed in kernel to support HD audio in cubox,
so probably yes, it will be needed for xbian.
but i don't understand everything in that domain, so probably @mk01 will have the right solution ;-)

@mk01
Copy link
Member

mk01 commented Jul 1, 2014

those files are part of linux-image-3.10.30 package.

root@cubox:~# dpkg -S imx-hdmi-soc.conf
linux-image-3.10.30-armmp: /usr/share/alsa/cards/imx-hdmi-soc.conf

added into version 1.0.8 on July-12 (at least according to it's timestamp)

@mk01
Copy link
Member

mk01 commented Jul 19, 2014

@321liftoff

is this still a topic? for testing go for kernel 1.0.9-1404445130 at staging or even 1.0.9-1405636465 at devel.

@321liftoff
Copy link
Author

Hmm...that's hard for me to tell because I added the file manually before you fixed some packages, so I can't speak to whether the package is working correctly. If you're confident that the issue is solved, I'll close this and if someone else has issues, they can re-open it. Let me know if you agree.

@mk01
Copy link
Member

mk01 commented Jul 19, 2014

if this was the only issue leading to SPDIF being only accessible then yes, let's close it.

just wanted to be sure there is not other stuff behind and I can leave this one at peace.

@mk01 mk01 closed this as completed Jul 19, 2014
@CurlyMoo
Copy link
Contributor

Issue is again present on kernel 3.10.51 version 1.0.3-1411580192.

@CurlyMoo
Copy link
Contributor

Likewise on 3.14.14+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants