diff --git a/src/EMUUSBAudio.xcodeproj/project.pbxproj b/src/EMUUSBAudio.xcodeproj/project.pbxproj
index 115f383..7cda172 100644
--- a/src/EMUUSBAudio.xcodeproj/project.pbxproj
+++ b/src/EMUUSBAudio.xcodeproj/project.pbxproj
@@ -41,7 +41,6 @@
6CB2722F1A54197B00FA8B61 /* EMUUSBOutputStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6CB2722D1A54197B00FA8B61 /* EMUUSBOutputStream.cpp */; };
6CB272301A54197B00FA8B61 /* EMUUSBOutputStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 6CB2722E1A54197B00FA8B61 /* EMUUSBOutputStream.h */; };
6CE021FE1A5FCE9C00568A82 /* StreamInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6CE021FD1A5FCE9C00568A82 /* StreamInfo.cpp */; };
- 6CF9CB271D26D53200719B95 /* EMUUSBAudio-Info-11.plist in Resources */ = {isa = PBXBuildFile; fileRef = 6CF9CB261D26D53200719B95 /* EMUUSBAudio-Info-11.plist */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
@@ -325,7 +324,6 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 6CF9CB271D26D53200719B95 /* EMUUSBAudio-Info-11.plist in Resources */,
6C7735F719E320A000ED3FAA /* InfoPlist.strings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
diff --git a/src/EMUUSBAudio/EMUUSBAudioDevice.cpp b/src/EMUUSBAudio/EMUUSBAudioDevice.cpp
index 5e48dba..fa2240d 100644
--- a/src/EMUUSBAudio/EMUUSBAudioDevice.cpp
+++ b/src/EMUUSBAudio/EMUUSBAudioDevice.cpp
@@ -320,8 +320,6 @@ IOReturn EMUUSBAudioDevice::protectedInitHardware(IOService * provider) {
mAnchorResetCount = kRefreshCount;
mUpdateTimer = IOTimerEventSource::timerEventSource(this, TimerAction);
FailIf(NULL == mUpdateTimer, Exit);
- // TURNED OFF HACK to turn off this update timer.
- //workLoop->addEventSource(mUpdateTimer);
TimerAction(this, mUpdateTimer);
// CHECK This bundle was removed as it is not clear what it is for.
@@ -329,8 +327,8 @@ IOReturn EMUUSBAudioDevice::protectedInitHardware(IOService * provider) {
IOService::registerService();
//
// init engine - see what happens
-#if 1
- // need to make sure we're not crossing paths with a terminating driver (hey, it happens)
+
+ // need to make sure we're not crossing paths with a terminating driver (hey, it happens)
if (FALSE == mTerminatingDriver) {
EMUUSBAudioEngine *audioEngine = NULL;
audioEngine = new EMUUSBAudioEngine;
@@ -345,7 +343,6 @@ IOReturn EMUUSBAudioDevice::protectedInitHardware(IOService * provider) {
audioEngine->release();
mAudioEngine = audioEngine; //used for releasing at end
}
-#endif
//
}
Exit:
@@ -378,27 +375,15 @@ void EMUUSBAudioDevice::checkUHCI() {
void EMUUSBAudioDevice::setupStatusFeedback() {
-// IOUSBFindEndpointRequest statusEndpoint;
-
-// statusEndpoint.type = kUSBInterrupt;
-// statusEndpoint.direction = kUSBIn;
-// statusEndpoint.maxPacketSize = kStatusPacketSize; // is this sizeof(UInt16)
-// statusEndpoint.interval = 0xFF;
-
- //mStatusPipe = mControlInterface->findPipe(&statusEndpoint);
mStatusPipe = mControlInterface->findPipe(kUSBIn,kUSBInterrupt);
if (mStatusPipe) {// the endpoint exists
- mStatusPipe->retain();// retain until tear down
mDeviceStatusBuffer = (UInt16*) IOMalloc(sizeof(UInt16)); // Is this kStatusPacketSize?
if (mDeviceStatusBuffer) {
mStatusBufferDesc = IOMemoryDescriptor::withAddress(mDeviceStatusBuffer, kStatusPacketSize, kIODirectionIn);
if (mStatusBufferDesc) {
mStatusBufferDesc->prepare();
mStatusCheckCompletion.set((void*) this, statusHandler, 0);
-// mStatusCheckCompletion.target = (void*) this;
-// mStatusCheckCompletion.action = statusHandler;
-// mStatusCheckCompletion.parameter = 0;
mStatusCheckTimer = IOTimerEventSource::timerEventSource(this, StatusAction);
if (mStatusCheckTimer) {
workLoop->addEventSource(mStatusCheckTimer);// add timer action to the workloop
diff --git a/src/EMUUSBAudio/EMUUSBAudioEngine.cpp b/src/EMUUSBAudio/EMUUSBAudioEngine.cpp
index 9e9cb94..4b9254f 100644
--- a/src/EMUUSBAudio/EMUUSBAudioEngine.cpp
+++ b/src/EMUUSBAudio/EMUUSBAudioEngine.cpp
@@ -1761,15 +1761,11 @@ IOReturn EMUUSBAudioEngine::startUSBStream() {
FailIf (kIOReturnSuccess != resultCode, Exit);
// Acquire a PIPE for the isochronous stream.
- //audioIsochEndpoint.type = kUSBIsoc;
- //audioIsochEndpoint.direction = usbInputStream.streamDirection;
{
debugIOLogC("createInputPipe");
-// usbInputStream.pipe = usbInputStream.streamInterface->findPipe ( &audioIsochEndpoint);
usbInputStream.pipe =
usbInputStream.streamInterface->findPipe (usbInputStream.streamDirection, kUSBIsoc);
FailIf (NULL == usbInputStream.pipe, Exit);
- usbInputStream.pipe->retain ();
}
address = usbAudio->GetIsocEndpointAddress(usbInputStream.interfaceNumber, usbInputStream.alternateSettingID, usbInputStream.streamDirection);
@@ -1803,15 +1799,9 @@ IOReturn EMUUSBAudioEngine::startUSBStream() {
FailIf (kIOReturnSuccess != resultCode, Exit);
debugIOLog("create output pipe ");
- //bzero(&audioIsochEndpoint,sizeof(audioIsochEndpoint));
- //audioIsochEndpoint.type = kUSBIsoc;
- //audioIsochEndpoint.direction = mOutput.streamDirection;
- //mOutput.pipe = mOutput.streamInterface->findPipe ( &audioIsochEndpoint);
mOutput.pipe = mOutput.streamInterface->findPipe (mOutput.streamDirection, kUSBIsoc);
FailIf (NULL == mOutput.pipe, Exit);
- mOutput.pipe->retain ();
debugIOLog("check for associated endpoint");
- //CheckForAssociatedEndpoint (usbAudio,mOutput.interfaceNumber,mOutput.alternateSettingID);// result is ignored
address = usbAudio->GetIsocEndpointAddress(mOutput.interfaceNumber, mOutput.alternateSettingID, mOutput.streamDirection);
maxPacketSize = usbAudio->GetEndpointMaxPacketSize(mOutput.interfaceNumber, mOutput.alternateSettingID, address);
@@ -1826,9 +1816,7 @@ IOReturn EMUUSBAudioEngine::startUSBStream() {
// When a late error is encountered (USB 2.0), increment the var until a max of 16 frames is reached.
// NB - From testing and observation this work around does not help and has therefore been deleted.
mOutput.frameOffset = 8; // HACK kMinimumFrameOffset + ((kUSBDeviceSpeedHigh == mHubSpeed) * kUSB2FrameOffset);
- //mOutput.usbFrameToQueueAt = 0; // INIT as late as possible. mBus->GetFrameNumber() + mOutput.frameOffset; // start on an offset usb frame
mOutput.usbIsocFrames[0].resetTime();
- //*(UInt64 *) (&(mOutput.usbIsocFrames[0].frTimeStamp)) = 0xFFFFFFFFFFFFFFFFull;
setRunEraseHead(true); // need it to avoid stutter at start&end and to allow multiple simultaneous playback.
diff --git a/src/IOUSBInterface.h b/src/IOUSBInterface.h
index 9070032..bd39eef 100644
--- a/src/IOUSBInterface.h
+++ b/src/IOUSBInterface.h
@@ -48,7 +48,7 @@ class IOUSBInterface1: public IOUSBInterface {
@param request Requirements for pipe to match, updated with the found pipe's
properties.
- @result Pointer to the pipe, or NULL if no pipe matches the request.
+ @result Pointer to the retained pipe, or NULL if no pipe matches the request.
*/
IOUSBPipe* findPipe(uint8_t direction, uint8_t type) {
IOUSBFindEndpointRequest request;
@@ -56,7 +56,11 @@ class IOUSBInterface1: public IOUSBInterface {
request.type = type;
request.interval = 0xFF;
request.maxPacketSize = 0;
- return FindNextPipe(NULL, &request);
+ IOUSBPipe* pipe= FindNextPipe(NULL, &request);
+ if (pipe!=NULL) {
+ pipe->retain();
+ }
+ return pipe;
}
/*! Send a request to the USB device over mControlInterface (default pipe 0?)
@@ -147,7 +151,7 @@ class IOUSBInterface1: public IOUSBHostInterface {
starting from the beginning of the interface's pipe list
@param direction the direction for the required pipe. eg kUSBInterrupt or kUSBIsoc or kUSBAnyType
@param type the type of the required pipe: kUSBIn or kUSBOut
- @result Pointer to the pipe, or NULL if no pipe matches the request.
+ @result Pointer to the retained pipe, or NULL if no pipe matches the request.
*/
IOUSBPipe* findPipe(uint8_t direction, uint8_t type) {
debugIOLog("+findPipe: dir=%d, type = %d", direction, type);
@@ -183,7 +187,6 @@ class IOUSBInterface1: public IOUSBHostInterface {
return NULL;
}
debugIOLog("-findpipe: success");
- //pipe->release(); // FIXME HACK should be consistent with 10.9
return OSDynamicCast(IOUSBPipe, pipe);
}
}
diff --git a/v11/.DS_Store b/v11/.DS_Store
index a9c6b84..888d8e8 100644
Binary files a/v11/.DS_Store and b/v11/.DS_Store differ
diff --git a/v11/EMUUSBAudio.kext/Contents/MacOS/EMUUSBAudio b/v11/EMUUSBAudio.kext/Contents/MacOS/EMUUSBAudio
index d36e40a..e7b8c0e 100755
Binary files a/v11/EMUUSBAudio.kext/Contents/MacOS/EMUUSBAudio and b/v11/EMUUSBAudio.kext/Contents/MacOS/EMUUSBAudio differ
diff --git a/v11/EMUUSBAudio.kext/Contents/Resources/EMUUSBAudio-Info-11.plist b/v11/EMUUSBAudio.kext/Contents/Resources/EMUUSBAudio-Info-11.plist
deleted file mode 100644
index 2a2f6e2..0000000
--- a/v11/EMUUSBAudio.kext/Contents/Resources/EMUUSBAudio-Info-11.plist
+++ /dev/null
@@ -1,303 +0,0 @@
-
-
-
-
- IOKitPersonalities
-
- EMUSBAudioTrackerPre
-
- latencyADC
- 53
- latencyDAC
- 15
- CFBundleIdentifier
- com.emu.driver.EMUUSBAudio
- IOClass
- EMUUSBAudioDevice
- IOProviderClass
- IOUSBHostInterface
- IOUserClientClass
- EMUUSBUserClient
- SafetyOffsetMicroSec
- 4200
- bConfigurationValue
- 1
- bInterfaceNumber
- 0
- bcdDevice
- 256
- idProduct
- 16138
- idVendor
- 1054
-
- EMUUSBAudioControl02
-
- latencyADC
- 53
- latencyDAC
- 15
- CFBundleIdentifier
- com.emu.driver.EMUUSBAudio
- IOAudioEngineChannelCategoryNames
-
- InputChannel1
- Analog In
- InputChannel2
- Analog In
- OutputChannel1
- Analog Out
- OutputChannel2
- Analog Out
-
- IOAudioEngineChannelNames
-
- InputChannel1
- Analog In 1
- InputChannel2
- Analog In 2
- OutputChannel1
- Analog Out 1
- OutputChannel2
- Analog Out 2
-
- IOAudioEngineChannelNumberNames
-
- InputChannel1
- 1
- InputChannel2
- 2
- OutputChannel1
- 1
- OutputChannel2
- 2
-
- IOClass
- EMUUSBAudioDevice
- IOProviderClass
- IOUSBHostInterface
- IOUserClientClass
- EMUUSBUserClient
- SafetyOffsetMicroSec
- 4200
- TransportTypeOverride
- 1
- bConfigurationValue
- 1
- bInterfaceNumber
- 0
- bcdDevice
- 256
- idProduct
- 16130
- idVendor
- 1054
-
- EMUUSBAudioControl0204
-
- latencyADC
- 53
- latencyDAC
- 15
- CFBundleIdentifier
- com.emu.driver.EMUUSBAudio
- IOAudioEngineChannelCategoryNames
-
- InputChannel1
- Analog In
- InputChannel2
- Analog In
- OutputChannel1
- Analog Out
- OutputChannel2
- Analog Out
- OutputChannel3
- Analog Out
- OutputChannel4
- Analog Out
-
- IOAudioEngineChannelNames
-
- InputChannel1
- Analog In 1
- InputChannel2
- Analog In 2
- OutputChannel1
- Analog Out 1
- OutputChannel2
- Analog Out 2
- OutputChannel3
- Analog Out 3
- OutputChannel4
- Analog Out 4
-
- IOAudioEngineChannelNumberNames
-
- InputChannel1
- 1
- InputChannel2
- 2
- OutputChannel1
- 1
- OutputChannel2
- 2
- OutputChannel3
- 1
- OutputChannel4
- 2
-
- IOClass
- EMUUSBAudioDevice
- IOProviderClass
- IOUSBHostInterface
- IOUserClientClass
- EMUUSBUserClient
- SafetyOffsetMicroSec
- 4200
- TransportTypeOverride
- 1
- bConfigurationValue
- 1
- bHasSPDIFClock
- 0
- bInterfaceNumber
- 0
- bcdDevice
- 256
- idProduct
- 16153
- idVendor
- 1054
-
- EMUUSBAudioControl04
-
- latencyADC
- 53
- latencyDAC
- 38
- SafetyOffsetMicroSec
- 4200
- CFBundleIdentifier
- com.emu.driver.EMUUSBAudio
- IOAudioEngineChannelCategoryNames
-
- InputChannel1
- Analog In
- InputChannel2
- Analog In
- InputChannel3
- SPDIF In
- InputChannel4
- SPDIF In
- OutputChannel1
- Analog Out
- OutputChannel2
- Analog Out
- OutputChannel3
- SPDIF Out
- OutputChannel4
- SPDIF Out
-
- IOAudioEngineChannelNames
-
- InputChannel1
- Analog In 1
- InputChannel2
- Analog In 2
- InputChannel3
- SPDIF In 1
- InputChannel4
- SPDIF In 2
- OutputChannel1
- Analog Out 1
- OutputChannel2
- Analog Out 2
- OutputChannel3
- SPDIF Out 1
- OutputChannel4
- SPDIF Out 2
-
- IOAudioEngineChannelNumberNames
-
- InputChannel1
- 1
- InputChannel2
- 2
- InputChannel3
- 1
- InputChannel4
- 2
- OutputChannel1
- 1
- OutputChannel2
- 2
- OutputChannel3
- 1
- OutputChannel4
- 2
-
- IOClass
- EMUUSBAudioDevice
- IOProviderClass
- IOUSBHostInterface
- IOUserClientClass
- EMUUSBUserClient
- TransportTypeOverride
- 1
- bConfigurationValue
- 1
- bHasSPDIFClock
- 1
- bInterfaceNumber
- 0
- bcdDevice
- 256
- idProduct
- 16132
- idVendor
- 1054
-
-
- CFBundleDisplayName
-
- LSApplicationCategoryType
-
- CFBundleDevelopmentRegion
- English
- CFBundleExecutable
- ${EXECUTABLE_NAME}
- CFBundleIconFile
-
- CFBundleIdentifier
- com.emu.driver.EMUUSBAudio
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- ${PRODUCT_NAME}
- CFBundlePackageType
- KEXT
- CFBundleShortVersionString
- 3.5.5
- CFBundleSignature
- EMUU
- CFBundleVersion
- 3.5.5
- NSHumanReadableCopyright
- Copyright © 2015 com.emu & W.Pasman
- OSBundleLibraries
-
- com.apple.iokit.IOAudioFamily
- 1.9.7f2
- com.apple.iokit.IOUSBHostFamily
- 1.0.1
- com.apple.kpi.iokit
- 13.4
- com.apple.kpi.libkern
- 13.4
- com.apple.kpi.mach
- 13.4
- com.apple.kpi.bsd
- 15.4.0
-
-
-
diff --git a/v9/.DS_Store b/v9/.DS_Store
index 9dfbc82..8904e58 100644
Binary files a/v9/.DS_Store and b/v9/.DS_Store differ
diff --git a/v9/EMUUSBAudio.kext/Contents/MacOS/EMUUSBAudio b/v9/EMUUSBAudio.kext/Contents/MacOS/EMUUSBAudio
index d9ee590..e5c1ab4 100755
Binary files a/v9/EMUUSBAudio.kext/Contents/MacOS/EMUUSBAudio and b/v9/EMUUSBAudio.kext/Contents/MacOS/EMUUSBAudio differ
diff --git a/v9/EMUUSBAudio.kext/Contents/Resources/EMUUSBAudio-Info-11.plist b/v9/EMUUSBAudio.kext/Contents/Resources/EMUUSBAudio-Info-11.plist
deleted file mode 100644
index 2a2f6e2..0000000
--- a/v9/EMUUSBAudio.kext/Contents/Resources/EMUUSBAudio-Info-11.plist
+++ /dev/null
@@ -1,303 +0,0 @@
-
-
-
-
- IOKitPersonalities
-
- EMUSBAudioTrackerPre
-
- latencyADC
- 53
- latencyDAC
- 15
- CFBundleIdentifier
- com.emu.driver.EMUUSBAudio
- IOClass
- EMUUSBAudioDevice
- IOProviderClass
- IOUSBHostInterface
- IOUserClientClass
- EMUUSBUserClient
- SafetyOffsetMicroSec
- 4200
- bConfigurationValue
- 1
- bInterfaceNumber
- 0
- bcdDevice
- 256
- idProduct
- 16138
- idVendor
- 1054
-
- EMUUSBAudioControl02
-
- latencyADC
- 53
- latencyDAC
- 15
- CFBundleIdentifier
- com.emu.driver.EMUUSBAudio
- IOAudioEngineChannelCategoryNames
-
- InputChannel1
- Analog In
- InputChannel2
- Analog In
- OutputChannel1
- Analog Out
- OutputChannel2
- Analog Out
-
- IOAudioEngineChannelNames
-
- InputChannel1
- Analog In 1
- InputChannel2
- Analog In 2
- OutputChannel1
- Analog Out 1
- OutputChannel2
- Analog Out 2
-
- IOAudioEngineChannelNumberNames
-
- InputChannel1
- 1
- InputChannel2
- 2
- OutputChannel1
- 1
- OutputChannel2
- 2
-
- IOClass
- EMUUSBAudioDevice
- IOProviderClass
- IOUSBHostInterface
- IOUserClientClass
- EMUUSBUserClient
- SafetyOffsetMicroSec
- 4200
- TransportTypeOverride
- 1
- bConfigurationValue
- 1
- bInterfaceNumber
- 0
- bcdDevice
- 256
- idProduct
- 16130
- idVendor
- 1054
-
- EMUUSBAudioControl0204
-
- latencyADC
- 53
- latencyDAC
- 15
- CFBundleIdentifier
- com.emu.driver.EMUUSBAudio
- IOAudioEngineChannelCategoryNames
-
- InputChannel1
- Analog In
- InputChannel2
- Analog In
- OutputChannel1
- Analog Out
- OutputChannel2
- Analog Out
- OutputChannel3
- Analog Out
- OutputChannel4
- Analog Out
-
- IOAudioEngineChannelNames
-
- InputChannel1
- Analog In 1
- InputChannel2
- Analog In 2
- OutputChannel1
- Analog Out 1
- OutputChannel2
- Analog Out 2
- OutputChannel3
- Analog Out 3
- OutputChannel4
- Analog Out 4
-
- IOAudioEngineChannelNumberNames
-
- InputChannel1
- 1
- InputChannel2
- 2
- OutputChannel1
- 1
- OutputChannel2
- 2
- OutputChannel3
- 1
- OutputChannel4
- 2
-
- IOClass
- EMUUSBAudioDevice
- IOProviderClass
- IOUSBHostInterface
- IOUserClientClass
- EMUUSBUserClient
- SafetyOffsetMicroSec
- 4200
- TransportTypeOverride
- 1
- bConfigurationValue
- 1
- bHasSPDIFClock
- 0
- bInterfaceNumber
- 0
- bcdDevice
- 256
- idProduct
- 16153
- idVendor
- 1054
-
- EMUUSBAudioControl04
-
- latencyADC
- 53
- latencyDAC
- 38
- SafetyOffsetMicroSec
- 4200
- CFBundleIdentifier
- com.emu.driver.EMUUSBAudio
- IOAudioEngineChannelCategoryNames
-
- InputChannel1
- Analog In
- InputChannel2
- Analog In
- InputChannel3
- SPDIF In
- InputChannel4
- SPDIF In
- OutputChannel1
- Analog Out
- OutputChannel2
- Analog Out
- OutputChannel3
- SPDIF Out
- OutputChannel4
- SPDIF Out
-
- IOAudioEngineChannelNames
-
- InputChannel1
- Analog In 1
- InputChannel2
- Analog In 2
- InputChannel3
- SPDIF In 1
- InputChannel4
- SPDIF In 2
- OutputChannel1
- Analog Out 1
- OutputChannel2
- Analog Out 2
- OutputChannel3
- SPDIF Out 1
- OutputChannel4
- SPDIF Out 2
-
- IOAudioEngineChannelNumberNames
-
- InputChannel1
- 1
- InputChannel2
- 2
- InputChannel3
- 1
- InputChannel4
- 2
- OutputChannel1
- 1
- OutputChannel2
- 2
- OutputChannel3
- 1
- OutputChannel4
- 2
-
- IOClass
- EMUUSBAudioDevice
- IOProviderClass
- IOUSBHostInterface
- IOUserClientClass
- EMUUSBUserClient
- TransportTypeOverride
- 1
- bConfigurationValue
- 1
- bHasSPDIFClock
- 1
- bInterfaceNumber
- 0
- bcdDevice
- 256
- idProduct
- 16132
- idVendor
- 1054
-
-
- CFBundleDisplayName
-
- LSApplicationCategoryType
-
- CFBundleDevelopmentRegion
- English
- CFBundleExecutable
- ${EXECUTABLE_NAME}
- CFBundleIconFile
-
- CFBundleIdentifier
- com.emu.driver.EMUUSBAudio
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- ${PRODUCT_NAME}
- CFBundlePackageType
- KEXT
- CFBundleShortVersionString
- 3.5.5
- CFBundleSignature
- EMUU
- CFBundleVersion
- 3.5.5
- NSHumanReadableCopyright
- Copyright © 2015 com.emu & W.Pasman
- OSBundleLibraries
-
- com.apple.iokit.IOAudioFamily
- 1.9.7f2
- com.apple.iokit.IOUSBHostFamily
- 1.0.1
- com.apple.kpi.iokit
- 13.4
- com.apple.kpi.libkern
- 13.4
- com.apple.kpi.mach
- 13.4
- com.apple.kpi.bsd
- 15.4.0
-
-
-