I have already asked this question on stack overflow without much luck so far, but i figured it might fair better here.
I have an android TV (Philips 49PUS6401) I want to connect a surround sound system to it which is much better quality than the built in speakers even when only being used in stereo.
however this TV separates the volume control for the master output and the headphone output, the result being that even with the in TV speakers turned off, the volume keys on the remote do not adjust the headphone volume (which i'm using as a line out)
I am planning to write a simple app to adjust the headphone volume whenever the mast volume is changed, but i can't seem to figure out how to get or set the headphone volume, as the audio manager deals with streams rather than outputs, so the only value i can get from it is the master.
How do I go about finding a way to get/set the headphone volume? I have got shell access through adb, but i cannot get root.
for reference the tv is running the latest firmware, which is android 5.1.1
I know that normally android doesn't allow control over individual audio devices, but instead uses streams, and androids hardware abstraction layer (HAL) takes care of the routing, but somehow the manufacturer of this TV has been able to split the audio and feed it out of the headphone socket and a second output simultaneously. this issue has been quite heavily commented on in forums: see here
For the time being I'm just looking for a way to access it over ADB, but long term I'm planning to write a simple app to link the volume of the main output to the volume of the headphones so I don't have to delve into a submenu (which upsets kodi-media player) in order to change the volume.
so either ADB commands or the relevant section of the android API would be welcome, i've already looked at:
and gone digging in the filesystem, i'm guessing that what i want will be hidden in the /dev part of the filesystem which i can't get at without root, but i would be glad to be wrong.