[mythtv-users] CEC support on Raspberry Pi 3

Peter Bennett cats22 at comcast.net
Sat Jul 9 14:40:39 UTC 2016


On 07/09/2016 09:46 AM, Mike Bibbings wrote:
> On 09/07/16 13:57, Matthew Zimmerman wrote:
>> So I have a Raspberry Pi 3 running mythfrontend 0.28 on raspbian
>> jessie with which overall works beautifully, but the icing on the
>> cake would be to get CEC functionality working so I can control
>> mythfrontend with the TV remote (definitely a wife-acceptance-factor!)
>>
>> 2016-07-09 08:38:06.693291 C  mythfrontend version: fixes/0.28
>> [v0.28-32-g6eff083] www.mythtv.org <http://www.mythtv.org>
>> ---- SNIP ------
>> 2016-07-09 08:38:08.833406 I  CECAdapter: Found 1 CEC devices(s).
>> 2016-07-09 08:38:08.833503 I  CECAdapter: Device 1: path 'Raspberry
>> Pi' com port 'RPI' SELECTED
>> 2016-07-09 08:38:08.833522 I  CECAdapter: Trying to open device
>> Raspberry Pi (RPI).
>> 2016-07-09 08:38:08.834810 I  CECAdapter: connection opened
>> 2016-07-09 08:38:09.158714 I  CECAdapter: registering new CEC client
>> - v3.0.1
>> 2016-07-09 08:38:09.910458 E  CECAdapter: AllocateLogicalAddresses -
>> failed to allocate device '0', type 'playback device'
>> 2016-07-09 08:38:09.910497 E  CECAdapter: failed to find a free
>> logical address for the client
>> 2016-07-09 08:38:09.910608 E  CECAdapter: failed to register the new
>> CEC client - cannot allocate the requested device types
>> 2016-07-09 08:38:09.910679 E  CECAdapter: Failed to open device.
>> 2016-07-09 08:38:09.910695 E  CECAdapter: failed to register a CEC
>> client
>> 2016-07-09 08:38:11.336293 I  CECAdapter: Closing down CEC.
>>
>> https://www.mythtv.org/wiki/Raspberry_Pi states that CEC support
>> should work in this case.  This isn't a hardware thing because
>> cec-util works beautifully.
>>
>> How can I debug this further?  I'm not shy of writing some code to
>> fix it, although my C is not great.
>>
>> Thanks for this working as well as it does!
>>
>>
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users at mythtv.org
>> http://lists.mythtv.org/mailman/listinfo/mythtv-users
>> http://wiki.mythtv.org/Mailing_List_etiquette
>> MythTV Forums: https://forum.mythtv.org
> A few things to try:
>
> Upgrade your version of mythtv-light, as of writing I have
> v0.28-40-g7a4e9ab, which is later than the version you have
> see https://www.mythtv.org/wiki/MythTV_Light
>
> I had to install libcec3 (sudo apt-get install libcec3)
>
> Mike
>  
>

I will be adding libcec3 to the package dependencies. That seemed to be
included by default in earlier releases of jessie, but is no longer
there by default.

I tested with the latest of everything and it is working for me. This is
from the log:

