diff options
author | Mark Brown <broonie@linaro.org> | 2014-03-13 10:19:47 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-03-13 10:19:47 -0400 |
commit | 1727428de8e57b3800f850bc6fff4eee58461e6d (patch) | |
tree | f207c8f3e6878abce0f4d2b49f6ce7f6639cd6bf | |
parent | 3025df7f04b3597146f57d10af0865fda42ac4b3 (diff) | |
parent | b92af2b8844c964fc7e1905f797a8d780c7212de (diff) |
Merge remote-tracking branch 'asoc/topic/s6000' into asoc-next
-rw-r--r-- | sound/soc/s6000/s6105-ipcam.c | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/sound/soc/s6000/s6105-ipcam.c b/sound/soc/s6000/s6105-ipcam.c index 945e8abdc10f..0b21d1dc80c1 100644 --- a/sound/soc/s6000/s6105-ipcam.c +++ b/sound/soc/s6000/s6105-ipcam.c | |||
@@ -104,8 +104,8 @@ static int output_type_get(struct snd_kcontrol *kcontrol, | |||
104 | static int output_type_put(struct snd_kcontrol *kcontrol, | 104 | static int output_type_put(struct snd_kcontrol *kcontrol, |
105 | struct snd_ctl_elem_value *ucontrol) | 105 | struct snd_ctl_elem_value *ucontrol) |
106 | { | 106 | { |
107 | struct snd_soc_codec *codec = kcontrol->private_data; | 107 | struct snd_soc_card *card = kcontrol->private_data; |
108 | struct snd_soc_dapm_context *dapm = &codec->dapm; | 108 | struct snd_soc_dapm_context *dapm = &card->dapm; |
109 | unsigned int val = (ucontrol->value.enumerated.item[0] != 0); | 109 | unsigned int val = (ucontrol->value.enumerated.item[0] != 0); |
110 | char *differential = "Audio Out Differential"; | 110 | char *differential = "Audio Out Differential"; |
111 | char *stereo = "Audio Out Stereo"; | 111 | char *stereo = "Audio Out Stereo"; |
@@ -137,13 +137,7 @@ static int s6105_aic3x_init(struct snd_soc_pcm_runtime *rtd) | |||
137 | { | 137 | { |
138 | struct snd_soc_codec *codec = rtd->codec; | 138 | struct snd_soc_codec *codec = rtd->codec; |
139 | struct snd_soc_dapm_context *dapm = &codec->dapm; | 139 | struct snd_soc_dapm_context *dapm = &codec->dapm; |
140 | 140 | struct snd_soc_card *card = rtd->card; | |
141 | /* Add s6105 specific widgets */ | ||
142 | snd_soc_dapm_new_controls(dapm, aic3x_dapm_widgets, | ||
143 | ARRAY_SIZE(aic3x_dapm_widgets)); | ||
144 | |||
145 | /* Set up s6105 specific audio path audio_map */ | ||
146 | snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map)); | ||
147 | 141 | ||
148 | /* not present */ | 142 | /* not present */ |
149 | snd_soc_dapm_nc_pin(dapm, "MONO_LOUT"); | 143 | snd_soc_dapm_nc_pin(dapm, "MONO_LOUT"); |
@@ -157,17 +151,10 @@ static int s6105_aic3x_init(struct snd_soc_pcm_runtime *rtd) | |||
157 | snd_soc_dapm_nc_pin(dapm, "RLOUT"); | 151 | snd_soc_dapm_nc_pin(dapm, "RLOUT"); |
158 | snd_soc_dapm_nc_pin(dapm, "HPRCOM"); | 152 | snd_soc_dapm_nc_pin(dapm, "HPRCOM"); |
159 | 153 | ||
160 | /* always connected */ | ||
161 | snd_soc_dapm_enable_pin(dapm, "Audio In"); | ||
162 | |||
163 | /* must correspond to audio_out_mux.private_value initializer */ | 154 | /* must correspond to audio_out_mux.private_value initializer */ |
164 | snd_soc_dapm_disable_pin(dapm, "Audio Out Differential"); | 155 | snd_soc_dapm_disable_pin(&card->dapm, "Audio Out Differential"); |
165 | snd_soc_dapm_sync(dapm); | ||
166 | snd_soc_dapm_enable_pin(dapm, "Audio Out Stereo"); | ||
167 | |||
168 | snd_soc_dapm_sync(dapm); | ||
169 | 156 | ||
170 | snd_ctl_add(codec->card->snd_card, snd_ctl_new1(&audio_out_mux, codec)); | 157 | snd_ctl_add(card->snd_card, snd_ctl_new1(&audio_out_mux, card)); |
171 | 158 | ||
172 | return 0; | 159 | return 0; |
173 | } | 160 | } |
@@ -190,6 +177,11 @@ static struct snd_soc_card snd_soc_card_s6105 = { | |||
190 | .owner = THIS_MODULE, | 177 | .owner = THIS_MODULE, |
191 | .dai_link = &s6105_dai, | 178 | .dai_link = &s6105_dai, |
192 | .num_links = 1, | 179 | .num_links = 1, |
180 | |||
181 | .dapm_widgets = aic3x_dapm_widgets, | ||
182 | .num_dapm_widgets = ARRAY_SIZE(aic3x_dapm_widgets), | ||
183 | .dapm_routes = audio_map, | ||
184 | .num_dapm_routes = ARRAY_SIZE(audio_map), | ||
193 | }; | 185 | }; |
194 | 186 | ||
195 | static struct s6000_snd_platform_data s6105_snd_data __initdata = { | 187 | static struct s6000_snd_platform_data s6105_snd_data __initdata = { |