[alsa-devel] [PATCH] ASoC: rt5640: change widget sequence for depop

Bard Liao bardliao at realtek.com
Tue Aug 20 04:36:01 CEST 2013


> -----Original Message-----
> From: Stephen Warren [mailto:swarren at wwwdotorg.org]
> Sent: Tuesday, August 20, 2013 1:30 AM
> To: Bard Liao
> Cc: broonie at kernel.org; lgirdwood at gmail.com; alsa-devel at alsa-project.org;
> Flove; Oder Chiou; swarren at nvidia.com
> Subject: Re: [PATCH] ASoC: rt5640: change widget sequence for depop
> 
> On 08/19/2013 06:18 AM, bardliao at realtek.com wrote:
> > From: Bard Liao <bardliao at realtek.com>
> >
> > Add mute/unmute control in widget event and modify the power on/off
> sequence to avoid pop noise.
> 
> This version breaks both headphone and speaker output. I see the following
> issues:
> 
> 1)
> 
> After a reboot, if all of "{HP,Speaker} [LR] Playback Switch" are on/unmuted,
> and I start playback, then something sets all those controls to off/muted. I
> suspect this is related to function rt5640_hp_event() twiddling the same
> RT5640_[LR]_MUTE bits that the hp_[lr]_enable_control controls twiddle.
> 
> 2)
> 
> If playback is running, and (1) has caused all output to be muted, and I then
> run alsamixer and enable/unmute "HP L Playback Switch", I hear sound on
> both the L and R headphone channels for a very brief time, then output
> switches to the L channel only. Similar happens if I unmute "HP R Playback
> Switch" first. Unmuting both switches does produce stereo sound as expected.
> 
> I don't know if this also happens for the speaker output, since the board is too
> far away from me to easily tell which speakers are playing.

I think you didn't apply Lars-Peter's patch as below.
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -229,6 +229,8 @@ static int dapm_kcontrol_data_alloc(struct
  			template.id = snd_soc_dapm_kcontrol;
  			template.name = kcontrol->id.name;

+			data->value = template.on_val;
+
  			data->widget = snd_soc_dapm_new_control(widget->dapm,
  				&template);
  			if (!data->widget) {

It should be able to solve this issue.
If I remove this patch I can reproduce the issue.
Sorry for not informing you about that.

> 
> ------Please consider the environment before printing this e-mail.


More information about the Alsa-devel mailing list