[Q&A] [MOD] USB Audio Support - Nexus 7 Q&A, Help & Troubleshooting

Q&A for [MOD] USB Audio Support
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.
Before posting, please use the forum search and read through the discussion thread for [MOD] USB Audio Support. If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.
Thanks for understanding and for helping to keep XDA neat and tidy!

NetFluke said:
Here's a small New Year present to all audio lovers!
This patcher was originally developed by JackNorris and was later modified by _crue_ - many thanks!
However, 4.4.zip patch disabled headphone functionality. So I ripped contents of WiredAccessoryManager from Timur's USB-ROM and updated 4.2 and 4.4 zips with them.
Results:
1. USB DAC hotplug works!
2. Switching between internal speakers and DAC - works!
3. Once headphones are plugged in, sound switches from speakers or DAC to them - works!
4. No volume control for USB DAC - this requires another patch for AudioPolicyManagerBase.cpp before ROM compilation (http://forum.xda-developers.com/showthread.php?t=2222374&page=93 post #928 - again, all credits to JackNorris). I do not have the environment to build my own ROM...
It's strange that FineVolumeControl app is able to control DAC volume.
As of now, it's a partial success, but hope is not lost! Please look for 1st post in this thread for instructions.
Tested with Oxydo v15 version 1 (BTW, v1 boot failure can be caused by different SEPOLICY binary in CM11 and AOSP ROMs, binary from latest CM11 kernel works even if installed in AOSP kernel ramdisk) and CM11 nightly from 12/25.
Credits:
To JackNorris and _crue_ for the patcher
To Timur Mehrvarz for his tremendous development work on USB ROM.
Happy New Year!
P.S. Additional info (as per recommendation from redeyedjedi)
Java JRE 1.6 (16u45 recommended) must be installed (included SMALI binaries might not work with Java 1.7), as well as .NET v4 or v4.5
Hotplug on boot does not work (not an issue for me) no matter which options I adjust under /sys/kernel/usbhost - I must unplug OTG cable from Nexus first.
However, if I boot without OTG cable, then connect it without DAC and only later connect the DAC, it is detected properly.
If I boot with OTG Y-cable (with power connected to it) and plug the DAC after boot completion it is detected properly.
It seems that initial DAC detection routine in the kernel is affected by OTG charging patch (as Timur stated a while ago). There might be something else in his ROM to force initial DAC detection. I played with Timur's kernel during my 4.2.2 days and it did not detect DAC on boot as well when using stock ROM.
If I boot with stock CM11 kernel, DAC is detected on boot, hotplug works, but no OTG charging (and I need it for USB peripherals)
And there's still a volume control issue...
WARNING: It seems that this patch will only work on CM11-based ROMs! It can render AOSP ROMs (such as Purity) unbootable! Please use with caution!
Click to expand...
Click to collapse
@NetFluke were you ever able to get the volume control for the USB DAC to work? I have a Nexus 7 2012 grouper with kangaroo kernel 3.1.10 and stock AOSP 4.4.4 with xposed framework and the USBAudioAccessory module witch works great as far hot pluggable USB and charging in Host mode. I have two DAC's, one is a Pluggable brand with no controls and the volume is either 0 or max and I have another generic one with hard volume buttons. When I press the hard buttons the volume slider appears and goes from 0 to max. However when I have FineVolumeControl in the foreground i can control the volume granularly both with the hard buttons on the DAC and Nexus and also the soft controls. I found out the hard way that @jacknorris's volume control only works on 4.2.x and earlier. This is all for a car install in my Honda Fit. Any help would be greatly appreciated.

@yukster Which faux kernel are you using? I am running AOSP 4.4.4 with faux123 3.1.10 on my Nexus 7 2012 grouper. Did you have to do anything else else to get it to recognize the DAC?
Thanks,
Peter

Related

[Q] USB Audio on ubuntu?

Has anyone manage to install an usb audio board or usb headphones to ubuntu on hd2? Is it possible? I'm trying to update alsa drivers but haven't managed to solve this problem.
Is there a known way?
Yes, worked fine with new kernel update and modules. It detected as soon as i inserted the sound card even through usb hub.
However audio does not work for phone calls still. Exploring out still...
can you please direct me on where or how these updates could be make. Even external audio would be ok.
I've tried downloading any update i could get, but don't know how to enable sound as my external usb audio adapters are not yet recognised.
Yes... external audio is fine. I tried with a Microsoft USB Headphones and also with cheap usb sound card both are working fine...
Search with the string zImage-htcleo-usbhost-latest and download both zImage-htcleo-usbhost-latest and modules-htcleo-usbhost-latest.tgz
Search [Discussion]Linux and Android on the HD2 and you will get information about updating the kernel.
Cheers!
hello, i did by the following guide
Installing the latest Linux kernel image (zImage)
1) Download the latest Linux kernel image (right click, save file as)
1a)for Google Android
1b) for classical GNU/Linux based distros (Ubuntu, openemebdded, meego, maemo etc)
Be aware these build links are dynamic and will be updated once the Linux kernel source code is updated. See here for static links
2) Rename the file to zImage
3) Overwrite your old zImage file with the newly obtained zImage file
Installing the matching Linux kernel modules (.ko files)
1) Download the latest Linux kernel modules to match your kernel image
1a) for classical GNU/Linux based distros (Ubuntu...)
1b) for Google Android
2) Install the modules...
2a) in GNU/Linux
As root run
cd /
tar xvf /path/to/modules-htcleo-usbhost-latest.tgz
downloaded both zImage-htcleo-usbhost-latestt and modules-htcleo-usbhost-latest.tgz then renamed first one like the older one in the linux folder, then use the tar command in root console to copy files from the archive to /lib folder (or wherever they were put). After a restart i get some fatal errors during text load up of linux, something involving mod probe complaining about not finding something in /lib folder, modules.dep if i remember, then at GUI load i get another error "cannot update ICEautorithy file. When i click ok, i get the desktop loaded but still no sound plus now, no wifi or some other drivers.
I guess i did it wrong
diwa_sen said:
Yes, worked fine with new kernel update and modules. It detected as soon as i inserted the sound card even through usb hub.
However audio does not work for phone calls still. Exploring out still...
Click to expand...
Click to collapse
can you please tell me in detail what I have to do to get usb audio working
in sound settings it shows me that there is no hardware????
i didn't manage to solve that problem.
i still have problems replacing the old kernel and modules, after reboot the phone displays some errors involving modprobe then iceauthority files. If someone could upload a newer version using this kernel or a guide to enable sound, it would be excellent.
ok, managed to change to a new kernel and modules with no problems but still.. no audio. By default (no other modifications) i have no audio devices in the hardware tab of "audio" in preferences. When booting up i can see the usb-audio driver loading up and my audio card is recognised as "usb headphones" or something like that, but when the graphical part of ubuntu loads up i can't see nothing related to audio.
Tried with both cheap sound card and logitech usb headphones, same result, no sound.
USB audio works on my Allwinner A10 tablet witn "Unofficial CyanogenMod 9 for many AllWinner A10 tablets" firmware from Christian Troy

