aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/wm5102.c2
-rw-r--r--sound/soc/codecs/wm8903.c2
-rw-r--r--sound/soc/samsung/i2s.c17
-rw-r--r--sound/soc/soc-compress.c14
-rw-r--r--sound/soc/soc-core.c2
-rw-r--r--sound/soc/tegra/tegra_pcm.c24
6 files changed, 28 insertions, 33 deletions
diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c
index b82bbf584146..34d0201d6a78 100644
--- a/sound/soc/codecs/wm5102.c
+++ b/sound/soc/codecs/wm5102.c
@@ -584,7 +584,7 @@ static int wm5102_sysclk_ev(struct snd_soc_dapm_widget *w,
584 struct snd_kcontrol *kcontrol, int event) 584 struct snd_kcontrol *kcontrol, int event)
585{ 585{
586 struct snd_soc_codec *codec = w->codec; 586 struct snd_soc_codec *codec = w->codec;
587 struct arizona *arizona = dev_get_drvdata(codec->dev); 587 struct arizona *arizona = dev_get_drvdata(codec->dev->parent);
588 struct regmap *regmap = codec->control_data; 588 struct regmap *regmap = codec->control_data;
589 const struct reg_default *patch = NULL; 589 const struct reg_default *patch = NULL;
590 int i, patch_size; 590 int i, patch_size;
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index 134e41c870b9..f8a31ad0b203 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -1083,6 +1083,8 @@ static const struct snd_soc_dapm_route wm8903_intercon[] = {
1083 { "ROP", NULL, "Right Speaker PGA" }, 1083 { "ROP", NULL, "Right Speaker PGA" },
1084 { "RON", NULL, "Right Speaker PGA" }, 1084 { "RON", NULL, "Right Speaker PGA" },
1085 1085
1086 { "Charge Pump", NULL, "CLK_DSP" },
1087
1086 { "Left Headphone Output PGA", NULL, "Charge Pump" }, 1088 { "Left Headphone Output PGA", NULL, "Charge Pump" },
1087 { "Right Headphone Output PGA", NULL, "Charge Pump" }, 1089 { "Right Headphone Output PGA", NULL, "Charge Pump" },
1088 { "Left Line Output PGA", NULL, "Charge Pump" }, 1090 { "Left Line Output PGA", NULL, "Charge Pump" },
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index d7231e336a7c..6bbeb0bf1a73 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -972,6 +972,7 @@ static const struct snd_soc_dai_ops samsung_i2s_dai_ops = {
972static struct i2s_dai *i2s_alloc_dai(struct platform_device *pdev, bool sec) 972static struct i2s_dai *i2s_alloc_dai(struct platform_device *pdev, bool sec)
973{ 973{
974 struct i2s_dai *i2s; 974 struct i2s_dai *i2s;
975 int ret;
975 976
976 i2s = devm_kzalloc(&pdev->dev, sizeof(struct i2s_dai), GFP_KERNEL); 977 i2s = devm_kzalloc(&pdev->dev, sizeof(struct i2s_dai), GFP_KERNEL);
977 if (i2s == NULL) 978 if (i2s == NULL)
@@ -996,15 +997,17 @@ static struct i2s_dai *i2s_alloc_dai(struct platform_device *pdev, bool sec)
996 i2s->i2s_dai_drv.capture.channels_max = 2; 997 i2s->i2s_dai_drv.capture.channels_max = 2;
997 i2s->i2s_dai_drv.capture.rates = SAMSUNG_I2S_RATES; 998 i2s->i2s_dai_drv.capture.rates = SAMSUNG_I2S_RATES;
998 i2s->i2s_dai_drv.capture.formats = SAMSUNG_I2S_FMTS; 999 i2s->i2s_dai_drv.capture.formats = SAMSUNG_I2S_FMTS;
1000 dev_set_drvdata(&i2s->pdev->dev, i2s);
999 } else { /* Create a new platform_device for Secondary */ 1001 } else { /* Create a new platform_device for Secondary */
1000 i2s->pdev = platform_device_register_resndata(NULL, 1002 i2s->pdev = platform_device_alloc("samsung-i2s-sec", -1);
1001 "samsung-i2s-sec", -1, NULL, 0, NULL, 0);
1002 if (IS_ERR(i2s->pdev)) 1003 if (IS_ERR(i2s->pdev))
1003 return NULL; 1004 return NULL;
1004 }
1005 1005
1006 /* Pre-assign snd_soc_dai_set_drvdata */ 1006 platform_set_drvdata(i2s->pdev, i2s);
1007 dev_set_drvdata(&i2s->pdev->dev, i2s); 1007 ret = platform_device_add(i2s->pdev);
1008 if (ret < 0)
1009 return NULL;
1010 }
1008 1011
1009 return i2s; 1012 return i2s;
1010} 1013}
@@ -1107,6 +1110,10 @@ static int samsung_i2s_probe(struct platform_device *pdev)
1107 1110
1108 if (samsung_dai_type == TYPE_SEC) { 1111 if (samsung_dai_type == TYPE_SEC) {
1109 sec_dai = dev_get_drvdata(&pdev->dev); 1112 sec_dai = dev_get_drvdata(&pdev->dev);
1113 if (!sec_dai) {
1114 dev_err(&pdev->dev, "Unable to get drvdata\n");
1115 return -EFAULT;
1116 }
1110 snd_soc_register_dai(&sec_dai->pdev->dev, 1117 snd_soc_register_dai(&sec_dai->pdev->dev,
1111 &sec_dai->i2s_dai_drv); 1118 &sec_dai->i2s_dai_drv);
1112 asoc_dma_platform_register(&pdev->dev); 1119 asoc_dma_platform_register(&pdev->dev);
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
index b5b3db71e253..ed0bfb0ddb96 100644
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -211,19 +211,27 @@ static int soc_compr_set_params(struct snd_compr_stream *cstream,
211 if (platform->driver->compr_ops && platform->driver->compr_ops->set_params) { 211 if (platform->driver->compr_ops && platform->driver->compr_ops->set_params) {
212 ret = platform->driver->compr_ops->set_params(cstream, params); 212 ret = platform->driver->compr_ops->set_params(cstream, params);
213 if (ret < 0) 213 if (ret < 0)
214 goto out; 214 goto err;
215 } 215 }
216 216
217 if (rtd->dai_link->compr_ops && rtd->dai_link->compr_ops->set_params) { 217 if (rtd->dai_link->compr_ops && rtd->dai_link->compr_ops->set_params) {
218 ret = rtd->dai_link->compr_ops->set_params(cstream); 218 ret = rtd->dai_link->compr_ops->set_params(cstream);
219 if (ret < 0) 219 if (ret < 0)
220 goto out; 220 goto err;
221 } 221 }
222 222
223 snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_PLAYBACK, 223 snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_PLAYBACK,
224 SND_SOC_DAPM_STREAM_START); 224 SND_SOC_DAPM_STREAM_START);
225 225
226out: 226 /* cancel any delayed stream shutdown that is pending */
227 rtd->pop_wait = 0;
228 mutex_unlock(&rtd->pcm_mutex);
229
230 cancel_delayed_work_sync(&rtd->delayed_work);
231
232 return ret;
233
234err:
227 mutex_unlock(&rtd->pcm_mutex); 235 mutex_unlock(&rtd->pcm_mutex);
228 return ret; 236 return ret;
229} 237}
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 507d251916af..ff4b45a5d796 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2963,7 +2963,7 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol,
2963 val = val << shift; 2963 val = val << shift;
2964 2964
2965 ret = snd_soc_update_bits_locked(codec, reg, val_mask, val); 2965 ret = snd_soc_update_bits_locked(codec, reg, val_mask, val);
2966 if (ret != 0) 2966 if (ret < 0)
2967 return ret; 2967 return ret;
2968 2968
2969 if (snd_soc_volsw_is_stereo(mc)) { 2969 if (snd_soc_volsw_is_stereo(mc)) {
diff --git a/sound/soc/tegra/tegra_pcm.c b/sound/soc/tegra/tegra_pcm.c
index c925ab0adeb6..5e2c55c5b255 100644
--- a/sound/soc/tegra/tegra_pcm.c
+++ b/sound/soc/tegra/tegra_pcm.c
@@ -43,8 +43,6 @@
43static const struct snd_pcm_hardware tegra_pcm_hardware = { 43static const struct snd_pcm_hardware tegra_pcm_hardware = {
44 .info = SNDRV_PCM_INFO_MMAP | 44 .info = SNDRV_PCM_INFO_MMAP |
45 SNDRV_PCM_INFO_MMAP_VALID | 45 SNDRV_PCM_INFO_MMAP_VALID |
46 SNDRV_PCM_INFO_PAUSE |
47 SNDRV_PCM_INFO_RESUME |
48 SNDRV_PCM_INFO_INTERLEAVED, 46 SNDRV_PCM_INFO_INTERLEAVED,
49 .formats = SNDRV_PCM_FMTBIT_S16_LE, 47 .formats = SNDRV_PCM_FMTBIT_S16_LE,
50 .channels_min = 2, 48 .channels_min = 2,
@@ -127,26 +125,6 @@ static int tegra_pcm_hw_free(struct snd_pcm_substream *substream)
127 return 0; 125 return 0;
128} 126}
129 127
130static int tegra_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
131{
132 switch (cmd) {
133 case SNDRV_PCM_TRIGGER_START:
134 case SNDRV_PCM_TRIGGER_RESUME:
135 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
136 return snd_dmaengine_pcm_trigger(substream,
137 SNDRV_PCM_TRIGGER_START);
138
139 case SNDRV_PCM_TRIGGER_STOP:
140 case SNDRV_PCM_TRIGGER_SUSPEND:
141 case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
142 return snd_dmaengine_pcm_trigger(substream,
143 SNDRV_PCM_TRIGGER_STOP);
144 default:
145 return -EINVAL;
146 }
147 return 0;
148}
149
150static int tegra_pcm_mmap(struct snd_pcm_substream *substream, 128static int tegra_pcm_mmap(struct snd_pcm_substream *substream,
151 struct vm_area_struct *vma) 129 struct vm_area_struct *vma)
152{ 130{
@@ -164,7 +142,7 @@ static struct snd_pcm_ops tegra_pcm_ops = {
164 .ioctl = snd_pcm_lib_ioctl, 142 .ioctl = snd_pcm_lib_ioctl,
165 .hw_params = tegra_pcm_hw_params, 143 .hw_params = tegra_pcm_hw_params,
166 .hw_free = tegra_pcm_hw_free, 144 .hw_free = tegra_pcm_hw_free,
167 .trigger = tegra_pcm_trigger, 145 .trigger = snd_dmaengine_pcm_trigger,
168 .pointer = snd_dmaengine_pcm_pointer, 146 .pointer = snd_dmaengine_pcm_pointer,
169 .mmap = tegra_pcm_mmap, 147 .mmap = tegra_pcm_mmap,
170}; 148};