Re: [RFC PATCH] ASoC: pcm_dmaengine: Add support for BE DAIs

From: Codrin.Ciubotariu
Date: Fri Dec 11 2020 - 13:02:50 EST


On 08.12.2020 21:31, Mark Brown wrote:
> On Tue, Dec 08, 2020 at 07:26:35PM +0000, Codrin.Ciubotariu@xxxxxxxxxxxxx wrote:
>
>> I do not know too much about the dummy PCM. It seems like it is creating
>> a card without DPCM links and fakes a buffer, which is not quite what I
>> need. I will investigate more.
>
> Right, that's what I was imagining the second runtime you proposed
> looking like.
>

I don't need the whole struct snd_pcm_runtime, only struct
snd_pcm_hardware, at least for now. I looked some more and a suitable
place would be struct snd_soc_dpcm, since it is created at runtime and
used anyway to characterize a FE <-> BE link. What do you think?

Also, I noticed that the HW constraints added by a DAI driver (a codec
for example) are added to PCM's runtime->hw_constraints, even if the DAI
driver is part of a BE. Shouldn't these constraints be applied only to
BE and eventually merge them to FE (struct snd_pcm_hardware) if
dai_link->dpcm_merged_* are set?

Best regards,
Codrin