[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4f401536-5a66-0d65-30cb-7ecf6b235539@microchip.com>
Date: Wed, 14 Apr 2021 14:58:10 +0000
From: <Codrin.Ciubotariu@...rochip.com>
To: <perex@...ex.cz>, <alsa-devel@...a-project.org>,
<linux-kernel@...r.kernel.org>
CC: <gustavoars@...nel.org>, <mirq-linux@...e.qmqm.pl>,
<broonie@...nel.org>, <tiwai@...e.com>, <lgirdwood@...il.com>
Subject: Re: [RFC PATCH 0/3] Separate BE DAI HW constraints from FE ones
On 23.03.2021 16:18, Codrin.Ciubotariu@...rochip.com wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> On 23.03.2021 14:15, Jaroslav Kysela wrote:
>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>>
>> Dne 23. 03. 21 v 12:43 Codrin Ciubotariu napsal(a):
>>
>>> To achieve this, the first thing needed is to detect whether a HW
>>> constraint rule is enforced by a FE or a BE DAI. This means that
>>> snd_pcm_hw_rule_add() needs to be able to differentiate between the two
>>> type of DAIs. For this, the runtime pointer to struct snd_pcm_runtime is
>>> replaced with a pointer to struct snd_pcm_substream, to be able to reach
>>> substream->pcm->internal to differentiate between FE and BE DAIs.
>>
>> Think about other not-so-invasive solution. What about to use
>> 'runtime->private_data' (struct snd_soc_pcm_runtime *) to determine FE / BE?
>>
>
> I think struct snd_soc_pcm_runtime * is placed in
> substream->private_data, while runtime->private_data is used more by the
> platform drivers. runtime->trigger_master could be an idea, but it looks
> like it's initialized just before the trigger callback is called, way
> after the constraint rules are added and I am not sure it can be
> initialized earlier...
>
> Best regards,
> Codrin
>
How about using a different API for ASoC only, since that's the place of
DPCM. Only drivers that do not involve DSPs would have to to be changed
to call the new snd_pcm_hw_rule_add() variant.
Another solution would be to have a different snd_soc_pcm_runtime for BE
interfaces (with a new hw_constraints member of course). What do you think?
Thanks!
Codrin
Powered by blists - more mailing lists