[alsa-devel] Disabling HFL/R outputs in twl4030
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
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.
-Misa
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
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.
Is it possible to have a dapm switch that doesn't affect register bits? I mean that the kcontrol associated to the switch doesn't affect any register?
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.
On Fri, May 22, 2009 at 12:48:28PM +0300, Peter Ujfalusi wrote:
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.
It should do - the active stream names are matched against the stream name (second argument) for the DAC to decide if DACs are active. This then feeds through to the rest of the output path. The code for this is in snd_soc_dapm_stream_event().
Looking at the twl4030 driver the names for the streams need some adjustment. I'm vaugely surprised that the HiFi streams match as is but I think I'm just missing something there.
On Friday 22 May 2009 13:36:04 ext Mark Brown wrote:
On Fri, May 22, 2009 at 12:48:28PM +0300, Peter Ujfalusi wrote:
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.
It should do - the active stream names are matched against the stream name (second argument) for the DAC to decide if DACs are active. This then feeds through to the rest of the output path. The code for this is in snd_soc_dapm_stream_event().
Looking at the twl4030 driver the names for the streams need some adjustment. I'm vaugely surprised that the HiFi streams match as is but I think I'm just missing something there.
So changing the stream names in the twl4030_dai: for HiFi: .stream_name = "HiFi Playback" and leave the "Capture" and for voice: .stream_name = "Voice Playback" and leave the "Capture"
since there is no HiFi or Voice dedicated ADC...
Than changing the DAPM_DACs stream names for the HiFi stream: "Right Front HiFi Playback", "Left Front HiFi Playback", "Right Rear HiFi Playback", "Left Rear HiFi Playback"
Should do the trick?
On Fri, May 22, 2009 at 02:03:28PM +0300, Peter Ujfalusi wrote:
So changing the stream names in the twl4030_dai: for HiFi: .stream_name = "HiFi Playback" and leave the "Capture" and for voice: .stream_name = "Voice Playback" and leave the "Capture"
Than changing the DAPM_DACs stream names for the HiFi stream: "Right Front HiFi Playback", "Left Front HiFi Playback", "Right Rear HiFi Playback", "Left Rear HiFi Playback"
Should do the trick?
I'd expect so, yes.
participants (3)
-
Lopez Cruz, Misael
-
Mark Brown
-
Peter Ujfalusi