Android Tablets Forum banner
21 - 33 of 33 Posts

·
Registered
Joined
·
6 Posts
Hi Tsynik,

"Francisco Franco - News are not so great at the moment. I've been trying to find out why this doesn't work with the correct SND USB Audio activated in the kernel, the device doesn't even recognize this device...doesn't even appear as a card via the ALSA driver..."
https://plus.google.com/u/0/106873500108976028532/posts/3fb1yDEawb2

Francisco Franco is trying to enable USB audio on his kernel-modded Android 4.0 ICS powered Galaxy Nexus.
His Galaxy Nexus doesn't recognize a battery-powered USB DAC/amp FiiO E7.
What could be the problem?
Thanks!
 

·
Registered
Joined
·
75 Posts
"Francisco Franco - News are not so great at the moment. I've been trying to find out why this doesn't work with the correct SND USB Audio activated in the kernel, the device doesn't even recognize this device...doesn't even appear as a card via the ALSA driver..."
https://plus.google.com/u/0/106873500108976028532/posts/3fb1yDEawb2

Francisco Franco is trying to enable USB audio on his kernel-modded Android 4.0 ICS powered Galaxy Nexus.
His Galaxy Nexus doesn't recognize a battery-powered USB DAC/amp FiiO E7.
What could be the problem?
Thanks!
Hm, if there is no device nodes in /dev/snd/ then it's 100% kernel configuraion problem. Something is missing in it's options. Also, order of modules loading does matter. He need to check dmesg output on loading modules, and try to load them by hand from shell. After it have correct devices in /dev/snd/, he can go furhter to android part (alsa HAL).
 

·
Registered
Joined
·
4 Posts
Yes, it's possible to do. Here is the 2nd version of libaudio.so for Ainol NOVO7A, which allow to choose not only output, but also input source. Also, it allow 48000Hz as input freq (Ainol version limited to 44100Hz).
You can switch input source by property "media.audio.in.mode". Current values are: "codec, usb, fm". I made it for getting audio from USB FM tuner, but you can use it for headset microphone input also.

USB-AUDIO v2

Need to mention, media.audio.in.mode and media.audio.out.mode are system properties, and they need to be set with setprop command from shell, so, if you want to set it via "widget", that app need root privileges or at least privileges to set system properties on device. Tasker can do this. Also, your input source must support rates and channel configurations, which used by Android software for voice input. For example, my FM card only output with 48000Hz 2 channels (stereo), and other modes (standart 44100Hz 2ch) fail. So, I modded libaudio so it can provide 48000Hz also.
Thank you tsynik for the response.

I copied the libaudio.so (as well as installed a few apps), and then robooted. The tablet has now come to a screeching halt. It will not go beyond the opening picture of an android...
so I'm thinking it's probably time to reflash the thing with a new rom *grin*.
and...
Managed to shove windows into a virtualbox and flashed the tablet with the feiyu v2.3.

Questions
Was the baseband 1.8beta a possible problem with the libaudio.so?
What is the recommended rom? (unless yours is ready?)

thanks
Andrew
 

·
Registered
Joined
·
75 Posts
Questions
Was the baseband 1.8beta a possible problem with the libaudio.so?
What is the recommended rom? (unless yours is ready?)

thanks
Andrew
I recommend you feiyu ROM (0225 or 0318), because it's most current 2.3.4 ROM with many fixes and bluetooth support. And it also based on Ainol 2.3.4 Android source code (as mine). Plus, it also install Clockworkmod recovery, which can be used for backup, restore and update of installed ROM without reflash. I tested my previous libaudio.so with that ROM on Ainol and Onda VX610W and it worked fine. Now I don't have that ROM installed, and can't test new libs against it... Also, if you'll attach logcat, I'll try find out what happening, maybe more files need to be replaced.

p.s. You must always backup stock files, which you can revert via ADB (push libaudio.so /system/lib/), if tablet doesn't boot with new one.
 

·
Registered
Joined
·
4 Posts
I recommend you feiyu ROM (0225 or 0318), because it's most current 2.3.4 ROM with many fixes and bluetooth support. And it also based on Ainol 2.3.4 Android source code (as mine). Plus, it also install Clockworkmod recovery, which can be used for backup, restore and update of installed ROM without reflash. I tested my previous libaudio.so with that ROM on Ainol and Onda VX610W and it worked fine. Now I don't have that ROM installed, and can't test new libs against it... Also, if you'll attach logcat, I'll try find out what happening, maybe more files need to be replaced.

p.s. You must always backup stock files, which you can revert via ADB (push libaudio.so /system/lib/), if tablet doesn't boot with new one.
Thanks tysnik.

I must be doing something wrong, probably something simple.

Loaded the feiyu 0318, and then:
- copied the files in
- added lines to the end of init.sun4i.rc file (copied from ubuntu machine after editing)
- rebooted tablet.
- went to a command line (terminal emulator)
- typed in 'setprop media.audio.out.mode usb'. No error.

I had a song playing as I did this (winamp). There was no change. Sound did not go to the headset, and continued through the the tablet speakers.

What should I expect with the usb headset plugged in?
How about if it is not plugged in?
Is it possible that this is a permissions problem?
Any guesses?
Might be worth a skype (same as my handle) conversation if you are so inclined, as I would love to get this working.

Just an aside.
I notice with the feiyu roms that the symlink for sdcard on the root points to the local disk, and /mnt/extern_sd points to the actual sdcard, which doesn't make sense to me.
Can I change this to sdcard pointing to /mnt/extern_sd, and localdisk (or whatever) pointing to /mnt/sdcard? Would I do this through the init.rc file?
 

·
Registered
Joined
·
75 Posts
I had a song playing as I did this (winamp). There was no change. Sound did not go to the headset, and continued through the the tablet speakers.

What should I expect with the usb headset plugged in?
How about if it is not plugged in?
Is it possible that this is a permissions problem?
Any guesses?
Currently played stream cannot be changed on demand by hardware. So, You need to stop playback, and start it again at least after changing properties. If you are brave, I made full CWM-compatible image for Novo7A. You can install it from feiyu firmware as update. Boot to recovery (hold volume plus on power on tablet), and choose install zip from sd-card option. After update, I suggest you choose Wipe data / factory reset, so on first boot usefull apps will be preinstalled. This is the link. But, make a backup of current fw from cwm recovery first. And, sadly, my update also replace kernel on tablet, so, you'll need to use livesuite if you'll want return to feiyu kernel again ;-) Audio settings (USB out, microphone) located in IVI section of Settings app.

p.s. I'm not tested it long, so... there can be some bugs ;-) Tell me if you'll find them ;-)
p.p.s. If your native language not english - sorry. Only English / Russian interface languages compiled for now.



When you set property to usb, libaudio.so will try to open /dev/snd/pcmC2D0p for playback new streams. In case this device exists - there will be sound from USB. In case it doesn't - there will be error in logcat (can't open device ...), and there will be no sound at all till you'll set property back to codec. Stream, which was active at property change, will use already opened device, and switch to new on stop / restart playback. Check logcat - I leave some debugging messages about what's going on (Catlog on Google Play if you doesn't use adb shell)
 

·
Registered
Joined
·
4 Posts
Currently played stream cannot be changed on demand by hardware. So, You need to stop playback, and start it again at least after changing properties. If you are brave, I made full CWM-compatible image for Novo7A. You can install it from feiyu firmware as update. Boot to recovery (hold volume plus on power on tablet), and choose install zip from sd-card option. After update, I suggest you choose Wipe data / factory reset, so on first boot usefull apps will be preinstalled. This is the link. But, make a backup of current fw from cwm recovery first. And, sadly, my update also replace kernel on tablet, so, you'll need to use livesuite if you'll want return to feiyu kernel again ;-) Audio settings (USB out, microphone) located in IVI section of Settings app.

p.s. I'm not tested it long, so... there can be some bugs ;-) Tell me if you'll find them ;-)
p.p.s. If your native language not english - sorry. Only English / Russian interface languages compiled for now.

When you set property to usb, libaudio.so will try to open /dev/snd/pcmC2D0p for playback new streams. In case this device exists - there will be sound from USB. In case it doesn't - there will be error in logcat (can't open device ...), and there will be no sound at all till you'll set property back to codec. Stream, which was active at property change, will use already opened device, and switch to new on stop / restart playback. Check logcat - I leave some debugging messages about what's going on (Catlog on Google Play if you doesn't use adb shell)
Thanks again tsynik.

Unfortunately, I don't know how to access logcat, so all I can give you is what I observe. I will try and do some research this weekend on it.

I did give you update a try, and the first thing that hit was an error when trying to connect to wifi. It returned 'error' almost immediately and I couldn't get it going.
I tried flushing the cache, Wipe data / factory reset.

While I had it loaded, I tried the usb out and in. neither seemed to work.The tablet just gave (and recorded) no sound through the headset using soundrecorder (/dev/snd/pcmC2D0p error?).

Did your update include the USB-AUDIO v2 files you had posted?

I'm also wondering if the usb cable I am using is up to the job and have a OTG adapter on order. So far I have tried running just the headset as well as a usb hub with headset, mouse and mini-keyboard plugged in, which appears to be too much for the mini usb port on the novo7a to handle.

I do like what you have added for adjusting the status bar and would like to try the next version, but the wifi error is a nogo for now. I have reverted to feiyu0318.

I like what you are doing here and am looking forward to the next version.

thanks
saanichtonian
 

·
Registered
Joined
·
7 Posts
Hi Цыник!
I plan to do the same as you'd mention use Novo 7/8 AdvanceII to stream loos-less audio .flacs to external DAC for HiEnd Audio in the CAR.
I am looking for cheepest tablet but good asynchronous DAC to do the job.

1) Can you mention what tablet models you tried it and it works? what was the model of OMAP4 you mentioned?
2) What was Max streaming resolution 24bit/96khz?
3) Do you know Was that mode USB Audio asynchronous(when DAC controls the timing and rates) - less chances of jitters
or
synchronous when player device(tablet) just streams data to DAC according to internal not perfect USB timing - more jitters as'd reported introdced due to some other tablet activities?
4)What DACs you'd tried besides PCM2704, FiiO E7(someone else reported working) and Creative ?
5)Do you know new ICS on Novo Advanced II or other tablets have the same (need of manual tweeking) or better out of the box support of USB Audio?

Заранее спасибо!
Igor'
 

·
Registered
Joined
·
75 Posts
Hi Цыник!
I plan to do the same as you'd mention use Novo 7/8 AdvanceII to stream loos-less audio .flacs to external DAC for HiEnd Audio in the CAR.
I am looking for cheepest tablet but good asynchronous DAC to do the job.

1) Can you mention what tablet models you tried it and it works? what was the model of OMAP4 you mentioned?
2) What was Max streaming resolution 24bit/96khz?
3) Do you know Was that mode USB Audio asynchronous(when DAC controls the timing and rates) - less chances of jitters
or
synchronous when player device(tablet) just streams data to DAC according to internal not perfect USB timing - more jitters as'd reported introdced due to some other tablet activities?
4)What DACs you'd tried besides PCM2704, FiiO E7(someone else reported working) and Creative ?
5)Do you know new ICS on Novo Advanced II or other tablets have the same (need of manual tweeking) or better out of the box support of USB Audio?

Заранее спасибо!
Igor'
I was playing with DACs integration to Android from Android 2.2 era, when it was almost not possible at all, and it was all about a hack. My goal was to have lossless player in my car, and Wits A81G (omap4 platform) was the first tablet, which do the job. I'm quite happy with my PCM2704 DAC in the car, it overplay Creative devices, and suite my needs (I have no flacs at 24bit resolution). 500GB HDD and 16bit 44100 flacs on it (driven by PowerAMP) is enough for me. I don't go further. You can look into DrDac NANO, as it have strong output (2-4V), suited for external AMP, and supports 24bit/96 also. But, it's also a question of OS. Android, even in ICS, not goes to USB audio path, so its still hard to find any products with external USB audio support. I added it by myself, changing alsa libs for Allwinner A10 platform (2.3, ICS). So, for now, any A10 device (as it's opensource arch now) can support USB audio with some mods. But, it now limited to 16bit/44100/48000 PCM (can be extended to any more, but who nedd this? ;-) Feel free to ask your questionsin Russian on PCCAR forum ;-)

Hyundai A7HD have Cm9 usb-audio supported firmware. And many others.

p.s. probably almost any synchronous USB DAC will work, as it uses standart usb-audio driver for linux. Don't know, how about others. If it have driver for linux 3.0 kernel, probably it will be possible to make it work also.
 

·
Registered
Joined
·
7 Posts
So, for now, any A10 device (as it's opensource arch now) can support USB audio with some mods. But, it now limited to 16bit/44100/48000 PCM (can be extended to any more, but who nedd this? ;-)

Hyundai A7HD have Cm9 usb-audio supported firmware. And many others.

p.s. probably almost any synchronous USB DAC will work, as it uses standart usb-audio driver for linux. Don't know, how about others. If it have driver for linux 3.0 kernel, probably it will be possible to make it work also.
Spasibo for your answers!

is there any way to bypass Android layer to transparent signal from flac to DAC so Android didn't change it and play with volume etc?
so currently any media player is sending 16bit/44100/48000 PCM stream to Android and with proper settings that stream can be redirected to DAC?
Second question what need to be done to get more then 16bit/48000(special app, config mod etc)?
can we do something like this http://blog.agdunn.net/?p=434 on Android?
audio_output {
type "alsa"
name "myDAC″
device "hw:1,0″
}
 

·
Registered
Joined
·
75 Posts
Discussion Starter · #32 ·
Spasibo for your answers!

is there any way to bypass Android layer to transparent signal from flac to DAC so Android didn't change it and play with volume etc?
so currently any media player is sending 16bit/44100/48000 PCM stream to Android and with proper settings that stream can be redirected to DAC?
Second question what need to be done to get more then 16bit/48000(special app, config mod etc)?
can we do something like this http://blog.agdunn.net/?p=434 on Android?
audio_output {
type "alsa"
name "myDAC″
device "hw:1,0″
}
Did you read this thread? That's the way alsa was controlled in Android 2.2. If you have compatible layer - you can do it this way (as I was done on Wits A81G). But it's not transparent stream. PowerAMP in Android have direct volume control, which bypass filters. In ICS, I've done it this way, with audio library and tinyalsa library.
 

·
Registered
Joined
·
1 Posts
I have a GT90H tablet

I use these command to add modules:

cd /sdcard/Download

mount -o rw,remount -t yaffs2 /system

cp snd-hwdep.ko /system/vendor/modules/snd-hwdep.ko

chmod 0644 /system/vendor/modules/snd-hwdep.ko

insmod /system/vendor/modules/snd-hwdep.ko

but the insmod does not run and I received the error "exec format error"
 
21 - 33 of 33 Posts
Top