简体   繁体   中英

Port Alsa to Android

I'm trying to add the usb audio function for my android phone. Is it possible that as long as I can add all the alsa driver to my android system and then i can get what i want? Can anyone give me some hints on how android is using alsa and how I can add alsa kernel modules to existing system?

Thank you.

@James, the android platform already includes alsa for its audio sub system as a standard and you do not need to add it yourself. If you have a rooted phone or a branded phone you can connect your phone to your network and using the ip address connect it your development system: adb connect IP-address:5555 , the easiest way to check will be to use adb to connect to your phone

You can verify the existences of alsa by going into the /proc directory. You will find a file called devices. If you cat the devices file you should see under character devices alsa with device ID 116

Also inside the /proc directory you should find another directory called asound. Go into that directory and do a listing ls -l. You will notice all the sound devices - sound cards, including the SPDIF, HDMI and sound codes used by your android device. All these devices are controlled by alsa.

If you unplug your usb device you will notice that the listing in the asound directory changes. Alsa manages all the audio functions including playback and recording of audio on your android device.

I hope this non technical overview helps. By all means if you have more questions feel free to ask

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM