Audio level setting

i set up a new AVR which handles all coding so transcoding isn’t needed any more but i remembered this line and somehow i can’t see the volume of kodi even when the AVR is off.
setup:
HDMI veroplus => HDMI port in-1 , TVdecoder => spdiff optical towards DVD in (AR03) HDMI towards TV.(so i can get sound on tv speakers when AVR isn’t active.)
DVDplayer in digital coax and scart to tv. (no HDMI out)
ARC is working (tv to reciever) and Yatse is controling the recievers output level.
one thing was strange: switching to hdmi1 (poort in tv) when i prest play on yatse.
probably ARC related.
now veraplus is hmdi1 and tv decoder is hdmi2. that should work.

one thing i need to investigate:
old ARV default start was less towards max output strenght then my new one. same audio amplifying specs. something caused by HDMI connection? (earlier passthrough optical spdiff or transcoded)
or is this about that volume at 100% as spoken above?)
can’t see if it’s 100%. And only thing i could do to check is disconnect AVR loop and connect HDMI direct towards the TV.
just today put together (connected the pieces) so fine tuning is in progress.

for now improvement is eminent with the new AVR.

If Kodi sees an amplifier on the CEC bus the volume controls that are accessible via keyboards and normal remote controls will only send signals via CEC and not control PCM levels which is what you were seeing before. Most of the mobile apps to control Kodi will only control the PCM levels, but it varies from app to app. You can just point your web browser to the ip address of your Vero (if your kodi web settings are not set to port 80 then you will need to enter 192.198.x.x:<port>). AFAIK all those web interfaces only control PCM so that will get you what you want.

Your AVR may be able to handle the varios DTS and Dolby formats but everything else will need to be converted to PCM (all music files for example) in Kodi. When the AVR is off, CEC stays on so it has the ability to turn devices back on. With this type of situation you would need to use more than one remote or a remote that is configured to send IR commands to the TV for Volume. Since you want to switch between using the TV internal speakers and the AVR then you would need to control volume on the TV which should automatically direct which volume it is controlling. There is no ability for a Kodi client to perform this function as TV’s don’t normally respond to CEC requests to change their volume like an AVR does.

In Kodi go to settings>system>input>peripherals>CEC>switch source to this device on startup

1 Like

Yatse controls my AVR volume via Kodi which is a good thing. (If i remember correct even with music output) my question is more i didn’t check PCM volume setting in Kodi before i swapped AVR’s. Does this matter? Or is PCM volume level default 100% when CEC is taken over? i mean do i have lower volume level output in pastthrough if PCM level is left on 70% lasttime i used it.? (i would think not but hence i am not sure i want to check.)

for now i just switched sources in tv. kodi in 1 tv in 2. if this is working it’s fine.
an other thing i need to adress to now CEC is active: (from earlier tests)

">when i start it switch to hdmi 2 and there’s no signal. So the osmc is showing with red light i am stil active.
pressing “home” does activate signal to hdmi and turn off red cross.

Sounds like you have standby on via CEC. You can configure this under Settings → Input → Peripherals."

my task is now first some testing and use and writing down strainge and misbehaviour along the way, then read in (learning) functionality’s.
make up a ideal working setup.
first change was spdiff output from TVdecoder plugged out, to plug-in in tv optical spdiff. (Netflix is a TV App not a decoder app. So no audio of netflix is brought back towards tvdecoder to output by spdiff.) worked nicely (TV-remote does control AVR volume)

thanks for the knowledge to guide me.

I’ve moved this to a new thread as the wiki thread should only be for questions specific to the guide itself. :wink:

3 Likes

Passthrough is just that, the audio tracks are sent without being touched. If the PCM volume in Kodi is less than 100% then you play something that is not DTS or Dolby, like FLAC for example, then it will have a lower level than it should. Last I checked Kodi reset that volume on reboot to 100%. I suggested you use the web interface to check. There are other ways to check, but they are more involved.

I’m having a hard time unpacking exactly what your saying/asking there. It seemed like earlier you were asking about why the source would switch. I was giving you the location of where you can disable that behavior. That also showed you where you could tweak other CEC behavior of your Vero.

