All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Jaroslav Kysela <perex@perex.cz>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Takashi Iwai <tiwai@suse.com>
Cc: alsa-devel@alsa-project.org
Subject: [PATCH v3 16/21] ASoC: soc-dai.c: replace dpcm_playback/capture to playback/capture_only
Date: Mon, 29 May 2023 01:05:23 +0000	[thread overview]
Message-ID: <871qj0lzfw.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <87o7m4lzl3.wl-kuninori.morimoto.gx@renesas.com>

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/soc-dai.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sound/soc/soc-dai.c b/sound/soc/soc-dai.c
index 02dd64dea179..138f71ceab3c 100644
--- a/sound/soc/soc-dai.c
+++ b/sound/soc/soc-dai.c
@@ -505,8 +505,10 @@ void snd_soc_dai_link_set_capabilities(struct snd_soc_dai_link *dai_link)
 		supported[direction] = supported_cpu && supported_codec;
 	}
 
-	dai_link->dpcm_playback = supported[SNDRV_PCM_STREAM_PLAYBACK];
-	dai_link->dpcm_capture  = supported[SNDRV_PCM_STREAM_CAPTURE];
+	dai_link->playback_only = supported[SNDRV_PCM_STREAM_PLAYBACK] &&
+				 !supported[SNDRV_PCM_STREAM_CAPTURE];
+	dai_link->capture_only  = supported[SNDRV_PCM_STREAM_CAPTURE] &&
+				 !supported[SNDRV_PCM_STREAM_PLAYBACK];
 }
 EXPORT_SYMBOL_GPL(snd_soc_dai_link_set_capabilities);
 
-- 
2.25.1


  parent reply	other threads:[~2023-05-29  1:08 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-29  1:02 [PATCH v3 00/21] ASoC: replace dpcm_playback/capture to playback/capture_only Kuninori Morimoto
2023-05-29  1:02 ` [PATCH v3 01/21] ASoC: soc-pcm.c: indicate error if stream has no playback no capture Kuninori Morimoto
2023-05-29  1:02 ` [PATCH v3 02/21] ASoC: soc-pcm.c: use dai_link on soc_get_playback_capture() Kuninori Morimoto
2023-05-29  1:03 ` [PATCH v3 03/21] ASoC: soc-pcm.c: cleanup soc_get_playback_capture() error Kuninori Morimoto
2023-05-29  1:03 ` [PATCH v3 04/21] ASoC: soc-pcm.c: use temporary variable at soc_get_playback_capture() Kuninori Morimoto
2023-05-29  1:03 ` [PATCH v3 05/21] ASoC: soc-pcm.c: tidyup playback/capture_only " Kuninori Morimoto
2023-05-29  1:03 ` [PATCH v3 06/21] ASoC: soc-pcm.c: cleanup normal connection loop at soc_get_playback_capture() part1 Kuninori Morimoto
2023-05-29  1:03 ` [PATCH v3 07/21] ASoC: soc-pcm.c: cleanup normal connection loop at soc_get_playback_capture() part2 Kuninori Morimoto
2023-05-30  0:01   ` Kuninori Morimoto
2023-05-30  0:42     ` Kuninori Morimoto
2023-05-29  1:03 ` [PATCH v3 08/21] ASoC: soc-pcm.c: cleanup soc_get_playback_capture() Kuninori Morimoto
2023-05-29  1:03 ` [PATCH v3 09/21] ASoC: amd: replace dpcm_playback/capture to playback/capture_only Kuninori Morimoto
2023-05-29  1:04 ` [PATCH v3 10/21] ASoC: fsl: " Kuninori Morimoto
2023-05-29  1:04 ` [PATCH v3 11/21] ASoC: sof: " Kuninori Morimoto
2023-05-29  1:04 ` [PATCH v3 12/21] ASoC: meson: " Kuninori Morimoto
2023-05-29  1:04 ` [PATCH v3 13/21] ASoC: Intel: " Kuninori Morimoto
2023-05-29  1:05 ` [PATCH v3 14/21] ASoC: samsung: " Kuninori Morimoto
2023-05-29  1:05 ` [PATCH v3 15/21] ASoC: mediatek: " Kuninori Morimoto
2023-05-29  1:05 ` Kuninori Morimoto [this message]
2023-05-29  1:05 ` [PATCH v3 17/21] ASoC: Intel/avs: " Kuninori Morimoto
2023-05-29  1:05 ` [PATCH v3 18/21] ASoC: soc-core.c: " Kuninori Morimoto
2023-05-29  1:05 ` [PATCH v3 19/21] ASoC: soc-topology.c: " Kuninori Morimoto
2023-05-29 14:57   ` Amadeusz Sławiński
2023-05-29 23:49     ` Kuninori Morimoto
2023-05-29  1:05 ` [PATCH v3 20/21] ASoC: soc-compress.c: " Kuninori Morimoto
2023-05-29  1:05 ` [PATCH v3 21/21] ASoC: soc-pcm.c: remove dpcm_playback/capture Kuninori Morimoto

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=871qj0lzfw.wl-kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.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 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.