diff mbox series

[v2,04/16] ASoC: sof: Replace dpcm_playback/capture to playback/capture_only

Message ID 87ttkludo3.wl-kuninori.morimoto.gx@renesas.com
State New
Headers show
Series ASoC: Replace dpcm_playback/capture to playback/capture_only | expand

Commit Message

Kuninori Morimoto April 1, 2024, 12:31 a.m. UTC
soc_get_playback_capture() is now handling DPCM and normal comprehensively
for playback/capture stream. We can use playback/capture_only flag
instead of using dpcm_playback/capture. This patch replace these.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/sof/nocodec.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Pierre-Louis Bossart April 1, 2024, 4:12 p.m. UTC | #1
On 3/31/24 19:31, Kuninori Morimoto wrote:
> soc_get_playback_capture() is now handling DPCM and normal comprehensively
> for playback/capture stream. We can use playback/capture_only flag
> instead of using dpcm_playback/capture. This patch replace these.
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  sound/soc/sof/nocodec.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/sound/soc/sof/nocodec.c b/sound/soc/sof/nocodec.c
> index 34aa8a7cfc7d..a0105c31723c 100644
> --- a/sound/soc/sof/nocodec.c
> +++ b/sound/soc/sof/nocodec.c
> @@ -55,10 +55,6 @@ static int sof_nocodec_bes_setup(struct device *dev,
>  		links[i].no_pcm = 1;
>  		links[i].cpus->dai_name = drv[i].name;
>  		links[i].platforms->name = dev_name(dev->parent);
> -		if (drv[i].playback.channels_min)
> -			links[i].dpcm_playback = 1;
> -		if (drv[i].capture.channels_min)
> -			links[i].dpcm_capture = 1;

Sorry, I don't see where this functionality is now moved?
soc_get_playback_capture() doesn't seem to have any logic based on the
channels_min value?

>  
>  		links[i].be_hw_params_fixup = sof_pcm_dai_link_fixup;
>  	}
Kuninori Morimoto April 1, 2024, 11:19 p.m. UTC | #2
Hi Pierre-Louis

> > soc_get_playback_capture() is now handling DPCM and normal comprehensively
> > for playback/capture stream. We can use playback/capture_only flag
> > instead of using dpcm_playback/capture. This patch replace these.
> > 
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > ---
(snip)
> > -		if (drv[i].playback.channels_min)
> > -			links[i].dpcm_playback = 1;
> > -		if (drv[i].capture.channels_min)
> > -			links[i].dpcm_capture = 1;
> 
> Sorry, I don't see where this functionality is now moved?
> soc_get_playback_capture() doesn't seem to have any logic based on the
> channels_min value?

snd_soc_dai_stream_valid() is judging based on channels_min



Thank you for your help !!

Best regards
---
Renesas Electronics
Ph.D. Kuninori Morimoto
diff mbox series

Patch

diff --git a/sound/soc/sof/nocodec.c b/sound/soc/sof/nocodec.c
index 34aa8a7cfc7d..a0105c31723c 100644
--- a/sound/soc/sof/nocodec.c
+++ b/sound/soc/sof/nocodec.c
@@ -55,10 +55,6 @@  static int sof_nocodec_bes_setup(struct device *dev,
 		links[i].no_pcm = 1;
 		links[i].cpus->dai_name = drv[i].name;
 		links[i].platforms->name = dev_name(dev->parent);
-		if (drv[i].playback.channels_min)
-			links[i].dpcm_playback = 1;
-		if (drv[i].capture.channels_min)
-			links[i].dpcm_capture = 1;
 
 		links[i].be_hw_params_fixup = sof_pcm_dai_link_fixup;
 	}