Ticket #2722: libavc1394-0.5.3-int-changer.diff
File libavc1394-0.5.3-int-changer.diff, 3.1 KB (added by , 19 years ago) |
---|
-
libs/libmythtv/firewirechannel.cpp
16 16 #define LOC QString("FireChan: ") 17 17 #define LOC_ERR QString("FireChan, Error: ") 18 18 19 #ifndef AVC1394_PANEL_COMMAND_PASS_THROUGH20 #define AVC1394_PANEL_COMMAND_PASS_THROUGH 0x000007C0021 #endif22 23 #ifndef AVC1394_PANEL_OPERATION_024 #define AVC1394_PANEL_OPERATION_0 0x00000002025 #endif26 27 19 #define DCT6200_CMD0 (AVC1394_CTYPE_CONTROL | \ 28 20 AVC1394_SUBUNIT_TYPE_PANEL | \ 29 21 AVC1394_SUBUNIT_ID_0 | \ … … 104 96 quadlet_t cmd[2] = { DCT6200_CMD0 | dig[i], 0x0, }; 105 97 if (!avc1394_transaction_block(fwhandle, fw_opts.node, cmd, 2, 1)) 106 98 { 99 avc1394_transaction_block_close(fwhandle); 107 100 VERBOSE(VB_IMPORTANT, "AVC transaction failed."); 108 101 return false; 109 102 } 103 avc1394_transaction_block_close(fwhandle); 110 104 usleep(500000); 111 105 } 112 106 } … … 132 126 133 127 if(!avc1394_transaction_block(fwhandle, fw_opts.node, cmd, 3, 1)) 134 128 { 129 avc1394_transaction_block_close(fwhandle); 135 130 VERBOSE(VB_IMPORTANT, "AVC transaction failed."); 136 131 return false; 137 132 } 133 avc1394_transaction_block_close(fwhandle); 138 134 139 135 cmd[0] = SA3250_CMD0 | AVC1394_SA3250_OPERAND_KEY_RELEASE; 140 136 cmd[1] = SA3250_CMD1 | (dig[0] << 16) | (dig[1] << 8) | dig[2]; … … 149 145 150 146 if (!avc1394_transaction_block(fwhandle, fw_opts.node, cmd, 3, 1)) 151 147 { 148 avc1394_transaction_block_close(fwhandle); 152 149 VERBOSE(VB_IMPORTANT, "AVC transaction failed."); 153 150 return false; 154 151 } 152 avc1394_transaction_block_close(fwhandle); 155 153 } 156 154 else if (fw_opts.model == "SA4200HD") 157 155 { … … 170 168 171 169 if (!avc1394_transaction_block(fwhandle, fw_opts.node, cmd, 3, 1)) 172 170 { 171 avc1394_transaction_block_close(fwhandle); 173 172 VERBOSE(VB_IMPORTANT, "AVC transaction failed."); 174 173 return false; 175 174 } 175 avc1394_transaction_block_close(fwhandle); 176 176 } 177 178 177 return true; 179 178 } 180 179 … … 229 228 if (rval) 230 229 { 231 230 response = rval[0]; 231 avc1394_transaction_block_close(fwhandle); 232 232 233 233 if (AVC1394_MASK_RESPONSE(response) == AVC1394_RESPONSE_ACCEPTED) 234 234 { … … 254 254 } 255 255 else 256 256 { 257 avc1394_transaction_block_close(fwhandle); 257 258 VERBOSE(VB_IMPORTANT, LOC + "Power on cmd failed (no response)"); 258 259 return false; 259 260 } … … 278 279 if (rval) 279 280 { 280 281 response = rval[0]; 282 avc1394_transaction_block_close(fwhandle); 281 283 282 284 if (AVC1394_MASK_RESPONSE(response) == AVC1394_RESPONSE_IMPLEMENTED) 283 285 { … … 309 311 return Failed; 310 312 } 311 313 } 314 avc1394_transaction_block_close(fwhandle); 312 315 VERBOSE(VB_CHANNEL, LOC + "Failed to get STB Power State"); 313 316 return Failed; 314 317 }