]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ASoC: SOF: pcm: Add compress_ops for SOF platform component driver
authorDaniel Baluta <daniel.baluta@nxp.com>
Wed, 23 Feb 2022 15:38:49 +0000 (17:38 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 24 Feb 2022 02:04:39 +0000 (02:04 +0000)
Now that sof_compressed_ops initial implementation was merged
we can enable it in SOF platform component driver.

This partially reverts commit
ee92dfe8c020 ("ASoC: SOF: pcm: Remove non existent CONFIG_SND_SOC_SOF_COMPRESS reference")

Reported-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20220223153849.84471-1-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/pcm.c
sound/soc/sof/sof-priv.h

index 137f8ed71677af008f6497f66927e070ce809707..a312ed855f1abe0c93c66eaedc7a87c40917f36f 100644 (file)
@@ -922,6 +922,10 @@ void snd_sof_new_platform_drv(struct snd_sof_dev *sdev)
        pd->pointer = sof_pcm_pointer;
        pd->ack = sof_pcm_ack;
 
+#if IS_ENABLED(CONFIG_SND_SOC_SOF_COMPRESS)
+       pd->compress_ops = &sof_compressed_ops;
+#endif
+
        pd->pcm_construct = sof_pcm_new;
        pd->ignore_machine = drv_name;
        pd->be_hw_params_fixup = sof_pcm_dai_link_fixup;
index 2c8e556cd5cc9d7af75f5bca8689c9bee4a05cb5..886787a9997fb367208118c5d9801f1a441faac4 100644 (file)
@@ -556,6 +556,11 @@ int snd_sof_debugfs_add_region_item_iomem(struct snd_sof_dev *sdev,
                enum snd_sof_fw_blk_type blk_type, u32 offset, size_t size,
                const char *name, enum sof_debugfs_access_type access_type);
 
+/*
+ * Platform specific ops.
+ */
+extern struct snd_compress_ops sof_compressed_ops;
+
 /*
  * DSP Architectures.
  */