Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>,
	Mark Brown <broonie@kernel.org>
Subject: Re: Question about DPCM private_data of soc-compress.c
Date: Mon, 23 Jan 2023 12:01:34 +0000	[thread overview]
Message-ID: <20230123120134.GW36097@ediswmail.ad.cirrus.com> (raw)
In-Reply-To: <87tu0i6j7j.wl-kuninori.morimoto.gx@renesas.com>

On Mon, Jan 23, 2023 at 03:08:49AM +0000, Kuninori Morimoto wrote:
> 
> Hi ALSA ML
> 
> I'm not familiar with soc-compress.c, but I think dpcm_capture case don't need "else" ?
> I think it is same as soc-pcm.c :: soc_new_pcm().
> I'm happy to post patch if someone acknowledge this question.
> 
> 	--- soc-compress.c --------
> 	int snd_soc_new_compress(...)
> 	{
> 		...
> 		if (rtd->dai_link->dynamic) {
> 			...
> 			if (rtd->dai_link->dpcm_playback)
> 				be_pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream->private_data = rtd;
> -			else if (rtd->dai_link->dpcm_capture)
> +			if (rtd->dai_link->dpcm_capture)
> 				be_pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream->private_data = rtd;
> 			...
> 		}
> 		...
> 	}
> 
> 	--- soc-pcm.c ---------------
> 	int soc_new_pcm(...)
> 	{
> 		...
> 		if (rtd->dai_link->no_pcm || rtd->dai_link->params) {
> 			if (playback)
> 				pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream->private_data = rtd;
> =>			if (capture)
> 				pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream->private_data = rtd;
> 			goto out;
> 		}
> 		...
> 	}
> 

I would certainly agree, pretty sure the else is redundant.

Thanks,
Charles

  reply	other threads:[~2023-01-23 12:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-23  3:08 Question about DPCM private_data of soc-compress.c Kuninori Morimoto
2023-01-23 12:01 ` Charles Keepax [this message]
2023-01-23 15:44   ` Pierre-Louis Bossart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230123120134.GW36097@ediswmail.ad.cirrus.com \
    --to=ckeepax@opensource.cirrus.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox