aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/jz4740.c2
-rw-r--r--sound/soc/codecs/sn95031.c2
-rw-r--r--sound/soc/codecs/wm8903.c38
-rw-r--r--sound/soc/codecs/wm8994.c16
-rw-r--r--sound/soc/codecs/wm_hubs.c8
-rw-r--r--sound/soc/mid-x86/sst_platform.c10
-rw-r--r--sound/soc/samsung/pcm.c4
-rw-r--r--sound/soc/sh/fsi.c22
-rw-r--r--sound/soc/soc-core.c5
-rw-r--r--sound/soc/tegra/harmony.c1
10 files changed, 73 insertions, 35 deletions
diff --git a/sound/soc/codecs/jz4740.c b/sound/soc/codecs/jz4740.c
index f7cd346fd727..f5ccdbf7ebc6 100644
--- a/sound/soc/codecs/jz4740.c
+++ b/sound/soc/codecs/jz4740.c
@@ -308,8 +308,6 @@ static int jz4740_codec_dev_probe(struct snd_soc_codec *codec)
308 snd_soc_dapm_add_routes(dapm, jz4740_codec_dapm_routes, 308 snd_soc_dapm_add_routes(dapm, jz4740_codec_dapm_routes,
309 ARRAY_SIZE(jz4740_codec_dapm_routes)); 309 ARRAY_SIZE(jz4740_codec_dapm_routes));
310 310
311 snd_soc_dapm_new_widgets(codec);
312
313 jz4740_codec_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 311 jz4740_codec_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
314 312
315 return 0; 313 return 0;
diff --git a/sound/soc/codecs/sn95031.c b/sound/soc/codecs/sn95031.c
index a54d2a5b28f6..4d9fb279e146 100644
--- a/sound/soc/codecs/sn95031.c
+++ b/sound/soc/codecs/sn95031.c
@@ -927,7 +927,7 @@ static struct platform_driver sn95031_codec_driver = {
927 .owner = THIS_MODULE, 927 .owner = THIS_MODULE,
928 }, 928 },
929 .probe = sn95031_device_probe, 929 .probe = sn95031_device_probe,
930 .remove = sn95031_device_remove, 930 .remove = __devexit_p(sn95031_device_remove),
931}; 931};
932 932
933static int __init sn95031_init(void) 933static int __init sn95031_init(void)
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index ae1cadfae84c..f52b623bb692 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -247,8 +247,6 @@ static int wm8903_volatile_register(struct snd_soc_codec *codec, unsigned int re
247 case WM8903_REVISION_NUMBER: 247 case WM8903_REVISION_NUMBER:
248 case WM8903_INTERRUPT_STATUS_1: 248 case WM8903_INTERRUPT_STATUS_1:
249 case WM8903_WRITE_SEQUENCER_4: 249 case WM8903_WRITE_SEQUENCER_4:
250 case WM8903_POWER_MANAGEMENT_3:
251 case WM8903_POWER_MANAGEMENT_2:
252 case WM8903_DC_SERVO_READBACK_1: 250 case WM8903_DC_SERVO_READBACK_1:
253 case WM8903_DC_SERVO_READBACK_2: 251 case WM8903_DC_SERVO_READBACK_2:
254 case WM8903_DC_SERVO_READBACK_3: 252 case WM8903_DC_SERVO_READBACK_3:
@@ -875,34 +873,40 @@ SND_SOC_DAPM_MIXER("Left Speaker Mixer", WM8903_POWER_MANAGEMENT_4, 1, 0,
875SND_SOC_DAPM_MIXER("Right Speaker Mixer", WM8903_POWER_MANAGEMENT_4, 0, 0, 873SND_SOC_DAPM_MIXER("Right Speaker Mixer", WM8903_POWER_MANAGEMENT_4, 0, 0,
876 right_speaker_mixer, ARRAY_SIZE(right_speaker_mixer)), 874 right_speaker_mixer, ARRAY_SIZE(right_speaker_mixer)),
877 875
878SND_SOC_DAPM_PGA_S("Left Headphone Output PGA", 0, WM8903_ANALOGUE_HP_0, 876SND_SOC_DAPM_PGA_S("Left Headphone Output PGA", 0, WM8903_POWER_MANAGEMENT_2,
879 4, 0, NULL, 0), 877 1, 0, NULL, 0),
880SND_SOC_DAPM_PGA_S("Right Headphone Output PGA", 0, WM8903_ANALOGUE_HP_0, 878SND_SOC_DAPM_PGA_S("Right Headphone Output PGA", 0, WM8903_POWER_MANAGEMENT_2,
881 0, 0, NULL, 0), 879 0, 0, NULL, 0),
882 880
883SND_SOC_DAPM_PGA_S("Left Line Output PGA", 0, WM8903_ANALOGUE_LINEOUT_0, 4, 0, 881SND_SOC_DAPM_PGA_S("Left Line Output PGA", 0, WM8903_POWER_MANAGEMENT_3, 1, 0,
884 NULL, 0), 882 NULL, 0),
885SND_SOC_DAPM_PGA_S("Right Line Output PGA", 0, WM8903_ANALOGUE_LINEOUT_0, 0, 0, 883SND_SOC_DAPM_PGA_S("Right Line Output PGA", 0, WM8903_POWER_MANAGEMENT_3, 0, 0,
886 NULL, 0), 884 NULL, 0),
887 885
888SND_SOC_DAPM_PGA_S("HPL_RMV_SHORT", 4, WM8903_ANALOGUE_HP_0, 7, 0, NULL, 0), 886SND_SOC_DAPM_PGA_S("HPL_RMV_SHORT", 4, WM8903_ANALOGUE_HP_0, 7, 0, NULL, 0),
889SND_SOC_DAPM_PGA_S("HPL_ENA_OUTP", 3, WM8903_ANALOGUE_HP_0, 6, 0, NULL, 0), 887SND_SOC_DAPM_PGA_S("HPL_ENA_OUTP", 3, WM8903_ANALOGUE_HP_0, 6, 0, NULL, 0),
890SND_SOC_DAPM_PGA_S("HPL_ENA_DLY", 1, WM8903_ANALOGUE_HP_0, 5, 0, NULL, 0), 888SND_SOC_DAPM_PGA_S("HPL_ENA_DLY", 2, WM8903_ANALOGUE_HP_0, 5, 0, NULL, 0),
889SND_SOC_DAPM_PGA_S("HPL_ENA", 1, WM8903_ANALOGUE_HP_0, 4, 0, NULL, 0),
891SND_SOC_DAPM_PGA_S("HPR_RMV_SHORT", 4, WM8903_ANALOGUE_HP_0, 3, 0, NULL, 0), 890SND_SOC_DAPM_PGA_S("HPR_RMV_SHORT", 4, WM8903_ANALOGUE_HP_0, 3, 0, NULL, 0),
892SND_SOC_DAPM_PGA_S("HPR_ENA_OUTP", 3, WM8903_ANALOGUE_HP_0, 2, 0, NULL, 0), 891SND_SOC_DAPM_PGA_S("HPR_ENA_OUTP", 3, WM8903_ANALOGUE_HP_0, 2, 0, NULL, 0),
893SND_SOC_DAPM_PGA_S("HPR_ENA_DLY", 1, WM8903_ANALOGUE_HP_0, 1, 0, NULL, 0), 892SND_SOC_DAPM_PGA_S("HPR_ENA_DLY", 2, WM8903_ANALOGUE_HP_0, 1, 0, NULL, 0),
893SND_SOC_DAPM_PGA_S("HPR_ENA", 1, WM8903_ANALOGUE_HP_0, 0, 0, NULL, 0),
894 894
895SND_SOC_DAPM_PGA_S("LINEOUTL_RMV_SHORT", 4, WM8903_ANALOGUE_LINEOUT_0, 7, 0, 895SND_SOC_DAPM_PGA_S("LINEOUTL_RMV_SHORT", 4, WM8903_ANALOGUE_LINEOUT_0, 7, 0,
896 NULL, 0), 896 NULL, 0),
897SND_SOC_DAPM_PGA_S("LINEOUTL_ENA_OUTP", 3, WM8903_ANALOGUE_LINEOUT_0, 6, 0, 897SND_SOC_DAPM_PGA_S("LINEOUTL_ENA_OUTP", 3, WM8903_ANALOGUE_LINEOUT_0, 6, 0,
898 NULL, 0), 898 NULL, 0),
899SND_SOC_DAPM_PGA_S("LINEOUTL_ENA_DLY", 1, WM8903_ANALOGUE_LINEOUT_0, 5, 0, 899SND_SOC_DAPM_PGA_S("LINEOUTL_ENA_DLY", 2, WM8903_ANALOGUE_LINEOUT_0, 5, 0,
900 NULL, 0),
901SND_SOC_DAPM_PGA_S("LINEOUTL_ENA", 1, WM8903_ANALOGUE_LINEOUT_0, 4, 0,
900 NULL, 0), 902 NULL, 0),
901SND_SOC_DAPM_PGA_S("LINEOUTR_RMV_SHORT", 4, WM8903_ANALOGUE_LINEOUT_0, 3, 0, 903SND_SOC_DAPM_PGA_S("LINEOUTR_RMV_SHORT", 4, WM8903_ANALOGUE_LINEOUT_0, 3, 0,
902 NULL, 0), 904 NULL, 0),
903SND_SOC_DAPM_PGA_S("LINEOUTR_ENA_OUTP", 3, WM8903_ANALOGUE_LINEOUT_0, 2, 0, 905SND_SOC_DAPM_PGA_S("LINEOUTR_ENA_OUTP", 3, WM8903_ANALOGUE_LINEOUT_0, 2, 0,
904 NULL, 0), 906 NULL, 0),
905SND_SOC_DAPM_PGA_S("LINEOUTR_ENA_DLY", 1, WM8903_ANALOGUE_LINEOUT_0, 1, 0, 907SND_SOC_DAPM_PGA_S("LINEOUTR_ENA_DLY", 2, WM8903_ANALOGUE_LINEOUT_0, 1, 0,
908 NULL, 0),
909SND_SOC_DAPM_PGA_S("LINEOUTR_ENA", 1, WM8903_ANALOGUE_LINEOUT_0, 0, 0,
906 NULL, 0), 910 NULL, 0),
907 911
908SND_SOC_DAPM_SUPPLY("DCS Master", WM8903_DC_SERVO_0, 4, 0, NULL, 0), 912SND_SOC_DAPM_SUPPLY("DCS Master", WM8903_DC_SERVO_0, 4, 0, NULL, 0),
@@ -1037,10 +1041,14 @@ static const struct snd_soc_dapm_route intercon[] = {
1037 { "Left Speaker PGA", NULL, "Left Speaker Mixer" }, 1041 { "Left Speaker PGA", NULL, "Left Speaker Mixer" },
1038 { "Right Speaker PGA", NULL, "Right Speaker Mixer" }, 1042 { "Right Speaker PGA", NULL, "Right Speaker Mixer" },
1039 1043
1040 { "HPL_ENA_DLY", NULL, "Left Headphone Output PGA" }, 1044 { "HPL_ENA", NULL, "Left Headphone Output PGA" },
1041 { "HPR_ENA_DLY", NULL, "Right Headphone Output PGA" }, 1045 { "HPR_ENA", NULL, "Right Headphone Output PGA" },
1042 { "LINEOUTL_ENA_DLY", NULL, "Left Line Output PGA" }, 1046 { "HPL_ENA_DLY", NULL, "HPL_ENA" },
1043 { "LINEOUTR_ENA_DLY", NULL, "Right Line Output PGA" }, 1047 { "HPR_ENA_DLY", NULL, "HPR_ENA" },
1048 { "LINEOUTL_ENA", NULL, "Left Line Output PGA" },
1049 { "LINEOUTR_ENA", NULL, "Right Line Output PGA" },
1050 { "LINEOUTL_ENA_DLY", NULL, "LINEOUTL_ENA" },
1051 { "LINEOUTR_ENA_DLY", NULL, "LINEOUTR_ENA" },
1044 1052
1045 { "HPL_DCS", NULL, "DCS Master" }, 1053 { "HPL_DCS", NULL, "DCS Master" },
1046 { "HPR_DCS", NULL, "DCS Master" }, 1054 { "HPR_DCS", NULL, "DCS Master" },
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 3290333b2bb9..84e1bd1d2822 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -3261,20 +3261,36 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec)
3261 wm8994_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 3261 wm8994_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
3262 3262
3263 /* Latch volume updates (right only; we always do left then right). */ 3263 /* Latch volume updates (right only; we always do left then right). */
3264 snd_soc_update_bits(codec, WM8994_AIF1_DAC1_LEFT_VOLUME,
3265 WM8994_AIF1DAC1_VU, WM8994_AIF1DAC1_VU);
3264 snd_soc_update_bits(codec, WM8994_AIF1_DAC1_RIGHT_VOLUME, 3266 snd_soc_update_bits(codec, WM8994_AIF1_DAC1_RIGHT_VOLUME,
3265 WM8994_AIF1DAC1_VU, WM8994_AIF1DAC1_VU); 3267 WM8994_AIF1DAC1_VU, WM8994_AIF1DAC1_VU);
3268 snd_soc_update_bits(codec, WM8994_AIF1_DAC2_LEFT_VOLUME,
3269 WM8994_AIF1DAC2_VU, WM8994_AIF1DAC2_VU);
3266 snd_soc_update_bits(codec, WM8994_AIF1_DAC2_RIGHT_VOLUME, 3270 snd_soc_update_bits(codec, WM8994_AIF1_DAC2_RIGHT_VOLUME,
3267 WM8994_AIF1DAC2_VU, WM8994_AIF1DAC2_VU); 3271 WM8994_AIF1DAC2_VU, WM8994_AIF1DAC2_VU);
3272 snd_soc_update_bits(codec, WM8994_AIF2_DAC_LEFT_VOLUME,
3273 WM8994_AIF2DAC_VU, WM8994_AIF2DAC_VU);
3268 snd_soc_update_bits(codec, WM8994_AIF2_DAC_RIGHT_VOLUME, 3274 snd_soc_update_bits(codec, WM8994_AIF2_DAC_RIGHT_VOLUME,
3269 WM8994_AIF2DAC_VU, WM8994_AIF2DAC_VU); 3275 WM8994_AIF2DAC_VU, WM8994_AIF2DAC_VU);
3276 snd_soc_update_bits(codec, WM8994_AIF1_ADC1_LEFT_VOLUME,
3277 WM8994_AIF1ADC1_VU, WM8994_AIF1ADC1_VU);
3270 snd_soc_update_bits(codec, WM8994_AIF1_ADC1_RIGHT_VOLUME, 3278 snd_soc_update_bits(codec, WM8994_AIF1_ADC1_RIGHT_VOLUME,
3271 WM8994_AIF1ADC1_VU, WM8994_AIF1ADC1_VU); 3279 WM8994_AIF1ADC1_VU, WM8994_AIF1ADC1_VU);
3280 snd_soc_update_bits(codec, WM8994_AIF1_ADC2_LEFT_VOLUME,
3281 WM8994_AIF1ADC2_VU, WM8994_AIF1ADC2_VU);
3272 snd_soc_update_bits(codec, WM8994_AIF1_ADC2_RIGHT_VOLUME, 3282 snd_soc_update_bits(codec, WM8994_AIF1_ADC2_RIGHT_VOLUME,
3273 WM8994_AIF1ADC2_VU, WM8994_AIF1ADC2_VU); 3283 WM8994_AIF1ADC2_VU, WM8994_AIF1ADC2_VU);
3284 snd_soc_update_bits(codec, WM8994_AIF2_ADC_LEFT_VOLUME,
3285 WM8994_AIF2ADC_VU, WM8994_AIF1ADC2_VU);
3274 snd_soc_update_bits(codec, WM8994_AIF2_ADC_RIGHT_VOLUME, 3286 snd_soc_update_bits(codec, WM8994_AIF2_ADC_RIGHT_VOLUME,
3275 WM8994_AIF2ADC_VU, WM8994_AIF1ADC2_VU); 3287 WM8994_AIF2ADC_VU, WM8994_AIF1ADC2_VU);
3288 snd_soc_update_bits(codec, WM8994_DAC1_LEFT_VOLUME,
3289 WM8994_DAC1_VU, WM8994_DAC1_VU);
3276 snd_soc_update_bits(codec, WM8994_DAC1_RIGHT_VOLUME, 3290 snd_soc_update_bits(codec, WM8994_DAC1_RIGHT_VOLUME,
3277 WM8994_DAC1_VU, WM8994_DAC1_VU); 3291 WM8994_DAC1_VU, WM8994_DAC1_VU);
3292 snd_soc_update_bits(codec, WM8994_DAC2_LEFT_VOLUME,
3293 WM8994_DAC2_VU, WM8994_DAC2_VU);
3278 snd_soc_update_bits(codec, WM8994_DAC2_RIGHT_VOLUME, 3294 snd_soc_update_bits(codec, WM8994_DAC2_RIGHT_VOLUME,
3279 WM8994_DAC2_VU, WM8994_DAC2_VU); 3295 WM8994_DAC2_VU, WM8994_DAC2_VU);
3280 3296
diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c
index 7b6b3c18e299..4005e9af5d61 100644
--- a/sound/soc/codecs/wm_hubs.c
+++ b/sound/soc/codecs/wm_hubs.c
@@ -740,12 +740,12 @@ static const struct snd_soc_dapm_route analogue_routes[] = {
740 740
741 { "SPKL", "Input Switch", "MIXINL" }, 741 { "SPKL", "Input Switch", "MIXINL" },
742 { "SPKL", "IN1LP Switch", "IN1LP" }, 742 { "SPKL", "IN1LP Switch", "IN1LP" },
743 { "SPKL", "Output Switch", "Left Output Mixer" }, 743 { "SPKL", "Output Switch", "Left Output PGA" },
744 { "SPKL", NULL, "TOCLK" }, 744 { "SPKL", NULL, "TOCLK" },
745 745
746 { "SPKR", "Input Switch", "MIXINR" }, 746 { "SPKR", "Input Switch", "MIXINR" },
747 { "SPKR", "IN1RP Switch", "IN1RP" }, 747 { "SPKR", "IN1RP Switch", "IN1RP" },
748 { "SPKR", "Output Switch", "Right Output Mixer" }, 748 { "SPKR", "Output Switch", "Right Output PGA" },
749 { "SPKR", NULL, "TOCLK" }, 749 { "SPKR", NULL, "TOCLK" },
750 750
751 { "SPKL Boost", "Direct Voice Switch", "Direct Voice" }, 751 { "SPKL Boost", "Direct Voice Switch", "Direct Voice" },
@@ -767,8 +767,8 @@ static const struct snd_soc_dapm_route analogue_routes[] = {
767 { "SPKOUTRP", NULL, "SPKR Driver" }, 767 { "SPKOUTRP", NULL, "SPKR Driver" },
768 { "SPKOUTRN", NULL, "SPKR Driver" }, 768 { "SPKOUTRN", NULL, "SPKR Driver" },
769 769
770 { "Left Headphone Mux", "Mixer", "Left Output Mixer" }, 770 { "Left Headphone Mux", "Mixer", "Left Output PGA" },
771 { "Right Headphone Mux", "Mixer", "Right Output Mixer" }, 771 { "Right Headphone Mux", "Mixer", "Right Output PGA" },
772 772
773 { "Headphone PGA", NULL, "Left Headphone Mux" }, 773 { "Headphone PGA", NULL, "Left Headphone Mux" },
774 { "Headphone PGA", NULL, "Right Headphone Mux" }, 774 { "Headphone PGA", NULL, "Right Headphone Mux" },
diff --git a/sound/soc/mid-x86/sst_platform.c b/sound/soc/mid-x86/sst_platform.c
index b2e9198a983a..d567c322a2fb 100644
--- a/sound/soc/mid-x86/sst_platform.c
+++ b/sound/soc/mid-x86/sst_platform.c
@@ -116,18 +116,20 @@ struct snd_soc_dai_driver sst_platform_dai[] = {
116static inline void sst_set_stream_status(struct sst_runtime_stream *stream, 116static inline void sst_set_stream_status(struct sst_runtime_stream *stream,
117 int state) 117 int state)
118{ 118{
119 spin_lock(&stream->status_lock); 119 unsigned long flags;
120 spin_lock_irqsave(&stream->status_lock, flags);
120 stream->stream_status = state; 121 stream->stream_status = state;
121 spin_unlock(&stream->status_lock); 122 spin_unlock_irqrestore(&stream->status_lock, flags);
122} 123}
123 124
124static inline int sst_get_stream_status(struct sst_runtime_stream *stream) 125static inline int sst_get_stream_status(struct sst_runtime_stream *stream)
125{ 126{
126 int state; 127 int state;
128 unsigned long flags;
127 129
128 spin_lock(&stream->status_lock); 130 spin_lock_irqsave(&stream->status_lock, flags);
129 state = stream->stream_status; 131 state = stream->stream_status;
130 spin_unlock(&stream->status_lock); 132 spin_unlock_irqrestore(&stream->status_lock, flags);
131 return state; 133 return state;
132} 134}
133 135
diff --git a/sound/soc/samsung/pcm.c b/sound/soc/samsung/pcm.c
index 38aac7d57a59..9c7e8b48aed6 100644
--- a/sound/soc/samsung/pcm.c
+++ b/sound/soc/samsung/pcm.c
@@ -350,8 +350,8 @@ static int s3c_pcm_set_fmt(struct snd_soc_dai *cpu_dai,
350 ctl = readl(regs + S3C_PCM_CTL); 350 ctl = readl(regs + S3C_PCM_CTL);
351 351
352 switch (fmt & SND_SOC_DAIFMT_INV_MASK) { 352 switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
353 case SND_SOC_DAIFMT_NB_NF: 353 case SND_SOC_DAIFMT_IB_NF:
354 /* Nothing to do, NB_NF by default */ 354 /* Nothing to do, IB_NF by default */
355 break; 355 break;
356 default: 356 default:
357 dev_err(pcm->dev, "Unsupported clock inversion!\n"); 357 dev_err(pcm->dev, "Unsupported clock inversion!\n");
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
index 0c9997e2d8c0..23c0e83d4c19 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
@@ -1200,10 +1200,11 @@ static int fsi_probe(struct platform_device *pdev)
1200 master->fsib.master = master; 1200 master->fsib.master = master;
1201 1201
1202 pm_runtime_enable(&pdev->dev); 1202 pm_runtime_enable(&pdev->dev);
1203 pm_runtime_resume(&pdev->dev);
1204 dev_set_drvdata(&pdev->dev, master); 1203 dev_set_drvdata(&pdev->dev, master);
1205 1204
1205 pm_runtime_get_sync(&pdev->dev);
1206 fsi_soft_all_reset(master); 1206 fsi_soft_all_reset(master);
1207 pm_runtime_put_sync(&pdev->dev);
1207 1208
1208 ret = request_irq(irq, &fsi_interrupt, IRQF_DISABLED, 1209 ret = request_irq(irq, &fsi_interrupt, IRQF_DISABLED,
1209 id_entry->name, master); 1210 id_entry->name, master);
@@ -1218,8 +1219,17 @@ static int fsi_probe(struct platform_device *pdev)
1218 goto exit_free_irq; 1219 goto exit_free_irq;
1219 } 1220 }
1220 1221
1221 return snd_soc_register_dais(&pdev->dev, fsi_soc_dai, ARRAY_SIZE(fsi_soc_dai)); 1222 ret = snd_soc_register_dais(&pdev->dev, fsi_soc_dai,
1223 ARRAY_SIZE(fsi_soc_dai));
1224 if (ret < 0) {
1225 dev_err(&pdev->dev, "cannot snd dai register\n");
1226 goto exit_snd_soc;
1227 }
1228
1229 return ret;
1222 1230
1231exit_snd_soc:
1232 snd_soc_unregister_platform(&pdev->dev);
1223exit_free_irq: 1233exit_free_irq:
1224 free_irq(irq, master); 1234 free_irq(irq, master);
1225exit_iounmap: 1235exit_iounmap:
@@ -1238,12 +1248,11 @@ static int fsi_remove(struct platform_device *pdev)
1238 1248
1239 master = dev_get_drvdata(&pdev->dev); 1249 master = dev_get_drvdata(&pdev->dev);
1240 1250
1241 snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(fsi_soc_dai)); 1251 free_irq(master->irq, master);
1242 snd_soc_unregister_platform(&pdev->dev);
1243
1244 pm_runtime_disable(&pdev->dev); 1252 pm_runtime_disable(&pdev->dev);
1245 1253
1246 free_irq(master->irq, master); 1254 snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(fsi_soc_dai));
1255 snd_soc_unregister_platform(&pdev->dev);
1247 1256
1248 iounmap(master->base); 1257 iounmap(master->base);
1249 kfree(master); 1258 kfree(master);
@@ -1321,3 +1330,4 @@ module_exit(fsi_mobile_exit);
1321MODULE_LICENSE("GPL"); 1330MODULE_LICENSE("GPL");
1322MODULE_DESCRIPTION("SuperH onchip FSI audio driver"); 1331MODULE_DESCRIPTION("SuperH onchip FSI audio driver");
1323MODULE_AUTHOR("Kuninori Morimoto <morimoto.kuninori@renesas.com>"); 1332MODULE_AUTHOR("Kuninori Morimoto <morimoto.kuninori@renesas.com>");
1333MODULE_ALIAS("platform:fsi-pcm-audio");
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index b76b74db0968..d8562ce4de7a 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -629,6 +629,7 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
629 runtime->hw.rates |= codec_dai_drv->capture.rates; 629 runtime->hw.rates |= codec_dai_drv->capture.rates;
630 } 630 }
631 631
632 ret = -EINVAL;
632 snd_pcm_limit_hw_rates(runtime); 633 snd_pcm_limit_hw_rates(runtime);
633 if (!runtime->hw.rates) { 634 if (!runtime->hw.rates) {
634 printk(KERN_ERR "asoc: %s <-> %s No matching rates\n", 635 printk(KERN_ERR "asoc: %s <-> %s No matching rates\n",
@@ -640,7 +641,8 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
640 codec_dai->name, cpu_dai->name); 641 codec_dai->name, cpu_dai->name);
641 goto config_err; 642 goto config_err;
642 } 643 }
643 if (!runtime->hw.channels_min || !runtime->hw.channels_max) { 644 if (!runtime->hw.channels_min || !runtime->hw.channels_max ||
645 runtime->hw.channels_min > runtime->hw.channels_max) {
644 printk(KERN_ERR "asoc: %s <-> %s No matching channels\n", 646 printk(KERN_ERR "asoc: %s <-> %s No matching channels\n",
645 codec_dai->name, cpu_dai->name); 647 codec_dai->name, cpu_dai->name);
646 goto config_err; 648 goto config_err;
@@ -2060,6 +2062,7 @@ const struct dev_pm_ops snd_soc_pm_ops = {
2060 .resume = snd_soc_resume, 2062 .resume = snd_soc_resume,
2061 .poweroff = snd_soc_poweroff, 2063 .poweroff = snd_soc_poweroff,
2062}; 2064};
2065EXPORT_SYMBOL_GPL(snd_soc_pm_ops);
2063 2066
2064/* ASoC platform driver */ 2067/* ASoC platform driver */
2065static struct platform_driver soc_driver = { 2068static struct platform_driver soc_driver = {
diff --git a/sound/soc/tegra/harmony.c b/sound/soc/tegra/harmony.c
index 8585957477eb..556a57133925 100644
--- a/sound/soc/tegra/harmony.c
+++ b/sound/soc/tegra/harmony.c
@@ -370,6 +370,7 @@ static struct platform_driver tegra_snd_harmony_driver = {
370 .driver = { 370 .driver = {
371 .name = DRV_NAME, 371 .name = DRV_NAME,
372 .owner = THIS_MODULE, 372 .owner = THIS_MODULE,
373 .pm = &snd_soc_pm_ops,
373 }, 374 },
374 .probe = tegra_snd_harmony_probe, 375 .probe = tegra_snd_harmony_probe,
375 .remove = __devexit_p(tegra_snd_harmony_remove), 376 .remove = __devexit_p(tegra_snd_harmony_remove),