rt5640.c (85a3685852d9ac7d92be9d824533c915a4597fa4) | rt5640.c (bd1204cb51f15d202f95222e873a94ed5d07b784) |
---|---|
1/* 2 * rt5640.c -- RT5640/RT5639 ALSA SoC audio codec driver 3 * 4 * Copyright 2011 Realtek Semiconductor Corp. 5 * Author: Johnny Hsu <johnnyhsu@realtek.com> 6 * Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved. 7 * 8 * This program is free software; you can redistribute it and/or modify --- 1925 unchanged lines hidden (view full) --- 1934EXPORT_SYMBOL_GPL(rt5640_dmic_enable); 1935 1936static int rt5640_probe(struct snd_soc_codec *codec) 1937{ 1938 struct rt5640_priv *rt5640 = snd_soc_codec_get_drvdata(codec); 1939 1940 rt5640->codec = codec; 1941 | 1/* 2 * rt5640.c -- RT5640/RT5639 ALSA SoC audio codec driver 3 * 4 * Copyright 2011 Realtek Semiconductor Corp. 5 * Author: Johnny Hsu <johnnyhsu@realtek.com> 6 * Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved. 7 * 8 * This program is free software; you can redistribute it and/or modify --- 1925 unchanged lines hidden (view full) --- 1934EXPORT_SYMBOL_GPL(rt5640_dmic_enable); 1935 1936static int rt5640_probe(struct snd_soc_codec *codec) 1937{ 1938 struct rt5640_priv *rt5640 = snd_soc_codec_get_drvdata(codec); 1939 1940 rt5640->codec = codec; 1941 |
1942 rt5640_set_bias_level(codec, SND_SOC_BIAS_OFF); | 1942 snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_OFF); |
1943 1944 snd_soc_update_bits(codec, RT5640_DUMMY1, 0x0301, 0x0301); 1945 snd_soc_update_bits(codec, RT5640_MICBIAS, 0x0030, 0x0030); 1946 snd_soc_update_bits(codec, RT5640_DSP_PATH2, 0xfc00, 0x0c00); 1947 1948 switch (snd_soc_read(codec, RT5640_RESET) & RT5640_ID_MASK) { 1949 case RT5640_ID_5640: 1950 case RT5640_ID_5642: --- 35 unchanged lines hidden (view full) --- 1986 return 0; 1987} 1988 1989#ifdef CONFIG_PM 1990static int rt5640_suspend(struct snd_soc_codec *codec) 1991{ 1992 struct rt5640_priv *rt5640 = snd_soc_codec_get_drvdata(codec); 1993 | 1943 1944 snd_soc_update_bits(codec, RT5640_DUMMY1, 0x0301, 0x0301); 1945 snd_soc_update_bits(codec, RT5640_MICBIAS, 0x0030, 0x0030); 1946 snd_soc_update_bits(codec, RT5640_DSP_PATH2, 0xfc00, 0x0c00); 1947 1948 switch (snd_soc_read(codec, RT5640_RESET) & RT5640_ID_MASK) { 1949 case RT5640_ID_5640: 1950 case RT5640_ID_5642: --- 35 unchanged lines hidden (view full) --- 1986 return 0; 1987} 1988 1989#ifdef CONFIG_PM 1990static int rt5640_suspend(struct snd_soc_codec *codec) 1991{ 1992 struct rt5640_priv *rt5640 = snd_soc_codec_get_drvdata(codec); 1993 |
1994 rt5640_set_bias_level(codec, SND_SOC_BIAS_OFF); | 1994 snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_OFF); |
1995 rt5640_reset(codec); 1996 regcache_cache_only(rt5640->regmap, true); 1997 regcache_mark_dirty(rt5640->regmap); 1998 if (gpio_is_valid(rt5640->pdata.ldo1_en)) 1999 gpio_set_value_cansleep(rt5640->pdata.ldo1_en, 0); 2000 2001 return 0; 2002} --- 256 unchanged lines hidden --- | 1995 rt5640_reset(codec); 1996 regcache_cache_only(rt5640->regmap, true); 1997 regcache_mark_dirty(rt5640->regmap); 1998 if (gpio_is_valid(rt5640->pdata.ldo1_en)) 1999 gpio_set_value_cansleep(rt5640->pdata.ldo1_en, 0); 2000 2001 return 0; 2002} --- 256 unchanged lines hidden --- |