Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot implement ARC with current libcec #612

Open
gmsoft-tuxicoman opened this issue Sep 13, 2022 · 1 comment
Open

Cannot implement ARC with current libcec #612

gmsoft-tuxicoman opened this issue Sep 13, 2022 · 1 comment

Comments

@gmsoft-tuxicoman
Copy link

Problem :

It seems that libcec doesn't allow to implement an ARC device.
It doesn't support opcode 0xC[012345] nor does it allow to set the audio status or short audio descriptor from the API.

Moreover, I cannot implement that manually because there is no way to tell libcec that the command callback handled the command that that it should not be handled internally.

For example, if I want to answer to "RequestARCInitiated" (0xC3) with "InitiateARC" (0xC1), libcec will still send "unrecognized opcode" after my reply and also to the initial "RequestARCInitiated" message.

Possible fix 1
A simple fix would be to update the API to allow the command callback to return true or false if the command has been handled or not.
Currently, the command will be sent to the callback and the CECCommandHandler will respond to the command anyway. Unfortunately this would break all existing apps that rely on this callback.

Possible fix 2
A new commandHandler callback can be created so that applications can handle themselves CEC commands and return true/false if the command has been handled and should be ignored by the CECCommandHandler.

Possible fix 3
Another option is to fully implement ARC support in libCEC.

I can work on any of those options. IMHO option 2 is the best one at this time as it will provide additional flexibility.

@gmsoft-tuxicoman
Copy link
Author

I've implemented fix 2 in #617 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant