aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/s6000/s6105-ipcam.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/s6000/s6105-ipcam.c')
-rw-r--r--sound/soc/s6000/s6105-ipcam.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/sound/soc/s6000/s6105-ipcam.c b/sound/soc/s6000/s6105-ipcam.c
index c1244c5bc730..5890e431852f 100644
--- a/sound/soc/s6000/s6105-ipcam.c
+++ b/sound/soc/s6000/s6105-ipcam.c
@@ -18,11 +18,9 @@
18#include <sound/core.h> 18#include <sound/core.h>
19#include <sound/pcm.h> 19#include <sound/pcm.h>
20#include <sound/soc.h> 20#include <sound/soc.h>
21#include <sound/soc-dapm.h>
22 21
23#include <variant/dmac.h> 22#include <variant/dmac.h>
24 23
25#include "../codecs/tlv320aic3x.h"
26#include "s6000-pcm.h" 24#include "s6000-pcm.h"
27#include "s6000-i2s.h" 25#include "s6000-i2s.h"
28 26
@@ -107,6 +105,7 @@ static int output_type_put(struct snd_kcontrol *kcontrol,
107 struct snd_ctl_elem_value *ucontrol) 105 struct snd_ctl_elem_value *ucontrol)
108{ 106{
109 struct snd_soc_codec *codec = kcontrol->private_data; 107 struct snd_soc_codec *codec = kcontrol->private_data;
108 struct snd_soc_dapm_context *dapm = &codec->dapm;
110 unsigned int val = (ucontrol->value.enumerated.item[0] != 0); 109 unsigned int val = (ucontrol->value.enumerated.item[0] != 0);
111 char *differential = "Audio Out Differential"; 110 char *differential = "Audio Out Differential";
112 char *stereo = "Audio Out Stereo"; 111 char *stereo = "Audio Out Stereo";
@@ -114,10 +113,10 @@ static int output_type_put(struct snd_kcontrol *kcontrol,
114 if (kcontrol->private_value == val) 113 if (kcontrol->private_value == val)
115 return 0; 114 return 0;
116 kcontrol->private_value = val; 115 kcontrol->private_value = val;
117 snd_soc_dapm_disable_pin(codec, val ? differential : stereo); 116 snd_soc_dapm_disable_pin(dapm, val ? differential : stereo);
118 snd_soc_dapm_sync(codec); 117 snd_soc_dapm_sync(dapm);
119 snd_soc_dapm_enable_pin(codec, val ? stereo : differential); 118 snd_soc_dapm_enable_pin(dapm, val ? stereo : differential);
120 snd_soc_dapm_sync(codec); 119 snd_soc_dapm_sync(dapm);
121 120
122 return 1; 121 return 1;
123} 122}
@@ -137,35 +136,36 @@ static const struct snd_kcontrol_new audio_out_mux = {
137static int s6105_aic3x_init(struct snd_soc_pcm_runtime *rtd) 136static int s6105_aic3x_init(struct snd_soc_pcm_runtime *rtd)
138{ 137{
139 struct snd_soc_codec *codec = rtd->codec; 138 struct snd_soc_codec *codec = rtd->codec;
139 struct snd_soc_dapm_context *dapm = &codec->dapm;
140 140
141 /* Add s6105 specific widgets */ 141 /* Add s6105 specific widgets */
142 snd_soc_dapm_new_controls(codec, aic3x_dapm_widgets, 142 snd_soc_dapm_new_controls(dapm, aic3x_dapm_widgets,
143 ARRAY_SIZE(aic3x_dapm_widgets)); 143 ARRAY_SIZE(aic3x_dapm_widgets));
144 144
145 /* Set up s6105 specific audio path audio_map */ 145 /* Set up s6105 specific audio path audio_map */
146 snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); 146 snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
147 147
148 /* not present */ 148 /* not present */
149 snd_soc_dapm_nc_pin(codec, "MONO_LOUT"); 149 snd_soc_dapm_nc_pin(dapm, "MONO_LOUT");
150 snd_soc_dapm_nc_pin(codec, "LINE2L"); 150 snd_soc_dapm_nc_pin(dapm, "LINE2L");
151 snd_soc_dapm_nc_pin(codec, "LINE2R"); 151 snd_soc_dapm_nc_pin(dapm, "LINE2R");
152 152
153 /* not connected */ 153 /* not connected */
154 snd_soc_dapm_nc_pin(codec, "MIC3L"); /* LINE2L on this chip */ 154 snd_soc_dapm_nc_pin(dapm, "MIC3L"); /* LINE2L on this chip */
155 snd_soc_dapm_nc_pin(codec, "MIC3R"); /* LINE2R on this chip */ 155 snd_soc_dapm_nc_pin(dapm, "MIC3R"); /* LINE2R on this chip */
156 snd_soc_dapm_nc_pin(codec, "LLOUT"); 156 snd_soc_dapm_nc_pin(dapm, "LLOUT");
157 snd_soc_dapm_nc_pin(codec, "RLOUT"); 157 snd_soc_dapm_nc_pin(dapm, "RLOUT");
158 snd_soc_dapm_nc_pin(codec, "HPRCOM"); 158 snd_soc_dapm_nc_pin(dapm, "HPRCOM");
159 159
160 /* always connected */ 160 /* always connected */
161 snd_soc_dapm_enable_pin(codec, "Audio In"); 161 snd_soc_dapm_enable_pin(dapm, "Audio In");
162 162
163 /* must correspond to audio_out_mux.private_value initializer */ 163 /* must correspond to audio_out_mux.private_value initializer */
164 snd_soc_dapm_disable_pin(codec, "Audio Out Differential"); 164 snd_soc_dapm_disable_pin(dapm, "Audio Out Differential");
165 snd_soc_dapm_sync(codec); 165 snd_soc_dapm_sync(dapm);
166 snd_soc_dapm_enable_pin(codec, "Audio Out Stereo"); 166 snd_soc_dapm_enable_pin(dapm, "Audio Out Stereo");
167 167
168 snd_soc_dapm_sync(codec); 168 snd_soc_dapm_sync(dapm);
169 169
170 snd_ctl_add(codec->card->snd_card, snd_ctl_new1(&audio_out_mux, codec)); 170 snd_ctl_add(codec->card->snd_card, snd_ctl_new1(&audio_out_mux, codec));
171 171