[alsa-devel] The best practice to tie platform DAPM widget and codec pin

Anatol Pomozov anatol.pomozov at gmail.com
Fri Sep 12 06:04:28 CEST 2014


Hi

I bringing up a board that has Realtek 5677 codec. The codec has 6
gpios and two of them are used by the board. pin3 is used to enable
headphones amplifier. pin2 is used to gate DMIC clock for 3 of 4 DMICs
- it allows to leave only one DMIC working in low-power mode.

Now I need to configure the codec that when "Headphones" audio path is
enabled then pin3 should go high. The same true for DMIC/pin2. I was
looking for existing similar solutions but cannot find one.

I need something similar to SND_SOC_DAPM_REGULATOR_SUPPLY that allows
to turn on/off part of the system. But instead of manipulating a
voltage regulator I just need to set/unset codec's gpio. What would be
the best way to achieve it?

The problem here is that codec does not know which of the outputs
(LOUT1, LOUT2, LOUT3) corresponds to headphones. It is configured as
audio path in *.dts file.


More information about the Alsa-devel mailing list