diff options
Diffstat (limited to 'sound/soc/sh/rcar/core.c')
-rw-r--r-- | sound/soc/sh/rcar/core.c | 250 |
1 files changed, 170 insertions, 80 deletions
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 89424470a1f3..91880156e1ae 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c | |||
@@ -255,11 +255,81 @@ int rsnd_dma_available(struct rsnd_dma *dma) | |||
255 | return !!dma->chan; | 255 | return !!dma->chan; |
256 | } | 256 | } |
257 | 257 | ||
258 | #define DMA_NAME_SIZE 16 | ||
259 | #define MOD_MAX 4 /* MEM/SSI/SRC/DVC */ | ||
260 | static int _rsnd_dma_of_name(char *dma_name, struct rsnd_mod *mod) | ||
261 | { | ||
262 | if (mod) | ||
263 | return snprintf(dma_name, DMA_NAME_SIZE / 2, "%s%d", | ||
264 | rsnd_mod_name(mod), rsnd_mod_id(mod)); | ||
265 | else | ||
266 | return snprintf(dma_name, DMA_NAME_SIZE / 2, "mem"); | ||
267 | |||
268 | } | ||
269 | |||
270 | static void rsnd_dma_of_name(struct rsnd_dma *dma, | ||
271 | int is_play, char *dma_name) | ||
272 | { | ||
273 | struct rsnd_mod *this = rsnd_dma_to_mod(dma); | ||
274 | struct rsnd_dai_stream *io = rsnd_mod_to_io(this); | ||
275 | struct rsnd_mod *ssi = rsnd_io_to_mod_ssi(io); | ||
276 | struct rsnd_mod *src = rsnd_io_to_mod_src(io); | ||
277 | struct rsnd_mod *dvc = rsnd_io_to_mod_dvc(io); | ||
278 | struct rsnd_mod *mod[MOD_MAX]; | ||
279 | struct rsnd_mod *src_mod, *dst_mod; | ||
280 | int i, index; | ||
281 | |||
282 | |||
283 | for (i = 0; i < MOD_MAX; i++) | ||
284 | mod[i] = NULL; | ||
285 | |||
286 | /* | ||
287 | * in play case... | ||
288 | * | ||
289 | * src -> dst | ||
290 | * | ||
291 | * mem -> SSI | ||
292 | * mem -> SRC -> SSI | ||
293 | * mem -> SRC -> DVC -> SSI | ||
294 | */ | ||
295 | mod[0] = NULL; /* for "mem" */ | ||
296 | index = 1; | ||
297 | for (i = 1; i < MOD_MAX; i++) { | ||
298 | if (!src) { | ||
299 | mod[i] = ssi; | ||
300 | break; | ||
301 | } else if (!dvc) { | ||
302 | mod[i] = src; | ||
303 | src = NULL; | ||
304 | } else { | ||
305 | mod[i] = dvc; | ||
306 | dvc = NULL; | ||
307 | } | ||
308 | |||
309 | if (mod[i] == this) | ||
310 | index = i; | ||
311 | } | ||
312 | |||
313 | if (is_play) { | ||
314 | src_mod = mod[index - 1]; | ||
315 | dst_mod = mod[index]; | ||
316 | } else { | ||
317 | src_mod = mod[index]; | ||
318 | dst_mod = mod[index + 1]; | ||
319 | } | ||
320 | |||
321 | index = 0; | ||
322 | index = _rsnd_dma_of_name(dma_name + index, src_mod); | ||
323 | *(dma_name + index++) = '_'; | ||
324 | index = _rsnd_dma_of_name(dma_name + index, dst_mod); | ||
325 | } | ||
326 | |||
258 | int rsnd_dma_init(struct rsnd_priv *priv, struct rsnd_dma *dma, | 327 | int rsnd_dma_init(struct rsnd_priv *priv, struct rsnd_dma *dma, |
259 | int is_play, int id) | 328 | int is_play, int id) |
260 | { | 329 | { |
261 | struct device *dev = rsnd_priv_to_dev(priv); | 330 | struct device *dev = rsnd_priv_to_dev(priv); |
262 | struct dma_slave_config cfg; | 331 | struct dma_slave_config cfg; |
332 | char dma_name[DMA_NAME_SIZE]; | ||
263 | dma_cap_mask_t mask; | 333 | dma_cap_mask_t mask; |
264 | int ret; | 334 | int ret; |
265 | 335 | ||
@@ -271,18 +341,23 @@ int rsnd_dma_init(struct rsnd_priv *priv, struct rsnd_dma *dma, | |||
271 | dma_cap_zero(mask); | 341 | dma_cap_zero(mask); |
272 | dma_cap_set(DMA_SLAVE, mask); | 342 | dma_cap_set(DMA_SLAVE, mask); |
273 | 343 | ||
344 | if (dev->of_node) | ||
345 | rsnd_dma_of_name(dma, is_play, dma_name); | ||
346 | else | ||
347 | snprintf(dma_name, DMA_NAME_SIZE, | ||
348 | is_play ? "tx" : "rx"); | ||
349 | |||
350 | dev_dbg(dev, "dma name : %s\n", dma_name); | ||
351 | |||
274 | dma->chan = dma_request_slave_channel_compat(mask, shdma_chan_filter, | 352 | dma->chan = dma_request_slave_channel_compat(mask, shdma_chan_filter, |
275 | (void *)id, dev, | 353 | (void *)id, dev, |
276 | is_play ? "tx" : "rx"); | 354 | dma_name); |
277 | if (!dma->chan) { | 355 | if (!dma->chan) { |
278 | dev_err(dev, "can't get dma channel\n"); | 356 | dev_err(dev, "can't get dma channel\n"); |
279 | return -EIO; | 357 | return -EIO; |
280 | } | 358 | } |
281 | 359 | ||
282 | cfg.slave_id = id; | 360 | rsnd_gen_dma_addr(priv, dma, &cfg, is_play, id); |
283 | cfg.dst_addr = 0; /* use default addr when playback */ | ||
284 | cfg.src_addr = 0; /* use default addr when capture */ | ||
285 | cfg.direction = is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM; | ||
286 | 361 | ||
287 | ret = dmaengine_slave_config(dma->chan, &cfg); | 362 | ret = dmaengine_slave_config(dma->chan, &cfg); |
288 | if (ret < 0) | 363 | if (ret < 0) |
@@ -309,23 +384,49 @@ void rsnd_dma_quit(struct rsnd_priv *priv, | |||
309 | } | 384 | } |
310 | 385 | ||
311 | /* | 386 | /* |
387 | * settting function | ||
388 | */ | ||
389 | u32 rsnd_get_adinr(struct rsnd_mod *mod) | ||
390 | { | ||
391 | struct rsnd_priv *priv = rsnd_mod_to_priv(mod); | ||
392 | struct rsnd_dai_stream *io = rsnd_mod_to_io(mod); | ||
393 | struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); | ||
394 | struct device *dev = rsnd_priv_to_dev(priv); | ||
395 | u32 adinr = runtime->channels; | ||
396 | |||
397 | switch (runtime->sample_bits) { | ||
398 | case 16: | ||
399 | adinr |= (8 << 16); | ||
400 | break; | ||
401 | case 32: | ||
402 | adinr |= (0 << 16); | ||
403 | break; | ||
404 | default: | ||
405 | dev_warn(dev, "not supported sample bits\n"); | ||
406 | return 0; | ||
407 | } | ||
408 | |||
409 | return adinr; | ||
410 | } | ||
411 | |||
412 | /* | ||
312 | * rsnd_dai functions | 413 | * rsnd_dai functions |
313 | */ | 414 | */ |
314 | #define __rsnd_mod_call(mod, func, rdai, io) \ | 415 | #define __rsnd_mod_call(mod, func, rdai...) \ |
315 | ({ \ | 416 | ({ \ |
316 | struct rsnd_priv *priv = rsnd_mod_to_priv(mod); \ | 417 | struct rsnd_priv *priv = rsnd_mod_to_priv(mod); \ |
317 | struct device *dev = rsnd_priv_to_dev(priv); \ | 418 | struct device *dev = rsnd_priv_to_dev(priv); \ |
318 | dev_dbg(dev, "%s [%d] %s\n", \ | 419 | dev_dbg(dev, "%s [%d] %s\n", \ |
319 | rsnd_mod_name(mod), rsnd_mod_id(mod), #func); \ | 420 | rsnd_mod_name(mod), rsnd_mod_id(mod), #func); \ |
320 | (mod)->ops->func(mod, rdai, io); \ | 421 | (mod)->ops->func(mod, rdai); \ |
321 | }) | 422 | }) |
322 | 423 | ||
323 | #define rsnd_mod_call(mod, func, rdai, io) \ | 424 | #define rsnd_mod_call(mod, func, rdai...) \ |
324 | (!(mod) ? -ENODEV : \ | 425 | (!(mod) ? -ENODEV : \ |
325 | !((mod)->ops->func) ? 0 : \ | 426 | !((mod)->ops->func) ? 0 : \ |
326 | __rsnd_mod_call(mod, func, (rdai), (io))) | 427 | __rsnd_mod_call(mod, func, rdai)) |
327 | 428 | ||
328 | #define rsnd_dai_call(rdai, io, fn) \ | 429 | #define rsnd_dai_call(fn, io, rdai...) \ |
329 | ({ \ | 430 | ({ \ |
330 | struct rsnd_mod *mod; \ | 431 | struct rsnd_mod *mod; \ |
331 | int ret = 0, i; \ | 432 | int ret = 0, i; \ |
@@ -333,7 +434,7 @@ void rsnd_dma_quit(struct rsnd_priv *priv, | |||
333 | mod = (io)->mod[i]; \ | 434 | mod = (io)->mod[i]; \ |
334 | if (!mod) \ | 435 | if (!mod) \ |
335 | continue; \ | 436 | continue; \ |
336 | ret = rsnd_mod_call(mod, fn, (rdai), (io)); \ | 437 | ret = rsnd_mod_call(mod, fn, rdai); \ |
337 | if (ret < 0) \ | 438 | if (ret < 0) \ |
338 | break; \ | 439 | break; \ |
339 | } \ | 440 | } \ |
@@ -467,10 +568,7 @@ static int rsnd_soc_dai_trigger(struct snd_pcm_substream *substream, int cmd, | |||
467 | struct rsnd_priv *priv = snd_soc_dai_get_drvdata(dai); | 568 | struct rsnd_priv *priv = snd_soc_dai_get_drvdata(dai); |
468 | struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai); | 569 | struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai); |
469 | struct rsnd_dai_stream *io = rsnd_rdai_to_io(rdai, substream); | 570 | struct rsnd_dai_stream *io = rsnd_rdai_to_io(rdai, substream); |
470 | struct rsnd_mod *mod = rsnd_ssi_mod_get_frm_dai(priv, | 571 | int ssi_id = rsnd_mod_id(rsnd_io_to_mod_ssi(io)); |
471 | rsnd_dai_id(priv, rdai), | ||
472 | rsnd_dai_is_play(rdai, io)); | ||
473 | int ssi_id = rsnd_mod_id(mod); | ||
474 | int ret; | 572 | int ret; |
475 | unsigned long flags; | 573 | unsigned long flags; |
476 | 574 | ||
@@ -486,20 +584,20 @@ static int rsnd_soc_dai_trigger(struct snd_pcm_substream *substream, int cmd, | |||
486 | if (ret < 0) | 584 | if (ret < 0) |
487 | goto dai_trigger_end; | 585 | goto dai_trigger_end; |
488 | 586 | ||
489 | ret = rsnd_dai_call(rdai, io, init); | 587 | ret = rsnd_dai_call(init, io, rdai); |
490 | if (ret < 0) | 588 | if (ret < 0) |
491 | goto dai_trigger_end; | 589 | goto dai_trigger_end; |
492 | 590 | ||
493 | ret = rsnd_dai_call(rdai, io, start); | 591 | ret = rsnd_dai_call(start, io, rdai); |
494 | if (ret < 0) | 592 | if (ret < 0) |
495 | goto dai_trigger_end; | 593 | goto dai_trigger_end; |
496 | break; | 594 | break; |
497 | case SNDRV_PCM_TRIGGER_STOP: | 595 | case SNDRV_PCM_TRIGGER_STOP: |
498 | ret = rsnd_dai_call(rdai, io, stop); | 596 | ret = rsnd_dai_call(stop, io, rdai); |
499 | if (ret < 0) | 597 | if (ret < 0) |
500 | goto dai_trigger_end; | 598 | goto dai_trigger_end; |
501 | 599 | ||
502 | ret = rsnd_dai_call(rdai, io, quit); | 600 | ret = rsnd_dai_call(quit, io, rdai); |
503 | if (ret < 0) | 601 | if (ret < 0) |
504 | goto dai_trigger_end; | 602 | goto dai_trigger_end; |
505 | 603 | ||
@@ -578,15 +676,27 @@ static const struct snd_soc_dai_ops rsnd_soc_dai_ops = { | |||
578 | .set_fmt = rsnd_soc_dai_set_fmt, | 676 | .set_fmt = rsnd_soc_dai_set_fmt, |
579 | }; | 677 | }; |
580 | 678 | ||
679 | #define rsnd_path_parse(priv, io, type) \ | ||
680 | ({ \ | ||
681 | struct rsnd_mod *mod; \ | ||
682 | int ret = 0; \ | ||
683 | int id = -1; \ | ||
684 | \ | ||
685 | if (rsnd_is_enable_path(io, type)) { \ | ||
686 | id = rsnd_info_id(priv, io, type); \ | ||
687 | if (id >= 0) { \ | ||
688 | mod = rsnd_##type##_mod_get(priv, id); \ | ||
689 | ret = rsnd_dai_connect(mod, io); \ | ||
690 | } \ | ||
691 | } \ | ||
692 | ret; \ | ||
693 | }) | ||
694 | |||
581 | static int rsnd_path_init(struct rsnd_priv *priv, | 695 | static int rsnd_path_init(struct rsnd_priv *priv, |
582 | struct rsnd_dai *rdai, | 696 | struct rsnd_dai *rdai, |
583 | struct rsnd_dai_stream *io) | 697 | struct rsnd_dai_stream *io) |
584 | { | 698 | { |
585 | struct rsnd_mod *mod; | ||
586 | struct rsnd_dai_platform_info *dai_info = rdai->info; | ||
587 | int ret; | 699 | int ret; |
588 | int ssi_id = -1; | ||
589 | int src_id = -1; | ||
590 | 700 | ||
591 | /* | 701 | /* |
592 | * Gen1 is created by SRU/SSI, and this SRU is base module of | 702 | * Gen1 is created by SRU/SSI, and this SRU is base module of |
@@ -598,38 +708,21 @@ static int rsnd_path_init(struct rsnd_priv *priv, | |||
598 | * Gen2 SCU path is very flexible, but, Gen1 SRU (SCU parts) is | 708 | * Gen2 SCU path is very flexible, but, Gen1 SRU (SCU parts) is |
599 | * using fixed path. | 709 | * using fixed path. |
600 | */ | 710 | */ |
601 | if (dai_info) { | ||
602 | if (rsnd_is_enable_path(io, ssi)) | ||
603 | ssi_id = rsnd_info_id(priv, io, ssi); | ||
604 | if (rsnd_is_enable_path(io, src)) | ||
605 | src_id = rsnd_info_id(priv, io, src); | ||
606 | } else { | ||
607 | /* get SSI's ID */ | ||
608 | mod = rsnd_ssi_mod_get_frm_dai(priv, | ||
609 | rsnd_dai_id(priv, rdai), | ||
610 | rsnd_dai_is_play(rdai, io)); | ||
611 | if (!mod) | ||
612 | return 0; | ||
613 | ssi_id = src_id = rsnd_mod_id(mod); | ||
614 | } | ||
615 | |||
616 | ret = 0; | ||
617 | 711 | ||
618 | /* SRC */ | 712 | /* SRC */ |
619 | if (src_id >= 0) { | 713 | ret = rsnd_path_parse(priv, io, src); |
620 | mod = rsnd_src_mod_get(priv, src_id); | 714 | if (ret < 0) |
621 | ret = rsnd_dai_connect(mod, io); | 715 | return ret; |
622 | if (ret < 0) | ||
623 | return ret; | ||
624 | } | ||
625 | 716 | ||
626 | /* SSI */ | 717 | /* SSI */ |
627 | if (ssi_id >= 0) { | 718 | ret = rsnd_path_parse(priv, io, ssi); |
628 | mod = rsnd_ssi_mod_get(priv, ssi_id); | 719 | if (ret < 0) |
629 | ret = rsnd_dai_connect(mod, io); | 720 | return ret; |
630 | if (ret < 0) | 721 | |
631 | return ret; | 722 | /* DVC */ |
632 | } | 723 | ret = rsnd_path_parse(priv, io, dvc); |
724 | if (ret < 0) | ||
725 | return ret; | ||
633 | 726 | ||
634 | return ret; | 727 | return ret; |
635 | } | 728 | } |
@@ -725,30 +818,15 @@ static int rsnd_dai_probe(struct platform_device *pdev, | |||
725 | struct snd_soc_dai_driver *drv; | 818 | struct snd_soc_dai_driver *drv; |
726 | struct rcar_snd_info *info = rsnd_priv_to_info(priv); | 819 | struct rcar_snd_info *info = rsnd_priv_to_info(priv); |
727 | struct rsnd_dai *rdai; | 820 | struct rsnd_dai *rdai; |
728 | struct rsnd_mod *pmod, *cmod; | 821 | struct rsnd_ssi_platform_info *pmod, *cmod; |
729 | struct device *dev = rsnd_priv_to_dev(priv); | 822 | struct device *dev = rsnd_priv_to_dev(priv); |
730 | int dai_nr; | 823 | int dai_nr; |
731 | int i; | 824 | int i; |
732 | 825 | ||
733 | rsnd_of_parse_dai(pdev, of_data, priv); | 826 | rsnd_of_parse_dai(pdev, of_data, priv); |
734 | 827 | ||
735 | /* | ||
736 | * dai_nr should be set via dai_info_nr, | ||
737 | * but allow it to keeping compatible | ||
738 | */ | ||
739 | dai_nr = info->dai_info_nr; | 828 | dai_nr = info->dai_info_nr; |
740 | if (!dai_nr) { | 829 | if (!dai_nr) { |
741 | /* get max dai nr */ | ||
742 | for (dai_nr = 0; dai_nr < 32; dai_nr++) { | ||
743 | pmod = rsnd_ssi_mod_get_frm_dai(priv, dai_nr, 1); | ||
744 | cmod = rsnd_ssi_mod_get_frm_dai(priv, dai_nr, 0); | ||
745 | |||
746 | if (!pmod && !cmod) | ||
747 | break; | ||
748 | } | ||
749 | } | ||
750 | |||
751 | if (!dai_nr) { | ||
752 | dev_err(dev, "no dai\n"); | 830 | dev_err(dev, "no dai\n"); |
753 | return -EIO; | 831 | return -EIO; |
754 | } | 832 | } |
@@ -765,11 +843,10 @@ static int rsnd_dai_probe(struct platform_device *pdev, | |||
765 | priv->rdai = rdai; | 843 | priv->rdai = rdai; |
766 | 844 | ||
767 | for (i = 0; i < dai_nr; i++) { | 845 | for (i = 0; i < dai_nr; i++) { |
768 | if (info->dai_info) | 846 | rdai[i].info = &info->dai_info[i]; |
769 | rdai[i].info = &info->dai_info[i]; | ||
770 | 847 | ||
771 | pmod = rsnd_ssi_mod_get_frm_dai(priv, i, 1); | 848 | pmod = rdai[i].info->playback.ssi; |
772 | cmod = rsnd_ssi_mod_get_frm_dai(priv, i, 0); | 849 | cmod = rdai[i].info->capture.ssi; |
773 | 850 | ||
774 | /* | 851 | /* |
775 | * init rsnd_dai | 852 | * init rsnd_dai |
@@ -787,8 +864,7 @@ static int rsnd_dai_probe(struct platform_device *pdev, | |||
787 | drv[i].playback.channels_min = 2; | 864 | drv[i].playback.channels_min = 2; |
788 | drv[i].playback.channels_max = 2; | 865 | drv[i].playback.channels_max = 2; |
789 | 866 | ||
790 | if (info->dai_info) | 867 | rdai[i].playback.info = &info->dai_info[i].playback; |
791 | rdai[i].playback.info = &info->dai_info[i].playback; | ||
792 | rsnd_path_init(priv, &rdai[i], &rdai[i].playback); | 868 | rsnd_path_init(priv, &rdai[i], &rdai[i].playback); |
793 | } | 869 | } |
794 | if (cmod) { | 870 | if (cmod) { |
@@ -797,8 +873,7 @@ static int rsnd_dai_probe(struct platform_device *pdev, | |||
797 | drv[i].capture.channels_min = 2; | 873 | drv[i].capture.channels_min = 2; |
798 | drv[i].capture.channels_max = 2; | 874 | drv[i].capture.channels_max = 2; |
799 | 875 | ||
800 | if (info->dai_info) | 876 | rdai[i].capture.info = &info->dai_info[i].capture; |
801 | rdai[i].capture.info = &info->dai_info[i].capture; | ||
802 | rsnd_path_init(priv, &rdai[i], &rdai[i].capture); | 877 | rsnd_path_init(priv, &rdai[i], &rdai[i].capture); |
803 | } | 878 | } |
804 | 879 | ||
@@ -873,6 +948,20 @@ static struct snd_pcm_ops rsnd_pcm_ops = { | |||
873 | 948 | ||
874 | static int rsnd_pcm_new(struct snd_soc_pcm_runtime *rtd) | 949 | static int rsnd_pcm_new(struct snd_soc_pcm_runtime *rtd) |
875 | { | 950 | { |
951 | struct rsnd_priv *priv = snd_soc_dai_get_drvdata(rtd->cpu_dai); | ||
952 | struct rsnd_dai *rdai; | ||
953 | int i, ret; | ||
954 | |||
955 | for_each_rsnd_dai(rdai, priv, i) { | ||
956 | ret = rsnd_dai_call(pcm_new, &rdai->playback, rdai, rtd); | ||
957 | if (ret) | ||
958 | return ret; | ||
959 | |||
960 | ret = rsnd_dai_call(pcm_new, &rdai->capture, rdai, rtd); | ||
961 | if (ret) | ||
962 | return ret; | ||
963 | } | ||
964 | |||
876 | return snd_pcm_lib_preallocate_pages_for_all( | 965 | return snd_pcm_lib_preallocate_pages_for_all( |
877 | rtd->pcm, | 966 | rtd->pcm, |
878 | SNDRV_DMA_TYPE_DEV, | 967 | SNDRV_DMA_TYPE_DEV, |
@@ -912,6 +1001,7 @@ static int rsnd_probe(struct platform_device *pdev) | |||
912 | rsnd_gen_probe, | 1001 | rsnd_gen_probe, |
913 | rsnd_ssi_probe, | 1002 | rsnd_ssi_probe, |
914 | rsnd_src_probe, | 1003 | rsnd_src_probe, |
1004 | rsnd_dvc_probe, | ||
915 | rsnd_adg_probe, | 1005 | rsnd_adg_probe, |
916 | rsnd_dai_probe, | 1006 | rsnd_dai_probe, |
917 | }; | 1007 | }; |
@@ -941,7 +1031,7 @@ static int rsnd_probe(struct platform_device *pdev) | |||
941 | return -ENODEV; | 1031 | return -ENODEV; |
942 | } | 1032 | } |
943 | 1033 | ||
944 | priv->dev = dev; | 1034 | priv->pdev = pdev; |
945 | priv->info = info; | 1035 | priv->info = info; |
946 | spin_lock_init(&priv->lock); | 1036 | spin_lock_init(&priv->lock); |
947 | 1037 | ||
@@ -955,11 +1045,11 @@ static int rsnd_probe(struct platform_device *pdev) | |||
955 | } | 1045 | } |
956 | 1046 | ||
957 | for_each_rsnd_dai(rdai, priv, i) { | 1047 | for_each_rsnd_dai(rdai, priv, i) { |
958 | ret = rsnd_dai_call(rdai, &rdai->playback, probe); | 1048 | ret = rsnd_dai_call(probe, &rdai->playback, rdai); |
959 | if (ret) | 1049 | if (ret) |
960 | return ret; | 1050 | return ret; |
961 | 1051 | ||
962 | ret = rsnd_dai_call(rdai, &rdai->capture, probe); | 1052 | ret = rsnd_dai_call(probe, &rdai->capture, rdai); |
963 | if (ret) | 1053 | if (ret) |
964 | return ret; | 1054 | return ret; |
965 | } | 1055 | } |
@@ -1002,11 +1092,11 @@ static int rsnd_remove(struct platform_device *pdev) | |||
1002 | pm_runtime_disable(&pdev->dev); | 1092 | pm_runtime_disable(&pdev->dev); |
1003 | 1093 | ||
1004 | for_each_rsnd_dai(rdai, priv, i) { | 1094 | for_each_rsnd_dai(rdai, priv, i) { |
1005 | ret = rsnd_dai_call(rdai, &rdai->playback, remove); | 1095 | ret = rsnd_dai_call(remove, &rdai->playback, rdai); |
1006 | if (ret) | 1096 | if (ret) |
1007 | return ret; | 1097 | return ret; |
1008 | 1098 | ||
1009 | ret = rsnd_dai_call(rdai, &rdai->capture, remove); | 1099 | ret = rsnd_dai_call(remove, &rdai->capture, rdai); |
1010 | if (ret) | 1100 | if (ret) |
1011 | return ret; | 1101 | return ret; |
1012 | } | 1102 | } |