Hello,
From the 4.1 release, android began to support usb sound card.
When the usb sound card inserted in the device, audio stream will immediately switch to the usb sound card.
I want the audio stream does not immediately switch over, but I do not know which side to modify it.
Where are the usb audio policy code? :crying:
Hello everyone!
First of all, I'm new to this forum and I hope I'm on the right section.
I am developing an Android app that uses USB in host mode. The USB device can stream audio (both playback and capture), but can also send/receive other data (no more than a few bytes) in interrupt/bulk mode.
The idea is to use USB Audio driver provided by Lollipop for audio, and the USB methods provided by the SDK for the other data.
When using Lollipop's USB audio driver, the OS "automatically routes audio playback and capture appropriately". However, the documentation (source.android.com/devices/audio/usb.html#hostApplications - sorry for the link, as a new user I can't post external link) also says that "the automatic routing may interfere with applications that are USB-aware".
I tried the automatic routing and it works. The problem is the following: when Android captures or plays audio, it seems that all the data sent/received in the same direction by another way are blocked (like interrupt ones, through the SDK). That is to say, if I play audio from the smartphone, I can't send any other data to the device (and if I capture, I can't receive).
Additional information:
The bandwith is not an issue: I succeeded to receive both "audio" and data using Libusb in isochronous mode for audio and the SDK for other data. But I can't write an entire driver for USB Audio with Libusb, and I'm not sure that a simple isochronous transfer does the trick correctly.
The device is recognized by a PC both as a microphone and a speaker, so this is not a device issue.
The phone is not rooted.
Is there a way to solve that?
Also, assuming I can use the Lollipop's driver, does anybody succeeded in sending and receiving audio at the same time?
Best regards,
Victor
Hi everyone I recently switched over to Android from iPhone for the first time and have been researching all kinds of stuff like crazy.
My issue is getting my music and playlists to pop up in my cars media system when I plug it in via USB. All my music and playlists are on my SD card because it won't all fit on internal storage. I'm not as knowledgeable as many of you here but after doing some research I think the problem is because I cannot put my phone into mass storage mode and adoptable storage doesn't exist on this phone. When I plug it into my car the only sound files are some weather notification tone and another type of beeping noise or something.
If there's an easy way to manage music on my SD card without having to remove it and plug it into my computer I would love to know that as well. A couple apps I tried could only connect to my internal storage for some reason.
Thanks in advance.
I use "Poweramp" (which I think is the best media player available for android):
https://play.google.com/store/apps/details?id=com.maxmpz.audioplayer
and "Bluetooth Connect & Play":
https://play.google.com/store/apps/details?id=com.cp2.start.and.play.music.player
Bluetooth Connect & Play allows me to choose what app I want to launch when I connect to the media centre in my car (Power amp). Works perfect.
Stromma
Thanks for the reply but I don't want to connect with Bluetooth. I want a USB connection for the audio quality and so that all my media shows up on my car screen so I can search through playlists and sounds with my car not the phone
Does your head unit read your iphone like a hard drive? I think your head unit need to be android compatible for that to work on the G5 but I'm not sure.
My wife just told me hers does that. I'm not sure why it wont read from your sd card.
I'm building a carPC, which connects to a 5-channel amplifier using a USB sound card. I have two sound cards available; a Sound Blaster X-fi, and a generic no-name one with a CM106 chip inside.
I'd like to use android-x86 for the OS, and I read that Android 5.0 and up supports external sound cards. However, I can't find a single app that offers a mixer that recognizes multiple speakers. I need front/rear, left/right and sub speaker balances, but I'm straight out of luck finding any support for this.
Hello,
I have got a "YokaTV KB2" box with Android 6.0.1.
This box has an AMLogic s912 SOC, 2 GB RAM, 32 GB ROM, 2.4/5GHz WiFi, Bluetooth 4, 2 USB, 1 HDMI, 1 AV, 1 SD card, gigabit Ethernet and 1 DC input connectors, plus a remote controller. Of course, it doesn't have a screen, speaker, microphone, camera, GPS and any sensors built-in. The device is rooted by factory and has Google Play market installed. So, this is not a classical smartphone or tablet, just a board with Android installed and video is outputted to HDMI, inputs are bluetooth or wifi keyboards, mice or its own infra red remote controller.
My issue is:
I have researched a lot in order to have a "sure fire" at choosing USB webcamera. As you may know this is not that easy task like in case of Windows. You can easily choose the "wrong one" that gives no video and/or audio (mic) on Android.
Anyway, I've found out that Microsoft LifeCam HD-3000 will be my choice, so I've bought that one. I've also checked it out by an app called CameraFi. It has perfect HD video (up to 720p) and audio (built-in USB microphone) on Android. Bingo... so far...
Then I've installed Skype for Android. Called voice test to check the connection out, but it finished "too fast" and I've not heard my voice. A bad sign...
Then I've called my other device and found out that video is going through perfectly (if we can call 640x480 resolution "perfect" for Skype), but no voice heard.
As you may know there are just a few device settings in Android Skype compared to Windows one. One for video quality (hi/lo) and that's all. No setting for sound input, so I can't select sound source (e.g. internal mic and usb audio/mic).
So, I've got a half-success regarding Skype on Android.
I guess, since internal microphone is configured in box's android, Skype is sticking to use it as default. But as the box has no internal microphone hardware, I can hear nothing (or just low volume static) on the counter side.
My questions:
1. Can I somehow "force" Skype for Android to use webcam's USB microphone instead of the phantom "built-in" mic?
I've tried to remove (comment out) built-in mic from "audio-policy.conf" file, but Skype just threw a message like "microphone is used by another app, quit that app or wait until it ends" or similar.
2. As it seems (as per the above) Skype WANTS to use (the non-existant) internal mic... is there a way to "re-route" the existant USB mic to show up as internal microphone to Skype? Are there any "build.prop" or other config file magics exists for this?
3. If none of the above, then is there a custom modded version of Skype for Android that has a bit more settings regarding audio/video ? I've found a few here but those were worked up to Android 4, but not for 5 or 6. And also I'm not sure if they has the audio settings needed...
4. As a final solution: I would also be happy with an alternative Skype client that could handle my webcam perfectly. But so far, all my searches resulted that "as a new feature:" Skype is missing from the popular clients (IM+, Imo etc.). But we never know, maybe there is one left exist...?
Thanks for reading my lengthy first post.
Is there a solution to the problem above?
I saw a "Sound Device Manager" section within Settings of Android 4.x.x on other TV-boxes.
Maybe there is a way to "enable" such a settings block within Android 6.0.1, too?
Hi, just faced same problems as DonJoee: (Scishion V88 Mini II TV Box, Rockchip RK3229,2 Gb/8Gb, Android 6.0), also after some research (tried already 3 webcams (Trust, Microsoft, No-name) :
-All cams detected by system
-All cams are showing/sending videostream perfect everywhere (skype, viber, UsbWebCameraPro etc.)
Webcam build-in microphone (also all cams): works perfect in Google voice search, UsbWebCameraPro. Problem: Does not work in messaging Apps (both Skype and Viber).
-Recommended disabling „OK Google on every screen“ does not help.
-Looks like after plugging, webcam’s microphone is detected correctly in /dev/snd/ as pcmC3D0c.
-Looks like messaging app always forced to use device internal microphone (TV boxes have no internal microphone), just ignoring others.
In addition to methods of DonJoee i have tried add in bild.prop:
usb.audio.cap.device=pcmC3D0c
audio.input.active=AUDIO_CODEC
Regretfully it does not help.
Any hint on app, that manages audio devices on Android 6.0?
Any other ideas?
Thanks
I faced a similar issue with my Huawei Honor 8 connected through USB OTG (USB C) to my USB microphone Blue Yeti. Tested on a Sony Xperia Z3 Compact as well with the same behaviour. When calling the Echo / Sound test service no audio was recorded at all. On a similar note, attempting to record using one of the few audio recording apps that allow input from USB microphones (RecForge II) was unsuccessful: when set up to use the "default" (and not the internal) microphone the recordings would not start (i.e. the visual representation of the sound input normally seen was static and zero and the time indicator did not move). However, a sound file with length "-596:-31:-23" was still created at every attempt.
I attempted a wide range of options, including enabling/disabling USB Debuggning and selecting different options in Select USB Configuration (including Audio source and MTP) in Developer options. I also made sure USB audio routing was not disabled in Developer options. No change had any effect, and I was confused that upon changing USB mode in the scrolldown menu that appears upon connecting the Blue Yeti to anything else than "Reverse charging" only made the red LED on the Blue Yeti turn off for a second, and then come back on as the phone automatically reverted the setting to Reverse charging. I also tried different USB cables and different OTG adapters to no avail.
The solution I found after much experimenting was not really related to the above. I found that, when attempting to record using the USB microphone in RecForge II, the recording would start if I disconnected and reconnected the USB microphone while recording. What happens is that the phone phone reverts to recording with the internal microphone when the USB microphone is disconnected, hence starting the recording since the audio input is valid. Upon reconnecting the USB microphone (still during recording), there is a few seconds of silence but then the phone switches to taking audio from the USB microphone input and I can record as normal.
The same applies for Skype. When calling the Echo/Sound test service with the USB microphone connected, I wait for the signal to start recording a message and then quickly disconnect and reconnect the USB microphone. This way, I am able to record a message using the USB microphone that is played back to me afterwards. I expect the same solution to apply during Skype calls (disconnecting and reconnecting should enable Skype to take audio from the USB microphone) but I have not tested this.