Merge tag 'asoc-v3.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Last updates for the merge window

A couple more fixes plus some extensions to DPCM for use with compressed
audio from Liam which arrived just after my previous pull request.

+347 -26
+22
include/sound/soc-dpcm.h
··· 11 11 #ifndef __LINUX_SND_SOC_DPCM_H 12 12 #define __LINUX_SND_SOC_DPCM_H 13 13 14 + #include <linux/slab.h> 14 15 #include <linux/list.h> 15 16 #include <sound/pcm.h> 16 17 ··· 135 134 int soc_dpcm_be_digital_mute(struct snd_soc_pcm_runtime *fe, int mute); 136 135 int soc_dpcm_debugfs_add(struct snd_soc_pcm_runtime *rtd); 137 136 int soc_dpcm_runtime_update(struct snd_soc_card *); 137 + 138 + int dpcm_path_get(struct snd_soc_pcm_runtime *fe, 139 + int stream, struct snd_soc_dapm_widget_list **list_); 140 + int dpcm_process_paths(struct snd_soc_pcm_runtime *fe, 141 + int stream, struct snd_soc_dapm_widget_list **list, int new); 142 + int dpcm_be_dai_startup(struct snd_soc_pcm_runtime *fe, int stream); 143 + int dpcm_be_dai_shutdown(struct snd_soc_pcm_runtime *fe, int stream); 144 + void dpcm_be_disconnect(struct snd_soc_pcm_runtime *fe, int stream); 145 + void dpcm_clear_pending_state(struct snd_soc_pcm_runtime *fe, int stream); 146 + int dpcm_be_dai_hw_free(struct snd_soc_pcm_runtime *fe, int stream); 147 + int dpcm_be_dai_hw_params(struct snd_soc_pcm_runtime *fe, int tream); 148 + int dpcm_be_dai_trigger(struct snd_soc_pcm_runtime *fe, int stream, int cmd); 149 + int dpcm_be_dai_prepare(struct snd_soc_pcm_runtime *fe, int stream); 150 + int dpcm_dapm_stream_event(struct snd_soc_pcm_runtime *fe, int dir, 151 + int event); 152 + 153 + static inline void dpcm_path_put(struct snd_soc_dapm_widget_list **list) 154 + { 155 + kfree(*list); 156 + } 157 + 138 158 139 159 #endif
+1
include/sound/soc.h
··· 1042 1042 1043 1043 /* Dynamic PCM BE runtime data */ 1044 1044 struct snd_soc_dpcm_runtime dpcm[2]; 1045 + int fe_compr; 1045 1046 1046 1047 long pmdown_time; 1047 1048 unsigned char pop_wait:1;
+300 -1
sound/soc/soc-compress.c
··· 24 24 #include <sound/compress_driver.h> 25 25 #include <sound/soc.h> 26 26 #include <sound/initval.h> 27 + #include <sound/soc-dpcm.h> 27 28 28 29 static int soc_compr_open(struct snd_compr_stream *cstream) 29 30 { ··· 73 72 platform->driver->compr_ops->free(cstream); 74 73 out: 75 74 mutex_unlock(&rtd->pcm_mutex); 75 + return ret; 76 + } 77 + 78 + static int soc_compr_open_fe(struct snd_compr_stream *cstream) 79 + { 80 + struct snd_soc_pcm_runtime *fe = cstream->private_data; 81 + struct snd_pcm_substream *fe_substream = fe->pcm->streams[0].substream; 82 + struct snd_soc_platform *platform = fe->platform; 83 + struct snd_soc_dai *cpu_dai = fe->cpu_dai; 84 + struct snd_soc_dai *codec_dai = fe->codec_dai; 85 + struct snd_soc_dpcm *dpcm; 86 + struct snd_soc_dapm_widget_list *list; 87 + int stream; 88 + int ret = 0; 89 + 90 + if (cstream->direction == SND_COMPRESS_PLAYBACK) 91 + stream = SNDRV_PCM_STREAM_PLAYBACK; 92 + else 93 + stream = SNDRV_PCM_STREAM_CAPTURE; 94 + 95 + mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME); 96 + 97 + if (platform->driver->compr_ops && platform->driver->compr_ops->open) { 98 + ret = platform->driver->compr_ops->open(cstream); 99 + if (ret < 0) { 100 + pr_err("compress asoc: can't open platform %s\n", platform->name); 101 + goto out; 102 + } 103 + } 104 + 105 + if (fe->dai_link->compr_ops && fe->dai_link->compr_ops->startup) { 106 + ret = fe->dai_link->compr_ops->startup(cstream); 107 + if (ret < 0) { 108 + pr_err("compress asoc: %s startup failed\n", fe->dai_link->name); 109 + goto machine_err; 110 + } 111 + } 112 + 113 + fe->dpcm[stream].runtime = fe_substream->runtime; 114 + 115 + if (dpcm_path_get(fe, stream, &list) <= 0) { 116 + dev_dbg(fe->dev, "ASoC: %s no valid %s route\n", 117 + fe->dai_link->name, stream ? "capture" : "playback"); 118 + } 119 + 120 + /* calculate valid and active FE <-> BE dpcms */ 121 + dpcm_process_paths(fe, stream, &list, 1); 122 + 123 + fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE; 124 + 125 + ret = dpcm_be_dai_startup(fe, stream); 126 + if (ret < 0) { 127 + /* clean up all links */ 128 + list_for_each_entry(dpcm, &fe->dpcm[stream].be_clients, list_be) 129 + dpcm->state = SND_SOC_DPCM_LINK_STATE_FREE; 130 + 131 + dpcm_be_disconnect(fe, stream); 132 + fe->dpcm[stream].runtime = NULL; 133 + goto fe_err; 134 + } 135 + 136 + dpcm_clear_pending_state(fe, stream); 137 + dpcm_path_put(&list); 138 + 139 + fe->dpcm[stream].state = SND_SOC_DPCM_STATE_OPEN; 140 + fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; 141 + 142 + if (cstream->direction == SND_COMPRESS_PLAYBACK) { 143 + cpu_dai->playback_active++; 144 + codec_dai->playback_active++; 145 + } else { 146 + cpu_dai->capture_active++; 147 + codec_dai->capture_active++; 148 + } 149 + 150 + cpu_dai->active++; 151 + codec_dai->active++; 152 + fe->codec->active++; 153 + 154 + mutex_unlock(&fe->card->mutex); 155 + 156 + return 0; 157 + 158 + fe_err: 159 + if (fe->dai_link->compr_ops && fe->dai_link->compr_ops->shutdown) 160 + fe->dai_link->compr_ops->shutdown(cstream); 161 + machine_err: 162 + if (platform->driver->compr_ops && platform->driver->compr_ops->free) 163 + platform->driver->compr_ops->free(cstream); 164 + out: 165 + fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; 166 + mutex_unlock(&fe->card->mutex); 76 167 return ret; 77 168 } 78 169 ··· 257 164 return 0; 258 165 } 259 166 167 + static int soc_compr_free_fe(struct snd_compr_stream *cstream) 168 + { 169 + struct snd_soc_pcm_runtime *fe = cstream->private_data; 170 + struct snd_soc_platform *platform = fe->platform; 171 + struct snd_soc_dai *cpu_dai = fe->cpu_dai; 172 + struct snd_soc_dai *codec_dai = fe->codec_dai; 173 + struct snd_soc_dpcm *dpcm; 174 + int stream, ret; 175 + 176 + mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME); 177 + 178 + if (cstream->direction == SND_COMPRESS_PLAYBACK) { 179 + stream = SNDRV_PCM_STREAM_PLAYBACK; 180 + cpu_dai->playback_active--; 181 + codec_dai->playback_active--; 182 + } else { 183 + stream = SNDRV_PCM_STREAM_CAPTURE; 184 + cpu_dai->capture_active--; 185 + codec_dai->capture_active--; 186 + } 187 + 188 + cpu_dai->active--; 189 + codec_dai->active--; 190 + fe->codec->active--; 191 + 192 + fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE; 193 + 194 + ret = dpcm_be_dai_hw_free(fe, stream); 195 + if (ret < 0) 196 + dev_err(fe->dev, "compressed hw_free failed %d\n", ret); 197 + 198 + ret = dpcm_be_dai_shutdown(fe, stream); 199 + 200 + /* mark FE's links ready to prune */ 201 + list_for_each_entry(dpcm, &fe->dpcm[stream].be_clients, list_be) 202 + dpcm->state = SND_SOC_DPCM_LINK_STATE_FREE; 203 + 204 + if (stream == SNDRV_PCM_STREAM_PLAYBACK) 205 + dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_STOP); 206 + else 207 + dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_STOP); 208 + 209 + fe->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE; 210 + fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; 211 + 212 + dpcm_be_disconnect(fe, stream); 213 + 214 + fe->dpcm[stream].runtime = NULL; 215 + 216 + if (fe->dai_link->compr_ops && fe->dai_link->compr_ops->shutdown) 217 + fe->dai_link->compr_ops->shutdown(cstream); 218 + 219 + if (platform->driver->compr_ops && platform->driver->compr_ops->free) 220 + platform->driver->compr_ops->free(cstream); 221 + 222 + mutex_unlock(&fe->card->mutex); 223 + return 0; 224 + } 225 + 260 226 static int soc_compr_trigger(struct snd_compr_stream *cstream, int cmd) 261 227 { 262 228 ··· 343 191 344 192 out: 345 193 mutex_unlock(&rtd->pcm_mutex); 194 + return ret; 195 + } 196 + 197 + static int soc_compr_trigger_fe(struct snd_compr_stream *cstream, int cmd) 198 + { 199 + struct snd_soc_pcm_runtime *fe = cstream->private_data; 200 + struct snd_soc_platform *platform = fe->platform; 201 + int ret = 0, stream; 202 + 203 + if (cmd == SND_COMPR_TRIGGER_PARTIAL_DRAIN || 204 + cmd == SND_COMPR_TRIGGER_DRAIN) { 205 + 206 + if (platform->driver->compr_ops && 207 + platform->driver->compr_ops->trigger) 208 + return platform->driver->compr_ops->trigger(cstream, cmd); 209 + } 210 + 211 + if (cstream->direction == SND_COMPRESS_PLAYBACK) 212 + stream = SNDRV_PCM_STREAM_PLAYBACK; 213 + else 214 + stream = SNDRV_PCM_STREAM_CAPTURE; 215 + 216 + 217 + mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME); 218 + 219 + if (platform->driver->compr_ops && platform->driver->compr_ops->trigger) { 220 + ret = platform->driver->compr_ops->trigger(cstream, cmd); 221 + if (ret < 0) 222 + goto out; 223 + } 224 + 225 + fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE; 226 + 227 + ret = dpcm_be_dai_trigger(fe, stream, cmd); 228 + 229 + switch (cmd) { 230 + case SNDRV_PCM_TRIGGER_START: 231 + case SNDRV_PCM_TRIGGER_RESUME: 232 + case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: 233 + fe->dpcm[stream].state = SND_SOC_DPCM_STATE_START; 234 + break; 235 + case SNDRV_PCM_TRIGGER_STOP: 236 + case SNDRV_PCM_TRIGGER_SUSPEND: 237 + fe->dpcm[stream].state = SND_SOC_DPCM_STATE_STOP; 238 + break; 239 + case SNDRV_PCM_TRIGGER_PAUSE_PUSH: 240 + fe->dpcm[stream].state = SND_SOC_DPCM_STATE_PAUSED; 241 + break; 242 + } 243 + 244 + out: 245 + fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; 246 + mutex_unlock(&fe->card->mutex); 346 247 return ret; 347 248 } 348 249 ··· 443 238 444 239 err: 445 240 mutex_unlock(&rtd->pcm_mutex); 241 + return ret; 242 + } 243 + 244 + static int soc_compr_set_params_fe(struct snd_compr_stream *cstream, 245 + struct snd_compr_params *params) 246 + { 247 + struct snd_soc_pcm_runtime *fe = cstream->private_data; 248 + struct snd_pcm_substream *fe_substream = fe->pcm->streams[0].substream; 249 + struct snd_soc_platform *platform = fe->platform; 250 + int ret = 0, stream; 251 + 252 + if (cstream->direction == SND_COMPRESS_PLAYBACK) 253 + stream = SNDRV_PCM_STREAM_PLAYBACK; 254 + else 255 + stream = SNDRV_PCM_STREAM_CAPTURE; 256 + 257 + mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME); 258 + 259 + if (platform->driver->compr_ops && platform->driver->compr_ops->set_params) { 260 + ret = platform->driver->compr_ops->set_params(cstream, params); 261 + if (ret < 0) 262 + goto out; 263 + } 264 + 265 + if (fe->dai_link->compr_ops && fe->dai_link->compr_ops->set_params) { 266 + ret = fe->dai_link->compr_ops->set_params(cstream); 267 + if (ret < 0) 268 + goto out; 269 + } 270 + 271 + /* 272 + * Create an empty hw_params for the BE as the machine driver must 273 + * fix this up to match DSP decoder and ASRC configuration. 274 + * I.e. machine driver fixup for compressed BE is mandatory. 275 + */ 276 + memset(&fe->dpcm[fe_substream->stream].hw_params, 0, 277 + sizeof(struct snd_pcm_hw_params)); 278 + 279 + fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE; 280 + 281 + ret = dpcm_be_dai_hw_params(fe, stream); 282 + if (ret < 0) 283 + goto out; 284 + 285 + ret = dpcm_be_dai_prepare(fe, stream); 286 + if (ret < 0) 287 + goto out; 288 + 289 + if (stream == SNDRV_PCM_STREAM_PLAYBACK) 290 + dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_START); 291 + else 292 + dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_START); 293 + 294 + fe->dpcm[stream].state = SND_SOC_DPCM_STATE_PREPARE; 295 + 296 + out: 297 + fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; 298 + mutex_unlock(&fe->card->mutex); 446 299 return ret; 447 300 } 448 301 ··· 623 360 624 361 return ret; 625 362 } 363 + 626 364 /* ASoC Compress operations */ 627 365 static struct snd_compr_ops soc_compr_ops = { 628 366 .open = soc_compr_open, ··· 639 375 .get_codec_caps = soc_compr_get_codec_caps 640 376 }; 641 377 378 + /* ASoC Dynamic Compress operations */ 379 + static struct snd_compr_ops soc_compr_dyn_ops = { 380 + .open = soc_compr_open_fe, 381 + .free = soc_compr_free_fe, 382 + .set_params = soc_compr_set_params_fe, 383 + .get_params = soc_compr_get_params, 384 + .set_metadata = soc_compr_set_metadata, 385 + .get_metadata = soc_compr_get_metadata, 386 + .trigger = soc_compr_trigger_fe, 387 + .pointer = soc_compr_pointer, 388 + .ack = soc_compr_ack, 389 + .get_caps = soc_compr_get_caps, 390 + .get_codec_caps = soc_compr_get_codec_caps 391 + }; 392 + 642 393 /* create a new compress */ 643 394 int soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) 644 395 { ··· 662 383 struct snd_soc_dai *codec_dai = rtd->codec_dai; 663 384 struct snd_soc_dai *cpu_dai = rtd->cpu_dai; 664 385 struct snd_compr *compr; 386 + struct snd_pcm *be_pcm; 665 387 char new_name[64]; 666 388 int ret = 0, direction = 0; 667 389 ··· 690 410 ret = -ENOMEM; 691 411 goto compr_err; 692 412 } 693 - memcpy(compr->ops, &soc_compr_ops, sizeof(soc_compr_ops)); 413 + 414 + if (rtd->dai_link->dynamic) { 415 + snprintf(new_name, sizeof(new_name), "(%s)", 416 + rtd->dai_link->stream_name); 417 + 418 + ret = snd_pcm_new_internal(rtd->card->snd_card, new_name, num, 419 + 1, 0, &be_pcm); 420 + if (ret < 0) { 421 + dev_err(rtd->card->dev, "ASoC: can't create compressed for %s\n", 422 + rtd->dai_link->name); 423 + goto compr_err; 424 + } 425 + 426 + rtd->pcm = be_pcm; 427 + rtd->fe_compr = 1; 428 + be_pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream->private_data = rtd; 429 + be_pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream->private_data = rtd; 430 + memcpy(compr->ops, &soc_compr_dyn_ops, sizeof(soc_compr_dyn_ops)); 431 + } else 432 + memcpy(compr->ops, &soc_compr_ops, sizeof(soc_compr_ops)); 694 433 695 434 /* Add copy callback for not memory mapped DSPs */ 696 435 if (platform->driver->compr_ops && platform->driver->compr_ops->copy)
+6 -5
sound/soc/soc-dapm.c
··· 2476 2476 } 2477 2477 2478 2478 static int snd_soc_dapm_add_route(struct snd_soc_dapm_context *dapm, 2479 - const struct snd_soc_dapm_route *route) 2479 + const struct snd_soc_dapm_route *route, 2480 + unsigned int is_prefixed) 2480 2481 { 2481 2482 struct snd_soc_dapm_widget *wsource = NULL, *wsink = NULL, *w; 2482 2483 struct snd_soc_dapm_widget *wtsource = NULL, *wtsink = NULL; ··· 2487 2486 char prefixed_source[80]; 2488 2487 int ret; 2489 2488 2490 - if (dapm->codec && dapm->codec->name_prefix) { 2489 + if (dapm->codec && dapm->codec->name_prefix && !is_prefixed) { 2491 2490 snprintf(prefixed_sink, sizeof(prefixed_sink), "%s %s", 2492 2491 dapm->codec->name_prefix, route->sink); 2493 2492 sink = prefixed_sink; ··· 2615 2614 2616 2615 mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_INIT); 2617 2616 for (i = 0; i < num; i++) { 2618 - r = snd_soc_dapm_add_route(dapm, route); 2617 + r = snd_soc_dapm_add_route(dapm, route, false); 2619 2618 if (r < 0) { 2620 2619 dev_err(dapm->dev, "ASoC: Failed to add route %s -> %s -> %s\n", 2621 2620 route->source, ··· 3671 3670 cpu_dai->codec->name, r.source, 3672 3671 codec_dai->platform->name, r.sink); 3673 3672 3674 - snd_soc_dapm_add_route(&card->dapm, &r); 3673 + snd_soc_dapm_add_route(&card->dapm, &r, true); 3675 3674 } 3676 3675 3677 3676 /* connect BE DAI capture if widgets are valid */ ··· 3682 3681 codec_dai->codec->name, r.source, 3683 3682 cpu_dai->platform->name, r.sink); 3684 3683 3685 - snd_soc_dapm_add_route(&card->dapm, &r); 3684 + snd_soc_dapm_add_route(&card->dapm, &r, true); 3686 3685 } 3687 3686 3688 3687 }
+6 -3
sound/soc/soc-generic-dmaengine-pcm.c
··· 176 176 { 177 177 struct dmaengine_pcm *pcm = soc_platform_to_pcm(rtd->platform); 178 178 struct snd_dmaengine_dai_dma_data *dma_data; 179 + dma_filter_fn fn = NULL; 179 180 180 181 dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); 181 182 182 183 if ((pcm->flags & SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX) && pcm->chan[0]) 183 184 return pcm->chan[0]; 184 185 185 - if (pcm->config->compat_request_channel) 186 + if (pcm->config && pcm->config->compat_request_channel) 186 187 return pcm->config->compat_request_channel(rtd, substream); 187 188 188 - return snd_dmaengine_pcm_request_channel(pcm->config->compat_filter_fn, 189 - dma_data->filter_data); 189 + if (pcm->config) 190 + fn = pcm->config->compat_filter_fn; 191 + 192 + return snd_dmaengine_pcm_request_channel(fn, dma_data->filter_data); 190 193 } 191 194 192 195 static bool dmaengine_pcm_can_report_residue(struct dma_chan *chan)
+12 -17
sound/soc/soc-pcm.c
··· 58 58 EXPORT_SYMBOL_GPL(snd_soc_set_runtime_hwparams); 59 59 60 60 /* DPCM stream event, send event to FE and all active BEs. */ 61 - static int dpcm_dapm_stream_event(struct snd_soc_pcm_runtime *fe, int dir, 61 + int dpcm_dapm_stream_event(struct snd_soc_pcm_runtime *fe, int dir, 62 62 int event) 63 63 { 64 64 struct snd_soc_dpcm *dpcm; ··· 885 885 } 886 886 887 887 /* disconnect a BE and FE */ 888 - static void dpcm_be_disconnect(struct snd_soc_pcm_runtime *fe, int stream) 888 + void dpcm_be_disconnect(struct snd_soc_pcm_runtime *fe, int stream) 889 889 { 890 890 struct snd_soc_dpcm *dpcm, *d; 891 891 ··· 981 981 return 0; 982 982 } 983 983 984 - static int dpcm_path_get(struct snd_soc_pcm_runtime *fe, 984 + int dpcm_path_get(struct snd_soc_pcm_runtime *fe, 985 985 int stream, struct snd_soc_dapm_widget_list **list_) 986 986 { 987 987 struct snd_soc_dai *cpu_dai = fe->cpu_dai; ··· 1001 1001 1002 1002 *list_ = list; 1003 1003 return paths; 1004 - } 1005 - 1006 - static inline void dpcm_path_put(struct snd_soc_dapm_widget_list **list) 1007 - { 1008 - kfree(*list); 1009 1004 } 1010 1005 1011 1006 static int dpcm_prune_paths(struct snd_soc_pcm_runtime *fe, int stream, ··· 1072 1077 continue; 1073 1078 1074 1079 /* don't connect if FE is not running */ 1075 - if (!fe->dpcm[stream].runtime) 1080 + if (!fe->dpcm[stream].runtime && !fe->fe_compr) 1076 1081 continue; 1077 1082 1078 1083 /* newly connected FE and BE */ ··· 1097 1102 * Find the corresponding BE DAIs that source or sink audio to this 1098 1103 * FE substream. 1099 1104 */ 1100 - static int dpcm_process_paths(struct snd_soc_pcm_runtime *fe, 1105 + int dpcm_process_paths(struct snd_soc_pcm_runtime *fe, 1101 1106 int stream, struct snd_soc_dapm_widget_list **list, int new) 1102 1107 { 1103 1108 if (new) ··· 1106 1111 return dpcm_prune_paths(fe, stream, list); 1107 1112 } 1108 1113 1109 - static void dpcm_clear_pending_state(struct snd_soc_pcm_runtime *fe, int stream) 1114 + void dpcm_clear_pending_state(struct snd_soc_pcm_runtime *fe, int stream) 1110 1115 { 1111 1116 struct snd_soc_dpcm *dpcm; 1112 1117 ··· 1144 1149 } 1145 1150 } 1146 1151 1147 - static int dpcm_be_dai_startup(struct snd_soc_pcm_runtime *fe, int stream) 1152 + int dpcm_be_dai_startup(struct snd_soc_pcm_runtime *fe, int stream) 1148 1153 { 1149 1154 struct snd_soc_dpcm *dpcm; 1150 1155 int err, count = 0; ··· 1296 1301 return ret; 1297 1302 } 1298 1303 1299 - static int dpcm_be_dai_shutdown(struct snd_soc_pcm_runtime *fe, int stream) 1304 + int dpcm_be_dai_shutdown(struct snd_soc_pcm_runtime *fe, int stream) 1300 1305 { 1301 1306 struct snd_soc_dpcm *dpcm; 1302 1307 ··· 1357 1362 return 0; 1358 1363 } 1359 1364 1360 - static int dpcm_be_dai_hw_free(struct snd_soc_pcm_runtime *fe, int stream) 1365 + int dpcm_be_dai_hw_free(struct snd_soc_pcm_runtime *fe, int stream) 1361 1366 { 1362 1367 struct snd_soc_dpcm *dpcm; 1363 1368 ··· 1422 1427 return 0; 1423 1428 } 1424 1429 1425 - static int dpcm_be_dai_hw_params(struct snd_soc_pcm_runtime *fe, int stream) 1430 + int dpcm_be_dai_hw_params(struct snd_soc_pcm_runtime *fe, int stream) 1426 1431 { 1427 1432 struct snd_soc_dpcm *dpcm; 1428 1433 int ret; ··· 1552 1557 return ret; 1553 1558 } 1554 1559 1555 - static int dpcm_be_dai_trigger(struct snd_soc_pcm_runtime *fe, int stream, 1560 + int dpcm_be_dai_trigger(struct snd_soc_pcm_runtime *fe, int stream, 1556 1561 int cmd) 1557 1562 { 1558 1563 struct snd_soc_dpcm *dpcm; ··· 1720 1725 return ret; 1721 1726 } 1722 1727 1723 - static int dpcm_be_dai_prepare(struct snd_soc_pcm_runtime *fe, int stream) 1728 + int dpcm_be_dai_prepare(struct snd_soc_pcm_runtime *fe, int stream) 1724 1729 { 1725 1730 struct snd_soc_dpcm *dpcm; 1726 1731 int ret = 0;