ASoC: sof: use snd_compress_ops
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 20 Apr 2020 07:09:48 +0000 (16:09 +0900)
committerMark Brown <broonie@kernel.org>
Tue, 21 Apr 2020 18:01:58 +0000 (19:01 +0100)
We can use snd_compress_ops.
Let's switch to use it.

Upstream code doesn't have sof_compressed_ops.
This patch assume it is implemented at out-of-tree.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87o8rmvdj7.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/compress.c
sound/soc/sof/compress.h
sound/soc/sof/pcm.c
sound/soc/sof/sof-priv.h

index 7354dc6a49cf886da9705b5d54f37945fb2aee41..7294451cd67cc71d07a5e7a2fbc9c76d06b5b545 100644 (file)
@@ -13,7 +13,7 @@
 #include "ops.h"
 #include "probe.h"
 
-struct snd_compr_ops sof_probe_compressed_ops = {
+struct snd_compress_ops sof_probe_compressed_ops = {
        .copy           = sof_probe_compr_copy,
 };
 EXPORT_SYMBOL(sof_probe_compressed_ops);
@@ -117,8 +117,9 @@ int sof_probe_compr_pointer(struct snd_compr_stream *cstream,
 }
 EXPORT_SYMBOL(sof_probe_compr_pointer);
 
-int sof_probe_compr_copy(struct snd_compr_stream *cstream,
-               char __user *buf, size_t count)
+int sof_probe_compr_copy(struct snd_soc_component *component,
+                        struct snd_compr_stream *cstream,
+                        char __user *buf, size_t count)
 {
        struct snd_compr_runtime *rtd = cstream->runtime;
        unsigned int offset, n;
index 800f163603e1e10bf7832c84c1b306dc3bccbc68..0386844c0bf579d12dd770105389ca02c424dcf5 100644 (file)
@@ -13,7 +13,7 @@
 
 #include <sound/compress_driver.h>
 
-extern struct snd_compr_ops sof_probe_compressed_ops;
+extern struct snd_compress_ops sof_probe_compressed_ops;
 
 int sof_probe_compr_open(struct snd_compr_stream *cstream,
                struct snd_soc_dai *dai);
@@ -25,7 +25,8 @@ int sof_probe_compr_trigger(struct snd_compr_stream *cstream, int cmd,
                struct snd_soc_dai *dai);
 int sof_probe_compr_pointer(struct snd_compr_stream *cstream,
                struct snd_compr_tstamp *tstamp, struct snd_soc_dai *dai);
-int sof_probe_compr_copy(struct snd_compr_stream *cstream,
-               char __user *buf, size_t count);
+int sof_probe_compr_copy(struct snd_soc_component *component,
+                        struct snd_compr_stream *cstream,
+                        char __user *buf, size_t count);
 
 #endif
index 47cd741f2a8c74eacb91dfc27b7b923d6022c143..0885826adb6cdce32691142b6f36b9f62f0134fb 100644 (file)
@@ -785,11 +785,11 @@ void snd_sof_new_platform_drv(struct snd_sof_dev *sdev)
        pd->pointer = sof_pcm_pointer;
 
 #if IS_ENABLED(CONFIG_SND_SOC_SOF_COMPRESS)
-       pd->compr_ops = &sof_compressed_ops;
+       pd->compress_ops = &sof_compressed_ops;
 #endif
 #if IS_ENABLED(CONFIG_SND_SOC_SOF_DEBUG_PROBES)
        /* override cops when probe support is enabled */
-       pd->compr_ops = &sof_probe_compressed_ops;
+       pd->compress_ops = &sof_probe_compressed_ops;
 #endif
        pd->pcm_construct = sof_pcm_new;
        pd->ignore_machine = drv_name;
index a4b297c842dfceb0d91eb6a1013d636e71ba7528..965b9da696d5b170568f324c1b874d905b4c27a5 100644 (file)
@@ -522,7 +522,7 @@ void snd_sof_handle_fw_exception(struct snd_sof_dev *sdev);
 /*
  * Platform specific ops.
  */
-extern struct snd_compr_ops sof_compressed_ops;
+extern struct snd_compress_ops sof_compressed_ops;
 
 /*
  * DSP Architectures.