All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] ASoC: max98090: add shutdown callback for max98090
       [not found]   ` <B03A893ADFE80748942D13AFAF28451924E3198860@ITSVLEX06.it.maxim-ic.internal>
@ 2015-04-10  0:46     ` Jianqun
       [not found]       ` <B03A893ADFE80748942D13AFAF28451924E4BADE53@ITSVLEX06.it.maxim-ic.internal>
  0 siblings, 1 reply; 16+ messages in thread
From: Jianqun @ 2015-04-10  0:46 UTC (permalink / raw)
  To: Anish Kumar, Matthew Mowdy, zhengxing, wxt, Nitin Mittal
  Cc: alsa-devel, broonie

Hi Anish Kumar

在 04/10/2015 03:38 AM, Anish Kumar 写道:
>> To fix pop noise when shutdown,the pop noise during shutdown
>> is the pmic cutoff power of codec without any notice.
> Is the power turned off without any intimation to the codec driver?
> Or is it physically removed? Can you describe the probelm 
> better?
When device is shutdown with playing music, the origin driver does nothing for shutdown operation,
as a result, pmic will cut off the power of codec IC, thus cause a pop noise from speaker and headphone.

So the patch added a shutdown callback for driver, enable volume smoothing and disable zero cross,
this is referenced from mic_input which does the samething before mic switch.

I'm very happy if some suggestion from maximintegrate . :-)
>
> +static void max98090_i2c_shutdown(struct i2c_client *i2c)
> +{
> +       struct max98090_priv *max98090 = dev_get_drvdata(&i2c->dev);
> +
> +       dev_info(&i2c->dev, "shut down device\n");
> +
> +       /* Enable volume smoothing, disable zero cross.  This will cause
> +        * a quick 40ms ramp to mute on shutdown.
> +        */
> +       regmap_write(max98090->regmap,
> +               M98090_REG_LEVEL_CONTROL, M98090_VSENN_MASK);
> +       regmap_write(max98090->regmap,
> +               M98090_REG_DEVICE_SHUTDOWN, 0x00);
> +       msleep(40);
> +}
> +
>
>


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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] ASoC: max98090: add shutdown callback for max98090
       [not found]       ` <B03A893ADFE80748942D13AFAF28451924E4BADE53@ITSVLEX06.it.maxim-ic.internal>
@ 2015-04-16  2:19         ` Caesar Wang
       [not found]           ` <B03A893ADFE80748942D13AFAF28451924E4BADE55@ITSVLEX06.it.maxim-ic.internal>
  0 siblings, 1 reply; 16+ messages in thread
From: Caesar Wang @ 2015-04-16  2:19 UTC (permalink / raw)
  To: Anish Kumar, Jianqun, Matthew Mowdy, zhengxing, Nitin Mittal
  Cc: alsa-devel, broonie

在 2015年04月16日 05:14, Anish Kumar 写道:
> 在 04/10/2015 03:38 AM, Anish Kumar 写道:
>>> To fix pop noise when shutdown,the pop noise during shutdown
>>> is the pmic cutoff power of codec without any notice.
>> Is the power turned off without any intimation to the codec driver?
>> Or is it physically removed? Can you describe the probelm
>> better?
>> When device is shutdown with playing music, the origin driver does nothing for shutdown operation,
>> as a result, pmic will cut off the power of codec IC, thus cause a pop noise from speaker and headphone.
>> So the patch added a shutdown callback for driver, enable volume smoothing and disable zero cross,
>> this is referenced from mic_input which does the samething before mic switch.
>> I'm very happy if some suggestion from maximintegrate . :-)
> Please let me know if the patch worked for you.

Yes, the patch can work for me.
We had tested on chromiumos.

>> +static void max98090_i2c_shutdown(struct i2c_client *i2c)
>> +{
>> +       struct max98090_priv *max98090 = dev_get_drvdata(&i2c->dev);
>> +
>> +       dev_info(&i2c->dev, "shut down device\n");
>> +
>> +       /* Enable volume smoothing, disable zero cross.  This will cause
>> +        * a quick 40ms ramp to mute on shutdown.
>> +        */
>> +       regmap_write(max98090->regmap,
>> +               M98090_REG_LEVEL_CONTROL, M98090_VSENN_MASK);
>> +       regmap_write(max98090->regmap,
>> +               M98090_REG_DEVICE_SHUTDOWN, 0x00);
>> +       msleep(40);
>> +}
>> +
>>
>>
>
>
>
>

-- 
**************************************************************************************
王晓腾    Caesar Wang
Product R&D Dept.III
Fuzhou Rockchip Electronics Co.Ltd
Addr:  NO.18 Building, A District, Fuzhou Software Park,Gulou District,Fuzhou, Fujian,China(Fuzhou Headquarters)
               21F,Malata Building,Kejizhongyi Avenue,Nanshan District,Shenzhen  (Shenzhen Office)
Tel:+86-591-83991906/07 - 8221
Mobile:+86 15059456742
E-mail : wxt@rock-chips.com
***************************************************************************************
***************************************************************************************
IMPORTANT NOTICE: This email is from Fuzhou Rockchip Electronics Co., Ltd .The contents of this email and any attachments may
contain information that is privileged, confidential and/or exempt from disclosure under applicable law and relevant NDA.
If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the
information is STRICTLY PROHIBITED. Please immediately contact the sender as soon as possible and destroy the material
in its entirety in any format. Thank you.
***************************************************************************************


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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] ASoC: max98090: add shutdown callback for max98090
       [not found]           ` <B03A893ADFE80748942D13AFAF28451924E4BADE55@ITSVLEX06.it.maxim-ic.internal>
@ 2015-04-16  3:40             ` Caesar Wang
       [not found]               ` <B03A893ADFE80748942D13AFAF28451924E4BADE57@ITSVLEX06.it.maxim-ic.internal>
  0 siblings, 1 reply; 16+ messages in thread
From: Caesar Wang @ 2015-04-16  3:40 UTC (permalink / raw)
  To: Anish Kumar, Jianqun, Matthew Mowdy, zhengxing, Nitin Mittal
  Cc: alsa-devel, broonie



在 2015年04月16日 10:41, Anish Kumar 写道:
> 在 2015年04月16日 05:14, Anish Kumar 写道:
>> 在 04/10/2015 03:38 AM, Anish Kumar 写道:
>>>> To fix pop noise when shutdown,the pop noise during shutdown
>>>> is the pmic cutoff power of codec without any notice.
>>> Is the power turned off without any intimation to the codec driver?
>>> Or is it physically removed? Can you describe the probelm
>>> better?
>>> When device is shutdown with playing music, the origin driver does nothing for shutdown operation,
>>> as a result, pmic will cut off the power of codec IC, thus cause a pop noise from speaker and headphone.
>>> So the patch added a shutdown callback for driver, enable volume smoothing and disable zero cross,
>>> this is referenced from mic_input which does the samething before mic switch.
>>> I'm very happy if some suggestion from maximintegrate . :-)
>> Please let me know if the patch worked for you.
>> Yes, the patch can work for me.
> I hope this patch is what you tested.
>
> +static void max98090_i2c_shutdown(struct i2c_client *i2c)
> +{
> +       struct max98090_priv *max98090 = dev_get_drvdata(&i2c->dev);
> +
> +       dev_info(&i2c->dev, "shut down device\n");
> +
> +       /* enable zero crossing */
> +       regmap_write(max98090->regmap,
> +               M98090_REG_LEVEL_CONTROL, M98090_ZDENN_MASK-1);
> +
> +       /* turn down volume levels for all the outputs */
> +       regmap_write(max98090->regmap,
> +               M98090_REG_RCV_LOUTL_VOLUME, 0x00);
> +       regmap_write(max98090->regmap,
> +               M98090_REG_LOUTR_VOLUME, 0x00);
> +       regmap_write(max98090->regmap,
> +               M98090_REG_LEFT_SPK_VOLUME, 0x00);
> +       regmap_write(max98090->regmap,
> +               M98090_REG_RIGHT_SPK_VOLUME, 0x00);
> +       regmap_write(max98090->regmap,
> +               M98090_REG_LEFT_HP_VOLUME, 0x00);
> +       regmap_write(max98090->regmap,
> +               M98090_REG_RIGHT_HP_VOLUME, 0x00);
> +       regmap_write(max98090->regmap,
> +               M98090_REG_DEVICE_SHUTDOWN, 0x00);
> +       msleep(40);
> +}
> +
> Please go ahead and submit to Mark.
With the about is also useful to solve it.

@zengxing, could you also help verify it?
>> We had tested on chromiumos.
>>> +static void max98090_i2c_shutdown(struct i2c_client *i2c)
>>> +{
>>> +       struct max98090_priv *max98090 = dev_get_drvdata(&i2c->dev);
>>> +
>>> +       dev_info(&i2c->dev, "shut down device\n");
>>> +
>>> +       /* Enable volume smoothing, disable zero cross.  This will cause
>>> +        * a quick 40ms ramp to mute on shutdown.
>>> +        */
>>> +       regmap_write(max98090->regmap,
>>> +               M98090_REG_LEVEL_CONTROL, M98090_VSENN_MASK);
>>> +       regmap_write(max98090->regmap,
>>> +               M98090_REG_DEVICE_SHUTDOWN, 0x00);
>>> +       msleep(40);
>>> +}
>>> +
>>>
>>>
>>
>>
>>
> --
> **************************************************************************************
> 王晓腾    Caesar Wang
> Product R&D Dept.III
> Fuzhou Rockchip Electronics Co.Ltd
> Addr:  NO.18 Building, A District, Fuzhou Software Park,Gulou District,Fuzhou, Fujian,China(Fuzhou Headquarters)
>                 21F,Malata Building,Kejizhongyi Avenue,Nanshan District,Shenzhen  (Shenzhen Office)
> Tel:+86-591-83991906/07 - 8221
> Mobile:+86 15059456742
> E-mail : wxt@rock-chips.com
> ***************************************************************************************
> ***************************************************************************************
> IMPORTANT NOTICE: This email is from Fuzhou Rockchip Electronics Co., Ltd .The contents of this email and any attachments may
> contain information that is privileged, confidential and/or exempt from disclosure under applicable law and relevant NDA.
> If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the
> information is STRICTLY PROHIBITED. Please immediately contact the sender as soon as possible and destroy the material
> in its entirety in any format. Thank you.
> ***************************************************************************************
>

-- 
**************************************************************************************
王晓腾    Caesar Wang
Product R&D Dept.III
Fuzhou Rockchip Electronics Co.Ltd
Addr:  NO.18 Building, A District, Fuzhou Software Park,Gulou District,Fuzhou, Fujian,China(Fuzhou Headquarters)
               21F,Malata Building,Kejizhongyi Avenue,Nanshan District,Shenzhen  (Shenzhen Office)
Tel:+86-591-83991906/07 - 8221
Mobile:+86 15059456742
E-mail : wxt@rock-chips.com
***************************************************************************************
***************************************************************************************
IMPORTANT NOTICE: This email is from Fuzhou Rockchip Electronics Co., Ltd .The contents of this email and any attachments may
contain information that is privileged, confidential and/or exempt from disclosure under applicable law and relevant NDA.
If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the
information is STRICTLY PROHIBITED. Please immediately contact the sender as soon as possible and destroy the material
in its entirety in any format. Thank you.
***************************************************************************************


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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] ASoC: max98090: add shutdown callback for max98090
       [not found]               ` <B03A893ADFE80748942D13AFAF28451924E4BADE57@ITSVLEX06.it.maxim-ic.internal>
@ 2015-04-17  7:22                 ` Caesar Wang
  0 siblings, 0 replies; 16+ messages in thread
From: Caesar Wang @ 2015-04-17  7:22 UTC (permalink / raw)
  To: Anish Kumar, Jianqun, Matthew Mowdy, zhengxing, Nitin Mittal
  Cc: alsa-devel, broonie



在 2015年04月17日 15:14, Anish Kumar 写道:
> 在 2015年04月16日 10:41, Anish Kumar 写道:
>> 在 2015年04月16日 05:14, Anish Kumar 写道:
>>> 在 04/10/2015 03:38 AM, Anish Kumar 写道:
>>>>> To fix pop noise when shutdown,the pop noise during shutdown
>>>>> is the pmic cutoff power of codec without any notice.
>>>> Is the power turned off without any intimation to the codec driver?
>>>> Or is it physically removed? Can you describe the probelm
>>>> better?
>>>> When device is shutdown with playing music, the origin driver does nothing for shutdown operation,
>>>> as a result, pmic will cut off the power of codec IC, thus cause a pop noise from speaker and headphone.
>>>> So the patch added a shutdown callback for driver, enable volume smoothing and disable zero cross,
>>>> this is referenced from mic_input which does the samething before mic switch.
>>>> I'm very happy if some suggestion from maximintegrate . :-)
>>> Please let me know if the patch worked for you.
>>> Yes, the patch can work for me.
>> I hope this patch is what you tested.
>>
>> +static void max98090_i2c_shutdown(struct i2c_client *i2c)
>> +{
>> +       struct max98090_priv *max98090 = dev_get_drvdata(&i2c->dev);
>> +
>> +       dev_info(&i2c->dev, "shut down device\n");
>> +
>> +       /* enable zero crossing */
>> +       regmap_write(max98090->regmap,
>> +               M98090_REG_LEVEL_CONTROL, M98090_ZDENN_MASK-1);
>> +
>> +       /* turn down volume levels for all the outputs */
>> +       regmap_write(max98090->regmap,
>> +               M98090_REG_RCV_LOUTL_VOLUME, 0x00);
>> +       regmap_write(max98090->regmap,
>> +               M98090_REG_LOUTR_VOLUME, 0x00);
>> +       regmap_write(max98090->regmap,
>> +               M98090_REG_LEFT_SPK_VOLUME, 0x00);
>> +       regmap_write(max98090->regmap,
>> +               M98090_REG_RIGHT_SPK_VOLUME, 0x00);
>> +       regmap_write(max98090->regmap,
>> +               M98090_REG_LEFT_HP_VOLUME, 0x00);
>> +       regmap_write(max98090->regmap,
>> +               M98090_REG_RIGHT_HP_VOLUME, 0x00);
>> +       regmap_write(max98090->regmap,
>> +               M98090_REG_DEVICE_SHUTDOWN, 0x00);
>> +       msleep(40);
>> +}
>> +
>> Please go ahead and submit to Mark.
> With the about is also useful to solve it.
>
> @zengxing, could you also help verify it?
> Verified ?

zengxing, who told me is useful to solve it.

>>> We had tested on chromiumos.
>>>> +static void max98090_i2c_shutdown(struct i2c_client *i2c)
>>>> +{
>>>> +       struct max98090_priv *max98090 = dev_get_drvdata(&i2c->dev);
>>>> +
>>>> +       dev_info(&i2c->dev, "shut down device\n");
>>>> +
>>>> +       /* Enable volume smoothing, disable zero cross.  This will cause
>>>> +        * a quick 40ms ramp to mute on shutdown.
>>>> +        */
>>>> +       regmap_write(max98090->regmap,
>>>> +               M98090_REG_LEVEL_CONTROL, M98090_VSENN_MASK);
>>>> +       regmap_write(max98090->regmap,
>>>> +               M98090_REG_DEVICE_SHUTDOWN, 0x00);
>>>> +       msleep(40);
>>>> +}
>>>> +
>>>>
>>>>
>>>
>>>
>> --
>> **************************************************************************************
>> 王晓腾    Caesar Wang
>> Product R&D Dept.III
>> Fuzhou Rockchip Electronics Co.Ltd
>> Addr:  NO.18 Building, A District, Fuzhou Software Park,Gulou District,Fuzhou, Fujian,China(Fuzhou Headquarters)
>>                  21F,Malata Building,Kejizhongyi Avenue,Nanshan District,Shenzhen  (Shenzhen Office)
>> Tel:+86-591-83991906/07 - 8221
>> Mobile:+86 15059456742
>> E-mail : wxt@rock-chips.com
>> ***************************************************************************************
>> ***************************************************************************************
>> IMPORTANT NOTICE: This email is from Fuzhou Rockchip Electronics Co., Ltd .The contents of this email and any attachments may
>> contain information that is privileged, confidential and/or exempt from disclosure under applicable law and relevant NDA.
>> If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the
>> information is STRICTLY PROHIBITED. Please immediately contact the sender as soon as possible and destroy the material
>> in its entirety in any format. Thank you.
>> ***************************************************************************************
>>
> --
> **************************************************************************************
> 王晓腾    Caesar Wang
> Product R&D Dept.III
> Fuzhou Rockchip Electronics Co.Ltd
> Addr:  NO.18 Building, A District, Fuzhou Software Park,Gulou District,Fuzhou, Fujian,China(Fuzhou Headquarters)
>                 21F,Malata Building,Kejizhongyi Avenue,Nanshan District,Shenzhen  (Shenzhen Office)
> Tel:+86-591-83991906/07 - 8221
> Mobile:+86 15059456742
> E-mail : wxt@rock-chips.com
> ***************************************************************************************
> ***************************************************************************************
> IMPORTANT NOTICE: This email is from Fuzhou Rockchip Electronics Co., Ltd .The contents of this email and any attachments may
> contain information that is privileged, confidential and/or exempt from disclosure under applicable law and relevant NDA.
> If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the
> information is STRICTLY PROHIBITED. Please immediately contact the sender as soon as possible and destroy the material
> in its entirety in any format. Thank you.
> ***************************************************************************************
>
>

-- 
**************************************************************************************
王晓腾    Caesar Wang
Product R&D Dept.III
Fuzhou Rockchip Electronics Co.Ltd
Addr:  NO.18 Building, A District, Fuzhou Software Park,Gulou District,Fuzhou, Fujian,China(Fuzhou Headquarters)
               21F,Malata Building,Kejizhongyi Avenue,Nanshan District,Shenzhen  (Shenzhen Office)
Tel:+86-591-83991906/07 - 8221
Mobile:+86 15059456742
E-mail : wxt@rock-chips.com
***************************************************************************************
***************************************************************************************
IMPORTANT NOTICE: This email is from Fuzhou Rockchip Electronics Co., Ltd .The contents of this email and any attachments may
contain information that is privileged, confidential and/or exempt from disclosure under applicable law and relevant NDA.
If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the
information is STRICTLY PROHIBITED. Please immediately contact the sender as soon as possible and destroy the material
in its entirety in any format. Thank you.
***************************************************************************************


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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] ASoC: max98090: add shutdown callback for max98090
  2015-04-08  9:50     ` Mark Brown
@ 2015-04-08 10:15       ` Caesar Wang
  -1 siblings, 0 replies; 16+ messages in thread
From: Caesar Wang @ 2015-04-08 10:15 UTC (permalink / raw)
  To: Mark Brown
  Cc: Sonny Rao, Cheng-Yi Chiang, Heiko Stuebner, zhengxing, jay.xu,
	linux-rockchip, linux-arm-kernel, dri-devel, Jaroslav Kysela,
	alsa-devel, Takashi Iwai, linux-kernel, Dylan Reid,
	Liam Girdwood, Lars-Peter Clausen, Jarkko Nikula, Tushar Behera

Mark,


在 2015年04月08日 17:50, Mark Brown 写道:
> On Wed, Apr 08, 2015 at 04:52:08PM +0800, Caesar Wang wrote:
>
>> +static void max98090_i2c_shutdown(struct i2c_client *i2c)
>> +{
>> +	struct max98090_priv *max98090 = dev_get_drvdata(&i2c->dev);
>> +
>> +	dev_info(&i2c->dev, "shut down device\n");
> Remove this, it's adding noise.

Done
>> +
>> +	/* Enable volume smoothing, disable zero cross.  This will cause
>> +	 * a quick 40ms ramp to mute on shutdown.
>> +	 */
>> +	regmap_write(max98090->regmap,
>> +		M98090_REG_LEVEL_CONTROL, M98090_VSENN_MASK);
>> +	regmap_write(max98090->regmap,
>> +		M98090_REG_DEVICE_SHUTDOWN, 0x00);
>> +	msleep(40);
>> +}
> This is OK but equivalent code should be being added to the driver
> remove path as the same thing should be happening there.
Yeah.I will fix it in v2 patch.

Thanks!

-- 
**************************************************************************************
王晓腾    Caesar Wang
系统产品三部   Product R&D Dept.III
福州瑞芯微电子有限公司 Fuzhou Rockchip Electronics Co.Ltd
地址:福建省福州市铜盘路软件大道89号软件园A区18号楼 (福州总部)
         深圳南山区科技中一路万利达大厦21层 (深圳分公司)
Addr:  NO.18 Building, A District, Fuzhou Software Park,Gulou District,Fuzhou, Fujian,China(Fuzhou Headquarters)
          21F,Malata Building,Kejizhongyi Avenue,Nanshan District,Shenzhen  (Shenzhen Office)
Tel:+86-591-83991906/07 - 8221
Mobile:+86 15059456742
E-mail : wxt@rock-chips.com
***************************************************************************************
***************************************************************************************
保密提示:本邮件及其附件含有机密信息,仅发送给本邮件所指特定收件人。若非该特定收件人,请勿复制、 使用或披露本邮件的任何内容。
若误收本邮件,请从系统中永久性删除本邮件及所有附件,并以回复邮件或其他方式即刻告知发件人。福州瑞芯微电子有限公司拥有本邮件信
息的著作权及解释权,禁止任何未经授权许可的侵权行为。
  
IMPORTANT NOTICE: This email is from Fuzhou Rockchip Electronics Co., Ltd .The contents of this email and any attachments may
contain information that is privileged, confidential and/or exempt from disclosure under applicable law and relevant NDA.
If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the
information is STRICTLY PROHIBITED. Please immediately contact the sender as soon as possible and destroy the material
in its entirety in any format. Thank you.
***************************************************************************************



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH] ASoC: max98090: add shutdown callback for max98090
@ 2015-04-08 10:15       ` Caesar Wang
  0 siblings, 0 replies; 16+ messages in thread
From: Caesar Wang @ 2015-04-08 10:15 UTC (permalink / raw)
  To: linux-arm-kernel

Mark,


? 2015?04?08? 17:50, Mark Brown ??:
> On Wed, Apr 08, 2015 at 04:52:08PM +0800, Caesar Wang wrote:
>
>> +static void max98090_i2c_shutdown(struct i2c_client *i2c)
>> +{
>> +	struct max98090_priv *max98090 = dev_get_drvdata(&i2c->dev);
>> +
>> +	dev_info(&i2c->dev, "shut down device\n");
> Remove this, it's adding noise.

Done
>> +
>> +	/* Enable volume smoothing, disable zero cross.  This will cause
>> +	 * a quick 40ms ramp to mute on shutdown.
>> +	 */
>> +	regmap_write(max98090->regmap,
>> +		M98090_REG_LEVEL_CONTROL, M98090_VSENN_MASK);
>> +	regmap_write(max98090->regmap,
>> +		M98090_REG_DEVICE_SHUTDOWN, 0x00);
>> +	msleep(40);
>> +}
> This is OK but equivalent code should be being added to the driver
> remove path as the same thing should be happening there.
Yeah.I will fix it in v2 patch.

Thanks!

-- 
**************************************************************************************
???    Caesar Wang
??????   Product R&D Dept.III
??????????? Fuzhou Rockchip Electronics Co.Ltd
????????????????89????A?18?? ??????
         ???????????????21? ???????
Addr?  NO.18 Building, A District, Fuzhou Software Park,Gulou District,Fuzhou, Fujian,China(Fuzhou Headquarters)
          21F,Malata Building,Kejizhongyi Avenue,Nanshan District,Shenzhen  (Shenzhen Office)
Tel?+86-591-83991906/07 - 8221
Mobile:+86 15059456742
E-mail : wxt at rock-chips.com
***************************************************************************************
***************************************************************************************
???????????????????????????????????????????????? ??????????????
??????????????????????????????????????????????????????????????
??????????????????????????
  
IMPORTANT NOTICE: This email is from Fuzhou Rockchip Electronics Co., Ltd .The contents of this email and any attachments may
contain information that is privileged, confidential and/or exempt from disclosure under applicable law and relevant NDA.
If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the
information is STRICTLY PROHIBITED. Please immediately contact the sender as soon as possible and destroy the material
in its entirety in any format. Thank you.
***************************************************************************************

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] ASoC: max98090: add shutdown callback for max98090
  2015-04-08  9:25     ` Heiko Stübner
@ 2015-04-08 10:14       ` Caesar Wang
  -1 siblings, 0 replies; 16+ messages in thread
From: Caesar Wang @ 2015-04-08 10:14 UTC (permalink / raw)
  To: Heiko Stübner
  Cc: Sonny Rao, Cheng-Yi Chiang, Mark Brown, zhengxing, jay.xu,
	linux-rockchip, linux-arm-kernel, dri-devel, Jaroslav Kysela,
	alsa-devel, Takashi Iwai, linux-kernel, Dylan Reid,
	Liam Girdwood, Lars-Peter Clausen, Jarkko Nikula, Tushar Behera

Heiko,

在 2015年04月08日 17:25, Heiko Stübner 写道:
> Hi Caesar,
>
> Am Mittwoch, 8. April 2015, 16:52:08 schrieb Caesar Wang:
>> To fix pop noise when shutdown,the pop noise during shutdown
>> is the pmic cutoff power of codec without any notice.
>>
>> Signed-off-by: jay.xu <xjq@rock-chips.com>
>> Signed-off-by: zhengxing <zhengxing@rock-chips.com>
>> Signed-off-by: Caesar Wang <wxt@rock-chips.com>
>>
>> Serien-cc: linux-kernel@vger.kernel.org
>> Serien-cc: devicetree@vger.kernel.org
>> Serien-cc: dianders@chromium.org
>>
>> ---
>>
>>   sound/soc/codecs/max98090.c | 17 +++++++++++++++++
>>   1 file changed, 17 insertions(+)
>>
>> diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
>> index b112b1c..066954a0 100644
>> --- a/sound/soc/codecs/max98090.c
>> +++ b/sound/soc/codecs/max98090.c
>> @@ -2611,6 +2611,22 @@ static int max98090_i2c_remove(struct i2c_client
>> *client) return 0;
>>   }
>>
>> +static void max98090_i2c_shutdown(struct i2c_client *i2c)
>> +{
>> +	struct max98090_priv *max98090 = dev_get_drvdata(&i2c->dev);
>> +
>> +	dev_info(&i2c->dev, "shut down device\n");
> is this dev_info really necessary? dev_dbg might be better, or leave it out
> completely, as it doesn't really provide any additional benefit.
>

As Mark suggestion, I will remove it.
>> +
>> +	/* Enable volume smoothing, disable zero cross.  This will cause
>> +	 * a quick 40ms ramp to mute on shutdown.
>> +	 */
> Comment style is off ... should be
>
> /*
>   * Enable volume smoothing, disable zero cross.  This will cause
>   * a quick 40ms ramp to mute on shutdown.
>   */
>

Done
>> +	regmap_write(max98090->regmap,
>> +		M98090_REG_LEVEL_CONTROL, M98090_VSENN_MASK);
>> +	regmap_write(max98090->regmap,
>> +		M98090_REG_DEVICE_SHUTDOWN, 0x00);
>> +	msleep(40);
>> +}
>> +
>>   #ifdef CONFIG_PM
>>   static int max98090_runtime_resume(struct device *dev)
>>   {
>> @@ -2697,6 +2713,7 @@ static struct i2c_driver max98090_i2c_driver = {
>>   	},
>>   	.probe  = max98090_i2c_probe,
>>   	.remove = max98090_i2c_remove,
>> +	.shutdown = max98090_i2c_shutdown,
>>   	.id_table = max98090_i2c_id,
>>   };
>
>
>

-- 
**************************************************************************************
王晓腾    Caesar Wang
系统产品三部   Product R&D Dept.III
福州瑞芯微电子有限公司 Fuzhou Rockchip Electronics Co.Ltd
地址:福建省福州市铜盘路软件大道89号软件园A区18号楼 (福州总部)
         深圳南山区科技中一路万利达大厦21层 (深圳分公司)
Addr:  NO.18 Building, A District, Fuzhou Software Park,Gulou District,Fuzhou, Fujian,China(Fuzhou Headquarters)
          21F,Malata Building,Kejizhongyi Avenue,Nanshan District,Shenzhen  (Shenzhen Office)
Tel:+86-591-83991906/07 - 8221
Mobile:+86 15059456742
E-mail : wxt@rock-chips.com
***************************************************************************************
***************************************************************************************
保密提示:本邮件及其附件含有机密信息,仅发送给本邮件所指特定收件人。若非该特定收件人,请勿复制、 使用或披露本邮件的任何内容。
若误收本邮件,请从系统中永久性删除本邮件及所有附件,并以回复邮件或其他方式即刻告知发件人。福州瑞芯微电子有限公司拥有本邮件信
息的著作权及解释权,禁止任何未经授权许可的侵权行为。
  
IMPORTANT NOTICE: This email is from Fuzhou Rockchip Electronics Co., Ltd .The contents of this email and any attachments may
contain information that is privileged, confidential and/or exempt from disclosure under applicable law and relevant NDA.
If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the
information is STRICTLY PROHIBITED. Please immediately contact the sender as soon as possible and destroy the material
in its entirety in any format. Thank you.
***************************************************************************************



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH] ASoC: max98090: add shutdown callback for max98090
@ 2015-04-08 10:14       ` Caesar Wang
  0 siblings, 0 replies; 16+ messages in thread
From: Caesar Wang @ 2015-04-08 10:14 UTC (permalink / raw)
  To: linux-arm-kernel

Heiko,

? 2015?04?08? 17:25, Heiko St?bner ??:
> Hi Caesar,
>
> Am Mittwoch, 8. April 2015, 16:52:08 schrieb Caesar Wang:
>> To fix pop noise when shutdown,the pop noise during shutdown
>> is the pmic cutoff power of codec without any notice.
>>
>> Signed-off-by: jay.xu <xjq@rock-chips.com>
>> Signed-off-by: zhengxing <zhengxing@rock-chips.com>
>> Signed-off-by: Caesar Wang <wxt@rock-chips.com>
>>
>> Serien-cc: linux-kernel at vger.kernel.org
>> Serien-cc: devicetree at vger.kernel.org
>> Serien-cc: dianders at chromium.org
>>
>> ---
>>
>>   sound/soc/codecs/max98090.c | 17 +++++++++++++++++
>>   1 file changed, 17 insertions(+)
>>
>> diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
>> index b112b1c..066954a0 100644
>> --- a/sound/soc/codecs/max98090.c
>> +++ b/sound/soc/codecs/max98090.c
>> @@ -2611,6 +2611,22 @@ static int max98090_i2c_remove(struct i2c_client
>> *client) return 0;
>>   }
>>
>> +static void max98090_i2c_shutdown(struct i2c_client *i2c)
>> +{
>> +	struct max98090_priv *max98090 = dev_get_drvdata(&i2c->dev);
>> +
>> +	dev_info(&i2c->dev, "shut down device\n");
> is this dev_info really necessary? dev_dbg might be better, or leave it out
> completely, as it doesn't really provide any additional benefit.
>

As Mark suggestion, I will remove it.
>> +
>> +	/* Enable volume smoothing, disable zero cross.  This will cause
>> +	 * a quick 40ms ramp to mute on shutdown.
>> +	 */
> Comment style is off ... should be
>
> /*
>   * Enable volume smoothing, disable zero cross.  This will cause
>   * a quick 40ms ramp to mute on shutdown.
>   */
>

Done
>> +	regmap_write(max98090->regmap,
>> +		M98090_REG_LEVEL_CONTROL, M98090_VSENN_MASK);
>> +	regmap_write(max98090->regmap,
>> +		M98090_REG_DEVICE_SHUTDOWN, 0x00);
>> +	msleep(40);
>> +}
>> +
>>   #ifdef CONFIG_PM
>>   static int max98090_runtime_resume(struct device *dev)
>>   {
>> @@ -2697,6 +2713,7 @@ static struct i2c_driver max98090_i2c_driver = {
>>   	},
>>   	.probe  = max98090_i2c_probe,
>>   	.remove = max98090_i2c_remove,
>> +	.shutdown = max98090_i2c_shutdown,
>>   	.id_table = max98090_i2c_id,
>>   };
>
>
>

-- 
**************************************************************************************
???    Caesar Wang
??????   Product R&D Dept.III
??????????? Fuzhou Rockchip Electronics Co.Ltd
????????????????89????A?18?? ??????
         ???????????????21? ???????
Addr?  NO.18 Building, A District, Fuzhou Software Park,Gulou District,Fuzhou, Fujian,China(Fuzhou Headquarters)
          21F,Malata Building,Kejizhongyi Avenue,Nanshan District,Shenzhen  (Shenzhen Office)
Tel?+86-591-83991906/07 - 8221
Mobile:+86 15059456742
E-mail : wxt at rock-chips.com
***************************************************************************************
***************************************************************************************
???????????????????????????????????????????????? ??????????????
??????????????????????????????????????????????????????????????
??????????????????????????
  
IMPORTANT NOTICE: This email is from Fuzhou Rockchip Electronics Co., Ltd .The contents of this email and any attachments may
contain information that is privileged, confidential and/or exempt from disclosure under applicable law and relevant NDA.
If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the
information is STRICTLY PROHIBITED. Please immediately contact the sender as soon as possible and destroy the material
in its entirety in any format. Thank you.
***************************************************************************************

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] ASoC: max98090: add shutdown callback for max98090
  2015-04-08  8:52   ` Caesar Wang
