xbmc-imx6 / libcec

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

libcec fails with connected through surround receiver #2

Open zpon opened 10 years ago

zpon commented 10 years ago

I'm having a problem using libcec from my cubox-i, but only when it is connected to my TV through my surround receiver (connecting it directly to my TV seems to function as expected). My Raspberry Pi device has been able to function through the same setup without any problems, which is why I expect this is a problem related to the implementation for this device.

I have tried both with the Arch Linux provided builds and building it myself from https://github.com/archlinuxarm/PKGBUILDs/blob/master/alarm/libcec-imx6/PKGBUILD. And even tried debugging wiith gdb, but so far without result.

Here is the result from cec-client:

# cec-client
No device type given. Using 'recording device'
CEC Parser created - libCEC version 2.1.4
no serial port given. trying autodetect:
 path:     /dev/mxc_hdmi_cec
 com port: i.MX

opening a connection to the CEC adapter...
DEBUG:   [             136]     unregistering all CEC clients
DEBUG:   [             137]     Broadcast (F): osd name set to 'Broadcast'
NOTICE:  [             139]     connection opened
DEBUG:   [             139]     << Broadcast (F) -> TV (0): POLL
DEBUG:   [             139]     processor thread started
TRAFFIC: [             140]     << f0
DEBUG:   [            1137]     command transmitted
DEBUG:   [            1137]     >> POLL sent
DEBUG:   [            1137]     TV (0): device status changed into 'present'
DEBUG:   [            1138]     << requesting vendor ID of 'TV' (0)
TRAFFIC: [            1138]     << f0:8c
DEBUG:   [            2137]     command transmitted
DEBUG:   [            3137]     expected response not received (87: device vendor id)
TRAFFIC: [            3138]     << f0:8c
DEBUG:   [            4137]     command transmitted
DEBUG:   [            5137]     expected response not received (87: device vendor id)
NOTICE:  [            5137]     registering new CEC client - v2.1.4
DEBUG:   [            5138]     detecting logical address for type 'recording device'
DEBUG:   [            5138]     trying logical address 'Recorder 1'
DEBUG:   [            5138]     << Recorder 1 (1) -> Recorder 1 (1): POLL
TRAFFIC: [            5139]     << 11
DEBUG:   [            6137]     command transmitted
DEBUG:   [            6137]     >> POLL sent
DEBUG:   [            6137]     logical address 'Recorder 1' already taken
DEBUG:   [            6137]     Recorder 1 (1): device status changed into 'present'
DEBUG:   [            6138]     trying logical address 'Recorder 2'
DEBUG:   [            6138]     << Recorder 2 (2) -> Recorder 2 (2): POLL
TRAFFIC: [            6138]     << 22
DEBUG:   [            7137]     command transmitted
DEBUG:   [            7137]     >> POLL sent
DEBUG:   [            7137]     logical address 'Recorder 2' already taken
DEBUG:   [            7137]     Recorder 2 (2): device status changed into 'present'
DEBUG:   [            7138]     trying logical address 'Recorder 3'
DEBUG:   [            7138]     << Recorder 3 (9) -> Recorder 3 (9): POLL
TRAFFIC: [            7138]     << 99
DEBUG:   [            8137]     command transmitted
DEBUG:   [            8137]     >> POLL sent
DEBUG:   [            8137]     logical address 'Recorder 3' already taken
DEBUG:   [            8137]     Recorder 3 (9): device status changed into 'present'
ERROR:   [            8138]     AllocateLogicalAddresses - failed to allocate device '0', type 'recording device'
ERROR:   [            8138]     failed to find a free logical address for the client
ERROR:   [            8138]     failed to register the new CEC client - cannot allocate the requested device types
ERROR:   [            8139]     failed to register a CEC client
unable to open the device on port i.MX
DEBUG:   [            8139]     unregistering all CEC clients

Please let me know if there is anything I can do or try help debug this problem.

zpon commented 10 years ago

Another thing, if I have the receiver turned of when I run cec-client, I output which seems right (see output below). I can even start XBMC and the start the receiver and navigate around in XBMC (only if the receiver is on another HDMI-input than the cubox-i).

