Pulse-Eight / libcec

USB CEC Adapter communication Library http://libcec.pulse-eight.com/
Other
714 stars 287 forks source link

How and when to use "audio_get_status" #637

Open chincheta0815 opened 1 year ago

chincheta0815 commented 1 year ago

I want to read out the audio volume and status from my audio system. This does work only once, after I set the system into the active audio mode, I never again get any audio status...

Are there any restrictions or thing I have to consider??? What is the purpose of that command: using it once or periodically?

satmandu commented 11 months ago

Are you planning on submitting a PR for the changes at https://github.com/chincheta0815/libcec/tree/fixes_and_additions ?

Did you figure out a way to get your audio volume and status?

Looking at the traffic in cec-client when I hit volume up on my remote I see volume go from 0:

TRAFFIC: [         1164987]     >> 05:89:10:75:00
TRAFFIC: [         1170579]     >> 05:89:10:75:01

All the way up to 100:

TRAFFIC: [         1235454]     >> 05:89:10:75:48
TRAFFIC: [         1235605]     >> 05:89:10:75:4a
TRAFFIC: [         1235708]     >> 05:89:10:75:4c
TRAFFIC: [         1235963]     >> 05:89:10:75:4e
TRAFFIC: [         1236163]     >> 05:89:10:75:50
TRAFFIC: [         1236363]     >> 05:89:10:75:52
TRAFFIC: [         1236564]     >> 05:89:10:75:54
TRAFFIC: [         1236763]     >> 05:89:10:75:56
TRAFFIC: [         1236963]     >> 05:89:10:75:58
TRAFFIC: [         1237163]     >> 05:89:10:75:5a
TRAFFIC: [         1237364]     >> 05:89:10:75:5c
TRAFFIC: [         1237563]     >> 05:89:10:75:5e
TRAFFIC: [         1237764]     >> 05:89:10:75:60
TRAFFIC: [         1237963]     >> 05:89:10:75:62
TRAFFIC: [         1238163]     >> 05:89:10:75:64

But sending volup or voldown using cec-client doesn't appear to change this.

(I have a Panasonic tv, connected to a Panasonic soundbar over CEC, and the soundbar is the primary volume source.)

audio_get_status also doesn't do anything for me....

chincheta0815 commented 11 months ago

Well, actually I do not know if I should submit a PR as there seems nobody actually to maintain libcec anymore... I collected some PR's, bugfixes and additions that I understood and that seemed reasonable and helpful to me. So far my branch is really subject to change at the moment...

Anyways, I got the get_audio_status issue solved (with my Teufel Soundbar). First of all the device (e.g. amp) needs to be set to "SYSTEM AUDIO MODE". Afterwards, you can change the volume via volup, voldown and mute via CEC.

To get a feedback there seems to be a bug/missing feature in the original code... I did a workaround/fix to get the audio status working. With the original code I only got the very first audio_status after setting the CEC device into AUDIO MODE.

Only thing: My Amp does not show any mute state due to a seemingly lacking implementation of the mute mask...

malard commented 11 months ago

Hi, we do maintain it, however we've been extremely busy at Pulse-Eight, I can get someone to review everything being requested soon

Sent from my phone


