Forums » Replicant installation »
Headphone jack not working
Added by Mickey Knox over 9 years ago
Hello,
I bought a Samsung Galaxy S2 to try Replicant.
Unfortunately, I did not try the headphone jack before flashing replicant.
Now I don't know, if the hardware is broken, or is there a known issue with replicant?
Symptom description: The headphone jack has no function whatsoever. There is no reaction,
when I plug in the jack; the music is still playing on the phones speaker.
Is there a way to force the output to the headphone?
Just in case only the plug-in event is somehow broken.
Replies (1)
RE: Headphone jack not working - Added by My Self over 9 years ago
I have the SGS2 (i9100), too. If I plug in my headphones into my Replicant 4.2 OS, the toggle-event is triggered automatically, and my headphones will be successfully used.
- [logcat] (if you want to compare)
D/EventHub(2841): No input device configuration file found for device 'sec_jack'.
V/WiredAccessoryManager(2841): Headset UEVENT: {SUBSYSTEM=switch, SWITCH_STATE=1, DEVPATH=/devices/virtual/switch/h2w, SEQNUM=2636, ACTION=change, SWITCH_NAME=h2w, SWITCH_TIME=4977794327237}
V/WiredAccessoryManager(2841): newName=h2w newState=1 headsetState=1 prev headsetState=0
I/EventHub(2841): New device: id=14, fd=232, path='/dev/input/event11', name='sec_jack', classes=0x1, configuration='', keyLayout='/system/usr/keylayout/Generic.kl', keyCharacterMap='/system/usr/keychars/Generic.kcm', builtinKeyboard=false, usingSuspendBlockIoctl=true, usingClockIoctl=false
I/InputReader(2841): Device added: id=14, name='sec_jack', sources=0x00000101
V/WiredAccessoryManager(2841): device h2w connected
D/TinyALSA-Audio Output(2585): audio_out_set_parameters(0x41f4fd60, routing=4)
D/TinyALSA-Audio Mixer(2585): tinyalsa_mixer_set_device(4)
D/TinyALSA-Audio Mixer(2585): Setting Speaker Playback Volume to 0
D/TinyALSA-Audio Mixer(2585): Setting Speaker Playback Switch to off
D/TinyALSA-Audio Mixer(2585): Setting Headphone Playback Volume to 15
D/TinyALSA-Audio Mixer(2585): Setting HP Gain Playback Volume to 3
D/TinyALSA-Audio Mixer(2585): Setting Headphone Playback Switch to on
D/Yamaha-MC1N2-Audio(2585): yamaha_mc1n2_audio_set_route(4)
D/Yamaha-MC1N2-Audio(2585): yamaha_mc1n2_audio_route_start()
D/Yamaha-MC1N2-Audio(2585): (yamaha_mc1n2_audio_params_route_find): device = 4, direction = 0
D/TinyALSA-Audio Hardware(2585): audio_hw_set_voice_volume(0x41f4ca90, 0.800000)
D/TinyALSA-Audio Output(2585): audio_out_set_parameters(0x41f4fd60, routing=4)
I/HeadsetService(3070): Headset=true; Bluetooth=false
I/HeadsetService(3070): Selected configuration: headset
I/Effect-DRC: Compression factor set to: 1.500000
I/Effect-BassBoost(2585): New strength: 0
I/Effect-Equalizer(2585): Setting band 0 to 0
I/Effect-Equalizer(2585): Setting band 1 to 0
I/Effect-Equalizer(2585): Setting band 2 to 0
I/Effect-Equalizer(2585): Setting band 3 to 0
I/Effect-Equalizer(2585): Setting band 4 to 0
I/Effect-Equalizer(2585): Setting loudness correction reference to 100.000000 dB
D/dalvikvm(10542): GC_CONCURRENT freed 262K, 60% free 3819K/9424K, paused 2ms+4ms, total 18ms
- https://f-droid.org/repository/browse/?fdid=com.dwalkes.android.toggleheadset2 (sadly seems to be incompatible with Android versions higher than 4.0.3)
- https://play.google.com/store/apps/details?id=com.chislonchow.toggleheadp (based on toggleheadset2, but isn't open source; you could ask the developer to free the code)
- https://play.google.com/store/apps/details?id=com.woodslink.android.wiredheadphoneroutingfix (seems to be what you need, but sadly isn't open source, too)
Ad hoc, I can't find a command to do what these apps provide.
One last thing I tried this second. I installed this app: https://f-droid.org/repository/browse/?fdid=ch.blinkenlights.android.vanillaplug (you don't have to install the Vanilla Music player). With this app installed I got an toaster notification on my screen on putting my headphones in, which could help you answering you basic question.
Happy testing.