Changeset 1900
- Timestamp:
- 09/16/10 13:15:35 (10 years ago)
- Files:
-
- trunk/libffado/src/dice/dice_avdevice.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/src/dice/dice_avdevice.cpp
r1815 r1900 1150 1150 } 1151 1151 1152 if (result != DICE_OWNER_NO_OWNER ) {1152 if (result != DICE_OWNER_NO_OWNER && result != swap_value) { 1153 1153 debugWarning("Could not register ourselves as device owner, unexpected register value: 0x%016"PRIX64"\n", result); 1154 1154 return false; … … 1304 1304 } 1305 1305 if(reg_isoch != 0xFFFFFFFFUL) { 1306 debugError("ISO_CHANNEL register != 0xFFFFFFFF (=0x%08"PRIX32") for ATX %d\n", reg_isoch, n); 1307 p->setChannel(-1); 1306 debugWarning("ISO_CHANNEL register != 0xFFFFFFFF (=0x%08"PRIX32") for ATX %d\n", reg_isoch, n); 1307 /* The ISO channel has already been registered, probably 1308 * because the device was running before and jackd just 1309 * crashed. Let's simply reuse the previously selected 1310 * ISO channel. 1311 * 1312 * FIXME: try to reset the channel register and 1313 * return to a clean state 1314 */ 1308 1315 deallocateIsoChannel(isochannel); 1309 return false; 1316 p->setChannel(reg_isoch); 1317 #if 0 1318 /* FIXME: Looks like it's not necessary to ask the IRM. 1319 * Just use the already registered ISO channel. 1320 */ 1321 // ask the IRM to use this channel 1322 if (get1394Service().allocateFixedIsoChannelGeneric(reg_isoch,p->getMaxPacketSize()) < 0) { 1323 debugError("Cannot allocate iso channel (0x%08"PRIX32") for ATX %d\n", reg_isoch, n); 1324 } 1325 #endif 1326 isochannel=reg_isoch; 1310 1327 } 1311 1328 … … 1355 1372 } 1356 1373 if(reg_isoch != 0xFFFFFFFFUL) { 1357 debugError("ISO_CHANNEL register != 0xFFFFFFFF (=0x%08"PRIX32") for ARX %d\n", reg_isoch, n); 1358 p->setChannel(-1); 1374 debugWarning("ISO_CHANNEL register != 0xFFFFFFFF (=0x%08"PRIX32") for ARX %d\n", reg_isoch, n); 1375 /* The ISO channel has already been registered, probably 1376 * because the device was running before and jackd just 1377 * crashed. Let's simply reuse the previously selected 1378 * ISO channel. 1379 * 1380 * FIXME: try to reset the channel register and 1381 * return to a clean state 1382 */ 1359 1383 deallocateIsoChannel(isochannel); 1360 return false; 1384 p->setChannel(reg_isoch); 1385 #if 0 1386 /* FIXME: Looks like it's not necessary to ask the IRM. 1387 * Just use the already registered ISO channel. 1388 */ 1389 // ask the IRM to use this channel 1390 if (get1394Service().allocateFixedIsoChannelGeneric(reg_isoch,p->getMaxPacketSize()) < 0) { 1391 debugError("Cannot allocate iso channel (0x%08"PRIX32") for ARX %d\n", reg_isoch, n); 1392 } 1393 #endif 1394 isochannel=reg_isoch; 1361 1395 } 1362 1396 … … 1689 1723 break; 1690 1724 } 1725 } 1726 1727 // FIXME: after a crash, the device might still be streaming. We 1728 // simply force a stop now (unless in snoopMode) to return to a 1729 // clean state. 1730 bool snoopMode = false; 1731 if(!getOption("snoopMode", snoopMode)) { 1732 //debugWarning("Could not retrieve snoopMode parameter, defauling to false\n"); 1733 } 1734 1735 if (!snoopMode) { 1736 disableIsoStreaming(); 1691 1737 } 1692 1738