* [PATCH] ASoC: soc-compress: set pcm nonatomic flag from dai_link
@ 2023-04-11 11:08 Srinivas Kandagatla
2023-04-11 13:25 ` Pierre-Louis Bossart
0 siblings, 1 reply; 3+ messages in thread
From: Srinivas Kandagatla @ 2023-04-11 11:08 UTC (permalink / raw)
To: broonie
Cc: perex, tiwai, lgirdwood, linux-kernel, alsa-devel,
Srinivas Kandagatla, Mohammad Rafi Shaik
In compress offload case we never set nonatomic flag on a new pcm. This triggers
below configuration error with DPCM on Qualcomm setup where dai_links are marked
as nonatomic.
"FE is atomic but BE is nonatomic, invalid configuration"
Fix this by Updating the pcm nonatomic flag correcly from the respective dai_link.
CC: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
sound/soc/soc-compress.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
index 554c329ec87f..a8d70274cab8 100644
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -615,6 +615,7 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num)
return ret;
}
+ be_pcm->nonatomic = rtd->dai_link->nonatomic;
rtd->pcm = be_pcm;
rtd->fe_compr = 1;
if (rtd->dai_link->dpcm_playback)
--
2.21.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: soc-compress: set pcm nonatomic flag from dai_link
2023-04-11 11:08 [PATCH] ASoC: soc-compress: set pcm nonatomic flag from dai_link Srinivas Kandagatla
@ 2023-04-11 13:25 ` Pierre-Louis Bossart
2023-04-11 13:30 ` Srinivas Kandagatla
0 siblings, 1 reply; 3+ messages in thread
From: Pierre-Louis Bossart @ 2023-04-11 13:25 UTC (permalink / raw)
To: Srinivas Kandagatla, broonie
Cc: tiwai, lgirdwood, linux-kernel, alsa-devel, Mohammad Rafi Shaik
On 4/11/23 06:08, Srinivas Kandagatla wrote:
> In compress offload case we never set nonatomic flag on a new pcm. This triggers
> below configuration error with DPCM on Qualcomm setup where dai_links are marked
> as nonatomic.
>
> "FE is atomic but BE is nonatomic, invalid configuration"
>
> Fix this by Updating the pcm nonatomic flag correcly from the respective dai_link.
>
> CC: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
> sound/soc/soc-compress.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
> index 554c329ec87f..a8d70274cab8 100644
> --- a/sound/soc/soc-compress.c
> +++ b/sound/soc/soc-compress.c
> @@ -615,6 +615,7 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num)
> return ret;
> }
>
> + be_pcm->nonatomic = rtd->dai_link->nonatomic;
> rtd->pcm = be_pcm;
> rtd->fe_compr = 1;
> if (rtd->dai_link->dpcm_playback)
isn't this fixed already? Daniel Baluta sent a patch for this, already
applied by Mark:
https://lore.kernel.org/alsa-devel/20230324124019.30826-1-daniel.baluta@oss.nxp.com/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: soc-compress: set pcm nonatomic flag from dai_link
2023-04-11 13:25 ` Pierre-Louis Bossart
@ 2023-04-11 13:30 ` Srinivas Kandagatla
0 siblings, 0 replies; 3+ messages in thread
From: Srinivas Kandagatla @ 2023-04-11 13:30 UTC (permalink / raw)
To: Pierre-Louis Bossart, broonie
Cc: tiwai, lgirdwood, linux-kernel, alsa-devel, Mohammad Rafi Shaik
On 11/04/2023 14:25, Pierre-Louis Bossart wrote:
>
>
> On 4/11/23 06:08, Srinivas Kandagatla wrote:
>> In compress offload case we never set nonatomic flag on a new pcm. This triggers
>> below configuration error with DPCM on Qualcomm setup where dai_links are marked
>> as nonatomic.
>>
>> "FE is atomic but BE is nonatomic, invalid configuration"
>>
>> Fix this by Updating the pcm nonatomic flag correcly from the respective dai_link.
>>
>> CC: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
>> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>> ---
>> sound/soc/soc-compress.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
>> index 554c329ec87f..a8d70274cab8 100644
>> --- a/sound/soc/soc-compress.c
>> +++ b/sound/soc/soc-compress.c
>> @@ -615,6 +615,7 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num)
>> return ret;
>> }
>>
>> + be_pcm->nonatomic = rtd->dai_link->nonatomic;
>> rtd->pcm = be_pcm;
>> rtd->fe_compr = 1;
>> if (rtd->dai_link->dpcm_playback)
>
> isn't this fixed already? Daniel Baluta sent a patch for this, already
> applied by Mark:
>
Thanks for pointing this, Yes, It is fixed in sound-next.. my branch was
a week+ old so did not spot it :-)
--srini
> https://lore.kernel.org/alsa-devel/20230324124019.30826-1-daniel.baluta@oss.nxp.com/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-04-11 13:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-11 11:08 [PATCH] ASoC: soc-compress: set pcm nonatomic flag from dai_link Srinivas Kandagatla
2023-04-11 13:25 ` Pierre-Louis Bossart
2023-04-11 13:30 ` Srinivas Kandagatla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®