2016-07-09 10:03:35.846100 I [995/995] CoreContext cecadapter.cpp:146
(Open) - CECAdapter: Found 1 CEC devices(s).
2016-07-09 10:03:35.846209 I [995/995] CoreContext cecadapter.cpp:155
(Open) - CECAdapter: Device 1: path 'Raspberry Pi' com port 'RPI' SELECTED
2016-07-09 10:03:35.846246 I [995/995] CoreContext cecadapter.cpp:162
(Open) - CECAdapter: Trying to open device Raspberry Pi (RPI).
2016-07-09 10:03:35.848044 I [995/1013] thread_unknown
cecadapter.cpp:215 (LogMessage) - CECAdapter: connection opened
2016-07-09 10:03:36.122666 I [995/1013] thread_unknown
cecadapter.cpp:215 (LogMessage) - CECAdapter: registering new CEC client
- v3.0.1
2016-07-09 10:03:36.816461 I [995/1013] thread_unknown
cecadapter.cpp:215 (LogMessage) - CECAdapter: >> source activated:
Playback 1 (4)
2016-07-09 10:03:36.816725 I [995/1013] thread_unknown
cecadapter.cpp:215 (LogMessage) - CECAdapter: CEC client registered:
libCEC version = 3.0.1, client version = 3.0.1, firmwar
e version = 1, logical address(es) = Playback 1 (4) , physical address:
2.0.0.0,  compiled on Fri Jul  3 19:20:43 UTC 2015 by
pbuilder at mgorven-pc.thefacebook.com on Linux 3.16.0-4
1-generic (armv7l), features: P8_USB, P8_detect, 'RPi'
2016-07-09 10:03:37.764237 I [995/995] CoreContext cecadapter.cpp:170
(Open) - CECAdapter: Opened CEC device.
2016-07-09 10:03:37.764377 I [995/1013] thread_unknown
cecadapter.cpp:215 (LogMessage) - CECAdapter: << powering on 'TV' (0)
2016-07-09 10:03:37.764586 I [995/1013] thread_unknown
cecadapter.cpp:215 (LogMessage) - CECAdapter: << powering on 'TV' (0)
2016-07-09 10:03:37.855367 I [995/1013] thread_unknown
cecadapter.cpp:215 (LogMessage) - CECAdapter: << Playback 1 (4) ->
broadcast (F): active source (2000)
2016-07-09 10:03:37.915928 I [995/995] CoreContext cecadapter.cpp:685
(HandleActions) - CECAdapter: Asked TV to turn on.
2016-07-09 10:03:38.187590 I [995/1013] thread_unknown
cecadapter.cpp:215 (LogMessage) - CECAdapter: >> source activated:
Playback 1 (4)
2016-07-09 10:03:38.187674 I [995/1013] thread_unknown
cecadapter.cpp:661 (HandleSourceActivated) - CECAdapter: Source Playback
1 Activated
2016-07-09 10:03:38.699630 I [995/995] CoreContext cecadapter.cpp:694
(HandleActions) - CECAdapter: Asked TV to switch to this input.
<snip>
2016-07-09 10:03:39.760243 I [995/1013] thread_unknown
cecadapter.cpp:215 (LogMessage) - CECAdapter: << powering on 'TV' (0)
2016-07-09 10:03:39.760284 I [995/995] CoreContext
mythmainwindow.cpp:1041 (Init) - Using Frameless Window
2016-07-09 10:03:39.760329 I [995/995] CoreContext
mythmainwindow.cpp:1052 (Init) - Using Full Screen Window
2016-07-09 10:03:39.761371 I [995/1013] thread_unknown
cecadapter.cpp:215 (LogMessage) - CECAdapter: << Playback 1 (4) ->
broadcast (F): active source (2000)

>From your log it looks like it does not like "playback device". CEC
supports different device types
  CEC_DEVICE_TYPE_TV               = 0,
  CEC_DEVICE_TYPE_RECORDING_DEVICE = 1,
  CEC_DEVICE_TYPE_RESERVED         = 2,
  CEC_DEVICE_TYPE_TUNER            = 3,
  CEC_DEVICE_TYPE_PLAYBACK_DEVICE  = 4,
  CEC_DEVICE_TYPE_AUDIO_SYSTEM     = 5

See if any setting on your TV can be used to tell it what devices to
support.

Also you can try with cec-util to test the different device types.

Does your remote have play, stop, pause, etc., buttons? If so it should
support playback (one would think!).

Perhaps we need to update MythTV to use other device types, based on
some parameter or configuration setting.

Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20160709/26f2d8d3/attachment.html>


More information about the mythtv-users mailing list