ASoC: component: Add generic PCM copy ops
[linux-2.6-block.git] / sound / soc / soc-pcm.c
index 8896227e4fb76000dec354b6ddf7af6431684900..71403da28d3739345c58bee3e75237010cb53522 100644 (file)
@@ -2973,7 +2973,9 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
                        rtd->ops.ioctl          = snd_soc_pcm_component_ioctl;
                if (drv->sync_stop)
                        rtd->ops.sync_stop      = snd_soc_pcm_component_sync_stop;
-               if (drv->copy_user)
+               if (drv->copy)
+                       rtd->ops.copy           = snd_soc_pcm_component_copy;
+               else if (drv->copy_user)
                        rtd->ops.copy_user      = snd_soc_pcm_component_copy_user;
                if (drv->page)
                        rtd->ops.page           = snd_soc_pcm_component_page;