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

Additional CEC command needed to make active source audio work on my system #103

Open
adq opened this Issue Jun 15, 2015 · 12 comments

Comments

Projects
None yet
5 participants
@adq

adq commented Jun 15, 2015

Hi. just upgraded my system to a Samsung TV (CEC 0.0.0.0), a Yamaha AV RVX377 receiver (CEC 1.0.0.0), and a pulse eight usb/hdmicec adaptor (CEC 1.1.0.0) attached to my media pc running xbmc under Arch linux. I'm using external 5.1 speakers on the yamaha, and never use the TV speakers.

Problem: video works fine, but I can't heard any sound on initial boot! Only way to force it to work is to manually turn the Yamaha AV off and on again once everything has started up. Then I can hear sound perfectly.

Playing around, I found that the Yamaha appears to be routing sound to the TV speakers by default rather than its own speakers, and none of the "set active source" commands XBMC sends makes it change it.

I've been playing around this evening, and found if I send the command: 15:70:11:00, the yamaha switches its output from the TV to the speakers attached to it and all is good. (this is the CEC System Audio Mode Request command, telling it to use 1.1.0.0 (the cec adapter) as the source.

I don't know if this is a libcec or an xbmc problem (or just some weird combination of equipment). I did look at the XBMC source, but it doesn't seem to send raw CEC commands; just uses the C++ API exposed by this library, hence I'm posting here to start with.

I can obviously send this to my receiver manually on startup (I do now!), but thought I should open a ticket to report this corner case in case it is useful.

@opdenkamp

This comment has been minimized.

Show comment
Hide comment
@opdenkamp

opdenkamp Jul 2, 2015

Contributor

the problem is actually caused by the tv, which should send this command. are you sure that you've enabled the external speakers in the TV's settings?

Contributor

opdenkamp commented Jul 2, 2015

the problem is actually caused by the tv, which should send this command. are you sure that you've enabled the external speakers in the TV's settings?

@opdenkamp opdenkamp added the question label Jul 6, 2015

@jabbas

This comment has been minimized.

Show comment
Hide comment
@jabbas

jabbas Jul 22, 2015

I have exactly same issue, but with RX-V477 with libcec-3.0.1 and kodi 15rc2.

