HDMI sound?

Hi!
I have just bought my new vero 2 streamer.
i have created a topic regaring the resolution - which is stuck af 720p

but i also have no sound. i have connected the Vero 2 to my tv - through HDMI
why cant i hear any sound?

I tried to connect my USB DAC - and use that ouput. it stutters like crazy - but there is sound though.
but because i dont want the studdering sound - i would really like to use it through hdmi.

br Ronni

Hi Again!
Just did som random testing.
found out that if i - after the vero 2 is running - take the HDMI cable out and plug it in again - it will start to work.

but is this really the way it is suppose to work? i mean - should i teach my kids to take the cabe out each time they tunr on the device.

this seems very buggy.

br Ronni

Hi Again

Just did a journalctrl - and the result is here:

http://paste.osmc.io/adasikezuz

It looks like my Audio problem is related to the HDMI port somehow.
it only registers when it plug the cable out - and put it back in again.

could the hdmi port defective?

br Ronni

Hi All!
The mailman delivered my new Vero 2 today.
It is suppose to be my new htpc for displaying movies in my home cinema.

My Projectors native resolution is 1920/1080p.

But the VERO 2 boots in 720p - and i cant change the resolution.

this should be possible somehow right?

br Ronni

Hi Again!
Changed from my Projector - to my main television.
the resolution is still not working.

heres is my journalctrl:

http://paste.osmc.io/adasikezuz

i tried to add this:

echo “1080p” > /sys/class/display/mode
exit 0
to my rc.local - and it seems to work.

But why doesnt my projector NOR my tv ( samsung ) give any EDI information at all:
osmc@osmc-Cuthbert:~$ cat /sys/devices/virtual/amhdmitx/amhdmitx0/disp_cap
null edid

br Ronni

Merging your two threads.

Hello

Sorry to hear about your problems with the new Vero.

Did you try another HDMI cable?

It seems that the EDID cannot be correctly read from your display:

Nov 05 20:02:37 osmc-Cuthbert kernel: hdmitx: system: gate/pwr cmd: 4
Nov 05 20:02:37 osmc-Cuthbert kernel: hdmitx: edid: edid failed
Nov 05 20:02:37 osmc-Cuthbert kernel: hdmitx: system: gate/pwr cmd: 4
Nov 05 20:02:37 osmc-Cuthbert kernel: hdmitx: edid: edid failed

This usually suggests a bad HDMI cable. I would suggest trying another cable between the V2 and the projector.

Can you confirm that there is no AVR between these devices?

This is obviously not suggested. So let’s get to the bottom of the problem instead :slight_smile:

if the port is defective you would see no picture at all.

This usually means you have an AVR with slow EDID handshake. But projectors with really long cables can exhibit similar symptoms. If you turn on projector, amp etc first, then after 20s plug in the Vero 2, do you still experience the problem?

In rare cases, some TV / projectors do not correctly present an EDID that is parseable. We can always work around that (forcing a mode) if that is the case. Some Pi users have to do this too.

Sam

Hi Sam!
Thank you for getting back to me!

At first i tried using it with my projector - but to try something else - I tried my television instead.
regarding HDMI cables - i first tried a long one ( for my projector ) - then a medium lenght one - for my television - and lastly i also tried with the supplied cable from the Box.

None of them seems to make any difference.

As of now - i have my vero2 running in 1080p - by adding the 1080p option manually to the rc.local
so i guess - as long as i dont restart the vero box - it will work.

because - once i restart - the sound will be gone, and then i will have to take the HDMI cable out and in again.

I can confirm that i have no AVR/DVR/DAC between my Vero2 and my Television.

My tv is a normal Samsung LED tv. approx 6 years old. I can remember the model - but i doubt it will do any diffence. i have used it as a my primary display with xbmc for the last 4 years - running XMBC and Kodi - on both X86 based hardware as well as some Pi’s.

But as you can see in the log- no EDID is found when plugging in the cable.

I can live with “hardcoding” both the sound and the resolution - even though an automatic solution would be preffered.

what can i do to further enlighten the subject?

Best regards
Ronni

Did you try all 3 cables with both devices, or just one cable with the TV?

This is most odd.

Thanks for clarifying.

EDID has always been dodgy, as TV manufacturers use the same across multiple models, but you should get some output, regardless of whether it’s meaningful.

I’d be interested to know if Vero 2 picks up an EDID later, i.e. if running cat /sys/class/amhdmitx/amhdmitx0/edid returns anything. I receive this with a 1080p Optoma projector connected to a Sony AVR:

cat /sys/class/amhdmitx/amhdmitx0/edid 
Receiver Brand Name: SNY
Receiver Product Name: SONY
EDID block number: 0x1
blk0 chksum: 0xa4
Source Physical Address[a.b.c.d]: 2.4.0.0
native Mode f1, VIC (native 16):
ColorDeepSupport b8, MaxTMDSClock 40
16 4 5 3 32 18 19 20 2 17 1 31 16 
Audio {format, channel, freq, cce}
{1, 1, 7f, 7}
{1, 5, 7f, 7}
{1, 7, 7f, 7}
{2, 5, 7, 5}
{7, 5, 1f, 0}
{10, 7, 6, 0}
{12, 7, 54, 0}
{11, 7, 7e, 1}
Speaker Allocation: 5f
Vendor: c03
Rx 3D Format Support List:
{VIC FramePacking TopBottom SidebySide}
{ 16	1	1	1 }
{ 4	0	1	1 }
{ 5	1	1	1 }
{ 3	0	1	1 }
{ 32	0	1	1 }
{ 18	0	1	1 }
{ 19	0	1	1 }
{ 20	0	1	1 }
{ 2	0	1	1 }
{ 17	0	1	1 }
{ 1	0	1	1 }
{ 31	0	1	1 }
{ 16	1	1	1 }

When audio doesn’t work, the output of

cat /sys/devices/virtual/amhdmitx/amhdmitx0/aud_ch

would be good to see, compared to when it does work for you.

I suspect this, in /etc/rc.local, will get things going:

echo "hdmi_channel = 2 ch" > /sys/devices/virtual/amhdmitx/amhdmitx0/aud_ch

Let me know how you get on. I’ll take a look at this in more detail tomorrow.

Hi Again!

Ok - tried to add your suggested string to the rc.local - and did a reboot of the device.
when i rebooted - it actually turned on my television. So i gues CEC is working.

but no sound.

this the output from my console:

osmc@osmc-Cuthbert:~$ cat /sys/devices/virtual/amhdmitx/amhdmitx0/edid
Receiver Brand Name:
Receiver Product Name:
EDID block number: 0x0
blk0 chksum: 0x00
Source Physical Address[a.b.c.d]: 0.0.0.0
native Mode 0, VIC (native 0):
ColorDeepSupport 0, MaxTMDSClock 0

Audio {format, channel, freq, cce}
Speaker Allocation: 0
Vendor: 0
Rx 3D Format Support List:
{VIC FramePacking TopBottom SidebySide}

And when i do a dmesg - and grep for edit - this it what i get:

osmc@osmc-Cuthbert:~$ dmesg | grep edid
[ 0.366482] hdmitx: edid: edid failed
[ 0.366511] hdmitx: edid: edid failed
[ 3.430378] hdmitx: edid: not find mapped display mode
[ 3.433481] hdmitx: edid: not find mapped display mode
[ 12.862133] hdmitx: edid: not find mapped display mode

Regarding HDMI cables.
I have tested the one delivered - and the one i normally use with my television.
i decided not to use the device in my cinema - so instead i am only focusing on getting it to work in my living room as our daily htpc and instead use my “real” pc (x86 intel ) in my cinema room.
( i have a lot of hifi equipment - and my usb dac - do studder alot when using it with the vero 2 -).

i just did a reboot - without the hdmi_channel in the rc.local - as it did not work anyway,
and after a “normal” reboot - this is how the aud_ch looks like:

osmc@osmc-Cuthbert:~$ cat /sys/devices/virtual/amhdmitx/amhdmitx0/aud_ch
hdmi_channel = 2 ch

but still no sound.

Hello again.
just tried to take the HDMI out - and plug it in again - this is my dmesg:

[ 700.915518] hdmi detect: plug.
[ 708.410424] [amlogic_cec] amlogic_cec_irq_handler(): cec msg status: rx: 0x2; tx: 0x0
[ 708.412433] hdmitx: cec: CEC[4]: rx msg len: 3 dat: 04 8d 01
[ 708.414264] CEC: tx msg len: 3 dat: 40 8e 00
[ 708.504033] [amlogic_cec] amlogic_cec_irq_handler(): cec msg status: rx: 0x0; tx: 0x2
[ 719.138350] [amlogic_cec] amlogic_cec_irq_handler(): cec msg status: rx: 0x2; tx: 0x0
[ 719.140696] hdmitx: cec: CEC[4]: rx msg len: 4 dat: 0f 82 00 00
[ 719.323485] [amlogic_cec] amlogic_cec_irq_handler(): cec msg status: rx: 0x2; tx: 0x0
[ 719.326503] hdmitx: cec: CEC[4]: rx msg len: 6 dat: 0f 80 10 00 40 00
[ 872.163022] buf=0
[ 872.163041] IEC958_mode_raw=0
[ 872.163119] IEC958_mode_codec= 0,IEC958 type 2 CH PCM
[ 872.163125] last mode 0,now 0
[ 872.177899] ----aml_hw_iec958_init,runtime->rate=44100–
[ 872.177920] [aml-spdif-dai]enterd aml_hw_iec958_init,set_clock:4,sample_rate= 5
[ 872.177926] audio_set_958_clk, freq=5,
[ 872.177932] ----aml_hw_iec958_init,runtime->rate=44100,sample_rate=5–
[ 872.177937] iec958 mode PCM16
[ 872.177945] IEC958 16bit
[ 872.177953] hdmitx: audio: aout notify rate 44100
[ 872.177958] hdmitx: audio: aout notify size 16
[ 872.177969] hdmitx: audio: audio channel num is 1
[ 872.177980] hdmitx: audio: SPDIF
[ 872.177991] hdmitx: audio: current VIC: 16
[ 872.177995] hdmitx: audio: audio sample rate: 2
[ 872.177999] hdmitx: audio: reset audio N para
[ 872.178011] hdmitx: audio: PCM out to HDMI
[ 872.178015] hdmitx: audio: i2s_to_spdif_flag:1
[ 872.178018] hdmitx: audio: Enable audio spdif to HDMI
[ 872.178025] hdmitx: audio: Audio Type: PCM
[ 872.178069] hdmitx: audio: set audio param
[ 872.178076] [aml-spdif-dai]spdif dma f05d2000,phy addr 2dd00000
[ 872.178247] ----aml_hw_iec958_init,runtime->rate=44100–
[ 872.178258] ----aml_hw_iec958_init,runtime->rate=44100,sample_rate=5–
[ 872.178263] iec958 mode PCM16
[ 872.178269] IEC958 16bit
[ 872.178275] hdmitx: audio: aout notify rate 44100
[ 872.178279] hdmitx: audio: aout notify size 16
[ 872.178283] hdmitx: audio: no update
[ 872.178288] [aml-spdif-dai]spdif dma f05d2000,phy addr 2dd00000
[ 872.181039] [aml-spdif-dai]aiu 958 playback enable
[ 934.558810] [aml-spdif-dai]aiu 958 playback disable
[ 934.558865] ----aml_hw_iec958_init,runtime->rate=44100–
[ 934.558873] ----aml_hw_iec958_init,runtime->rate=44100,sample_rate=5–
[ 934.558880] iec958 mode PCM16
[ 934.558887] IEC958 16bit
[ 934.558893] hdmitx: audio: aout notify rate 44100
[ 934.558898] hdmitx: audio: aout notify size 16
[ 934.558902] hdmitx: audio: no update
[ 934.558907] [aml-spdif-dai]spdif dma f05d2000,phy addr 2dd00000
[ 944.560155] [aml-spdif-dai]enterd aml_spdif_play,set_clock:5,sample_rate=4
[ 944.560168] audio_set_958_clk, freq=4,
[ 944.560178] IEC958 16bit
[ 944.560185] hdmitx: audio: aout notify rate 48000
[ 944.560189] hdmitx: audio: aout notify size 16
[ 944.560197] hdmitx: audio: audio channel num is 1
[ 944.560205] hdmitx: audio: SPDIF
[ 944.560216] hdmitx: audio: current VIC: 16
[ 944.560220] hdmitx: audio: audio sample rate: 3
[ 944.560224] hdmitx: audio: reset audio N para
[ 944.560235] hdmitx: audio: PCM out to HDMI
[ 944.560239] hdmitx: audio: i2s_to_spdif_flag:1
[ 944.560243] hdmitx: audio: Enable audio spdif to HDMI
[ 944.560250] hdmitx: audio: Audio Type: PCM
[ 944.560292] hdmitx: audio: set audio param
[ 944.560299] aml_i2s_close device type 2
[ 972.480364] AO cpu runs ok.
[ 972.480984] AO cpu runs ok.
osmc@osmc-Cuthbert:~$

but i still dont have any EDID info:
osmc@osmc-Cuthbert:~$ cat /sys/devices/virtual/amhdmitx/amhdmitx0/disp_cap
null edid

Could the board on the vero be defective?

If the device is defective I suspect we would not see any output at all. Do you notice any other adverse effects?

Does cat /proc/cmdline show an hdmimode?

When you say ‘no sound’, I just want to clarify that we are referring to the same thing: menu sounds when browsing the GUI; let’s leave sound from playback for now.

I’m guessing that when HDMI doesn’t work as expected, you’ve got:

cat /sys/class/amhdmitx/amhdmitx0/hpd_state == 0, and when it does work, it == 1.

This seems to be a timing issue that I fixed for another user. But since he changed TV, I removed the commit as no one else seemed affected. I can re-add this, but a couple of things to check first.

cat /sys/class/amhdmitx/amhdmitx0/config

shows for me:

disp switch (force or edid): force
audio config: on

If it shows audio_off, you could try: echo audio_on > /sys/class/amhdmitx/amhdmitx0/config. I will improve the situation where EDID cannot be read tonight and test this situation so that:

  • Sane defaults are used (audio on)
  • We wait longer than 200ms to read the EDID.

Sam

Hi Sam!
Thanks for your reply.
Regardring HDMI - when used with my tv - i have not seen any artifacts. When using my projector ( optoma hd20 ) it turned “greenish” with a very low resolution a couple of times. But not on my tv set.

Regarding /proc/cmdline:

cat /proc/cmdline
init=/init console=ttyS0,115200n8 no_console_suspend storage=1 vdaccfg=0xa000 lo go=osd1,loaded,0x7900000,720p,full hdmimode=720p cvbsmode=576cvbs androidboot.fi rstboot=0 hdmitx= mac=08:61:60:10:4e:f3 console=tty0 consoleblank=0 osmcdev=vero 2 root=/dev/vero-nand/root hdmitx=cecf quiet

regarding hpd_state it is:

cat /sys/class/amhdmitx/amhdmitx0/hpd_state

nothing.

regarding: cat /sys/class/amhdmitx/amhdmitx0/config

this is my info:
osmc@osmc-Cuthbert:~$ cat /sys/class/amhdmitx/amhdmitx0/config
disp switch (force or edid): force
audio config: on

br Ronni

Hi again!
Just forgot.

Regardings sound /audio.
what i refer to is - that if everything is powered down - and i turn on the device
there will be no sound. The only way i can get any sounds / audio is when i deplug and replug the HDMI cable.

This is for all sounds in the system, ie. menu sounds, and audio from live tv. or tv series etc.

Br Ronni

Okay. I can try and force hpd_state=1 on for you and send you a kernel to try. I will test this scenario myself tonight.

I can see that the bootloader is detecting your display as 720p. This may be because it doesn’t offer a preferred mode.

echo audio_off > /sys/class/amhdmitx/amhdmitx0/config
echo audio_on > /sys/class/amhdmitx/amhdmitx0/config

Doesn’t help with sound at all?

Hi!
Just tried restarting the system.
nothing changes when using
echo audio_off > /sys/class/amhdmitx/amhdmitx0/config
or
echo audio_on > /sys/class/amhdmitx/amhdmitx0/config

the result is the same.

just took a new pastelog:
http://paste.osmc.io/hibifuvaxe

