[mythtv-users] Firewire 6200ch can't set port

David King dave at daveking.com
Thu May 9 02:18:20 UTC 2019


On 5/8/19 1:33 PM, DryHeat122 . wrote:
> I'm thinking at this point the problem is edits I've made to 6200ch. 
> The error in (5) is thrown on line 636 of 6200ch when the device
> variable is set to -1.  device is initialized to -1 on line 351.  It
> is set to other than this value on line 631 after an if block with a
> long list of conditions trying to match dir.vendor_id and dir.model_id
> to the constants.  So maybe the condition I've added to the if block
> is not correct.  I can't see any other reason it wouldn't set the
> device.  Here is the condition I've added:
>
> ((dir.vendor_id == MOT_UNKNOWN_VENDOR_ID22) && (dir.model_id ==
> MOT_UNKNOWN_MODEL_ID01)) ||
>
> I can't see any reason why this doesn't match, can anyone else? 

Oh crud,  my previous post was made in much too much haste, I missed
this part of your post altogether.

So, now having read *everything* you wrote, I think that there might
indeed be a problem with the syntax.  The if statement in my copy of the
source ORs all the vendor ids inside a set of parenetheses and ORs all
the model ids together in another set of parentheses and then ANDs those
two sets of parentheses together.  I think that the code that adds your
new vendor/model ids should add the vendor and model ids separately to
each of the ORed lists.  Here's a patch based on my copy of the source
that shows what I'm suggesting:

--- 6200ch.c.orig    2019-05-08 22:09:31.033734006 -0400
+++ 6200ch.c    2019-05-08 22:13:07.355339961 -0400
@@ -138,6 +138,9 @@
 #define PACE550_MODEL_ID1  0x00010551
 #define PACE779_MODEL_ID1  0x00010755
 
+#define MOT_UNKNOWN_VENDOR_ID22 0x00848dc7
+#define MOT_UNKNOWN_MODEL_ID01 0x00001286
+
 #define AVC1394_6200_OPERAND_SET 0x20      /* 6200 subunit command
operand */
 
 #define CTL_CMD0 AVC1394_CTYPE_CONTROL | AVC1394_SUBUNIT_TYPE_PANEL | \
@@ -594,7 +597,8 @@
             (dir.vendor_id == MOT_UNKNOWN_VENDOR_ID20) ||
             (dir.vendor_id == MOT_UNKNOWN_VENDOR_ID21) ||
             (dir.vendor_id == PACE_VENDOR_ID1) ||
-            (dir.vendor_id == PACE_VENDOR_ID2)) &&
+            (dir.vendor_id == PACE_VENDOR_ID2) ||
+            (dir.vendor_id == MOT_UNKNOWN_VENDOR_ID22)) &&
            ((dir.model_id == DCH3200_MODEL_ID1) ||
             (dir.model_id == DCX3200_MODEL_ID1) ||
             (dir.model_id == DCX3200_MODEL_ID2) ||
@@ -619,7 +623,8 @@
             (dir.model_id == QIP7100_MODEL_ID4) ||
             (dir.model_id == QIP6200_MODEL_ID1) ||
             (dir.model_id == PACE550_MODEL_ID1) ||
-            (dir.model_id == PACE779_MODEL_ID1)) )
+            (dir.model_id == PACE779_MODEL_ID1) ||
+            (dir.model_id == MOT_UNKNOWN_MODEL_ID01)) )
       {
             if (dir.unit_spec_id != DCT6200_SPEC_ID ) {
                fprintf(stderr, "Warning: Unit Spec ID different.\n");

dave at daveking dot com



More information about the mythtv-users mailing list