@ 2015-04-08  9:50     ` Mark Brown
  -1 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2015-04-08  9:50 UTC (permalink / raw)
  To: Caesar Wang
  Cc: Sonny Rao, Cheng-Yi Chiang, Heiko Stuebner, zhengxing, jay.xu,
	linux-rockchip, linux-arm-kernel, dri-devel, Jaroslav Kysela,
	alsa-devel, Takashi Iwai, linux-kernel, Dylan Reid,
	Liam Girdwood, Lars-Peter Clausen, Jarkko Nikula, Tushar Behera

[-- Attachment #1: Type: text/plain, Size: 712 bytes --]

On Wed, Apr 08, 2015 at 04:52:08PM +0800, Caesar Wang wrote:

> +static void max98090_i2c_shutdown(struct i2c_client *i2c)
> +{
> +	struct max98090_priv *max98090 = dev_get_drvdata(&i2c->dev);
> +
> +	dev_info(&i2c->dev, "shut down device\n");

Remove this, it's adding noise.

> +
> +	/* Enable volume smoothing, disable zero cross.  This will cause
> +	 * a quick 40ms ramp to mute on shutdown.
> +	 */
> +	regmap_write(max98090->regmap,
> +		M98090_REG_LEVEL_CONTROL, M98090_VSENN_MASK);
> +	regmap_write(max98090->regmap,
> +		M98090_REG_DEVICE_SHUTDOWN, 0x00);
> +	msleep(40);
> +}

This is OK but equivalent code should be being added to the driver
remove path as the same thing should be happening there.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH] ASoC: max98090: add shutdown callback for max98090
@ 2015-04-08  9:50     ` Mark Brown
  0 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2015-04-08  9:50 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Apr 08, 2015 at 04:52:08PM +0800, Caesar Wang wrote:

> +static void max98090_i2c_shutdown(struct i2c_client *i2c)
> +{
> +	struct max98090_priv *max98090 = dev_get_drvdata(&i2c->dev);
> +
> +	dev_info(&i2c->dev, "shut down device\n");

Remove this, it's adding noise.

> +
> +	/* Enable volume smoothing, disable zero cross.  This will cause
> +	 * a quick 40ms ramp to mute on shutdown.
> +	 */
> +	regmap_write(max98090->regmap,
> +		M98090_REG_LEVEL_CONTROL, M98090_VSENN_MASK);
> +	regmap_write(max98090->regmap,
> +		M98090_REG_DEVICE_SHUTDOWN, 0x00);
> +	msleep(40);
> +}

This is OK but equivalent code should be being added to the driver
remove path as the same thing should be happening there.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150408/c43d88ca/attachment.sig>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] ASoC: max98090: add shutdown callback for max98090
  2015-04-08  8:52   ` Caesar Wang
  (?)
@ 2015-04-08  9:25     ` Heiko Stübner
  -1 siblings, 0 replies; 16+ messages in thread
From: Heiko Stübner @ 2015-04-08  9:25 UTC (permalink / raw)
  To: Caesar Wang
  Cc: Sonny Rao, Cheng-Yi Chiang, Mark Brown, zhengxing, jay.xu,
	linux-rockchip, linux-arm-kernel, dri-devel, Jaroslav Kysela,
	alsa-devel, Takashi Iwai, linux-kernel, Dylan Reid,
	Liam Girdwood, Lars-Peter Clausen, Jarkko Nikula, Tushar Behera

Hi Caesar,

Am Mittwoch, 8. April 2015, 16:52:08 schrieb Caesar Wang:
> To fix pop noise when shutdown,the pop noise during shutdown
> is the pmic cutoff power of codec without any notice.
> 
> Signed-off-by: jay.xu <xjq@rock-chips.com>
> Signed-off-by: zhengxing <zhengxing@rock-chips.com>
> Signed-off-by: Caesar Wang <wxt@rock-chips.com>
> 
> Serien-cc: linux-kernel@vger.kernel.org
> Serien-cc: devicetree@vger.kernel.org
> Serien-cc: dianders@chromium.org
> 
> ---
> 
>  sound/soc/codecs/max98090.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
> index b112b1c..066954a0 100644
> --- a/sound/soc/codecs/max98090.c
> +++ b/sound/soc/codecs/max98090.c
> @@ -2611,6 +2611,22 @@ static int max98090_i2c_remove(struct i2c_client
> *client) return 0;
>  }
> 
> +static void max98090_i2c_shutdown(struct i2c_client *i2c)
> +{
> +	struct max98090_priv *max98090 = dev_get_drvdata(&i2c->dev);
> +
> +	dev_info(&i2c->dev, "shut down device\n");

is this dev_info really necessary? dev_dbg might be better, or leave it out 
completely, as it doesn't really provide any additional benefit.


> +
> +	/* Enable volume smoothing, disable zero cross.  This will cause
> +	 * a quick 40ms ramp to mute on shutdown.
> +	 */

Comment style is off ... should be

/*
 * Enable volume smoothing, disable zero cross.  This will cause
 * a quick 40ms ramp to mute on shutdown.
 */


> +	regmap_write(max98090->regmap,
> +		M98090_REG_LEVEL_CONTROL, M98090_VSENN_MASK);
> +	regmap_write(max98090->regmap,
> +		M98090_REG_DEVICE_SHUTDOWN, 0x00);
> +	msleep(40);
> +}
> +
>  #ifdef CONFIG_PM
>  static int max98090_runtime_resume(struct device *dev)
>  {
> @@ -2697,6 +2713,7 @@ static struct i2c_driver max98090_i2c_driver = {
>  	},
>  	.probe  = max98090_i2c_probe,
>  	.remove = max98090_i2c_remove,
> +	.shutdown = max98090_i2c_shutdown,
>  	.id_table = max98090_i2c_id,
>  };


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] ASoC: max98090: add shutdown callback for max98090
@ 2015-04-08  9:25     ` Heiko Stübner
  0 siblings, 0 replies; 16+ messages in thread
From: Heiko Stübner @ 2015-04-08  9:25 UTC (permalink / raw)
  To: Caesar Wang
  Cc: alsa-devel, jay.xu, zhengxing, Liam Girdwood, Tushar Behera,
	linux-kernel, dri-devel, Jaroslav Kysela, linux-rockchip,
	Mark Brown, Jarkko Nikula, Dylan Reid, Sonny Rao,
	linux-arm-kernel, Cheng-Yi Chiang

Hi Caesar,

Am Mittwoch, 8. April 2015, 16:52:08 schrieb Caesar Wang:
> To fix pop noise when shutdown,the pop noise during shutdown
> is the pmic cutoff power of codec without any notice.
> 
> Signed-off-by: jay.xu <xjq@rock-chips.com>
> Signed-off-by: zhengxing <zhengxing@rock-chips.com>
> Signed-off-by: Caesar Wang <wxt@rock-chips.com>
> 
> Serien-cc: linux-kernel@vger.kernel.org
> Serien-cc: devicetree@vger.kernel.org
> Serien-cc: dianders@chromium.org
> 
> ---
> 
>  sound/soc/codecs/max98090.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
> index b112b1c..066954a0 100644
> --- a/sound/soc/codecs/max98090.c
> +++ b/sound/soc/codecs/max98090.c
> @@ -2611,6 +2611,22 @@ static int max98090_i2c_remove(struct i2c_client
> *client) return 0;
>  }
> 
> +static void max98090_i2c_shutdown(struct i2c_client *i2c)
> +{
> +	struct max98090_priv *max98090 = dev_get_drvdata(&i2c->dev);
> +
> +	dev_info(&i2c->dev, "shut down device\n");

is this dev_info really necessary? dev_dbg might be better, or leave it out 
completely, as it doesn't really provide any additional benefit.


> +
> +	/* Enable volume smoothing, disable zero cross.  This will cause
> +	 * a quick 40ms ramp to mute on shutdown.
> +	 */

Comment style is off ... should be

/*
 * Enable volume smoothing, disable zero cross.  This will cause
 * a quick 40ms ramp to mute on shutdown.
 */


> +	regmap_write(max98090->regmap,
> +		M98090_REG_LEVEL_CONTROL, M98090_VSENN_MASK);
> +	regmap_write(max98090->regmap,
> +		M98090_REG_DEVICE_SHUTDOWN, 0x00);
> +	msleep(40);
> +}
> +
>  #ifdef CONFIG_PM
>  static int max98090_runtime_resume(struct device *dev)
>  {
> @@ -2697,6 +2713,7 @@ static struct i2c_driver max98090_i2c_driver = {
>  	},
>  	.probe  = max98090_i2c_probe,
>  	.remove = max98090_i2c_remove,
> +	.shutdown = max98090_i2c_shutdown,
>  	.id_table = max98090_i2c_id,
>  };

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH] ASoC: max98090: add shutdown callback for max98090
@ 2015-04-08  9:25     ` Heiko Stübner
  0 siblings, 0 replies; 16+ messages in thread
