Android USB Multichannel Audio Routing - Android Q&A, Help & Troubleshooting

Hi All,
I have been searching about this topic for months I cannot find a method to use 6 channel usb dac or HDMI Audio output on Android. I dont want surround sound at all, but I would like to use my phone as the infotainment engine. However I should be able to route notification/phone audio to a specific channel lets say front left. I checked android hal service for related interfaces but configuration files doesnt really show clearly how can I implement this.
Are there any kind of example of this? Can you please advice me how can I do it. Even if I can manage to make one stereo pcm output for media + mono pcm output for notifications and calls that should be enough too. I can do the rest with a microcontroller.
One more question I heard few times androids audio mixer layer is so crappy that makes jitter on pcm signals, how is your experiences? For instance qualcomm based socs have integrated dsp why phone developers gets benefit from it?
Thanks

Hi, mbt28 did you manage to find a solution for this?
I'm searching for exactly the same solution, to somehow output digital stream (containing multiple audio tracks) to a DAC, which will then convert it to multiple analog tracks.
Kasparas

I've got multichannel analog output working on my H96 Max V58 tvbox, with a Startech 7.1 channel USB soundcard. It's got Android TV OS 12. I had to edit /vendor/etc/usb_audio_policy_configuration.xml to add the necessary info. I'm attaching a diff with my changes. The changes are just based on what I saw for the HDMI policy. I haven't tried to get the digital channels working on this device yet but that might be nice to try later too.
The reason I deleted some text from the header comment was to keep the overall filesize the same as the original. On my box /vendor is mounted from /dev/block/dm-1 and even though it's an ext4 filesystem, you can't edit any files on it because the FS has no free blocks left. So I had to overwrite the file by finding its byte offset in the block device image instead. If you can edit the policy file on your box, you can ignore that part of the diff.
PS: this is the USB soundcard I used https://www.amazon.com/StarTech-com-7-1-USB-Sound-Card/dp/B002LM0U2S
It works OK except its USB jack is flaky, doesn't always get a good connection. I have to jiggle the cable sometimes to get it to power on, but then it works.
PPS: I just checked, the SPDIF out works as-is, carrying the front left/right audio.

Related

Gtablet as a carpc?

Hey guys, I've been toying with the possibility of using the gtablet as a car pc. There are a few points to consider in my research.
- HDMI format can handle 8 channels of uncompressed audio. Can the gtablet output 8 channels of audio and have the power to handle processing (EQ, crossover, crossover slopes, time alignment, etc?)
- We would need to find a way to convert the hdmi cable to an analog rca cable. There are several devices that can do it, but none that I can see that can convert more than just 2 channels.
- Can the gtablet hand more than one bluetooth connection? I would like to connect a gps and an obdII device.
- There is a frontend on the android market called andcar, and it looks like it could be usable on the gtablet.
- Another option is to use a usb to rca dac, unfortunately all the ones on the market do not have android drivers to support it.
I would stay away from using the built-in jack on the gtab because, frankly, the audio quality from the jack is just not that good.
Any tips/ideas/suggestions?

[Q] What is the state of external audio input on Android?

Hello,
I'm trying to get higher quality audio input (sample width and conditioning, don't care about sampling rate above 32k) than is available through the microphone jack and was looking for an overview of where the development of such capabilites stands today. From what I gather:
Android 3.1 (maybe 3.2) added some support for USB Audio, though I can find almost no details on the capabilities. I can't post links, but a post on computeraudiophile with google search terms "usb audio enabled galaxy s3" claims support for a bunch of USB DACs on the Galaxy S3, but there is no mention of using the ADC.
Android 4.1 added support for USB audio docks -- these are generally (as far as I can find) speaker systems with a USB cable -- which only support audio output.
Software such as USB Audio Recorder Pro can record from a number of devices but this is of no use to a developer wishing to get the data into a separate application.
Lots of devices have HDMI ports but I found nothing about anyone managing HDMI input.
I can't find any such device for Bluetooth, but also nothing suggesting that it isn't possible. If so, can anyone speculate on audio quality limitations?
Now, I understand that the vast majority of users who want USB audio want output so it can go to their speakers, but there are some who need the other direction (or both...). Can anyone more familiar with the subject comment on the state of external audio input on Android devices?
Thanks,
Ben

USB DAC as main audio output

Hello,
I am making navigation system out of my android tablet, and i faced a problem that not all times i connect USB DAC, android sends audio data to USB, but rather to internal speakers (some times it does that, sometimes it does not)
Is where a simple way how to set to use USB as main audio source, and block headphones or any other audio source ?
Same apply to FM radio, i can plug headphones so it would act as antenna, but i still need audio to be rooted to USB DAC
Small support via PayPal for some one who give me the right answer
I would like to know too

Any way of adding an audio input to mix/play with the rest of the android sound?

The KLD2 I have has an AV input but one has to switch the MCU specifically to the AV input in order to listen.
What I am looking for is to have an audio input which mixes/plays full time with the rest of the android apps without having to explicitly switch to it. Has anyone done this? Do any usb devices exist (with android driver support) which implement an audio input and play real time what's coming in?
Yes, people have used a USB DAC, you need to search the original Q&A thread here :
https://forum.xda-developers.com/showthread.php?t=2660662
and maybe the MTCB Hardware Development forum. Try this first, its shorter !
Ok, I'll search that thread. DAC (Digital to Analog Converter) are used for the opposite thing though - to output sound from the MTC unit to an external amplifier or some other device. I am looking for the opposite (ADC) - to bring sound from external analog device into the MTC (and have the MTC mix/play it along). I've searched for USB ADC in the past but haven't found any interesting info yet.
shtirlitz111 said:
Ok, I'll search that thread. DAC (Digital to Analog Converter) are used for the opposite thing though - to output sound from the MTC unit to an external amplifier or some other device. I am looking for the opposite (ADC) - to bring sound from external analog device into the MTC (and have the MTC mix/play it along). I've searched for USB ADC in the past but haven't found any interesting info yet.
Click to expand...
Click to collapse
Doh, stupid me, but maybe an ADC will work in a similar way, via USB etc, so DAC posts may still help ? A seatrh for DAC should bring something up, btw, sometimes it works better to use google to search threads on XDA.
You are looking for something called an audio interrupt device. They used to be more popular when GPS nav units came out and people wanted voice nav over their stereo. They can connect by various means but you'll need to do some research to be sure it will work with your car and stereo setup.

How to force Skype for Android to use USB microphone?

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.

Categories

Resources