[Q] USB Host Controller

Hi, I'm running HyperDroid CM7 - 5.5.2 on my HD2 and I've had a problem installing the drivers needed for USB Host controlling or using USB OTG.
...Okay, not problems, I haven't been able to figure out ANYTHING over what to do.
I know that USB Hosting works on the Linux Ubuntu ROMS and WM 6.5, so I checked up what solutions would be available for Android?
I found this thread:
http://forum.xda-developers.com/showthread.php?t=1468531
Which directed me to:
http://sven.killig.de/android/N1/2.2/usb_host/
The thing is, I can't understand those instructions.
I have made my own OTG Cable and I have the power source figured out.
It's the software that has me scratching my head.
TL;DR
I cant install the drivers. I need clear instructions on how to.
I'll be honest with my technical skills, I'm very much a noob.
The best I can do is Flash a ROM.
(More specifically, flashing MAGLDR ROMs. I've flashed over 10 different ROMS on this machine)
Any help or instruction regarding this would be grand.
I thank you for your patience.

[Q] USB host mode in CyanogenMod 10.1.2

I am running CyanogenMod version 10.1.2 on a Nook Color via micro SD card. I can not get any USB devices (eg. thumb drives) to work. Nothing happens when I plug a USB device in, so it appears that the Nook Color does not recognize the device. To troubleshoot the problem, I ran a program called "USB Host Diagnostics," and received the following message:
USB Host Controller: version number 0.44
S3C USB Host Driver NOT found!
Root hub present, USB Host Mode is active.
What is the "S3C USB Host Driver? Where can I download it? How do I install the driver on the Nook Color? What steps do I need to take to get USB hosting to work? Thanks for any help you can give me to help me solve the problem!
CM 10.1.2 with USB Host / OTG
nuprps said:
I am running CyanogenMod version 10.1.2 on a Nook Color via micro SD card. I can not get any USB devices (eg. thumb drives) to work. Nothing happens when I plug a USB device in, so it appears that the Nook Color does not recognize the device. To troubleshoot the problem, I ran a program called "USB Host Diagnostics," and received the following message:
USB Host Controller: version number 0.44
S3C USB Host Driver NOT found!
Root hub present, USB Host Mode is active.
What is the "S3C USB Host Driver? Where can I download it? How do I install the driver on the Nook Color? What steps do I need to take to get USB hosting to work? Thanks for any help you can give me to help me solve the problem!
Click to expand...
Click to collapse
Good question.
This is the best I could dig up:
http://forum.xda-developers.com/showthread.php?p=40043731
Please let us know what you figure out!
nuprps said:
I am running CyanogenMod version 10.1.2 on a Nook Color via micro SD card. I can not get any USB devices (eg. thumb drives) to work. Nothing happens when I plug a USB device in, so it appears that the Nook Color does not recognize the device. To troubleshoot the problem, I ran a program called "USB Host Diagnostics," and received the following message:
USB Host Controller: version number 0.44
S3C USB Host Driver NOT found!
Root hub present, USB Host Mode is active.
What is the "S3C USB Host Driver? Where can I download it? How do I install the driver on the Nook Color? What steps do I need to take to get USB hosting to work? Thanks for any help you can give me to help me solve the problem!
Click to expand...
Click to collapse
Cyanogenmod 10.1.2 can't use USB host mode, if you need to use USB host mode use Cyanogenmod 7 and the nook color tools app to enable it
Sent from my NookColor using xda app-developers app
dombeef said:
Cyanogenmod 10.1.2 can't use USB host mode, if you need to use USB host mode use Cyanogenmod 7 and the nook color tools app to enable it
Click to expand...
Click to collapse
To expand on this: CM7 was based on top of an older Linux kernel version (2.6.32), on top of which a lot of hard work was done to enable USB host mode. In porting to CM9/10/10.1, we moved to a newer kernel version (3.0), and some of that work wasn't brought over. There aren't any technical barriers to enabling USB host mode on newer kernels -- someone "just" needs to spend the time to go through the patches for host mode in 2.6.32 and figure out what bits need to be forward ported to 3.0. (In case you haven't figured out yet, time is the scarcest asset in a volunteer project like this one ...)
nuprps said:
What is the "S3C USB Host Driver? Where can I download it? How do I install the driver on the Nook Color?
Click to expand...
Click to collapse
"S3C USB Host" refers to the USB OTG hardware included in Samsung S5PC110 ("Exynos3") devices, including the Nexus S and most Galaxy S series phones. It's not applicable to OMAP devices like the Nook Color, which use different, much more mature USB OTG hardware and drivers from Mentor Graphics and TI (musb_hdrc).
USB Host Mode with CM10
steven676 said:
To expand on this: CM7 was based on top of an older Linux kernel version (2.6.32), on top of which a lot of hard work was done to enable USB host mode. In porting to CM9/10/10.1, we moved to a newer kernel version (3.0), and some of that work wasn't brought over. There aren't any technical barriers to enabling USB host mode on newer kernels -- someone "just" needs to spend the time to go through the patches for host mode in 2.6.32 and figure out what bits need to be forward ported to 3.0. (In case you haven't figured out yet, time is the scarcest asset in a volunteer project like this one ...)
"S3C USB Host" refers to the USB OTG hardware included in Samsung S5PC110 ("Exynos3") devices, including the Nexus S and most Galaxy S series phones. It's not applicable to OMAP devices like the Nook Color, which use different, much more mature USB OTG hardware and drivers from Mentor Graphics and TI (musb_hdrc).
Click to expand...
Click to collapse
THANKS to EVERYONE for responding and clarifying the situation with USB Hosting mode on CM 10. The information saves me a lot of frustration in trying to get my Nook Color to recognize my USB devices. At least I can get USB Hosting working if I use CM7; that's an option, so thanks a lot for pointing it out. I'm a newbie and struggling to learn Android related stuff. If I had the technical know-how, I'd love to help solve the USB Host issue with CM10. For me at least, USB hosting would be a valuable feature in CM10 and beyond. I really like how well CM10 runs on my device with a SanDisk 8Gb micro SDHC card.
To get some of my devices (eg. keyboard) working on CM10, I may try the bluetooth capability in CM 10. However, I read somewhere that the range of bluetooth was limited on the Nook Color. I think that was awhile ago when developers initially unlocked bluetooth on the Nook Color. Is bluetooth range still a significant issue?
THANKS AGAIN!!!
nuprps said:
THANKS to EVERYONE for responding and clarifying the situation with USB Hosting mode on CM 10. The information saves me a lot of frustration in trying to get my Nook Color to recognize my USB devices. At least I can get USB Hosting working if I use CM7; that's an option, so thanks a lot for pointing it out. I'm a newbie and struggling to learn Android related stuff. If I had the technical know-how, I'd love to help solve the USB Host issue with CM10. For me at least, USB hosting would be a valuable feature in CM10 and beyond. I really like how well CM10 runs on my device with a SanDisk 8Gb micro SDHC card.
To get some of my devices (eg. keyboard) working on CM10, I may try the bluetooth capability in CM 10. However, I read somewhere that the range of bluetooth was limited on the Nook Color. I think that was awhile ago when developers initially unlocked bluetooth on the Nook Color. Is bluetooth range still a significant issue?
THANKS AGAIN!!!
Click to expand...
Click to collapse
There is a limited range for bluetooth, it was actually hidden in the official rom and not enabled until some developers found it out.
IF you really want USB host on a newish android version, you might want to use CM9, it still has usb host and I was able to use it a few months ago for a project. But there is limited opengl support and it might have a few minor bugs in it.
USB Host Mode with CM10
dombeef said:
There is a limited range for bluetooth, it was actually hidden in the official rom and not enabled until some developers found it out.
IF you really want USB host on a newish android version, you might want to use, it still has usb host and I was able to use it a few months ago for a project. But there is limited opengl support and it might have a few minor bugs in it.
Click to expand...
Click to collapse
Thanks for the tip about USB hosting mode and CM9. I'll download CM9 and see how it works with my Nook Color and USB peripherals.
USB Hosting with CM9?
dombeef said:
There is a limited range for bluetooth, it was actually hidden in the official rom and not enabled until some developers found it out.
IF you really want USB host on a newish android version, you might want to use, it still has usb host and I was able to use it a few months ago for a project. But there is limited opengl support and it might have a few minor bugs in it.
Click to expand...
Click to collapse
Please provide more detail about how you enabled USB hosting mode in CM9. I downloaded and installed CM9, but I can't figure out how to enable USB mode. I tried an app called "Nook Color Tweaks," but the app clearly states that it does not work with CM9. What steps did you take to get USB hosting on your device running CM9? Please clarify. Thank you!
nuprps said:
Please provide more detail about how you enabled USB hosting mode in CM9. I downloaded and installed CM9, but I can't figure out how to enable USB mode. I tried an app called "Nook Color Tweaks," but the app clearly states that it does not work with CM9. What steps did you take to get USB hosting on your device running CM9? Please clarify. Thank you!
Click to expand...
Click to collapse
I'm sorry,the app I was referring to was Nook Color Tweaks. Whoops :laugh:
A few of the options will not work on CM9 but the USB host will/should work.
I haven't used CM9 in a while now but if usb host doesn't work on the rom I linked to then you may want to use a ROM from eyeballer's unofficial CM9 nightly builds and try the latest opengl build. I had used eyeballer's rom in the past and it did work with USB host.
USB Host mode in CM11
steven676 said:
To expand on this: CM7 was based on top of an older Linux kernel version (2.6.32), on top of which a lot of hard work was done to enable USB host mode. In porting to CM9/10/10.1, we moved to a newer kernel version (3.0), and some of that work wasn't brought over. There aren't any technical barriers to enabling USB host mode on newer kernels -- someone "just" needs to spend the time to go through the patches for host mode in 2.6.32 and figure out what bits need to be forward ported to 3.0. (In case you haven't figured out yet, time is the scarcest asset in a volunteer project like this one ...)
Click to expand...
Click to collapse
I think the changes need to be made in encore_defconfig (or encore _cm11_defconfig). I can try to make the changes but these files are automatically generated in the make process. Could you point me to the configuration files where this happens? I think it must be in device/bn/encore.

Making external wifi adapter work?

I am having a problem understanding what options I have to use my external wifi adapter, TL WN722N, on my Android Phone. I am using a galaxy s10+, rooted with magisk, no custom recovery/kernel. My questions are:
I need to install the driver for this wifi adapter into my Android kernel right?
Do I need to rebuild the kernel for this? I.e. install the driver into the kernel and then flash the kernel, or is there a way where I can load a kernel module which contains the driver without flashing a custom kernel which contains this driver?
What options do I have to install this driver on my Android phone? I am having a hard time finding out how to install this driver into my android phone.

OTG not working

I tried various ways such as editing the system file located in system>vendor>etc>permissions>handheld_core_hardware.xml and even updating firmware (currently at 432)....my usb host working properly (as said by USB OTG Troubleshoot app) but still my flashdrive(works in my laptop) is not working on my phone (not lighting and already formatted it to fs fat32)... PLS HELP ME
Current OS: Nusantara EOL
Current Kernel: Darkonah 4.4.243

Categories

Resources