Hi

Thanks for your patience. This took a little longer than expected until I found the last piece of the puzzle.

I had an email from another user over the weekend. He has a projector with a long HDMI cable, and sometimes he has display issues with some devices. Unfortunately his cable is running through the wall and he does not want to re-run it. I had a look at his logs, and he has the same problem: the EDID cannot be read; and while a resolution can be hardcoded, audio was not working.

I had a further look at your logs and built a kernel here making sure that the EDID register was never read (to match your environment) and tested it. I was able to replicate the problem, as well as confirm that a hotplug event (removing + plugging in the cable) gave me sound back.

In your log you will see this line:

hdmitx: system: change to DVI mode

The kernel will try and read the IEEE standard identifier for HDMI. This is 0x000c03. This is used to determine capabilities for audio and video modes as well as colour range. I can see that on boot, if the EDID fails, the vendor ID is not set, then the code that sets up the video mode will restrict audio output.

I’ve added some sane defaults if the EDID cannot be read:

  • We set up the I2S for 44.1Khz, 2 channel PCM audio at 16-bit.
  • We set up the HDMI connected device as supporting HDMI and set the vendor ID so that later calls to set_disp_mode_auto do not limit the capabilities and then we call it so the video mode is configured properly.
  • We suppress hotplug events. If we can’t read the EDID, there’s not much point responding to hotplug events. I assume that most users will be using the device in a relatively static environment. EDID not being read and moving to another AVR or display is a serious corner case.

I’ve committed the fix:

You can test the fix by running the following commands:

wget "https://www.dropbox.com/s/qfje57ideot8wlp/vero2-image-3.10.104-3-osmc.deb?dl=1" -O vero2-kernel-EDID-fixup.deb
sudo dpkg -i vero2-kernel-EDID-fixup.deb
sudo reboot

You will still need to configure your desired video mode in /etc/rc.local, you only need the single line:

echo "1080p" > /sys/class/display/mode

I’m looking forward to your feedback. If this is good, I’ll get it included in the next OSMC update. Post a log whatever happens so that I can see if it’s working as expected.

Apologies for the long detail. Thanks for your patience while I investigated the issue.

Hi Sam!
Thank you for getting back to me.
i was on a business trip - so havent been able to test unti now.

The great news is - audio is now working - when i restart the system.

however a “funny” new issue has arrived. It is as if the patch has done something to my speakers. if i just let my system idle for 1 - 2 minutes - then it is as if there is a small “glitch” from the speakers. And if i then touch the remote - to navigate the menues - the same sound arrives a first touch.
then it changes to the normal click sound.

i am not sure that my explanation makes sense - but is is as if the sound is somehow not converted to the “click” sound but instead comes out kinda muffled.

Actually i dont care about the click sound - because i normally use kodi/osmc without the sound effects - but is the fact that the sound is there - when i just let the tv idle.

i will now try to test - to see if it also happens - when i "re"plug the hdmi cable.

i have attached my journal ctl:

http://paste.osmc.io/imusigolav

but once again - thank you very much. eveything seems to fall in its race place :slight_smile:

best of regards,
Ronni

Hello

I am glad we have made some progress with the sound. I’m not sure what the ‘glitch’ with the speakers may be. Is your device plugged directly in to the wall?

Let me know if unplugging and replugging resolves your sound issue for you. I suspect it won’t however, as I’ve disabled hotplug events when the EDID cannot be read, so this shouldn’t have an effect.

Can you try another TV temporarily to see if the issue is localised?

I will see if I can identify the issue here.

Sam

Hello

I had a think about this, and suspect that only setting the HDMI vendor is necessary. There’s a possibility before that configuring the sound manually was causing problems. I’ve removed that in this kernel, and I’ve re-enabled hotplugging, so there is now a realistic chance that unplugging and replugging the HDMI cable resolves the sound glitch for you. If it does, a log will help again and I can see what’s changing after the hotplug to address this.

wget "https://www.dropbox.com/s/b48jtwkv4shocav/vero2-kernel-soft-hdmi.deb?dl=0" -O vero2-kernel.deb
sudo dpkg -i vero2-kernel.deb
sudo reboot

Keep me posted

Sam