diff options
author | Mark Brown <broonie@linaro.org> | 2013-06-17 12:20:27 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-06-17 12:20:27 -0400 |
commit | 0c5f45065c41a88000848f2ed5d6a3f571f1bd3e (patch) | |
tree | 3fbc3c951846f2d4125d570065a1ad38df5b7086 | |
parent | 14345a589826089b4793b401ccc356dbb9947e3e (diff) | |
parent | 3eb28d3ca8f0c94ae40f57fbd53ef3805c8fdd2d (diff) |
Merge remote-tracking branch 'asoc/topic/sn95031' into asoc-next
-rw-r--r-- | sound/soc/codecs/ab8500-codec.c | 6 | ||||
-rw-r--r-- | sound/soc/codecs/sn95031.c | 2 | ||||
-rw-r--r-- | sound/soc/ux500/mop500.c | 2 | ||||
-rw-r--r-- | sound/soc/ux500/mop500_ab8500.c | 26 |
4 files changed, 16 insertions, 20 deletions
diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c index a153b168129b..3126cac7b7c8 100644 --- a/sound/soc/codecs/ab8500-codec.c +++ b/sound/soc/codecs/ab8500-codec.c | |||
@@ -1496,6 +1496,12 @@ static const char * const enum_ad_to_slot_map[] = {"AD_OUT1", | |||
1496 | "AD_OUT7", | 1496 | "AD_OUT7", |
1497 | "AD_OUT8", | 1497 | "AD_OUT8", |
1498 | "zeroes", | 1498 | "zeroes", |
1499 | "zeroes", | ||
1500 | "zeroes", | ||
1501 | "zeroes", | ||
1502 | "tristate", | ||
1503 | "tristate", | ||
1504 | "tristate", | ||
1499 | "tristate"}; | 1505 | "tristate"}; |
1500 | static SOC_ENUM_SINGLE_DECL(soc_enum_adslot0map, | 1506 | static SOC_ENUM_SINGLE_DECL(soc_enum_adslot0map, |
1501 | AB8500_ADSLOTSEL1, AB8500_ADSLOTSELX_EVEN_SHIFT, | 1507 | AB8500_ADSLOTSEL1, AB8500_ADSLOTSELX_EVEN_SHIFT, |
diff --git a/sound/soc/codecs/sn95031.c b/sound/soc/codecs/sn95031.c index d1ae869d3181..dba26e63844e 100644 --- a/sound/soc/codecs/sn95031.c +++ b/sound/soc/codecs/sn95031.c | |||
@@ -883,7 +883,7 @@ static int sn95031_codec_remove(struct snd_soc_codec *codec) | |||
883 | return 0; | 883 | return 0; |
884 | } | 884 | } |
885 | 885 | ||
886 | struct snd_soc_codec_driver sn95031_codec = { | 886 | static struct snd_soc_codec_driver sn95031_codec = { |
887 | .probe = sn95031_codec_probe, | 887 | .probe = sn95031_codec_probe, |
888 | .remove = sn95031_codec_remove, | 888 | .remove = sn95031_codec_remove, |
889 | .read = sn95031_read, | 889 | .read = sn95031_read, |
diff --git a/sound/soc/ux500/mop500.c b/sound/soc/ux500/mop500.c index 204b899c2311..8f5cd00a6e46 100644 --- a/sound/soc/ux500/mop500.c +++ b/sound/soc/ux500/mop500.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include "mop500_ab8500.h" | 27 | #include "mop500_ab8500.h" |
28 | 28 | ||
29 | /* Define the whole MOP500 soundcard, linking platform to the codec-drivers */ | 29 | /* Define the whole MOP500 soundcard, linking platform to the codec-drivers */ |
30 | struct snd_soc_dai_link mop500_dai_links[] = { | 30 | static struct snd_soc_dai_link mop500_dai_links[] = { |
31 | { | 31 | { |
32 | .name = "ab8500_0", | 32 | .name = "ab8500_0", |
33 | .stream_name = "ab8500_0", | 33 | .stream_name = "ab8500_0", |
diff --git a/sound/soc/ux500/mop500_ab8500.c b/sound/soc/ux500/mop500_ab8500.c index 892ad9a05c9f..884a36224fb1 100644 --- a/sound/soc/ux500/mop500_ab8500.c +++ b/sound/soc/ux500/mop500_ab8500.c | |||
@@ -125,9 +125,9 @@ static int mop500_ab8500_set_mclk(struct device *dev, | |||
125 | static int mclk_input_control_get(struct snd_kcontrol *kcontrol, | 125 | static int mclk_input_control_get(struct snd_kcontrol *kcontrol, |
126 | struct snd_ctl_elem_value *ucontrol) | 126 | struct snd_ctl_elem_value *ucontrol) |
127 | { | 127 | { |
128 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 128 | struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); |
129 | struct mop500_ab8500_drvdata *drvdata = | 129 | struct mop500_ab8500_drvdata *drvdata = |
130 | snd_soc_card_get_drvdata(codec->card); | 130 | snd_soc_card_get_drvdata(card); |
131 | 131 | ||
132 | ucontrol->value.enumerated.item[0] = drvdata->mclk_sel; | 132 | ucontrol->value.enumerated.item[0] = drvdata->mclk_sel; |
133 | 133 | ||
@@ -137,9 +137,9 @@ static int mclk_input_control_get(struct snd_kcontrol *kcontrol, | |||
137 | static int mclk_input_control_put(struct snd_kcontrol *kcontrol, | 137 | static int mclk_input_control_put(struct snd_kcontrol *kcontrol, |
138 | struct snd_ctl_elem_value *ucontrol) | 138 | struct snd_ctl_elem_value *ucontrol) |
139 | { | 139 | { |
140 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 140 | struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); |
141 | struct mop500_ab8500_drvdata *drvdata = | 141 | struct mop500_ab8500_drvdata *drvdata = |
142 | snd_soc_card_get_drvdata(codec->card); | 142 | snd_soc_card_get_drvdata(card); |
143 | unsigned int val = ucontrol->value.enumerated.item[0]; | 143 | unsigned int val = ucontrol->value.enumerated.item[0]; |
144 | 144 | ||
145 | if (val > (unsigned int)MCLK_ULPCLK) | 145 | if (val > (unsigned int)MCLK_ULPCLK) |
@@ -160,16 +160,6 @@ static struct snd_kcontrol_new mop500_ab8500_ctrls[] = { | |||
160 | SOC_ENUM_EXT("Master Clock Select", | 160 | SOC_ENUM_EXT("Master Clock Select", |
161 | soc_enum_mclk, | 161 | soc_enum_mclk, |
162 | mclk_input_control_get, mclk_input_control_put), | 162 | mclk_input_control_get, mclk_input_control_put), |
163 | /* Digital interface - Clocks */ | ||
164 | SOC_SINGLE("Digital Interface Master Generator Switch", | ||
165 | AB8500_DIGIFCONF1, AB8500_DIGIFCONF1_ENMASTGEN, | ||
166 | 1, 0), | ||
167 | SOC_SINGLE("Digital Interface 0 Bit-clock Switch", | ||
168 | AB8500_DIGIFCONF1, AB8500_DIGIFCONF1_ENFSBITCLK0, | ||
169 | 1, 0), | ||
170 | SOC_SINGLE("Digital Interface 1 Bit-clock Switch", | ||
171 | AB8500_DIGIFCONF1, AB8500_DIGIFCONF1_ENFSBITCLK1, | ||
172 | 1, 0), | ||
173 | SOC_DAPM_PIN_SWITCH("Headset Left"), | 163 | SOC_DAPM_PIN_SWITCH("Headset Left"), |
174 | SOC_DAPM_PIN_SWITCH("Headset Right"), | 164 | SOC_DAPM_PIN_SWITCH("Headset Right"), |
175 | SOC_DAPM_PIN_SWITCH("Earpiece"), | 165 | SOC_DAPM_PIN_SWITCH("Earpiece"), |
@@ -193,7 +183,7 @@ static struct snd_kcontrol_new mop500_ab8500_ctrls[] = { | |||
193 | 183 | ||
194 | /* ASoC */ | 184 | /* ASoC */ |
195 | 185 | ||
196 | int mop500_ab8500_startup(struct snd_pcm_substream *substream) | 186 | static int mop500_ab8500_startup(struct snd_pcm_substream *substream) |
197 | { | 187 | { |
198 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 188 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
199 | 189 | ||
@@ -202,7 +192,7 @@ int mop500_ab8500_startup(struct snd_pcm_substream *substream) | |||
202 | snd_soc_card_get_drvdata(rtd->card)); | 192 | snd_soc_card_get_drvdata(rtd->card)); |
203 | } | 193 | } |
204 | 194 | ||
205 | void mop500_ab8500_shutdown(struct snd_pcm_substream *substream) | 195 | static void mop500_ab8500_shutdown(struct snd_pcm_substream *substream) |
206 | { | 196 | { |
207 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 197 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
208 | struct device *dev = rtd->card->dev; | 198 | struct device *dev = rtd->card->dev; |
@@ -216,7 +206,7 @@ void mop500_ab8500_shutdown(struct snd_pcm_substream *substream) | |||
216 | rx_slots = DEF_RX_SLOTS; | 206 | rx_slots = DEF_RX_SLOTS; |
217 | } | 207 | } |
218 | 208 | ||
219 | int mop500_ab8500_hw_params(struct snd_pcm_substream *substream, | 209 | static int mop500_ab8500_hw_params(struct snd_pcm_substream *substream, |
220 | struct snd_pcm_hw_params *params) | 210 | struct snd_pcm_hw_params *params) |
221 | { | 211 | { |
222 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 212 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
@@ -385,7 +375,7 @@ int mop500_ab8500_machine_init(struct snd_soc_pcm_runtime *rtd) | |||
385 | drvdata->mclk_sel = MCLK_ULPCLK; | 375 | drvdata->mclk_sel = MCLK_ULPCLK; |
386 | 376 | ||
387 | /* Add controls */ | 377 | /* Add controls */ |
388 | ret = snd_soc_add_codec_controls(codec, mop500_ab8500_ctrls, | 378 | ret = snd_soc_add_card_controls(codec->card, mop500_ab8500_ctrls, |
389 | ARRAY_SIZE(mop500_ab8500_ctrls)); | 379 | ARRAY_SIZE(mop500_ab8500_ctrls)); |
390 | if (ret < 0) { | 380 | if (ret < 0) { |
391 | pr_err("%s: Failed to add machine-controls (%d)!\n", | 381 | pr_err("%s: Failed to add machine-controls (%d)!\n", |