Control Volume of Rasberry Pi Analogue OUt with TV remote [SOLVED]

Kodi installed on RPI2
Samsung TV controlled via Samsung TV remote (CEC codes ok)

If I go into settings, interface audio, I can change sound output
from HDMI (TV speakers) to onboard Pi analogue out).

The TV remote control can control volume levels on TV (via HDMI audio iutput)

Is it possible to configure it so it controls the volume on the Rasperry Pi analog out

Thanks in advance.

If you turn off CEC in Kodi (or it’s off or not available on your display) then the volume commands in Kodi will adjust the analog output. If CEC is working then Kodi automatically switches to sending CEC commands instead of adjusting the volume. There is no user option to change this behavior such that you can keep CEC active but retain non-CEC volume control… at least from a regular remote. There is a bit of an exception with the web interface and at least some of the smart phone Kodi remotes where their volume control will adjust Kodi’s volume instead of sending CEC.

Thanks for your help on this.
Yes disabled cec on the remote and then had to enable it again.

I have a wireless keyboard connected and that controls volume direct on kodi, so this
solves my problem. Will mark as solved