<!--
{
  "availability" : [
    "DriverKit: 21.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AudioDriverKit",
  "identifier" : "/documentation/AudioDriverKit/IOUserAudioDevice/StopIO",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AudioDriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOUserAudioDevice@F@StopIO#$@N@AudioDriverKit@E@IOUserAudioStartStopFlags#"
  },
  "title" : "StopIO"
}
-->

# StopIO

Tells the device to stop I/O.

```
virtual kern_return_t StopIO(IOUserAudioStartStopFlags in_flags);
```

## Parameters

`in_flags`

A `IOUserAudioStartStopFlag` to indicate I/O shutdown behavior.

## Return Value

<doc://com.apple.documentation/documentation/DriverKit/kIOReturnSuccess> on success, or another value if an error occurs. For a list of error codes, see <doc://com.apple.documentation/documentation/DriverKit/error-codes>.

## Discussion

The default implementation always returns <doc://com.apple.documentation/documentation/DriverKit/kIOReturnSuccess>.

Subclass and override this method to handle hardware-specific tasks during I/O shutdown, then call the superclass to update the I/O state. The framework expects this call to always succeed or fail.

All streams added to the device also receive a call to their [`StopIO`](/documentation/AudioDriverKit/IOUserAudioStream/StopIO) methods.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)