Audio out - only spdif

@bmillham
Tried it but after a kodi restart it was not persistent.
I will make some logging in tne next few days and upload them so it can be looked at.

thanks
Leurb

I don’t understand why tee is needed, but I think the problem could be with the single quotes:

os.system("echo audio_off | sudo tee /sys/class/amhdmitx/amhdmitx0/config")

or maybe

os.system("sudo echo audio_off > /sys/class/amhdmitx/amhdmitx0/config")

I can’t test just now.

You can’t use sudo and >

because sudo only works for the echo process
so there is no privilege to write to amhdmitx0/config.

However, IIRC, we have a udev rule to allow OSMC to access amhdmitx0/* because of Kodi, so you may be getting away with it.

Sam

Single quotes are fine. The posted script is exactly what I tested on my Vero 4K and it worked perfectly.

Yes, please post some logs. I tested the autoexec.py script on my system and it worked perfectly, even after a Kodi restart or system reboot.

Hi Guys,

Sorry for the delay but the urge is less because it works as long as I don’t reboot the Vero.
Here are the logs.
http://paste.osmc.tv/gusoradapo

I hope you can find something because it still is nog persistent.

Tia
Leurb

Hi,

 DEBUG: no profile autoexec.py (/home/osmc/.kodi/userdata/autoexec.py) found, skipping

Kodi seems unable to find autoexec.py, please confirm which directory you have placed it in and please post the contents of the file.

Thanks Tom.

Hi Tom,

Thanks for the quick reply

Path tot autoexec.py is usr/share/kodi/userdata
Contents:
mport os

os.system(‘echo audio_off | sudo tee /sys/class/amhdmitx/amhdmitx0/config’)

thanks
Leurb

Hi

It should be in /home/osmc/.kodi/userdata

not /usr/share

Sam

Hi Sam,

That did it.
Put the following in autoexec.py
import os

os.system(‘echo audio_off | sudo tee /sys/class/amhdmitx/amhdmitx0/config’)

and now it is persistent on reboots

thanks
Leurb

Brilliant

Sam

Sam,

The abve fix/solution broke with the March update.
When I now start a video stream both output get online.
If I manually set the HDMI audio off through the command line it seems oke but when I start a video I get audio on HDMI and SPDIF.

Do know what in the update broke and do you know a fix for it ?

Thanks
Leurb

HI @leurb,

there is now a config flag at

GUI Settings -> System -> Display -> Mute HDMI audio output

Have you tried this?

Hi @leurb

I’d recommend you try @JimKnopf’s suggestion.
There may be some changes with our audio improvements that could have caused this. We will check this on our side.

I think I know what this is but can’t deal with it until next week.

Hello Guys,

I didn’t know about the configuration option (wasn’t in the release notes I think).
I tried it but t didn’t fix it (did a reboot).
Should be cool if it worked because then you could change it from the gui.

I hope Grahamh finds out how to fix it ?

tia
Leurb

@Leurb Yeh, meanwhile also gave it a try (S/PDIF is not my standard setup with the Vero 4k) … but “HDMI audio mute” only works in the beginning for the GUI sounds but ends once a playback is started.
Let’s wait for fix to come …

Oke that clarifies the configuration option.
I will wait for a fix …(to bad you can’t easy go back to the january update (without re install en restore back-up)

Any progress on a fix ?

Tia
Leurb

Try this: [TESTING] Improved multi-channel PCM for Vero 4K

You should not have to re-boot for the GUI setting (in Settings - Display) to take effect, but it doesn’t take effect absolutely immediately.

This seems to work :grinning:
Will it be in the next Main update ?

Thanks
Leurb