diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2015-01-15 06:52:16 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-01-15 06:57:34 -0500 |
commit | 46f20872bc22c7513027dea09ac8d87f88e7e730 (patch) | |
tree | 8981b9a5997dc508748dc915837c52ff70a25256 /sound/soc | |
parent | 5f7201d5d6738790bf8179083e7a92347f1c4a23 (diff) |
ASoC: rt5677: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/rt5677.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c index 88de759fb7fc..ff7cce941106 100644 --- a/sound/soc/codecs/rt5677.c +++ b/sound/soc/codecs/rt5677.c | |||
@@ -895,7 +895,7 @@ static const struct snd_kcontrol_new rt5677_snd_controls[] = { | |||
895 | static int set_dmic_clk(struct snd_soc_dapm_widget *w, | 895 | static int set_dmic_clk(struct snd_soc_dapm_widget *w, |
896 | struct snd_kcontrol *kcontrol, int event) | 896 | struct snd_kcontrol *kcontrol, int event) |
897 | { | 897 | { |
898 | struct snd_soc_codec *codec = w->codec; | 898 | struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); |
899 | struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); | 899 | struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); |
900 | int idx = rl6231_calc_dmic_clk(rt5677->sysclk); | 900 | int idx = rl6231_calc_dmic_clk(rt5677->sysclk); |
901 | 901 | ||
@@ -910,7 +910,8 @@ static int set_dmic_clk(struct snd_soc_dapm_widget *w, | |||
910 | static int is_sys_clk_from_pll(struct snd_soc_dapm_widget *source, | 910 | static int is_sys_clk_from_pll(struct snd_soc_dapm_widget *source, |
911 | struct snd_soc_dapm_widget *sink) | 911 | struct snd_soc_dapm_widget *sink) |
912 | { | 912 | { |
913 | struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(source->codec); | 913 | struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm); |
914 | struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); | ||
914 | unsigned int val; | 915 | unsigned int val; |
915 | 916 | ||
916 | regmap_read(rt5677->regmap, RT5677_GLB_CLK1, &val); | 917 | regmap_read(rt5677->regmap, RT5677_GLB_CLK1, &val); |
@@ -924,7 +925,7 @@ static int is_sys_clk_from_pll(struct snd_soc_dapm_widget *source, | |||
924 | static int is_using_asrc(struct snd_soc_dapm_widget *source, | 925 | static int is_using_asrc(struct snd_soc_dapm_widget *source, |
925 | struct snd_soc_dapm_widget *sink) | 926 | struct snd_soc_dapm_widget *sink) |
926 | { | 927 | { |
927 | struct snd_soc_codec *codec = source->codec; | 928 | struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm); |
928 | struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); | 929 | struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); |
929 | unsigned int reg, shift, val; | 930 | unsigned int reg, shift, val; |
930 | 931 | ||
@@ -2125,7 +2126,7 @@ static const struct snd_kcontrol_new rt5677_if2_dac7_tdm_sel_mux = | |||
2125 | static int rt5677_bst1_event(struct snd_soc_dapm_widget *w, | 2126 | static int rt5677_bst1_event(struct snd_soc_dapm_widget *w, |
2126 | struct snd_kcontrol *kcontrol, int event) | 2127 | struct snd_kcontrol *kcontrol, int event) |
2127 | { | 2128 | { |
2128 | struct snd_soc_codec *codec = w->codec; | 2129 | struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); |
2129 | struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); | 2130 | struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); |
2130 | 2131 | ||
2131 | switch (event) { | 2132 | switch (event) { |
@@ -2149,7 +2150,7 @@ static int rt5677_bst1_event(struct snd_soc_dapm_widget *w, | |||
2149 | static int rt5677_bst2_event(struct snd_soc_dapm_widget *w, | 2150 | static int rt5677_bst2_event(struct snd_soc_dapm_widget *w, |
2150 | struct snd_kcontrol *kcontrol, int event) | 2151 | struct snd_kcontrol *kcontrol, int event) |
2151 | { | 2152 | { |
2152 | struct snd_soc_codec *codec = w->codec; | 2153 | struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); |
2153 | struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); | 2154 | struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); |
2154 | 2155 | ||
2155 | switch (event) { | 2156 | switch (event) { |
@@ -2173,7 +2174,7 @@ static int rt5677_bst2_event(struct snd_soc_dapm_widget *w, | |||
2173 | static int rt5677_set_pll1_event(struct snd_soc_dapm_widget *w, | 2174 | static int rt5677_set_pll1_event(struct snd_soc_dapm_widget *w, |
2174 | struct snd_kcontrol *kcontrol, int event) | 2175 | struct snd_kcontrol *kcontrol, int event) |
2175 | { | 2176 | { |
2176 | struct snd_soc_codec *codec = w->codec; | 2177 | struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); |
2177 | struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); | 2178 | struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); |
2178 | 2179 | ||
2179 | switch (event) { | 2180 | switch (event) { |
@@ -2191,7 +2192,7 @@ static int rt5677_set_pll1_event(struct snd_soc_dapm_widget *w, | |||
2191 | static int rt5677_set_pll2_event(struct snd_soc_dapm_widget *w, | 2192 | static int rt5677_set_pll2_event(struct snd_soc_dapm_widget *w, |
2192 | struct snd_kcontrol *kcontrol, int event) | 2193 | struct snd_kcontrol *kcontrol, int event) |
2193 | { | 2194 | { |
2194 | struct snd_soc_codec *codec = w->codec; | 2195 | struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); |
2195 | struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); | 2196 | struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); |
2196 | 2197 | ||
2197 | switch (event) { | 2198 | switch (event) { |
@@ -2209,7 +2210,7 @@ static int rt5677_set_pll2_event(struct snd_soc_dapm_widget *w, | |||
2209 | static int rt5677_set_micbias1_event(struct snd_soc_dapm_widget *w, | 2210 | static int rt5677_set_micbias1_event(struct snd_soc_dapm_widget *w, |
2210 | struct snd_kcontrol *kcontrol, int event) | 2211 | struct snd_kcontrol *kcontrol, int event) |
2211 | { | 2212 | { |
2212 | struct snd_soc_codec *codec = w->codec; | 2213 | struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); |
2213 | struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); | 2214 | struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); |
2214 | 2215 | ||
2215 | switch (event) { | 2216 | switch (event) { |
@@ -2236,7 +2237,7 @@ static int rt5677_set_micbias1_event(struct snd_soc_dapm_widget *w, | |||
2236 | static int rt5677_if1_adc_tdm_event(struct snd_soc_dapm_widget *w, | 2237 | static int rt5677_if1_adc_tdm_event(struct snd_soc_dapm_widget *w, |
2237 | struct snd_kcontrol *kcontrol, int event) | 2238 | struct snd_kcontrol *kcontrol, int event) |
2238 | { | 2239 | { |
2239 | struct snd_soc_codec *codec = w->codec; | 2240 | struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); |
2240 | struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); | 2241 | struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); |
2241 | unsigned int value; | 2242 | unsigned int value; |
2242 | 2243 | ||
@@ -2259,7 +2260,7 @@ static int rt5677_if1_adc_tdm_event(struct snd_soc_dapm_widget *w, | |||
2259 | static int rt5677_if2_adc_tdm_event(struct snd_soc_dapm_widget *w, | 2260 | static int rt5677_if2_adc_tdm_event(struct snd_soc_dapm_widget *w, |
2260 | struct snd_kcontrol *kcontrol, int event) | 2261 | struct snd_kcontrol *kcontrol, int event) |
2261 | { | 2262 | { |
2262 | struct snd_soc_codec *codec = w->codec; | 2263 | struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); |
2263 | struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); | 2264 | struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); |
2264 | unsigned int value; | 2265 | unsigned int value; |
2265 | 2266 | ||
@@ -2282,7 +2283,7 @@ static int rt5677_if2_adc_tdm_event(struct snd_soc_dapm_widget *w, | |||
2282 | static int rt5677_vref_event(struct snd_soc_dapm_widget *w, | 2283 | static int rt5677_vref_event(struct snd_soc_dapm_widget *w, |
2283 | struct snd_kcontrol *kcontrol, int event) | 2284 | struct snd_kcontrol *kcontrol, int event) |
2284 | { | 2285 | { |
2285 | struct snd_soc_codec *codec = w->codec; | 2286 | struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); |
2286 | struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); | 2287 | struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); |
2287 | 2288 | ||
2288 | switch (event) { | 2289 | switch (event) { |