A lot of screenshots in the Internet mention a 'audio source' USB configuration for Android. For example, this one from Google:

However, I cannot see this option with my SM-A510F with Android 9 (LineageOS 16).

Is there something I can do to enable it? Is it definitively gone from Android?

  • 1
    You do realize that the Samsung SM-A510F is from 2016 and has a headphone jack so it is unlikely to have the drivers for USB Audio. Otherwise you should show what you see on your device. May 24, 2020 at 21:18
  • One choice is MIDI. Thinking to myself, "Well, THAT'S audio...", I gave it a try. My USB DAC (reference-audio-analyzer.pro/en/…) is now working again! :D Pretty chuffed! Your mileage may vary, but - it's worth a try! :))) Dec 19, 2022 at 9:04

1 Answer 1


Android devices can work in USB host or device mode. Host is the one which controls USB communication. PCs mostly operate in host mode. Device is the one which is being powered and controlled by the host. Flash drive is a common example of USB device. Linux/Android kernel supports device mode through different gadget drivers. UMS, MTP, ADB are different gadget modes on Android devices.

Audio over USB in Device Mode

On Android devices, technically it's possible to stream Audio over USB both in host and device mode. Since Android 4.1 the latter mode is “provided by Android Open Accessory (AOA) 2.0 and provides limited audio capability”. It uses the USB Audio Gadget Driver in kernel (built with CONFIG_USB_AUDIO option) and the accessories supporting AOAv2 protocol are built using Accessory Development Kit (ADK). Custom Accessories page states:

AOA protocol specifies how an accessory can establish communication with an Android device via USB. Due to the low power output of Android devices, AOA requires the accessory to act as a USB host, meaning the connecting accessory must power the bus.

But as per official documentation:

Accessory mode audio has not been widely adopted, and is not currently recommended for new designs.

And the AOA protocol documentation warns:

Caution: AOAv2 audio support has been deprecated in Android 8.0.

It means Android 9+ devices won't be able to function in device mode while streaming audio over USB. So the Audio Source USB configuration option is no more there.

Audio over USB in Host Mode

However Android devices support audio peripherals in host mode (kernel must be built with CONFIG_SND_USB_AUDIO). Since AOA is specific to Android, such accessories aren't usable with other hosts like PCs. So there was a demand from audio peripheral manufacturers, device OEMs and ROM developers community to support standard USB audio out capability in host mode (e.g. see this, this and this). Support for a subset of USB audio class 1 (UAC1) features was added in Android 5.0.

USB Device classes specify the standard protocols for USB peripheral functions so that the host can inter-operate with them without requiring any hardware-specifc driver (i.e. in driverless mode). USB Mass Storage (UMS) is a common example. All Mass Storage Class (MSC) compliant thumb drives work on all OSes including Linux, Android and Windows, irrespective of the device vendor. In the same way the USB audio peripherals which are USB Audio Class 1 compliant work with Android devices like on any other USB hosts e.g. PCs.

So host mode USB audio covers wide range of USB-based peripherals including the headsets that follow the USB headset specification.

When a UAC1 compatible peripheral device (like a DAC) is connected to USB port on Android device, digital audio is automatically routed to that peripheral. However if an app wants to use advanced USB host APIs to interact with the peripheral (and not simply the audio routing) , it's possible to Disable USB audio routing in Developer Options.

  • bro, can we disable automatic routing to USB audio programmatically? Can you answer this stackoverflow.com/questions/77436297/…
    – Qamar
    Nov 13, 2023 at 4:53
  • 1
    @Qamar your app should have WRITE_SECURE_SETTINGS permission granted. Then call Settings.Secure.putInt(context.getContentResolver(), "usb_audio_automatic_routing_disabled", 1). // No sorry. Nov 13, 2023 at 7:58
  • @IrfanLatif Hi Irfan. Do you mind taking a look at this somewhat related question I have? Android 13 car head unit won't route phone calls or AV-IN audio to USB DAC/AMP android.stackexchange.com/q/255930/405546?sem=2
    – conanDrum
    Feb 1 at 21:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .