On Friday 22 May 2009 11:44:14 ext Lopez Cruz, Misael wrote:
It seems that there is no way to disable handsfree L/R outputs for twl4030 codec. That means that:
- handsfree amplifiers are turned-on even if we are not interested in routing through handsfree
- if the selected input of the handsfree mux is an active DAC (streaming) sound will be produced on hf outputs and the only way to silence them is routing from a different DAC, which doesn't seem like the right solution
Yes, I have also noticed this. Before the voice codec_dai integration it was possible to mute the HFL/R by setting it to Voice. Now with the voice codec_dai it is impossible to disable the HFL/R.
I guess ASoC does not have support for per codec_dai DAPM routing, or let's put it differently: binding DAPM controls to specific codec_dai.
Currently, handsfree amplifiers are turned-on when the HandsfreeL/R muxes are powered by the framework. I was thinking in adding a dapm switch to select whether or not handsfree amplifiers should be powered, but the switch probably is not the correct approach to handle this situation. Maybe a regular kcontrol could be the answer.
It has to be DAPM switch for muting the HFL and the HFR. In order to execute the pop removal on the HF outputs the bits in the HF registers has to be configured in a specific order (REF_EN, RAMP_EN, LOOP_EN and HB_EN)
The DAPM switch should not change any register bits, but should have variable in the twl4030_priv struct to change.
I have the re-written HFL/R pop removal thing without the DAPM mute switch. I still need to test it on different HWs, but at least it does look promising at the moment.
-Misa