CEC-FOLLOWER(1)

πŸ“¦
version 1.32.0 Β· 5 versions
, in alpine 3.24, arch rolling, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu resolute, ubuntu stonking

πŸ’– cec-follower β€” the manual, but make it a group chat πŸ’–

okay bestie, welcome to cec-follower(1), a User Commands page that's about to be your new hyperfixation. it's a little app that emulates CEC followers, and yes, it ate. let's get into it. ✨


πŸŽ€ NAME πŸŽ€

cec-follower β€” an application to emulate CEC followers. that's the whole name, that's the whole vibe, periodt. πŸ‘‘


✨ SYNOPSIS ✨

cec-follower [-h] [-d <dev>] [other options]

like, look at her. minimal. iconic. 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so the cec-follower tool is out here doing the most important job: emulating CEC followers. based on the configured logical address(es) of the CEC device, it will emulate the CEC behavior accordingly. it literally reads the room and acts right. πŸ’…

configuring the CEC device? that's a cec-ctl job, not hers. and ngl, certain CEC functionalities are only emulated if the corresponding Device Features flag is set (those get set when you're configuring with cec-ctl). the ones in question:

  • Audio Return Channel (RX and TX)
  • Audio Rate Control
  • Deck Control
  • Record TV screen

no flag, no emulation. that's the rule, fr fr. 🚩

cec-follower is basically a message loop β€” she's just sitting there, waiting for messages to arrive, and taking the appropriate action for each message. (incoming messages can be shown with the --show-msgs option, if you're nosy like me πŸ™ˆ). the follower also maintains an internal state with appropriate parameters like volume, current active source, power state and so on (state changes can be shown with the --show-state option, because we love transparency πŸ’œ).

she also aims to be a reference implementation on how a follower should behave. like, she's not just a follower, she's the follower. main character energy, honestly. πŸ‘‘

cec-follower will keep track of incoming messages and look for violations of the CEC specification with regards to timings. for example, it will warn if it receives the same message again within 200ms after it replied <Feature Abort> ["Unrecognized Opcode"] to that message β€” and it will check that press and hold behavior is done properly. she's watching. she's always watching. πŸ‘€

cec-follower will periodically send out polling messages to discover when a remote device is removed or a new one has appeared. when a device is removed, the recorded information about it is cleared. each logical address is polled about once every 15 seconds. and here's the catch, bestie β€” in between polls, removing a remote device or replacing it with a new one is not detected. she's good but she's not psychic. 😭

when you're running compliance tests with cec-compliance, cec-follower should be run on the same device, to act on incoming messages that are not replies to messages sent by the compliance tool. and before each test-run, cec-follower should be restarted if it's running β€” to initialize the emulated device with a clean and known initial state. fresh start, clean slate, new me. 🌸

yes this matters. do the restart. don't be chaotic. (or do, but know that the state won't be clean and known, and that's on you πŸ’€)

πŸ’… OPTIONS πŸ’…

  • -d, --device <dev> β€” use device <dev> as the CEC device. if <dev> is a number, then /dev/cec<dev> is used. cute little shortcut, we love her. πŸ“
  • -D, --driver <drv> β€” use a cec device that has driver name <drv>, as returned by the CEC_ADAP_G_CAPS ioctl. this option can be combined with -a to uniquely identify a CEC device without having to rely on the device node number. duo goals. 🫢
  • -a, --adapter <adap-name> β€” use a cec device that has adapter name <adap-name>, as returned by the CEC_ADAP_G_CAPS ioctl. this option can be combined with -D to uniquely identify a CEC device without having to rely on the device node number. see? told you. dynamic duo. ✨
  • -v, --verbose β€” turn on verbose reporting. she will not shut up (affectionate). πŸ—£οΈ
  • --version β€” show version information. the classic. the standard. πŸ’«
  • -w, --wall-clock β€” show timestamps as wall-clock time. this also turns on verbose reporting. two for one, slay. ⏰
  • -T, --trace β€” trace all called ioctls. useful for debugging. very detective, very πŸ”.
  • -h, --help β€” prints the help message. when in doubt, ask. πŸ™‹β€β™€οΈ
  • -n, --no-warnings β€” turn off warning messages. she'll stop telling you you're wrong. (she's still thinking it.) 🀫
  • -e, --exclusive β€” if specified, then the follower uses exclusive mode (CEC_MODE_EXCL_FOLLOWER). exclusive!! like her. πŸ’…
  • -m, --show-msgs β€” show received messages. gossip mode: activated. πŸ“¬
  • -s, --show-state β€” show state changes from the emulated device. glow-up receipts. πŸ¦‹
  • --service-by-dig-id β€” report digital services by digital ID instead of by channel. iykyk. πŸ“Ί
  • --standby β€” start the follower in the Standby status. sleepy girl era. 😴
  • --toggle-power-status <secs> β€” toggle the power status every <secs> seconds. only supported if the follower is emulating a TV. so if she's a TV, she's gonna flip-flop like it's a situationship. πŸ“ΊπŸ’₯
  • -i, --ignore <la>,<opcode> β€” ignore messages from logical address <la> and opcode <opcode>. 'all' can be used for <la> or <opcode> to match all logical addresses or opcodes. selective hearing is a skill, actually. πŸ™‰
  • --ignore-standby <n> β€” ignore every *<n>*th received Standby message. counting. ignoring. iconic. πŸ”’
  • --ignore-view-on <n> β€” ignore every *<n>*th received Image/Text View On message. same energy, different message. πŸ‘‘βœ¨

🌈 EXIT STATUS 🌈

on success, it returns 0. otherwise, it will return the error code. so if you see a 0, she's happy. anything else? read the number, bestie, it's literally telling you what went wrong. πŸ’€


πŸ› BUGS πŸ›

this manual page is a work in progress. she's evolving, okay, be patient. 🌱

bug reports or questions about this utility should be sent to the linux-media@vger.kernel.org mailinglist. yes, actually email them, that's the whole point of the line. πŸ“§


πŸ‘€ SEE ALSO πŸ‘€


and that's the whole page, bestie!! you understood all of it, no cap. go emulate some followers. πŸ¦‹βœ¨

this has been v4l-utils 1.32.0, dated August 2016 β€” yeah she's a vintage icon, and vintage is still slay. bye bestie, ily, remember to restart your follower before compliance tests πŸ’–πŸŽ€

πŸ“¦ where this page comes from