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
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.
hi,
My android 55 inch TV is on version Android 7.0 Nougat OS.
On multiple restart's of android tv i observed only few times sound stop coming out from apps like Youtube, Netflix.
Reason i observed is it happens only if logitech webcam with inbuilt mic is plugged into USB.
May be android tv on restart sometimes assigned logitech webcam as default AUDIO Output. Sometime it kept inbuilt speakers as Audio Output.
Without doing root how this problem can be resolved, please help ?
Dear community,
I have a problem which is the following :
When I leave my phone somewhere and overreach the distance limit, bluetooth gets disconnected.
However my audio then automatically begins to playback through the phone itself.
Does anyone recognise this and is there a solution to this?
Blackview 9000 pro
Android 8.0.0
Not app specific : both youtube and insight timer have the issue , which leads me to believe it is an android issue.
With kind regards,
Bradeam12
Hi all.
The sound from a USB DAC (iFi Go Link) I bought to use with my MediaPad keeps pausing randomly, introducing a brief gap in playback each time. I installed UAPP (USB Audio Player Pro), to see if it would help, but it hasn't. Sound from the headphone socket works fine, and the DAC works fine with my Sony Xperia phone.
I've noticed in Settings > Device connection, the "USB" entry is greyed out and states "Disconnected", even when the DAC is plugged in and playing music...?
Are there any (tablet) default settings I would need to change to solve the issue? Are there any known issues in using USB DACs with this MediaPad?
Thank you for any help with my issue.
My specific device is BAH2-W19, Build no. BAH2-W19 8.0.0.371(OCEC431).