From: Heiko Stübner @ 2015-04-08  9:25 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Caesar,

Am Mittwoch, 8. April 2015, 16:52:08 schrieb Caesar Wang:
> To fix pop noise when shutdown,the pop noise during shutdown
> is the pmic cutoff power of codec without any notice.
> 
> Signed-off-by: jay.xu <xjq@rock-chips.com>
> Signed-off-by: zhengxing <zhengxing@rock-chips.com>
> Signed-off-by: Caesar Wang <wxt@rock-chips.com>
> 
> Serien-cc: linux-kernel at vger.kernel.org
> Serien-cc: devicetree at vger.kernel.org
> Serien-cc: dianders at chromium.org
> 
> ---
> 
>  sound/soc/codecs/max98090.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
> index b112b1c..066954a0 100644
> --- a/sound/soc/codecs/max98090.c
> +++ b/sound/soc/codecs/max98090.c
> @@ -2611,6 +2611,22 @@ static int max98090_i2c_remove(struct i2c_client
> *client) return 0;
>  }
> 
> +static void max98090_i2c_shutdown(struct i2c_client *i2c)
> +{
> +	struct max98090_priv *max98090 = dev_get_drvdata(&i2c->dev);
> +
> +	dev_info(&i2c->dev, "shut down device\n");

is this dev_info really necessary? dev_dbg might be better, or leave it out 
completely, as it doesn't really provide any additional benefit.


> +
> +	/* Enable volume smoothing, disable zero cross.  This will cause
> +	 * a quick 40ms ramp to mute on shutdown.
> +	 */

Comment style is off ... should be

/*
 * Enable volume smoothing, disable zero cross.  This will cause
 * a quick 40ms ramp to mute on shutdown.
 */


> +	regmap_write(max98090->regmap,
> +		M98090_REG_LEVEL_CONTROL, M98090_VSENN_MASK);
> +	regmap_write(max98090->regmap,
> +		M98090_REG_DEVICE_SHUTDOWN, 0x00);
> +	msleep(40);
> +}
> +
>  #ifdef CONFIG_PM
>  static int max98090_runtime_resume(struct device *dev)
>  {
> @@ -2697,6 +2713,7 @@ static struct i2c_driver max98090_i2c_driver = {
>  	},
>  	.probe  = max98090_i2c_probe,
>  	.remove = max98090_i2c_remove,
> +	.shutdown = max98090_i2c_shutdown,
>  	.id_table = max98090_i2c_id,
>  };

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH] ASoC: max98090: add shutdown callback for max98090
@ 2015-04-08  8:52   ` Caesar Wang
  0 siblings, 0 replies; 16+ messages in thread
From: Caesar Wang @ 2015-04-08  8:52 UTC (permalink / raw)
  To: Sonny Rao, Cheng-Yi Chiang, Heiko Stuebner, Mark Brown,
	zhengxing, jay.xu
  Cc: linux-rockchip, linux-arm-kernel, dri-devel, Caesar Wang,
	Jaroslav Kysela, alsa-devel, Takashi Iwai, linux-kernel,
	Dylan Reid, Liam Girdwood, Lars-Peter Clausen, Jarkko Nikula,
	Tushar Behera

To fix pop noise when shutdown,the pop noise during shutdown
is the pmic cutoff power of codec without any notice.

Signed-off-by: jay.xu <xjq@rock-chips.com>
Signed-off-by: zhengxing <zhengxing@rock-chips.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>

Serien-cc: linux-kernel@vger.kernel.org
Serien-cc: devicetree@vger.kernel.org
Serien-cc: dianders@chromium.org

---

 sound/soc/codecs/max98090.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
index b112b1c..066954a0 100644
--- a/sound/soc/codecs/max98090.c
+++ b/sound/soc/codecs/max98090.c
@@ -2611,6 +2611,22 @@ static int max98090_i2c_remove(struct i2c_client *client)
 	return 0;
 }
 
+static void max98090_i2c_shutdown(struct i2c_client *i2c)
+{
+	struct max98090_priv *max98090 = dev_get_drvdata(&i2c->dev);
+
+	dev_info(&i2c->dev, "shut down device\n");
+
+	/* Enable volume smoothing, disable zero cross.  This will cause
+	 * a quick 40ms ramp to mute on shutdown.
+	 */
+	regmap_write(max98090->regmap,
+		M98090_REG_LEVEL_CONTROL, M98090_VSENN_MASK);
+	regmap_write(max98090->regmap,
+		M98090_REG_DEVICE_SHUTDOWN, 0x00);
+	msleep(40);
+}
+
 #ifdef CONFIG_PM
 static int max98090_runtime_resume(struct device *dev)
 {
@@ -2697,6 +2713,7 @@ static struct i2c_driver max98090_i2c_driver = {
 	},
 	.probe  = max98090_i2c_probe,
 	.remove = max98090_i2c_remove,
+	.shutdown = max98090_i2c_shutdown,
 	.id_table = max98090_i2c_id,
 };
 
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH] ASoC: max98090: add shutdown callback for max98090
@ 2015-04-08  8:52   ` Caesar Wang
  0 siblings, 0 replies; 16+ messages in thread
