2

In my smartphone, while listening to music, when I press the call button in the earphone (the one provided with the phone), the music passes and when I press it again the music starts playing.

I would like to replicate this functionality in desktop music apps. So, in my scenario, I have an earphone (with the call button), attached to the 3.5mm jack.

How can I come know when the Call button is pressed in the earphone. Is there someway I can analayse on of the /dev files for this? Is this functionality even supported in the Linux kernel?

Seth
  • 58,122
Hashken
  • 6,282

1 Answers1

4

There is no sound card generally available for PCs that detects the change in resistance caused by such a button press (certainly not anything AC97-based), so this won't work with desktop apps.

But the kernel support for the most part is there though.

  • so if I compile Ubuntu Trusty's kernel (3.19.0-66-generic) by including that patch then would it work? – Surya Teja Karra Sep 13 '16 at 04:03
  • 1
    @SuryaTejaKarra: Had you read the linked message closely enough you would have noticed that it is for a specific codec. If the codec does not support detection then no patch will help. – Ignacio Vazquez-Abrams Sep 13 '16 at 04:05