All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Mark Brown <broonie@kernel.org>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>
Subject: Question about DPCM private_data of soc-compress.c
Date: Mon, 23 Jan 2023 03:08:49 +0000	[thread overview]
Message-ID: <87tu0i6j7j.wl-kuninori.morimoto.gx@renesas.com> (raw)


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;
		}
		...
	}

Thank you for your help !!

Best regards
---
Kuninori Morimoto

             reply	other threads:[~2023-01-23  3:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-23  3:08 Kuninori Morimoto [this message]
2023-01-23 12:01 ` Question about DPCM private_data of soc-compress.c Charles Keepax
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=87tu0i6j7j.wl-kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.