Your new AVR has ARC, It sounds like you have a smart TV so that likely has ARC as well. ARC would remove the need for an optical cable from your TV to your AVR.

Kodi sets the volume to the value saved in guisettings.xml. I think you can just disable CEC, set the volume with the remote then enable CEC again and the setting will be saved.

It doesn’t

After some communication and testing with Grahamh we have figured out that it is a bit confusing how Kodi is dealing with volume on startup. Kodi is using the value last saved to disk but it only saves to disk under certain conditions and exiting or rebooting are not conditions that cause Kodi to write this setting to disk. A certain method to getting the Volume set on boot should be to set the volume during playback and then stop playback. The stopping part should cause it to write to disk.

An alternative, albeit more involved, way to set this can be done via a custom add-on. This method would allow to set a specific volume on boot which may be helpful in situations where it it only a TV and Kodi with no passthrough being used. This method would consist of making a folder in .kodi/addons/ titled service.autoexec in which you would need to place two files…

addon.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="service.autoexec" name="Autoexec Service" version="1.0.0" provider-name="your username">
	<requires>
		<import addon="xbmc.python" version="3.0.0"/>
	</requires>
	<extension point="xbmc.service" library="autoexec.py">
	</extension>
	<extension point="xbmc.addon.metadata">
		<summary lang="en_GB">Automatically run python code when Kodi starts.</summary>
		<description lang="en_GB">The Autoexec Service will automatically be run on Kodi startup.</description>
		<platform>all</platform>
		<license>GNU GENERAL PUBLIC LICENSE Version 2</license>
	</extension>
</addon>

autoexec.py

import xbmc

xbmc.executebuiltin('SetVolume(100,showvolumebar)')

In the python file the “100” is full volume. If you want it lower, use a lower number. More information about this method can be found on Kodi’s wiki [here]

This feels stupid.
I did disconnect hdmi towards reciever and connected temporaly the straight towards tv.
Disabled pasthrough to get sound on the tv. (like i had before)
Setup as before and sisabled cec on tv. Even turned of AVR completely.
Used veroplus it’s remote, (in case Yatse was reconfigured by seeing the yamaha.)
Say a straight video and audio by hdmi to tv and still no pcm volume controll.

I replicated the hardware config except changing AVR, turned it of hard, 230vac off kind. Turned off cec on my samsung tv. Disabled pasthrough in vero/kodi. Connected straight hdmi … Still no pcm volume control… :flushed:
I am lost. About checking pcm at 100% or not.

Turned off this completely, stil no pcm volume control on 2.0 mp3.

So i turned everything back on and back to original place and be done with it. Pcm volume level at 100% or not.:smirk:

I try to figure out, understand which connection does what and why.
Veroplus kodi menu:
In CEC menu:
Connected with HDMI device option 1 tv option 2 amplifier/AVR device.
I suspect veroplus => hdmi cable => AVR in => AVR out => hdmi cable => tv HDMi 1 in. Means set to option 2. Right?

To avoid CEC set veroplus in sleep mode, red cross appears on veroplus, set "when tv is shutdown " on ignore . Right?


This state AVR connect to HDMI 2 in (green box) has arc.
And TV decoder (plain internet tv provider) in HDMI 1 in STB.
When i do this and start a movie in kodi my samsung TV whiches to HDMI 1. And my reciever goes to avr 3 ( optical spdiff return for netflix app. ( does have dolby digital and 5.1 support on my samsung)

As i undercstand ARC does supports audio back towars AVR(yamaha) so i should use my tv’s ARC supported HDMI port right?
Disconnect optical wire. So only 2 hdmi cables in the tv (samsung)
Still behaviour is switch to HDMI 1 (stay on hdmi2)

When i stick HDMI cable of reciever output in Tv’s HDMI in 1 (anynet+/CEC connected) and my TVdecoder in HDMI 2 it works.
(switching to tv HDMI in port 2 disconnect anynet+/CEC)

And starting something(movie, music, serie in kodi does keep everything connected as needed.
It works but against what i think is recomended in manual of samsung.
manual of my new reciever i need to print in order to find all the details in how to setup everything.

Be back on this.

Same here, i have also a hard time to understand what’s happening. :grin:

Seriously, just type the ip address of your Vero into the web browser of your phone or PC to get to the web interface. If you don’t know what the ip address is then in Kodi check settings>system information. I know you configured Kodi to enable the web interface since you have Yatse working. If you configured the web interface to something other than port 80 you would put the ip address followed by a colon and then the port number you set (ie 192.168.0.10:2112). The volume showing there will be what you are looking to discover.

The disabling CEC would have worked if you made sure you clicked OK after changing the settings (its easy to accidently hit the back button on the remote instead) and rebooted after as that is needed for that setting to change.

Or you could post logs which would show this as well.

As for ARC I would plug everything into the AVR, make sure ARC is enabled in AVR, and TV. Check the TV and AVR manuals in case they need the HDMI cable plugged into a particular port. Make sure you are using an HDMI cable that is new enough that it supports ARC. At that point there should just need be one cable going to the TV other than the power plug and it should be able to send audio from the TV to the AVR on the same cable that the AVR is forwarding Video to the TV on.

To fix this turn everything off completely (ie at the wall). Wait a minute then turn things on again.

A post was split to a new topic: Audio and keymap setup questions


Maybe i am blind but in there nothing which shows volume level.

I think i did i will try again. :blush:
It’s no big thing but more about understanding the new configuration.
Edit: I did hit ok CEC off, and imidiately the AVR swiched to AV3 tv audio wile tvdecoder was active. So seleceted HDMI1 on tv hit play for music and poef back on tv hdmi2. Set back on hdmi 1 on ave and tv, play/ pauze toggle does no hdmi change. But yatse, veroplus remote, samsungs smartremote al can control AVR volume even with cabinet door closed. So CEC function on samsung turned off. And surprize stil i can control volumelevel of the AVR with the door closed. Plugged optical connection back in and AVR does show PCM, and volumecontrol is disconnected between tv and AVR. Turn on CEC/anynet feature on samsung back on and i control AVR volume.
(hdmi1stb and hdmi-out ave comunicating .)
AVR HDMI control off, and back to disconnecting CEC. So that’s working.( i have tv speaker volume control and a spdif pcm control from tv.)
Now veroplus and AVR.
Both CEC off. Hdmi cable as connection. AVR detect’s “music” thus 2.0. AVR shows onscreen it’s own volume level.
So last thing
I connected veroplus straight on the tv. Turned of pasthrough, so audio and video from veroplus by hmdicable towards tv. And only tv amplifier and speakers are changing volume by samsung remote. Veroplus remote does nothing.
I am baffled about the fact i can’t get PCM volume controle back in the veroplus.
Even when i total disconnect every thing except tv.
Last setting: Kodi: System, in CEC menu turn off “change source on tv when turned on”. And indeed i don’t get tv switching any more.
Connect AVR out in tv’s hmdi 2 (arc) and then i lose volume control by samsungremote. Veroplus and avr remote works.
Audio vero shows this

Conclusion hdmi1 of tv is CEC and volume control, i can use yatse, veroplus remote, ave remote and samsungremote for volume control wile watching a movie on the veroplus. (prevererd behaviour)

Device 1 samsung smart tv, does have arc and cec, anynet+.
From this,HDMI STB vs HDMI DVI vs HDMI ARC vs HDMI MHL vs HDMI Game designation, description, different | en.tab-tv.com,
STB, Set Top Box, does mean nothing else then just a label. It does support CEC.
ARC , hdmi2 on tv, does supports compressed 5.1. And lipsync correction.
Optical spdiff out, special for tv audio, aka also app related audio as in netflix. For feeding a AVR.

From samsung site:

Difference with HDMI

Both an optical cable and HDMI are connection methods that provide good sound for you. However, you may be curious about the differences between them.

First and foremost, there is no difference in sound. Whichever type you choose, they both send the same sound. Both can send multi-channel audio that is better than analogue.

The main difference between an optical cable and HDMI is the number of audio formats supported. The optical cable supports 5.1 Dolby Digital and DTS audio. HDMI supports not only 5.1 Dolby Digital and DTS audio but also Dolby Digital Plus, Dolby True HD, DTS-HD Master Audio, Dolby Atmos, and DTS:X.

My present setup means clear source split. HDMI 1 IN is veroplus, av3 (optical tv in) is tvaudio.
I need to read in about arc’s tv audiosignal indentification towards AVR. (how the AVR reacts and indentify this audio throwback of the TV without video signal.)
Reason tv decoder isn’t connected in HDMI 2 of AVR is i don’t want to have AVR always active in order to watch tv.

Device veroplus:
CECsettings, before i didn’t needed to see what’s what. (no HDMI pirt on the old AVR.) Now with the new AVR i enter a new connection level.
The veroplus does give a command " change to HDMI 1 (STB) when starting a movie. CEC related. No problem in my present setup because it’s already connected to HDMI 1. But TV’s HDMI2 has ARC and maybe i want to use that for the AVR.
So some reading has to be done to understand CEC and ARC posibilities.

device AVR: Again new connection posibilities.

  • display layout is different i need to pres “info” to toggle between fields to see if it’s DD or thrue HD or . Same for fast changing between audio preset. Small buttons old eye’s doens’t help either :yum:
    So again need to do some reading in the extended usermanual.
    Simpelst thing analoge radio, coax, would be connect and hit auto search frequency, and… Nothing. ( type of WTF? Which setting does this?) (i know radiosignal is there it worked on the old AVR.)
    Doesn’t matter that much i can use DAB as it seems.

For now everything works as i like. Now i am reading to see what’s in there to fine tune. :grin:
Be back with new info.

It is the grey section above those icons. It looks like it is all the way up.

Please don’t take this the wrong way, but it seems like you may be getting mixed up with changing different things on different devices at the same time and confusing things. For example I can’t think of any reason why turning off CEC in Kodi and hitting OK should make any action on another device trigger. This just isn’t consistent with my observations. Also anything that happens when you change CEC settings but before reboot is irrelevant as some settings take effect immediately, some need a Kodi reboot only, and some need a full system reboot. If CEC was disabled in the Vero then the OSMC remote absolutely would not control volume on another device over the CEC bus I can assure you.

The Vero’s remote is still sending CEC volume signals to the amplifier device that is still registering on the CEC bus because CEC on most devices is always on if the device is plugged in for to allow the devices to be powered back on via signals from the CEC bus. Almost no TV’s will register themselves as an amplifier device or respond to volume control signals sent over CEC. If your in the situation where you want to sometimes play audio via AVR and sometimes via TV and no use more than one remote control then whatever remote control your using will need to send volume commands to the TV directly. The OSMC remote, lacking infrared, cannot do this. There should be some configuration options between your TV and AVR such that the TV knows if the AVR is on or not (because of CEC) and will switch between the TV’s internal speakers being turned on and the volume affecting the TV speaker volume, and turning them off and sending CEC commands when the AVR is powered on.

Be aware that the TV, which kinda sorta acts as a moderator for the CEC bus can hold onto device assignments for a while after their disconnected. Just unplugging your AVR isn’t necessary going to get all the devices to kick off a new round of polling and have them agree to remove the device that was disconnected. The only way to be sure is to power all devices down and literally unplug them from the wall to be assured that no stale information is left behind. Having to do this is rare, but if you make changes to an existing setup, then it may become so.

Doesn’t your AVR have a passthrough setting?

That would be CEC activating a source on playback start. If you are already connected there then it is just the TV displaying extra info as it does refresh rate switching which is expected and normal. If ARC is enabled but the connection between the AVR and TV is wrong then some devices will switch to the wrong input. The solution here is to connect it to the ports outlined in the manual.

Just as a general comment, CEC, which is a blessing and a curse, is actually quite simple in theory. Devices talk to each other, and each is set with a type TV, amplifier, recording device, etc. There are certain requests they can send out, and certain data they will respond to. No magic, no unknowable complication. When you diagnose just keep this in mind which may help find solutions. Kodi sends out volume up on the amplifier device, if said amplifier device is there and turned on then it will probably turn the volume up. If it is off it is not. The TV isn’t going to do anything with that info as it isn’t the amplifier device. Mystery solved.

Nope, that’s true. TV (CEC AND ARC) <====> AVR (HDMI control and ARC) <=======> veroplus (CEC.) turning of CEC in veroplus dus this with volumecontrol:
TV <====>AVR=====>veroplus
Volume is 0dB in veroplus settings and the AVR just use that as plain inputsignal not PCM. So volume control does work still.
Turning off CEC in TV does still work AVR’s control. (maybe of what you said, reboot is needed to brake build up connection.
What i found difficult to grasp was if i turn off every CEC, connect hdmi straight to tv, powerdown hard (so no signal can go past in standby mode if possible.) i still didn’t get pcm volume graphics on screen. Maybe because of what you say, reboot of veroplus is needed.

Any way i think PCM is 100% (gray bar in web browser) and 0dB so no -dB which incline tuning down audiolevel.
I configured everything back to as it was.
I have no ARC of the tv i think that require using HDMI2(ARC).
I useHDMI1 (STD) which give me more control on basic things with all remotes.(good)
To get audio from tv back in the AVR i connected optical wire from tvout to TV IN in AVR. Connected AV4 (which works good.) AVR active it activate AV4 and thus audio thrue AVR and surround speakers.(tv speakers are muted) When i turn off AVR the TV speakers get active again. Works but there is a drawback is i can call it drawback (i think its’ no problem at all.) see support list of ARC and optical spdiff.

Finally the TV decoder is connected only with HDMI
So with AVR active the tv redirect TV audio from decoder towards optical output which is also av4 (i called TVaudio) ( AVR does control audio volume level.)

Only thing i need to do is select on TV hdmi 1 (veroplus) or hdmi2(tvdecoder) and if i like to have AVR come in to play turn on AVR and select hmdi1 or av4.
Because the tv, and the tvdecoder and the yamaha AVR has list of remotes IR-codes of different manufactories you can learn them to react on more then one remote.
And this is also in to play. It is multiroad communication :grin:

In my test setup veroplus hdmi tv it (volume change on veroplus remote) didn’t indeed. Because as you said veroplus remote isn’t IR it’s bluetooth i think. So it does nothing on the tv.

I explored all posible setups and found the best usable one.

Only detail left is lipsync, the tv reroute has a very tiny off sync of audio. Just enough to get noticed if you watch closely. (not enough to get anoid.)
So i think i use the TV’s lipsync setting because that’s the device who do the redirecting.

Audio Profiles lets you create a profile that is activated at startup.

https://kodi.tv/addons/matrix/script.audio.profiles

P.S. This is twice in two posts I’ve mentioned this add-on. I swear I’m not pushing an add-on I maintain. It just happens to solve the problem you’re trying to solve. '-)

Does that addon let you set a specific volume on boot? That add-on may be useful for the OP in other regards, but I didn’t know that particular task was one of them. Maybe this is an idea for a new feature. On the odd occasion you do get people with CEC in a passthrough setup where and fvolumelevel get set to <1 and the process to fix has a low WAF. I don’t know of a solution currently that is something other than make some script via the terminal to just set volume on startup.

I would ask why would anyone want to use pcm volume level for CEC modes and pasthrough of acr and DD types.?
Why is it connected somehow to each other?
Who needs to midly mute a signal which is supose to be for a standard inputport?

I assume pcm is from a control amplifier in the hardware of Vero and has a higher level of output then straight pasthrough which is probably just digital.
There is a function to lower output level for CEC modes towards AVR right?


Setting a amount of -dB lowers signal.

Volume control inside kodi is controlling a control-amp which basicly does -xdB to 100% (0dB) full amplitude control of the inputsignal towards the AVR.
Preamp => controlamp veroplus=> preamp inputsignal avr=>controlamp AVR=> outputamp to speakers
So if CEC gets active just raise PCMvolumecontrol to 100% (0dB) by force and show this in CEC menu as PCM level 100% now i think it’s that dB slider who shows the volumelevel. 0dB is full strenght 100%.
PCM control is for boosting analog signal for the AVR’s analoge input. Correct?

My problem was finding out if PCM volume controll was interacting with volume control of my AVR.(lower input signal means lower maximum output towards speakers and probably more noise in the outputsignal.
So a always visible state of PCM level inside the interface of Kodi was enough to end the search.(which was in my case also a confusing road of which setup did worked as i liked.)
And possible change to 100% of PCM level wile CEC is active if needed would be a extra.
This can be placed in the CEC menu.

edit:
Linear PCM is a signal format under which an analog
audio signal is digitized, recorded and transmitted without
using any compression.
Does this mean Vero/kodi first sets analog level and then digitalize?
So a digital file gets analoged (mp3=> music) then controlled by PCM 0-100% volumelevel and re-digitalized for output?

It does have an option to select a profile at startup (can’t remember when I added that). It’s in the Extras section and called Profile for Kodi Startup/Wake. You can also force the profile to load even if it’s currently loaded, which can be helpful if your startup profile was the last one loaded but something got changed manually. I use that exact setup to make sure the Kodi volume is set to like 90% anytime Kodi starts.

There is no CEC volume level vs PCM. CEC doesn’t know anything about the audio, not its volume, not what type of signal, nothing. There is only commands where one device can ask another device on the CEC bus to turn their volume up or down. Normally the only type of CEC device that will respond to that type of request is an amplifier type device (AVR/soundbar/preamp/etc).

Kodi can control LPCM output levels. Passthrough is literally that, the original audio track being sent out without any processing being done to it so there obviously cannot be any volume manipulation happening. In a really basic system you may have a computer monitor and a Kodi box with no passthrough and Kodi dealing with volume. Not the best, but it works, and its simple. On the complete opposite end of the spectrum an AVR that is always being used, 8 channels PCM output along with all passthrough enabled so it is dead simple and the best quality you can get from everything. In between those two setup you have everything you can imagine and more. Many to meet rather particular circumstances. I have one of my boxes set to lower the PCM volume to 80% on boot. Why would I do this when the remote directly controls the volume on the connected AVR? Because the person who normally watches TV there uses headphones and isn’t savvy enough to check the volume before they turn the headphones on and that keeps them from screaming about it being too loud. I use it basically as an audio level cap. Setups and situations can vary greatly.

I know CEC is like a fax protocoll: Bidirectional connection protocoll between devices.

The data send over is digital , so basicly sampled audio channels coded in 1 or 0.
If you want to change a audio loudnes(volume) of sound you need to make the digital signal analog and resample the analoge signals. And send that over.

Which is only posible to answer that request if the digital signal is decoded and made analoge again. (for speakers and headphones.)
To lower volume in a LPCM you need to recode the the dynamic range of the samples
Aka the highed of the puls must be altered and if al pulses are altered the same and correctly the analog signal would be only less loud and not changed. I think transcoding to ACR can do this.
Puls Coded Modulation signal can thus be digital and still changed in dynamic range.
Somewhat similair to rawfile of photo’s in a developmentprogram. The mapped photoncharge itself isn’t brightnes, the definition of the steps of the mapped charge does make the level of brighnes in the screen. For each channel of RGBG. And changing of all charges per channel the length/size of the step equal you change brightnes of the image on the monitorscreen.

Stereo music are two channels of (L)PCM so that i understand why you set PCM 80% for headphone use.

What i didn’t understand was why music, mp3 file, which is stereo 2.0 channel compressed PCMdata, doesn’t trigger the PCM volume change posibility as the compressed mp3 file is decoded back in two channels LPCM data by kodi and send over to the AVR. Right?
So pasthrough all kind Dolby digital enabled doesnt send the mp3 file through right?
So the mp3package gets unrapped(decoded) and restored in PCM audiodata before it’s send over.

Or does modi send mp3 as file and decode the AVR the mp3file? Then i understand that all volume control is gone but then Kodi’s PCM volumelevel setting doesn’t matter only thing what’s could be done is ask AVR to turndown volume a bit when it recieves a mp3file by CEC comunication protocol if thats posible.