Commit 39118ce5 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: sof: use snd_compress_ops

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: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87o8rmvdj7.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent c60e4459
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "ops.h" #include "ops.h"
#include "probe.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, .copy = sof_probe_compr_copy,
}; };
EXPORT_SYMBOL(sof_probe_compressed_ops); EXPORT_SYMBOL(sof_probe_compressed_ops);
...@@ -117,8 +117,9 @@ int sof_probe_compr_pointer(struct snd_compr_stream *cstream, ...@@ -117,8 +117,9 @@ int sof_probe_compr_pointer(struct snd_compr_stream *cstream,
} }
EXPORT_SYMBOL(sof_probe_compr_pointer); EXPORT_SYMBOL(sof_probe_compr_pointer);
int sof_probe_compr_copy(struct snd_compr_stream *cstream, int sof_probe_compr_copy(struct snd_soc_component *component,
char __user *buf, size_t count) struct snd_compr_stream *cstream,
char __user *buf, size_t count)
{ {
struct snd_compr_runtime *rtd = cstream->runtime; struct snd_compr_runtime *rtd = cstream->runtime;
unsigned int offset, n; unsigned int offset, n;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include <sound/compress_driver.h> #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, int sof_probe_compr_open(struct snd_compr_stream *cstream,
struct snd_soc_dai *dai); struct snd_soc_dai *dai);
...@@ -25,7 +25,8 @@ int sof_probe_compr_trigger(struct snd_compr_stream *cstream, int cmd, ...@@ -25,7 +25,8 @@ int sof_probe_compr_trigger(struct snd_compr_stream *cstream, int cmd,
struct snd_soc_dai *dai); struct snd_soc_dai *dai);
int sof_probe_compr_pointer(struct snd_compr_stream *cstream, int sof_probe_compr_pointer(struct snd_compr_stream *cstream,
struct snd_compr_tstamp *tstamp, struct snd_soc_dai *dai); struct snd_compr_tstamp *tstamp, struct snd_soc_dai *dai);
int sof_probe_compr_copy(struct snd_compr_stream *cstream, int sof_probe_compr_copy(struct snd_soc_component *component,
char __user *buf, size_t count); struct snd_compr_stream *cstream,
char __user *buf, size_t count);
#endif #endif
...@@ -785,11 +785,11 @@ void snd_sof_new_platform_drv(struct snd_sof_dev *sdev) ...@@ -785,11 +785,11 @@ void snd_sof_new_platform_drv(struct snd_sof_dev *sdev)
pd->pointer = sof_pcm_pointer; pd->pointer = sof_pcm_pointer;
#if IS_ENABLED(CONFIG_SND_SOC_SOF_COMPRESS) #if IS_ENABLED(CONFIG_SND_SOC_SOF_COMPRESS)
pd->compr_ops = &sof_compressed_ops; pd->compress_ops = &sof_compressed_ops;
#endif #endif
#if IS_ENABLED(CONFIG_SND_SOC_SOF_DEBUG_PROBES) #if IS_ENABLED(CONFIG_SND_SOC_SOF_DEBUG_PROBES)
/* override cops when probe support is enabled */ /* override cops when probe support is enabled */
pd->compr_ops = &sof_probe_compressed_ops; pd->compress_ops = &sof_probe_compressed_ops;
#endif #endif
pd->pcm_construct = sof_pcm_new; pd->pcm_construct = sof_pcm_new;
pd->ignore_machine = drv_name; pd->ignore_machine = drv_name;
......
...@@ -522,7 +522,7 @@ void snd_sof_handle_fw_exception(struct snd_sof_dev *sdev); ...@@ -522,7 +522,7 @@ void snd_sof_handle_fw_exception(struct snd_sof_dev *sdev);
/* /*
* Platform specific ops. * Platform specific ops.
*/ */
extern struct snd_compr_ops sof_compressed_ops; extern struct snd_compress_ops sof_compressed_ops;
/* /*
* DSP Architectures. * DSP Architectures.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment