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.
Purpose: To reduce the distortion and better control the audio DAC of the Pixel 2 XL.
Edit 11/25/18
Please see this post for the version supporting the Apple Dac. In addition the new version incorporates a mod for 50 steps of volume rocker control. I redid the volume limits in the app to 50, so you will have issues using the new app with 25 steps only.
Introduction: The new Pixel 2 differs from the original Pixel in a major way. The lack of a headset jack offloads the headset out capability to a USB Dac in the supplied dongle (or any USB Dac you are using). Although at first glace this is a disappointment to most, on further thought it has some advantages. No longer will you need to upgrade a phone because the audio is better on a newer model, just upgrade the dongle instead. Or, have a range of dongles to suit your purpose (power, low distortion, impedance, form factor, etc). But, unfortunately, the folks who designed the software, did not (IMO), properly adjust the digital gain of the dongle Dac or aftermarket devices like the Dragonfly red. So the Dragonfly can put out 2.1 V, but the stock Pixel 2 will only max out at 55 mV. Worse, the supplied dongle (which has very nice electrical/audio specs), is set to have maximal Dac digital gain, resulting in higher distortion. Now you may say, what about the good Gsmarena tests. They test all devices at max output, so the distortion bands will not appear so significant. But, you listen at perhaps one hundredth of that voltage, making the comparison invalid. By cutting the digital gain of the dongle, we can approach Dragonfly red specs in regards to distortion. The dongle has very low impedance, excellent crosstalk and power is there, if needed.
The goal of this project is to enable Dac digital gain adjustment, report the gain numbers and if so desired, track listening Spl to help protect your hearing. It is not an equalizer, effects module and the goal is audio quality/accuracy.
It does need root.
Requirements: Root with Magisk, Tested on stock 8.0. At this time the only dongles working are the supplied Google unit, and the Dragonfly red. More to follow. Each needs to be set in the software backend. App will work with Spotify, Google music, Neutron player, maybe others.
Download the tinymix file, unpack tinymix and place it in your sdcard/Download. If using the the tinymix32 file make sure you rename it to just tinymix, no extension.
Note, the version of tinymix for the U11 must be the 32 bit one.
Unzip the tinymix32, rename it to tinymix and place in the Download folder, then reboot the phone.
The version for the Pixel 2 XL is the 64 bit version posted as just "tinymix.rar"
Download and install the apk.
Open the apk, it will ask for root permission, say yes.
Reboot your phone.
The app will automatically copy tinymix to sbin.
Insert the dongle with headphones attached-- the phone does not register the dongle properly unless the headset is plugged into it. The Dragonfly does not have this issue.
The app will automatically open and the following screen appears:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
For now do nothing, it will go away in 10 secs.
Start playing music and the following notifications should appear:
Lets look at USB Gain first. Pull down the notification and the Dac Up, Dac Down, Sliders appear. The Up/Down will increment the digital gain by about 1 dB per click. The sliders will bring up the following:
The left controls the android volume, the right side control the Dac. You generally want the android vol near max and the Dac gain low. Since you can still adjust the android volume with the standard volume rocker (2.4dB per click), I would find a comfortable net volume out with the android Vol about 22 with a Dac gain to fill up the difference. The initial settings are some safe defaults I put in and we can change that as noted below. The gain numbers on the slider go from 1 to 64(Dragonfly defaults- 1 dB per tick), but the Google dongle has a range of 1 to 175 (don't ask me why). I have converted this so the spinner reads 1 to 64, but below it is the actual file output.
The 3 dot menu on the top right will bring you back here:
The headphones screen transfers to form entry to set up various headphones you may own. If you know the specs, the app will calculate the Spl (but there is an issue with the Google dongle calculation, it's off by a few dB, Dragonfly is spot on). More importantly the initial Dac gain (in percent) and android volume can be entered, so when you replug, the app will start with those settings. It remembers the last applied headset setting on reboot. So if you liked a dongle gain of 32 of 64 (same as 87 of 175), that's 50 percent. Sorry about the lack of uniformity, but the dongles all have different gain numbers.
The list of headphone entries lies below. A single click chooses the parameters for the listening session(start vol, gain, etc) and will remain for the next Usb insertion as well. To delete an entry, long press on it.
The headphone sensitivity numbers published are either dB/V or dB/mw. The program uses dB/V, but will autoconvert if dB/mw is entered. Be extra careful which headphone sensitivity units are used--either dB/V or dB/mw. Enter either one but not both. The website of the manufacturer should have the specs. Note: Shure is in dB/mw and Sennheiser is dB/V.
The visualizer button will engage the java android visualizer that actually calculates RMS and Peak signal, making the Spl more accurate. Some details from my old app.
Lastly, the Spl Graph option will allow you to view the current session of dongle use or previous, it use the Google Chart api.
To be extra cautious initially-Make sure you do not put the headset on and play - keep it off the ear then insert--a high sound volume can damage your hearing.
Many thanks to @chdloc for continued help in android audio, acoustics and of course friendship.
A few comments on excessive Dac digital gain.
The Dragonfly red is felt to be one of the top Usb Dacs in that price range. But how would it look if the digital gain was set at max (like Google does with it's dongle).
Here it is, android volume down, digital gain at max:
Not much different from the Google Usb dongle.
But, digital gain turned down, android vol high - much better:
I did measure the output voltage of the Dragonfly at max gain/max android vol, it is 2.1 volts - as advertised.
Reserved.
I do have a schiit dac that I can confirm is working as well. Thanks for your work on this!
I don't think I am ready to root the device yet (Android Pay one of the major reasons). Is there any way that this can be installed/enabled via ADB? I do have Dragonfly Black and love the sound coming out of it, but would prefer if I can get semi-decent sound out of the supplied dongle, mainly due to its size and convenience.
jasenko said:
I don't think I am ready to root the device yet (Android Pay one of the major reasons). Is there any way that this can be installed/enabled via ADB? I do have Dragonfly Black and love the sound coming out of it, but would prefer if I can get semi-decent sound out of the supplied dongle, mainly due to its size and convenience.
Click to expand...
Click to collapse
Believe me, I explored non root options and couldn't find one that can work.
The supplied Google dongle approaches the Dragonfly in quality with the proper settings.
Hey @bjrmd
Thanks for the detailed research
I just tried this, but however , couldn't notice difference in sound while changing the DAC slider. Noticed that the sound volume levels change as expected while moving the left slider . How would be the expected behaviour ?
Thanks again for your work !
Best regards
Ash
Ashray_Vk said:
Hey @bjrmd
Thanks for the detailed research
I just tried this, but however , couldn't notice difference in sound while changing the DAC slider. Noticed that the sound volume levels change as expected while moving the left slider . How would be the expected behaviour ?
Thanks again for your work !
Best regards
Ash
Click to expand...
Click to collapse
That means that something went wrong with the tinymix calls to the Dac. Did you place tinymix (extracted) in Download folder?
If so check sbin folder with a root capable file explorer and make sure tinymix is there.
The app should have asked for root on first opening as well.
On reboot, tinymix gets copied from the Download folder to sbin and run permissions granted.
bjrmd said:
That means that something went wrong with the tinymix calls to the Dac. Did you place tinymix (extracted) in Download folder?
If so check sbin folder with a root capable file explorer and make sure tinymix is there.
The app should have asked for root on first opening as well.
On reboot, tinymix gets copied from the Download folder to sbin and run permissions granted.
Click to expand...
Click to collapse
You are spot on.
I had extracted the contents to scard/ and not in downloads ( in the XDA mobile version, the download word is in the next line in my device and hence, missed that. Only saw sdcard/ . My bad )
It works now, thank you much!
Ash
Ashray_Vk said:
You are spot on.
I had extracted the contents to scard/ and not in downloads ( in the XDA mobile version, the download word is in the next line in my device and hence, missed that. Only saw sdcard/ . My bad )
It works now, thank you much!
Ash
Click to expand...
Click to collapse
Can you notice the difference in sound (not just the volume)?
@bjrmd
Great work, thanks bro.:good:
@bjrmd
Hey
Really cool thing you granted us access to.
I also do use a dragonfly red. However your app doesn’t seem to like it at all.
When I plug it in the toast message says. Error invalid mixer control.
I’m not able to adjust the dac gain.
Your app should be installed correctly as the Google dongle is working fine.
Can I get you some logs are anything so we can make it work?
With kind regards
That is strange, I have the same model Dragonfly and it works fine.
With the Dragonfly inserted could you please run, cat /proc/asound/card1/stream0 in a terminal (Termux) and post the output.
It's possible that your Dragonfly revision has a slightly different name of device.
Thanks
bjrmd said:
That is strange, I have the same model Dragonfly and it works fine.
With the Dragonfly inserted could you please run, cat /proc/asound/card1/stream0 in a terminal (Termux) and post the output.
It's possible that your Dragonfly revision has a slightly different name of device.
Thanks
Click to expand...
Click to collapse
Here you go. I think I updated the dragonfly at one point via PC if I remember correctly.
Freak07 said:
Here you go. I think I updated the dragonfly at one point via PC if I remember correctly.
Click to expand...
Click to collapse
Thanks (it is a bit different, not sure yet if it matters)
Now please try in the same terminal window with Dragonfly attached:
Tinymix -D 1
and note the output.
bjrmd said:
Thanks (it is a bit different, not sure yet if it matters)
Now please try in the same terminal window with Dragonfly attached:
Tinymix -D 1
and note the output.
Click to expand...
Click to collapse
Figured I needed to do lowercase.
Freak07 said:
Figured I needed to do lowercase.
Click to expand...
Click to collapse
Thanks, it should have been working.
When you plug in the Dragonfly, do you see the following toast messages:
"Reading Device"
then
"Dragonfly"
and get the Menu screen that stays for 10 sec
Also can you try in the terminal window:
tinymix -D 1 "PCM Playback Volume" 32
if it does not error, while playing music and your android volume low, run the same command but vary the number (ie 32) from 1 to 64, the volume should change--be careful--64 is full 2.1 volts at max android volume
bjrmd said:
Thanks, it should have been working.
When you plug in the Dragonfly, do you see the following toast messages:
"Reading Device"
then
"Dragonfly"
and get the Menu screen that stays for 10 sec
Also can you try in the terminal window:
tinymix -D 1 "PCM Playback Volume" 32
if it does not error, while playing music and your android volume low, run the same command but vary the number (ie 32) from 1 to 64, the volume should change--be careful--64 is full 2.1 volts at max android volume
Click to expand...
Click to collapse
No. In fact it showed reading device. Afterwards it showed the invalid mixer file toast and then google dongle detetected.
So I just deleted the tinymix file from sbin. Deleted the app and set it up new again without ever plugin the Google dongle in. Now it shows this in the notification area.
It says reading device and closing in ten seconds. But the toast never says dragonfly detected.
The other two commands I did again.
But setting the gain manually works! Via the last two commands.
Freak07 said:
No. In fact it showed reading device. Afterwards it showed the invalid mixer file toast and then google dongle detetected.
So I just deleted the tinymix file from sbin. Deleted the app and set it up new again without ever plugin the Google dongle in. Now it shows this in the notification area.
It says reading device and closing in ten seconds. But the toast never says dragonfly detected.
The other two commands I did again.
But setting the gain manually works! Via the last two commands.
Click to expand...
Click to collapse
I am not 100% sure why it didn't work but I made a change in the syntax for recognition and try the version below if you can.
It also has a few bug fixes and if it does work for you and you are interested, the Spl is now quite accurate for both devices.
bjrmd said:
I am not 100% sure why it didn't work but I made a change in the syntax for recognition and try the version below if you can.
It also has a few bug fixes and if it does work for you and you are interested, the Spl is now quite accurate for both devices.
Click to expand...
Click to collapse
Hello, thanks for the test however it still isn't working.
I deleted tinymix binary and the app again before updating.
When I plug in the dragonfly the window pops up. It says reading device but it never says dragonfly.
what may give a clue. When I never put in the google dongle before using the dragonfly I cannot bring up the slider/gain screen.
I attached a screenshot with the logcat lines hitting the slider button in statusbar 2 times. I also ran the commands you gave me again.
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.