Skip to contentSkip to conversation

ASoC: SOF: pcm: Add compress_ops for SOF platform component driver

PATCH In review Daniel Baluta 3 participants 3 messages Feb 23, 2022 – Feb 24, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: SOF: pcm: Add compress_ops for SOF platform component driver

From: Daniel Baluta <[email protected]>

Now that sof_compressed_ops initial implementation was merged we can enable it in SOF platform component driver.

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

---
 sound/soc/sof/pcm.c      | 4 ++++
 sound/soc/sof/sof-priv.h | 5 +++++
 2 files changed, 9 insertions(+)
sound/soc/sof/pcm.c +4 -0
index 137f8ed71677..a312ed855f1a 100644
@@ -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;
sound/soc/sof/sof-priv.h +5 -0
index 2c8e556cd5cc..886787a9997f 100644
@@ -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.
  */
Signature · 1 line
2.27.0
maintainer
#1 lore raw
Quoted 4 lines · Daniel Baluta

From: Daniel Baluta <[email protected]>

Now that sof_compressed_ops initial implementation was merged we can enable it in SOF platform component driver.

and fixes the following sparse error:
sound/soc/sof/compress.c:310:25: error: symbol 'sof_compressed_ops' was not declared. Should it be static?

Quoted 2 lines

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

Back at that time there were _no_ sof_compressed_ops in the tree...

Quoted 27 lines
---
 sound/soc/sof/pcm.c      | 4 ++++
 sound/soc/sof/sof-priv.h | 5 +++++
 2 files changed, 9 insertions(+)
sound/soc/sof/pcm.c +4 -0
index 137f8ed71677..a312ed855f1a 100644
@@ -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;
sound/soc/sof/sof-priv.h +0 -0
index 2c8e556cd5cc..886787a9997f 100644

sound/soc/sof/sof-priv.h int snd_sof_debugfs_add_region_item_iomem(struct snd_sof_dev *sdev, · line 562

Quoted 7 lines
sound/soc/sof/sof-priv.h +4 -0
@@ -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;

This is not really platform ops?

Quoted 4 lines
sound/soc/sof/sof-priv.h +1 -0
+
 /*
  * DSP Architectures.
  */
Signature · 1 line
Péter
maintainer
#2 lore raw
In reply to Daniel Baluta
Quoted 9 lines · Daniel Baluta

From: Daniel Baluta <[email protected]>

Now that sof_compressed_ops initial implementation was merged we can enable it in SOF platform component driver.

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

[...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: SOF: pcm: Add compress_ops for SOF platform component driver

      commit: 76cdd90b27b4e7379ce4d9032dda1927ac69ad01

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark