simple-audio-card and headphone jack detect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I am using the simple-card and simple-amplifier drivers with the
following devicetree:

amp: audio-amp {
   compatible = "simple-audio-amplifier";
   enable-gpios = <&gpc 15 GPIO_ACTIVE_HIGH>;
};

sound-card {
   compatible = "simple-audio-card";

   simple-audio-card,name = "rs90-audio";
   simple-audio-card,format = "i2s";

   simple-audio-card,widgets =
       "Speaker", "Speaker",
       "Headphone", "Headphones";
   simple-audio-card,routing =
       "INL", "LHPOUT",
       "INR", "RHPOUT",
       "Headphones", "LHPOUT",
       "Headphones", "RHPOUT",
       "Speaker", "OUTL",
       "Speaker", "OUTR";

   simple-audio-card,hp-det-gpio = <&gpd 16 GPIO_ACTIVE_LOW>;
   simple-audio-card,aux-devs = <&amp>;

   simple-audio-card,cpu {
       sound-dai = <&aic>;
   };

   simple-audio-card,codec {
       sound-dai = <&codec>;

       bitclock-master;
       frame-master;
   };
};

My codec outputs on the LHPOUT/RHPOUT lines. INL/INR and OUTL/OUTR
are the inputs/outputs of the simple-amplifier.

So far so good, when no audio is playing the audio amp is disabled
(GPIO is low), and it gets enabled as soon as I start to play audio.

What is not working, and what I am trying to achieve, is to have the
external audio amplifier disabled as soon as headphones are plugged.

Is that something the core handles for me?
Any suggestions to make it work?

Thanks,
-Paul


_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux