~libv4l/libv4l/dev

« back to all changes in this revision

Viewing changes to utils/cec-compliance/cec-compliance.cpp

  • Committer: Hans Verkuil
  • Date: 2021-04-13 09:19:50 UTC
  • Revision ID: git-v1:cd138c90d94385a816fb463d47f62b21fdc29106
cec: improve vendor ID logging

Always log the translated vendor ID string if available.
This helps debugging.

Also add a new vendor ID string.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

Show diffs side-by-side

added added

removed removed

Lines of Context:
1053
1053
        } else {
1054
1054
                node->remote[i].vendor_id = (msg.msg[2] << 16) |
1055
1055
                        (msg.msg[3] << 8) | msg.msg[4];
1056
 
                printf("0x%06x %s\n", node->remote[i].vendor_id,
1057
 
                       cec_vendor2s(node->remote[i].vendor_id));
 
1056
 
 
1057
                const char *vendor = cec_vendor2s(node->remote[i].vendor_id);
 
1058
 
 
1059
                if (vendor)
 
1060
                        printf("0x%06x (%s)\n",
 
1061
                               node->remote[i].vendor_id, vendor);
 
1062
                else
 
1063
                        printf("0x%06x\n", node->remote[i].vendor_id);
1058
1064
        }
1059
1065
 
1060
1066
        cec_msg_init(&msg, la, i);