You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No, I haven't had anyone asking for audio status, so I haven't looked into it. If you can explain briefly what you're trying to do, I might be able to help.
Audio status is only loosely implemented in the HDMI-CEC specification itself. It rarely (never?) works on TV's and only works on things like sound bars. We need better implementation in the HDMI spec itself before it can really be implemented in an API like this IMHO.
I know this is an old thread but I'd love to get an absolute volume reading. From what I have gathered the code that i need to evaluate is 15:71 (recorder to audio): "Give Audio Status"
Returns 51:8e e.g. indicating that the volume is 14 and its muted -> hex sum of 80 + an integer of 0..127.
This would be amazing to have because for my application I need an absolute volume scale.
@trainman419 I have been able to do this using cec-client but I am not able to drive this from python...so this is where your python package came in ;)
I poked around a little bit on this issue. You can add a wrapper for the libcec "GetAudioStatus" function without too much trouble, but as discussed here, libcec caches the first result and keeps returning it forever.
The path of least resistance is probably to ask the audio system for the audio status directly, add a handler to grab the response, and cast the resulting parameter from bytes to int. For example, when I run the following...
Activity
trainman419 commentedon Mar 7, 2023
No, I haven't had anyone asking for audio status, so I haven't looked into it. If you can explain briefly what you're trying to do, I might be able to help.
utdream commentedon Oct 3, 2023
Audio status is only loosely implemented in the HDMI-CEC specification itself. It rarely (never?) works on TV's and only works on things like sound bars. We need better implementation in the HDMI spec itself before it can really be implemented in an API like this IMHO.
r1ckdu commentedon Jan 16, 2024
I know this is an old thread but I'd love to get an absolute volume reading. From what I have gathered the code that i need to evaluate is 15:71 (recorder to audio): "Give Audio Status"
Returns 51:8e e.g. indicating that the volume is 14 and its muted -> hex sum of 80 + an integer of 0..127.
This would be amazing to have because for my application I need an absolute volume scale.
@trainman419 I have been able to do this using cec-client but I am not able to drive this from python...so this is where your python package came in ;)
nderr commentedon May 15, 2024
I poked around a little bit on this issue. You can add a wrapper for the libcec "GetAudioStatus" function without too much trouble, but as discussed here, libcec caches the first result and keeps returning it forever.
The path of least resistance is probably to ask the audio system for the audio status directly, add a handler to grab the response, and cast the resulting parameter from bytes to int. For example, when I run the following...
...I get the following output.
utdream commentedon May 17, 2024
Yuk. That really sucks that libcec does that. I like your implementation of asking the device directly. Thank you!