External speakers are enabled in the TV settings, volume change is working but there is no sound :(

(turning Yamaha off and on again fixes sound, but...)

jabbas commented Jul 22, 2015

I have exactly same issue, but with RX-V477 with libcec-3.0.1 and kodi 15rc2.

External speakers are enabled in the TV settings, volume change is working but there is no sound :(

(turning Yamaha off and on again fixes sound, but...)

@opdenkamp

This comment has been minimized.

Show comment
Hide comment
@opdenkamp

opdenkamp Jul 22, 2015

Contributor

Can you pastebin Kodi's debug log with component logging for the CEC
component enabled.

On 22-07-15 10:46, Grzegorz Dzięgielewski wrote:

I have exactly same issue, but with RX-V477 with libcec-3.0.1 and kodi
15rc2.

External speakers are enabled in the TV settings, volume change is
working but there is no sound :(


Reply to this email directly or view it on GitHub
#103 (comment).

Contributor

opdenkamp commented Jul 22, 2015

Can you pastebin Kodi's debug log with component logging for the CEC
component enabled.

On 22-07-15 10:46, Grzegorz Dzięgielewski wrote:

I have exactly same issue, but with RX-V477 with libcec-3.0.1 and kodi
15rc2.

External speakers are enabled in the TV settings, volume change is
working but there is no sound :(


Reply to this email directly or view it on GitHub
#103 (comment).

@jabbas

This comment has been minimized.

Show comment
Hide comment
@jabbas

jabbas Jul 22, 2015

I found an "temporary" solution: Set TV Speakers to the Receiver, but this makes sound routed from kodi to tv and from tv to the avr and it's reencoded by the TV, so even when i'm listenening to the stereo material i'm getting 5.1 stream to the avr.

Here's a log (with tv speakers set to external) - i've injected lines with additional information to easier find things (search for ^KODI): http://pastebin.com/ySNKvi96

jabbas commented Jul 22, 2015

I found an "temporary" solution: Set TV Speakers to the Receiver, but this makes sound routed from kodi to tv and from tv to the avr and it's reencoded by the TV, so even when i'm listenening to the stereo material i'm getting 5.1 stream to the avr.

Here's a log (with tv speakers set to external) - i've injected lines with additional information to easier find things (search for ^KODI): http://pastebin.com/ySNKvi96

@jabbas

This comment has been minimized.

Show comment
Hide comment
@jabbas

jabbas Jul 22, 2015

Uhm... here's an correct logfile: http://pastebin.com/zX9V9AfM - i've added manually one line that shows when i'm powering off and on the avr.

jabbas commented Jul 22, 2015

Uhm... here's an correct logfile: http://pastebin.com/zX9V9AfM - i've added manually one line that shows when i'm powering off and on the avr.

@jabbas

This comment has been minimized.

Show comment
Hide comment
@jabbas

jabbas Sep 22, 2015

Sending '15:70:11:00' is needed (at least in Samsung+Yamaha environment). Setting speakers to 'external' doesn't change anything...

Here's a cec-client log: http://pastebin.com/tVjjtDEr

Samsung asks the Yamaha for system audio status, Yamaha returns that is 'off' and that's it...

TRAFFIC: [           24290] >> 05:7d
TRAFFIC: [           24378] >> 50:7e:00

jabbas commented Sep 22, 2015

Sending '15:70:11:00' is needed (at least in Samsung+Yamaha environment). Setting speakers to 'external' doesn't change anything...

Here's a cec-client log: http://pastebin.com/tVjjtDEr

Samsung asks the Yamaha for system audio status, Yamaha returns that is 'off' and that's it...

TRAFFIC: [           24290] >> 05:7d
TRAFFIC: [           24378] >> 50:7e:00
@malard

This comment has been minimized.

Show comment
Hide comment
@malard

malard Sep 24, 2015

Member

it seems the AVR doesnt care which is the sender, given your sending it as LA1 does it work also if you send it as 05:70:11:00 ?

Member

malard commented Sep 24, 2015

it seems the AVR doesnt care which is the sender, given your sending it as LA1 does it work also if you send it as 05:70:11:00 ?

@jabbas

This comment has been minimized.

Show comment
Hide comment
@jabbas

jabbas Sep 24, 2015

Yep, it doesn't care.

jabbas commented Sep 24, 2015

Yep, it doesn't care.

@malard

This comment has been minimized.

Show comment
Hide comment
@malard

malard Sep 24, 2015

Member

okay so perhaps we should add this @opdenkamp to our list of quirks modes?

Member

malard commented Sep 24, 2015

okay so perhaps we should add this @opdenkamp to our list of quirks modes?

@jabbas

This comment has been minimized.

Show comment
Hide comment
@jabbas

jabbas Sep 24, 2015

Anyway... i've tested this with Kodi and the whole block which should powerup avr explicitly (and my code) isn't executed by kodi...
when doing as in cec-client it works like a charm... And i can't find any 'scheduling' in kodi logs.

jabbas commented Sep 24, 2015

Anyway... i've tested this with Kodi and the whole block which should powerup avr explicitly (and my code) isn't executed by kodi...
when doing as in cec-client it works like a charm... And i can't find any 'scheduling' in kodi logs.

@jabbas

This comment has been minimized.

Show comment
Hide comment
@jabbas

jabbas Sep 24, 2015

Okie, i've checked... the AVR Isn't available while we are doing both things. Here's a few lines of log with log message added by me:

19:28:20 T:140577223993088   DEBUG: CecLogMessage - Recorder 1 (1) was already marked as active source
19:28:20 T:140577223993088   DEBUG: CecLogMessage - >> source activated: Recorder 1 (1)
19:28:20 T:140577223993088   DEBUG: CecLogMessage - JABBAS: audioSystem->IsPresent()? 0
19:28:20 T:140577223993088   DEBUG: CecLogMessage - sending active source message for 'Recorder 1'
19:28:20 T:140577223993088   DEBUG: CecLogMessage - << powering on 'TV' (0)
19:28:20 T:140577223993088   DEBUG: CecLogMessage - << 10:04
19:28:20 T:140577223993088   DEBUG: CecLogMessage - << Recorder 1 (1) -> broadcast (F): active source (1100)
19:28:20 T:140577223993088   DEBUG: CecLogMessage - << 1f:82:11:00
19:28:20 T:140577223993088   DEBUG: CecLogMessage - << Recorder 1 (1) -> TV (0): menu state 'activated'
19:28:20 T:140577223993088   DEBUG: CecLogMessage - << 10:8e:00
19:28:20 T:140577223993088   DEBUG: CecLogMessage - << powering on 'TV' (0)
19:28:20 T:140577223993088   DEBUG: CecLogMessage - << 10:04
19:28:20 T:140577223993088   DEBUG: CecLogMessage - CEC transmission - received response - TRANSMIT_FAILED_ACK
19:28:20 T:140577223993088   DEBUG: CecLogMessage - << 10:04
19:28:21 T:140577223993088 WARNING: CecLogMessage - HIGH_ERROR line:189 time:1871
19:28:21 T:140577223993088   DEBUG: CecLogMessage - << Recorder 1 (1) -> Audio (5): POLL
19:28:21 T:140577223993088   DEBUG: CecLogMessage - << 15
19:28:21 T:140577223993088   DEBUG: CecLogMessage - >> POLL sent
19:28:21 T:140577223993088   DEBUG: CecLogMessage - Audio (5): device status changed into 'present'

jabbas commented Sep 24, 2015

Okie, i've checked... the AVR Isn't available while we are doing both things. Here's a few lines of log with log message added by me:

19:28:20 T:140577223993088   DEBUG: CecLogMessage - Recorder 1 (1) was already marked as active source
19:28:20 T:140577223993088   DEBUG: CecLogMessage - >> source activated: Recorder 1 (1)
19:28:20 T:140577223993088   DEBUG: CecLogMessage - JABBAS: audioSystem->IsPresent()? 0
19:28:20 T:140577223993088   DEBUG: CecLogMessage - sending active source message for 'Recorder 1'
19:28:20 T:140577223993088   DEBUG: CecLogMessage - << powering on 'TV' (0)
19:28:20 T:140577223993088   DEBUG: CecLogMessage - << 10:04
19:28:20 T:140577223993088   DEBUG: CecLogMessage - << Recorder 1 (1) -> broadcast (F): active source (1100)
19:28:20 T:140577223993088   DEBUG: CecLogMessage - << 1f:82:11:00
19:28:20 T:140577223993088   DEBUG: CecLogMessage - << Recorder 1 (1) -> TV (0): menu state 'activated'
19:28:20 T:140577223993088   DEBUG: CecLogMessage - << 10:8e:00
19:28:20 T:140577223993088   DEBUG: CecLogMessage - << powering on 'TV' (0)
19:28:20 T:140577223993088   DEBUG: CecLogMessage - << 10:04
19:28:20 T:140577223993088   DEBUG: CecLogMessage - CEC transmission - received response - TRANSMIT_FAILED_ACK
19:28:20 T:140577223993088   DEBUG: CecLogMessage - << 10:04
19:28:21 T:140577223993088 WARNING: CecLogMessage - HIGH_ERROR line:189 time:1871
19:28:21 T:140577223993088   DEBUG: CecLogMessage - << Recorder 1 (1) -> Audio (5): POLL
19:28:21 T:140577223993088   DEBUG: CecLogMessage - << 15
19:28:21 T:140577223993088   DEBUG: CecLogMessage - >> POLL sent
19:28:21 T:140577223993088   DEBUG: CecLogMessage - Audio (5): device status changed into 'present'
@mk01

This comment has been minimized.

Show comment
Hide comment
@mk01

mk01 Oct 18, 2015

Contributor

@jabbas

libCEC marks foreign device as 'present' only after a message is handled from it (or getstatus() was called, POLL sent and ACK received).

change audioSystem->IsPresent() for (audioSystem->GetStatus() == CEC_DEVICE_STATUS_PRESENT)

also comment out the whole block above the system sound request (unconditional poweron of AVR).

Contributor

mk01 commented Oct 18, 2015

@jabbas

libCEC marks foreign device as 'present' only after a message is handled from it (or getstatus() was called, POLL sent and ACK received).

change audioSystem->IsPresent() for (audioSystem->GetStatus() == CEC_DEVICE_STATUS_PRESENT)

also comment out the whole block above the system sound request (unconditional poweron of AVR).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment