Re: [PATCH v3 11/11] ASoC: SOF: Intel: Add Probe compress CPU DAIs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm not really happy with the changes inside pcm.c


On Tue, 2020-01-28 at 11:43 +0100, Cezary Rojewski wrote:
> --- a/sound/soc/sof/pcm.c
> +++ b/sound/soc/sof/pcm.c
> @@ -756,6 +756,15 @@ static void sof_pcm_remove(struct
> snd_soc_component *component)
>         snd_soc_tplg_component_remove(component,
> SND_SOC_TPLG_INDEX_ALL);
>  }
>  
> +#if IS_ENABLED(CONFIG_SND_SOC_SOF_DEBUG_PROBES)
> +#include "compress.h"
> +
> struct snd_compr_ops sof_compressed_ops = {+
> +       .copy           = sof_probe_compr_copy,
> +};
> +EXPORT_SYMBOL(sof_compressed_ops);
> +#endif
> +

Maybe call this structure sof_probe_compressed ops. Othwerwise you will
conflict with the real sof_compressed_ops.


>  void snd_sof_new_platform_drv(struct snd_sof_dev *sdev)
>  {
>         struct snd_soc_component_driver *pd = &sdev->plat_drv;
> @@ -775,7 +784,7 @@ void snd_sof_new_platform_drv(struct snd_sof_dev
> *sdev)
>         pd->trigger = sof_pcm_trigger;
>         pd->pointer = sof_pcm_pointer;
>  
> -#if IS_ENABLED(CONFIG_SND_SOC_SOF_COMPRESS)
> +#if IS_ENABLED(CONFIG_SND_SOC_SOF_DEBUG_PROBES)
>         pd->compr_ops = &sof_compressed_ops;
>  #endif
>         pd->pcm_construct = sof_pcm_new;
> 

Here you are breaking the non-existent yet compressed support. I would
leave:

#if IS_ENABLED(CONFIG_SND_SOC_SOF_DEBUG_PROBES)
         pd->compr_ops = &sof_compressed_ops;
#endif

and only override compr_ops if SND_SOC_SOF_DEBUG_PROBES is set like
this:


#if IS_ENABLED(CONFIG_SND_SOC_SOF_DEBUG_PROBES)
         pd->compr_ops = &sof_probe_compressed_ops;
#endif

Also does this mean we cannot support both "real" compressed sound card
and probes in the same time?


_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux