wm8978.c (4ba24fef3eb3b142197135223b90ced2f319cd53) wm8978.c (bd1204cb51f15d202f95222e873a94ed5d07b784)
1/*
2 * wm8978.c -- WM8978 ALSA SoC Audio Codec driver
3 *
4 * Copyright (C) 2009-2010 Guennadi Liakhovetski <g.liakhovetski@gmx.de>
5 * Copyright (C) 2007 Carlos Munoz <carlos@kenati.com>
6 * Copyright 2006-2009 Wolfson Microelectronics PLC.
7 * Based on wm8974 and wm8990 by Liam Girdwood <lrg@slimlogic.co.uk>
8 *

--- 914 unchanged lines hidden (view full) ---

923 .ops = &wm8978_dai_ops,
924 .symmetric_rates = 1,
925};
926
927static int wm8978_suspend(struct snd_soc_codec *codec)
928{
929 struct wm8978_priv *wm8978 = snd_soc_codec_get_drvdata(codec);
930
1/*
2 * wm8978.c -- WM8978 ALSA SoC Audio Codec driver
3 *
4 * Copyright (C) 2009-2010 Guennadi Liakhovetski <g.liakhovetski@gmx.de>
5 * Copyright (C) 2007 Carlos Munoz <carlos@kenati.com>
6 * Copyright 2006-2009 Wolfson Microelectronics PLC.
7 * Based on wm8974 and wm8990 by Liam Girdwood <lrg@slimlogic.co.uk>
8 *

--- 914 unchanged lines hidden (view full) ---

923 .ops = &wm8978_dai_ops,
924 .symmetric_rates = 1,
925};
926
927static int wm8978_suspend(struct snd_soc_codec *codec)
928{
929 struct wm8978_priv *wm8978 = snd_soc_codec_get_drvdata(codec);
930
931 wm8978_set_bias_level(codec, SND_SOC_BIAS_OFF);
931 snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_OFF);
932 /* Also switch PLL off */
933 snd_soc_write(codec, WM8978_POWER_MANAGEMENT_1, 0);
934
935 regcache_mark_dirty(wm8978->regmap);
936
937 return 0;
938}
939
940static int wm8978_resume(struct snd_soc_codec *codec)
941{
942 struct wm8978_priv *wm8978 = snd_soc_codec_get_drvdata(codec);
943
944 /* Sync reg_cache with the hardware */
945 regcache_sync(wm8978->regmap);
946
932 /* Also switch PLL off */
933 snd_soc_write(codec, WM8978_POWER_MANAGEMENT_1, 0);
934
935 regcache_mark_dirty(wm8978->regmap);
936
937 return 0;
938}
939
940static int wm8978_resume(struct snd_soc_codec *codec)
941{
942 struct wm8978_priv *wm8978 = snd_soc_codec_get_drvdata(codec);
943
944 /* Sync reg_cache with the hardware */
945 regcache_sync(wm8978->regmap);
946
947 wm8978_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
947 snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_STANDBY);
948
949 if (wm8978->f_pllout)
950 /* Switch PLL on */
951 snd_soc_update_bits(codec, WM8978_POWER_MANAGEMENT_1, 0x20, 0x20);
952
953 return 0;
954}
955

--- 132 unchanged lines hidden ---
948
949 if (wm8978->f_pllout)
950 /* Switch PLL on */
951 snd_soc_update_bits(codec, WM8978_POWER_MANAGEMENT_1, 0x20, 0x20);
952
953 return 0;
954}
955

--- 132 unchanged lines hidden ---