From: chincheta0815 @.> Sent: Saturday, October 14, 2023 8:00:22 AM To: Pulse-Eight/libcec @.> Cc: Subscribed @.***> Subject: Re: [Pulse-Eight/libcec] How and when to use "audio_get_status" (Issue #637)

Well, actually I do not know if I should submit a PR as there seems nobody actually to maintain libcec anymore... I collected some PR's, bugfixes and additions that I understood and that seemed reasonable and helpful to me. So far my branch is really subject to change at the moment...

Anyways, I got the get_audio_status issue solved (with my Teufel Soundbar). First of all the device (e.g. amp) needs to be set to "SYSTEM AUDIO MODE". Afterwards, you can change the volume via volup, voldown and mute via CEC.

To get a feedback there seems to be a bug/missing feature in the original code... I did a workaround/fix to get the audio status working. With the original code I only got the very first audio_status after setting the CEC device into AUDIO MODE.

Only thing: My Amp does not show any mute state due to a seemingly lacking implementation of the mute mask...

— Reply to this email directly, view it on GitHubhttps://github.com/Pulse-Eight/libcec/issues/637#issuecomment-1762670844, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAEFI54TB5KYNKPC3BPVKJTX7I2ANAVCNFSM6AAAAAA2JLJ37KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRSGY3TAOBUGQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>

chincheta0815 commented 11 months ago

Hej Martin,

thanks a lot for the reply. This was not ment to be offending. So sorry if these was a misunderstanding.

Actually I would really like to have some one to review the things. As you are busy I would probably say: Not all.

So when I am done I would put it into parts or at least clean up a little bit.

Especially the audio_status seems to have probably a missing feature/bug. Most other things I did are mainly to make the C version working…

Is that idea okay for you?

Best regards, Thanks a lot for the reply and Sorry for any misunderstandings...

Rouven

Am 14.10.2023 um 10:15 schrieb Martin Ellis @.***>:

Hi, we do maintain it, however we've been extremely busy at Pulse-Eight, I can get someone to review everything being requested soon

Sent from my phone


From: chincheta0815 @.> Sent: Saturday, October 14, 2023 8:00:22 AM To: Pulse-Eight/libcec @.> Cc: Subscribed @.***> Subject: Re: [Pulse-Eight/libcec] How and when to use "audio_get_status" (Issue #637)

Well, actually I do not know if I should submit a PR as there seems nobody actually to maintain libcec anymore... I collected some PR's, bugfixes and additions that I understood and that seemed reasonable and helpful to me. So far my branch is really subject to change at the moment...

Anyways, I got the get_audio_status issue solved (with my Teufel Soundbar). First of all the device (e.g. amp) needs to be set to "SYSTEM AUDIO MODE". Afterwards, you can change the volume via volup, voldown and mute via CEC.

To get a feedback there seems to be a bug/missing feature in the original code... I did a workaround/fix to get the audio status working. With the original code I only got the very first audio_status after setting the CEC device into AUDIO MODE.

Only thing: My Amp does not show any mute state due to a seemingly lacking implementation of the mute mask...

— Reply to this email directly, view it on GitHubhttps://github.com/Pulse-Eight/libcec/issues/637#issuecomment-1762670844, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAEFI54TB5KYNKPC3BPVKJTX7I2ANAVCNFSM6AAAAAA2JLJ37KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRSGY3TAOBUGQ. You are receiving this because you are subscribed to this thread.Message ID: @.***> — Reply to this email directly, view it on GitHub https://github.com/Pulse-Eight/libcec/issues/637#issuecomment-1762710089, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARI5HORNJP5SF4QXK5J4UDX7JCYNANCNFSM6AAAAAA2JLJ37I. You are receiving this because you authored the thread.

chincheta0815 commented 11 months ago

@malard I am coming back to our correspondence concerning reviewing all the requests by someone on your side. I am right now cleaning up a little bit and fell over a question I had when fixing some things. This question is related to outputting ther audio_status of a CEC device. (get_audio_status in cecc.h). In your last version in the master branch this outputs only the first audio status - every status afterwards else is not updated.

I Managed to update that, but: How do you wish to have it updated/how is it best?

  1. Internally in libcec so that the user should not have to cope with the correct timeouts. After a certain timeout (250ms) the function will update the status itself - the user just calls the function to her liking (e.g. https://github.com/chincheta0815/libcec/blob/90f67e9435d3f0e726340658e67ac4957f672b96/src/libcec/devices/CECAudioSystem.cpp#L178) or
  2. give an option to the user like "update" to get the latest values - here the user has to cope with the timing. (e.g. call GetAudioStatus with bUpdate = true from the user
  3. interface...) The original code does not show me the intention.

Both works, but is different in use. The solution should integrate to the rest of libcec and it's philiosophy...