bramp / libcec-daemon

A Linux daemon for connecting libcec to uinput. That is, using your TV to control your PC!
BSD 2-Clause "Simplified" License
65 stars 26 forks source link

Fails to work unless '--port tv.1' added to command line. #15

Closed phippodoplis closed 10 years ago

phippodoplis commented 10 years ago

After the two commits on Jan 16th 2014 I have tell the daemon what physical port it is on. Here is what I without that:

Jan 31 14:19:16 ernie logger: INFO - Opened /dev/uinput Jan 31 14:19:16 ernie logger: INFO - Created uinput device Jan 31 14:19:16 ernie logger: INFO - Openning /sys/devices/pci0000:00/0000:00:1d.1/usb2/2-1 Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(32 [D]unregistering all CEC clients) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(32 [D]Broadcast (F): osd name set to 'Broadcast') Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(35 [D]connection opened, clearing any previous input and waiting for active transmissions to end before starting) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(36 [D]communication thread started) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(46 [D]turning controlled mode on) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(77 [N]connection opened) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(78 [D]processor thread started) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(78 [D]<< Broadcast (F) -> TV (0): POLL) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(78 [T]<< f0) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(78 [D]setting the line timeout to 3) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(113 [D]>> POLL sent) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(113 [D]TV (0): device status changed into 'present') Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(113 [D]<< requesting vendor ID of 'TV' (0)) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(114 [T]<< f0:8c) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(522 [T]>> 0f:87:00:80:45) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(522 [D]>> TV (0) -> Broadcast (F): device vendor id (87)) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecCommand(Command 0 to 15 135) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(522 [D]TV (0): vendor = Panasonic (008045)) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(522 [D]expected response received (87: device vendor id)) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(522 [D]replacing the command handler for device 'TV' (0)) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(522 [N]registering new CEC client - v2.1.4) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(522 [D]detecting logical address for type 'playback device') Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(522 [D]trying logical address 'Playback 1') Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(522 [D]<< Playback 1 (4) -> Playback 1 (4): POLL) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(522 [T]<< 44) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(553 [D]CEC transmission - received response - TRANSMIT_FAILED_ACK) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(553 [T]<< 44) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(590 [D]CEC transmission - received response - TRANSMIT_FAILED_ACK) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(590 [D]>> POLL not sent) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(590 [D]using logical address 'Playback 1') Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(590 [D]Playback 1 (4): device status changed into 'handled by libCEC') Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(590 [D]Playback 1 (4): power status changed from 'unknown' to 'on') Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(590 [D]Playback 1 (4): vendor = Pulse Eight (001582)) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(590 [D]Playback 1 (4): CEC version 1.4) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(590 [D]AllocateLogicalAddresses - device '0', type 'playback device', LA '4') Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(590 [D]setting ackmask to 10) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(595 [D]Playback 1 (4): osd name set to 'ernie') Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(595 [D]Playback 1 (4): menu language set to 'eng') Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(595 [D]GetPhysicalAddress - trying to get the physical address via ADL) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(595 [D]GetPhysicalAddress - ADL returned physical address 0000) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(595 [D]GetPhysicalAddress - trying to get the physical address via nvidia driver) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(595 [D]GetPhysicalAddress - nvidia driver returned physical address 0000) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(595 [D]GetPhysicalAddress - trying to get the physical address from the OS) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(595 [D]GetPhysicalAddress - OS returned physical address 0000) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(595 [D]SetDevicePhysicalAddress - not setting invalid physical address 0000) Jan 31 14:19:16 ernie logger: DEBUG - Main::onCecLogMessage(595 [D]SetPhysicalAddress - resetting HDMI port and base device to defaults)

It may not be those commits at fault, libcec has been updated too

smithereens commented 10 years ago

libcec used to default return tv.1 If it couldn't detect the physical address, but in most recent version it defaults to broadcast, which breaks libcec-daemon. This was my main motivation for the recent patches to the daemon, I've also sent a patch to libcec as well to fix the detection problem. I've noticed that you have a Panasonic tv, do the latest commit caused any regression for you? I switched the daemon type from playback to recording device, just like XBMC do.

phippodoplis commented 10 years ago

Thanks for the response, guess I'll have to use tv.1 unless libcec changes. Not a problem. As for the Panasonic: Some keys have changed and the OK button does not seem to work, I've not had time to debug and it's not a problem with MythTV (which can map keys to functions anyway)

phippodoplis commented 10 years ago

The problem I'm having with the OK button is from the large recent commit that sorted out lots of things but changed a few key bindings (https://github.com/bramp/libcec-daemon/commit/e494489bf5b69c15bd9f313e37bea1d6615b5468#diff-7ec3c68a81efff79b6ca22ac1f1eabba).

CEC_USER_CONTROL_CODE_SELECT went from sending KEY_ENTER to KEY_OK and I don't think the X-server can handle that uinput key. Think this is going off-topic so will close this issue and open a new one for key binding.