2

I have a brand new Macbook Pro running Ubuntu 15.04-beta2. In OSX, I was able to use my iPhone headphones into the "headphone" jack and use the media keys on the headphones to control my system volume. Additionally, OSX was able to use the onboard mic as an additional input source.

The aforementioned feature has become my default way to control my system volume, and it's extremely hard for me to live without it. Coincidentally, I've been wanting to write some drivers for the Linux kernel, but wasn't quite sure what. I'd like to write drivers to implement volume control via the output jack, I just don't know where to start.

My current understanding of how this all works:

  1. 4-lead headphones uses 4th lead to short a certain range of ~2V to ~0V.
  2. Grab raw information from headphone jack (inside soundcard driver?) and convert data into an event
  3. Listen and respond to the newly created event and control media volume, just like media keys currently do.

I understand that this is potentially a huge protect, but I'm dedicated to get this working. I just need a bit information and I'm unclear as to where I can find it.

Brett
  • 43
  • 1
  • 7
  • 1
    I don't have any specific answer for you, but maybe this thread will help you: http://unix.stackexchange.com/questions/41954/earphone-remote-in-sound-jack-as-x-input. Basically soundcard must have some DAC, which translates these signals. The question is, is it some additional element, that you can it by some memory segment mapped in the driver or is it just parsing card input. This is the thing you have research. – mastier Sep 22 '15 at 11:26

0 Answers0