From: Caesar Wang @ 2015-04-08  8:52 UTC (permalink / raw)
  To: Sonny Rao, Cheng-Yi Chiang, Heiko Stuebner, Mark Brown,
	zhengxing, jay.xu
  Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, Lars-Peter Clausen,
	Liam Girdwood, Takashi Iwai, Tushar Behera,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Jaroslav Kysela,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Jarkko Nikula,
	Dylan Reid, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Caesar Wang

To fix pop noise when shutdown,the pop noise during shutdown
is the pmic cutoff power of codec without any notice.

Signed-off-by: jay.xu <xjq-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
Signed-off-by: zhengxing <zhengxing-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
Signed-off-by: Caesar Wang <wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>

Serien-cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Serien-cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Serien-cc: dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org

---

 sound/soc/codecs/max98090.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
index b112b1c..066954a0 100644
--- a/sound/soc/codecs/max98090.c
+++ b/sound/soc/codecs/max98090.c
@@ -2611,6 +2611,22 @@ static int max98090_i2c_remove(struct i2c_client *client)
 	return 0;
 }
 
+static void max98090_i2c_shutdown(struct i2c_client *i2c)
+{
+	struct max98090_priv *max98090 = dev_get_drvdata(&i2c->dev);
+
+	dev_info(&i2c->dev, "shut down device\n");
+
+	/* Enable volume smoothing, disable zero cross.  This will cause
+	 * a quick 40ms ramp to mute on shutdown.
+	 */
+	regmap_write(max98090->regmap,
+		M98090_REG_LEVEL_CONTROL, M98090_VSENN_MASK);
+	regmap_write(max98090->regmap,
+		M98090_REG_DEVICE_SHUTDOWN, 0x00);
+	msleep(40);
+}
+
 #ifdef CONFIG_PM
 static int max98090_runtime_resume(struct device *dev)
 {
@@ -2697,6 +2713,7 @@ static struct i2c_driver max98090_i2c_driver = {
 	},
 	.probe  = max98090_i2c_probe,
 	.remove = max98090_i2c_remove,
+	.shutdown = max98090_i2c_shutdown,
 	.id_table = max98090_i2c_id,
 };
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH] ASoC: max98090: add shutdown callback for max98090
@ 2015-04-08  8:52   ` Caesar Wang
  0 siblings, 0 replies; 16+ messages in thread
From: Caesar Wang @ 2015-04-08  8:52 UTC (permalink / raw)
  To: linux-arm-kernel

To fix pop noise when shutdown,the pop noise during shutdown
is the pmic cutoff power of codec without any notice.

Signed-off-by: jay.xu <xjq@rock-chips.com>
Signed-off-by: zhengxing <zhengxing@rock-chips.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>

Serien-cc: linux-kernel at vger.kernel.org
Serien-cc: devicetree at vger.kernel.org
Serien-cc: dianders at chromium.org

---

 sound/soc/codecs/max98090.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
index b112b1c..066954a0 100644
--- a/sound/soc/codecs/max98090.c
+++ b/sound/soc/codecs/max98090.c
@@ -2611,6 +2611,22 @@ static int max98090_i2c_remove(struct i2c_client *client)
 	return 0;
 }
 
+static void max98090_i2c_shutdown(struct i2c_client *i2c)
+{
+	struct max98090_priv *max98090 = dev_get_drvdata(&i2c->dev);
+
+	dev_info(&i2c->dev, "shut down device\n");
+
+	/* Enable volume smoothing, disable zero cross.  This will cause
+	 * a quick 40ms ramp to mute on shutdown.
+	 */
+	regmap_write(max98090->regmap,
+		M98090_REG_LEVEL_CONTROL, M98090_VSENN_MASK);
+	regmap_write(max98090->regmap,
+		M98090_REG_DEVICE_SHUTDOWN, 0x00);
+	msleep(40);
+}
+
 #ifdef CONFIG_PM
 static int max98090_runtime_resume(struct device *dev)
 {
@@ -2697,6 +2713,7 @@ static struct i2c_driver max98090_i2c_driver = {
 	},
 	.probe  = max98090_i2c_probe,
 	.remove = max98090_i2c_remove,
+	.shutdown = max98090_i2c_shutdown,
 	.id_table = max98090_i2c_id,
 };
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2015-04-17  7:22 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.2466.1428559383.807.alsa-devel@alsa-project.org>
     [not found] ` <CAK7N6vow0D8i6jQdjGbZ5L+VdyOtmSWSFdpyiE5JRH7SGtv=Dw@mail.gmail.com>
     [not found]   ` <B03A893ADFE80748942D13AFAF28451924E3198860@ITSVLEX06.it.maxim-ic.internal>
2015-04-10  0:46     ` [PATCH] ASoC: max98090: add shutdown callback for max98090 Jianqun
     [not found]       ` <B03A893ADFE80748942D13AFAF28451924E4BADE53@ITSVLEX06.it.maxim-ic.internal>
2015-04-16  2:19         ` Caesar Wang
     [not found]           ` <B03A893ADFE80748942D13AFAF28451924E4BADE55@ITSVLEX06.it.maxim-ic.internal>
2015-04-16  3:40             ` Caesar Wang
     [not found]               ` <B03A893ADFE80748942D13AFAF28451924E4BADE57@ITSVLEX06.it.maxim-ic.internal>
2015-04-17  7:22                 ` Caesar Wang
2015-04-08  8:52 [PATCH 0/1] " Caesar Wang
2015-04-08  8:52 ` [PATCH] " Caesar Wang
2015-04-08  8:52   ` Caesar Wang
2015-04-08  8:52   ` Caesar Wang
2015-04-08  9:25   ` Heiko Stübner
2015-04-08  9:25     ` Heiko Stübner
2015-04-08  9:25     ` Heiko Stübner
2015-04-08 10:14     ` Caesar Wang
2015-04-08 10:14       ` Caesar Wang
2015-04-08  9:50   ` Mark Brown
2015-04-08  9:50     ` Mark Brown
2015-04-08 10:15     ` Caesar Wang
2015-04-08 10:15       ` Caesar Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.