Quote: Originally Posted by grandrew Originally Posted by Hi!

I'm also interested in getting usb-audio-in to work!

My usb audio device is already supported by builtin usbaudio driver kernel module and is detected by ALSA



Do you think there are any chances to get it to work without patching? AFAIK android cannot switch automatically except for 'accessory mode' usb audio events which are supported for dock stations. Maybe it is possible to change audio cards priority via config files? As far as I understand audio_policy.conf is of no use?



For those who cannot find sources: the link is in the first message, read carefully!

Quote: Originally Posted by bbop Originally Posted by I have no idea what tools are available on android for audio stuff yet but I'm getting a nexus 7 and this looks interesting. I have some experience of doing audio stuff with linux though.



In linux, you can specify the default sound device via alsa with asound.conf or .asoundrc file. You can make relatively complex setups that will make alsa switch automatically when plugging in usb devices. the wiki:

http://alsa.opensrc.org/.asoundrc



what sort of sound related commands are available to you in android any way? Can you try these in the terminal?



aplay -l

amixer

alsamixer



aplay -l is specifically useful for determining the names of your hardware to configure alsa correctly (you should use names such as USB Audio Codec rather than HW 1,0 values).



OK well this is very interesting. I'm off to check what's been made available to android so far...

Quote: Originally Posted by henrylar Originally Posted by This is exactly what I am looking for. I have just got my N7, isn't even rooted yet. But I am going to try this out in a few days, and test it with the FIIO E17, which is why I bought the N7.



It will take a few days before I have access to a windows computer for the rooting, but then I will come back with my experience of it.

I am working on moving the code to a separate service which should allow switching to USB audio without having to patch any files you could instead install an APK, it would also be much safer than replacing the entire services file. I'm afraid that a config modification alone isn't going to make this work as there is simply no detection code to make and execute the switch.The alsa-utils package was the first thing I tried when attempting to make this work and while it can be compiled and successfully used to play and record audio it cannot be used to make configuration changes that are respected by the Android audio system.Sounds good - let me know how it goes. I have personally tested an E7 and it works fine, the E17 I believe needs to have USB charging disabled or it draws too much power.Just a small note - I have had some people getting UI crashes after replacing the services file. As mentioned above I am working on moving things into a separate service which should solve compatibility issues across different roms.