diff options
author | b02247 <b02247@freescale.com> | 2011-08-31 11:15:36 +0800 |
---|---|---|
committer | b02247 <b02247@freescale.com> | 2011-09-01 17:30:05 +0800 |
commit | 1aedc90d5008f553f3001ea4f1847f1be8dad0f2 (patch) | |
tree | 0264fdf0afedeeff602dca1e446b4f34761329ba | |
parent | b19c29bcbb74fabec866696105f3ef18a2e0ef50 (diff) |
ENGR00155763 SR:1-776919222 Noise from sgtl5000 when reboot
powerdown DAC,LINE_OUT,HP in shutdown
Signed-off-by: b02247 <b02247@freescale.com>
-rw-r--r-- | sound/soc/codecs/sgtl5000.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index bb94c65244f1..3ea3d4768070 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c @@ -1,7 +1,7 @@ /* * sgtl5000.c -- SGTL5000 ALSA SoC Audio driver * - * Copyright (C) 2008-2010 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright (C) 2008-2011 Freescale Semiconductor, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -1360,6 +1360,20 @@ static __devexit int sgtl5000_i2c_remove(struct i2c_client *client) return 0; } +static __devexit int sgtl5000_i2c_shutdown(struct i2c_client *client) +{ + struct snd_soc_codec *codec = i2c_get_clientdata(client); + int reg; + reg = sgtl5000_read(codec, SGTL5000_CHIP_ANA_POWER); + reg &= ~SGTL5000_VAG_POWERUP; + reg &= ~SGTL5000_HP_POWERUP; + reg &= ~SGTL5000_LINE_OUT_POWERUP; + reg &= ~SGTL5000_DAC_POWERUP; + reg &= ~SGTL5000_ADC_POWERUP; + sgtl5000_write(codec, SGTL5000_CHIP_ANA_POWER, reg); + return 0; +} + static const struct i2c_device_id sgtl5000_id[] = { {"sgtl5000-i2c", 0}, {}, @@ -1375,6 +1389,7 @@ static struct i2c_driver sgtl5000_i2c_driver = { .probe = sgtl5000_i2c_probe, .remove = __devexit_p(sgtl5000_i2c_remove), .id_table = sgtl5000_id, + .shutdown = sgtl5000_i2c_shutdown, }; static int __init sgtl5000_modinit(void) |