# cec-client 
No device type given. Using 'recording device'
CEC Parser created - libCEC version 2.1.4
no serial port given. trying autodetect: 
 path:     /dev/mxc_hdmi_cec
 com port: i.MX

opening a connection to the CEC adapter...
DEBUG:   [             135] unregistering all CEC clients
DEBUG:   [             137] Broadcast (F): osd name set to 'Broadcast'
NOTICE:  [             138] connection opened
DEBUG:   [             139] processor thread started
DEBUG:   [             139] << Broadcast (F) -> TV (0): POLL
TRAFFIC: [             140] << f0
NOTICE:  [             190] physical address changed to 2100
DEBUG:   [             204] >> POLL sent
DEBUG:   [             204] TV (0): device status changed into 'present'
DEBUG:   [             204] << requesting vendor ID of 'TV' (0)
TRAFFIC: [             205] << f0:8c
NOTICE:  [             250] physical address changed to 2100
NOTICE:  [             304] physical address changed to 2100
TRAFFIC: [             414] >> 0f:87:00:00:f0
DEBUG:   [             414] >> TV (0) -> Broadcast (F): device vendor id (87)
DEBUG:   [             414] TV (0): vendor = Samsung (0000f0)
DEBUG:   [             415] expected response received (87: device vendor id)
DEBUG:   [             415] replacing the command handler for device 'TV' (0)
NOTICE:  [             415] registering new CEC client - v2.1.4
DEBUG:   [             416] detecting logical address for type 'recording device'
DEBUG:   [             416] trying logical address 'Recorder 1'
DEBUG:   [             416] << Recorder 1 (1) -> Recorder 1 (1): POLL
TRAFFIC: [             417] << 11
NOTICE:  [             590] physical address changed to 2100
DEBUG:   [             604] >> POLL sent
DEBUG:   [             604] logical address 'Recorder 1' already taken
DEBUG:   [             604] Recorder 1 (1): device status changed into 'present'
DEBUG:   [             605] trying logical address 'Recorder 2'
DEBUG:   [             605] << Recorder 2 (2) -> Recorder 2 (2): POLL
TRAFFIC: [             605] << 22
NOTICE:  [             650] physical address changed to 2100
ERROR:   [             664] Write: sent command error !
TRAFFIC: [             664] << 22
ERROR:   [             724] Write: sent command error !
DEBUG:   [             724] >> POLL not sent
DEBUG:   [             724] using logical address 'Recorder 2'
DEBUG:   [             725] Recorder 2 (2): device status changed into 'handled by libCEC'
DEBUG:   [             725] Recorder 2 (2): power status changed from 'unknown' to 'on'
DEBUG:   [             725] Recorder 2 (2): vendor = Pulse Eight (001582)
DEBUG:   [             725] Recorder 2 (2): CEC version 1.4
DEBUG:   [             726] AllocateLogicalAddresses - device '0', type 'recording device', LA '2'
NOTICE:  [             724] physical address changed to 2100
DEBUG:   [             726] setting physical address to '2100'
DEBUG:   [             727] Recorder 2 (2): physical address changed from ffff to 2100
DEBUG:   [             727] Recorder 2 (2): osd name set to 'CECTester'
DEBUG:   [             727] Recorder 2 (2): menu language set to 'eng'
DEBUG:   [             728] physical address unchanged (2100)
NOTICE:  [             728] CEC client registered: libCEC version = 2.1.4, client version = 2.1.4, firmware version = 0, logical address(es) = Recorder 2 (2) , physical address: 2.1.0.0, host: armv7l-unknown-linux-gnueabihf, features: 'P8 USB' 'P8 USB detect' 'i.MX6', git revision: 42c3c07, compiled on: Sat Apr 26 00:40:12 UTC 2014 by nobody on Linux 3.4.76-1-ARCH (armv7l)
DEBUG:   [             728] << Recorder 2 (2) -> TV (0): OSD name 'CECTester'
TRAFFIC: [             729] << 20:47:43:45:43:54:65:73:74:65:72
NOTICE:  [             770] physical address changed to 2100
DEBUG:   [            1024] physical address unchanged (2100)
DEBUG:   [            1024] << requesting power status of 'TV' (0)
NOTICE:  [            1024] physical address changed to 2100
TRAFFIC: [            1024] << 20:8f
DEBUG:   [            1124] physical address unchanged (2100)
NOTICE:  [            1124] physical address changed to 2100
DEBUG:   [            1124] physical address unchanged (2100)
NOTICE:  [            1124] physical address changed to 2100
DEBUG:   [            1124] physical address unchanged (2100)
NOTICE:  [            1124] physical address changed to 2100
DEBUG:   [            1125] physical address unchanged (2100)
NOTICE:  [            1125] physical address changed to 2100
DEBUG:   [            1125] physical address unchanged (2100)
NOTICE:  [            1125] physical address changed to 2100
DEBUG:   [            1125] physical address unchanged (2100)
NOTICE:  [            1125] physical address changed to 2100
DEBUG:   [            1125] physical address unchanged (2100)
TRAFFIC: [            1164] >> 02:8c
DEBUG:   [            1164] >> TV (0) -> Recorder 2 (2): give device vendor id (8C)
DEBUG:   [            1164] << Recorder 2 (2) -> TV (0): vendor id Pulse Eight (1582)
TRAFFIC: [            1164] << 2f:87:00:15:82
NOTICE:  [            1360] physical address changed to 2100
DEBUG:   [            1474] physical address unchanged (2100)
NOTICE:  [            1474] physical address changed to 2100
DEBUG:   [            1474] physical address unchanged (2100)
NOTICE:  [            1474] physical address changed to 2100
DEBUG:   [            1474] physical address unchanged (2100)
TRAFFIC: [            1554] >> 02:90:00
DEBUG:   [            1554] >> TV (0) -> Recorder 2 (2): report power status (90)
DEBUG:   [            1554] TV (0): power status changed from 'unknown' to 'on'
DEBUG:   [            1555] expected response received (90: report power status)
waiting for input
TRAFFIC: [            1624] >> 02:83
DEBUG:   [            1624] >> TV (0) -> Recorder 2 (2): give physical address (83)
DEBUG:   [            1624] << Recorder 2 (2) -> broadcast (F): physical adddress 2100
TRAFFIC: [            1625] << 2f:84:21:00:01
NOTICE:  [            1670] physical address changed to 2100
DEBUG:   [            1774] physical address unchanged (2100)
NOTICE:  [            1774] physical address changed to 2100
DEBUG:   [            1774] physical address unchanged (2100)
NOTICE:  [            1774] physical address changed to 2100
DEBUG:   [            1774] physical address unchanged (2100)
TRAFFIC: [            1954] >> 02:a0:00:00:f0:23
DEBUG:   [            1954] >> TV (0) -> Recorder 2 (2): vendor command with id (A0)
TRAFFIC: [            1954] << 20:a0:00:00:f0:24:00:80
NOTICE:  [            2000] physical address changed to 2100
DEBUG:   [            2184] physical address unchanged (2100)
NOTICE:  [            2184] physical address changed to 2100
DEBUG:   [            2184] physical address unchanged (2100)
NOTICE:  [            2184] physical address changed to 2100
DEBUG:   [            2184] physical address unchanged (2100)
NOTICE:  [            2184] physical address changed to 2100
DEBUG:   [            2184] physical address unchanged (2100)
NOTICE:  [            2185] physical address changed to 2100
DEBUG:   [            2185] physical address unchanged (2100)
TRAFFIC: [            2254] >> 02:9f
DEBUG:   [            2254] >> TV (0) -> Recorder 2 (2): get cec version (9F)
DEBUG:   [            2254] << Recorder 2 (2) -> TV (0): cec version 1.4
TRAFFIC: [            2255] << 20:9e:05
NOTICE:  [            2300] physical address changed to 2100
DEBUG:   [            2354] physical address unchanged (2100)
NOTICE:  [            2354] physical address changed to 2100
DEBUG:   [            2354] physical address unchanged (2100)