diff options
author | Mark Brown <broonie@linaro.org> | 2013-08-31 08:38:16 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-24 14:40:10 -0400 |
commit | 1201939a6f981cb656872784e39ef443540078cd (patch) | |
tree | 0929809e22d9cff1a1720a1cc1b744f79727fe3b | |
parent | 6f88063c1474b8cdd9254d3934047b6087222145 (diff) |
ASoC: cq93vc: Use core I/O functions
Support future refactoring by using the core I/O functions rather than
calling the driver provided I/O functions directly.
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | sound/soc/codecs/cq93vc.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sound/soc/codecs/cq93vc.c b/sound/soc/codecs/cq93vc.c index e538f4eca980..2cbb584b33de 100644 --- a/sound/soc/codecs/cq93vc.c +++ b/sound/soc/codecs/cq93vc.c | |||
@@ -64,13 +64,15 @@ static const struct snd_kcontrol_new cq93vc_snd_controls[] = { | |||
64 | static int cq93vc_mute(struct snd_soc_dai *dai, int mute) | 64 | static int cq93vc_mute(struct snd_soc_dai *dai, int mute) |
65 | { | 65 | { |
66 | struct snd_soc_codec *codec = dai->codec; | 66 | struct snd_soc_codec *codec = dai->codec; |
67 | u8 reg = cq93vc_read(codec, DAVINCI_VC_REG09) & ~DAVINCI_VC_REG09_MUTE; | 67 | u8 reg; |
68 | 68 | ||
69 | if (mute) | 69 | if (mute) |
70 | cq93vc_write(codec, DAVINCI_VC_REG09, | 70 | reg = DAVINCI_VC_REG09_MUTE; |
71 | reg | DAVINCI_VC_REG09_MUTE); | ||
72 | else | 71 | else |
73 | cq93vc_write(codec, DAVINCI_VC_REG09, reg); | 72 | reg = 0; |
73 | |||
74 | snd_soc_update_bits(codec, DAVINCI_VC_REG09, DAVINCI_VC_REG09_MUTE, | ||
75 | reg); | ||
74 | 76 | ||
75 | return 0; | 77 | return 0; |
76 | } | 78 | } |
@@ -97,18 +99,18 @@ static int cq93vc_set_bias_level(struct snd_soc_codec *codec, | |||
97 | { | 99 | { |
98 | switch (level) { | 100 | switch (level) { |
99 | case SND_SOC_BIAS_ON: | 101 | case SND_SOC_BIAS_ON: |
100 | cq93vc_write(codec, DAVINCI_VC_REG12, | 102 | snd_soc_write(codec, DAVINCI_VC_REG12, |
101 | DAVINCI_VC_REG12_POWER_ALL_ON); | 103 | DAVINCI_VC_REG12_POWER_ALL_ON); |
102 | break; | 104 | break; |
103 | case SND_SOC_BIAS_PREPARE: | 105 | case SND_SOC_BIAS_PREPARE: |
104 | break; | 106 | break; |
105 | case SND_SOC_BIAS_STANDBY: | 107 | case SND_SOC_BIAS_STANDBY: |
106 | cq93vc_write(codec, DAVINCI_VC_REG12, | 108 | snd_soc_write(codec, DAVINCI_VC_REG12, |
107 | DAVINCI_VC_REG12_POWER_ALL_OFF); | 109 | DAVINCI_VC_REG12_POWER_ALL_OFF); |
108 | break; | 110 | break; |
109 | case SND_SOC_BIAS_OFF: | 111 | case SND_SOC_BIAS_OFF: |
110 | /* force all power off */ | 112 | /* force all power off */ |
111 | cq93vc_write(codec, DAVINCI_VC_REG12, | 113 | snd_soc_write(codec, DAVINCI_VC_REG12, |
112 | DAVINCI_VC_REG12_POWER_ALL_OFF); | 114 | DAVINCI_VC_REG12_POWER_ALL_OFF); |
113 | break; | 115 | break; |
114 | } | 116 | } |