CEC mixer / volume control

Discuss client development (or even MPD development if you feel so inclined), ask questions about the client libs, MPD feature requests from client developers, etc...
Post Reply
polyglot
Posts: 3
Joined: January 13th, 2016, 11:56 am

CEC mixer / volume control

Post by polyglot »

Hi,

I have what I suspect is a fairly common configuration: mpd running on an ARM SBC, plugged into a home-theatre receiver over HDMI. I would like to be able to control the receiver volume over CEC, which is entirely possible using the libcec API and/or cec-client (command line). That way the attenuation happens down the tail of the signal chain after the DACs, instead of smashing down the available bit-depth with a software mixer.

Does anyone know if mpd has been patched to support CEC as the mixer?

If not, I'm willing to do it but am not in any way familiar with the mpd codebase. Is there a wiki or something documenting relevant plugin interfaces and/or could someone point me at a plugin that would be a good starting-point for modification?

max
Forum team
Posts: 1024
Joined: January 15th, 2013, 3:43 pm

Re: CEC mixer / volume control

Post by max »

Write a mixer plugin.

Fux
Posts: 32
Joined: April 28th, 2013, 2:17 pm
Location: Wasserburg/Inn, Bavaria

Re: CEC mixer / volume control

Post by Fux »

You may take a look for synchronator:
https://github.com/therealmuffin/synchr ... ree/master

Synchronator maps a dummy ALSA device to serial, tcp (Beta) or i2c amplifiers for controlling the volume and/or other features. CEC may be added to synchronator or perhaps your receiver can be controlled over tcp.

Regards
Fux

polyglot
Posts: 3
Joined: January 13th, 2016, 11:56 am

Re: CEC mixer / volume control

Post by polyglot »

Fux wrote:You may take a look for synchronator:
https://github.com/therealmuffin/synchr ... ree/master

Synchronator maps a dummy ALSA device to serial, tcp (Beta) or i2c amplifiers for controlling the volume and/or other features. CEC may be added to synchronator or perhaps your receiver can be controlled over tcp.

That looks perfect, thanks.

polyglot
Posts: 3
Joined: January 13th, 2016, 11:56 am

Re: CEC mixer / volume control

Post by polyglot »

thanks. I have written a Perl hackjob which connects synchronator to cec-client. It's slow (because of the stupid remote-control dynamics implemented in my receiver), but I can now adjust my system volume from MPD clients.

Fux
Posts: 32
Joined: April 28th, 2013, 2:17 pm
Location: Wasserburg/Inn, Bavaria

Re: CEC mixer / volume control

Post by Fux »

@polyglot
Would be nice if you could publish your solution. Maybe its interesting for another one.

Post Reply