Sound Fix
From iDroidWiki
For some people, sound only comes out of the speakers when headphones are plugged in. This does not happen for everyone (config works for planetbeing) but others have this problem. Follow this guide to get the sound working if you have the problem. Although sound works from the external speakers, headphones do not yet work.
NOTE: This is only for 2G users. Asound.conf in 3G is very different.
Contents |
Disclaimer
- This fix is included in MoJo 1.0.1 onwards. If you are using MoJo 1.0.1+, you do not need to read this guide. If you are not using MoJo, then upgrade to MoJo as in the Installation Guide or read on.
Connect to ADB
1. This should be pretty straight forward by now. Connect to adb in your preferred OS. If you do not know what ADB is and how to connect via ADB, stop and read this guide first.
2. Pull the asound.conf from /etc:
adb pull /etc/asound.conf *path to file on your system*
Editing the configuration file
For Android 1.6 (Donut) Users
Change your asound.conf to look like this:
ctl.AndroidOut { type hw card 0 } ctl.AndroidIn { type hw card 0 } pcm.AndroidPlayback { type hw card 0 device 0 } pcm.AndroidPlayback_Speaker { type hw card 0 device 0 } pcm.AndroidPlayback_Speaker_normal { type hw card 0 device 0 } pcm.AndroidPlayback_Earpiece { type hw card 0 device 1 } pcm.AndroidPlayback_Headset { type hw card 0 device 1 } pcm.AndroidRecord { type hw card 0 device 0 }
For Android 2.2 (FroYo) Users
Change your asound.conf to look like this (if you have ddFroYo2G_v3, no need):
ctl.AndroidOut { type hw card 0 } ctl.AndroidIn { type hw card 0 } pcm.AndroidPlayback { type hw card 0 device 0 } pcm.AndroidPlayback_Speaker { type hw card 0 device 1 } pcm.AndroidPlayback_Speaker_normal { type hw card 0 device 1 } pcm.AndroidPlayback_Earpiece { type hw card 0 device 0 } pcm.AndroidPlayback_Headset { type hw card 0 device 1 } pcm.AndroidPlayback_Headset_normal { type hw card 0 device 1 } pcm.AndroidRecord { type hw card 0 device 0 } pcm.AndroidCapture { type hw card 0 device 0 }
Putting the asound.conf back
1. Load abd shell and remount /etc as r/w:
adb shell mount -o remount,rw /dev/root /system
2. Exit the shell and push the file back to the device:
adb push *path to asound.conf on system* /etc/asound.conf
3. Reboot the device and sound should now be working:
su reboot
Credits
- Planetbeing for telling me to try plugging headphones in to get sound :P
- guide by alex
- alex and ricky26 for helping ddominator do the debugging.