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: [PATCH 5/6] ASoC: simple-card-utils.c: ignore Codec2Codec setting if it already have
Date: Fri, 1 Jul 2022 05:18:40 +0000	[thread overview]
Message-ID: <87bku9s95b.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <87ilohs96p.wl-kuninori.morimoto.gx@renesas.com>

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Audio Graph Card2 setups own Codec2Codec settings,
but current simple-card-utils.c will try to setup Codec2Codec default
settings if needed, it will overwirtes the settings.
This patch ignores default Codec2Codec settings if it already have.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/generic/simple-card-utils.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c
index a761af6b13b6..b8a3da692ee8 100644
--- a/sound/soc/generic/simple-card-utils.c
+++ b/sound/soc/generic/simple-card-utils.c
@@ -527,6 +527,10 @@ static int asoc_simple_init_for_codec2codec(struct snd_soc_pcm_runtime *rtd,
 	struct snd_pcm_hardware hw;
 	int i, ret, stream;
 
+	/* Do nothing if it already has Codec2Codec settings */
+	if (dai_link->params)
+		return 0;
+
 	/* Only Codecs */
 	for_each_rtd_components(rtd, i, component) {
 		if (!asoc_simple_component_is_codec(component))
-- 
2.25.1


  parent reply	other threads:[~2022-07-01  5:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-01  5:17 [PATCH 0/6] ASoC: audio-graph-card2.c: make Codec2Codec settings optional Kuninori Morimoto
2022-07-01  5:18 ` [PATCH 1/6] ASoC: audio-graph-card2.c: use of_property_read_u32() for rate Kuninori Morimoto
2022-07-01  5:18 ` [PATCH 2/6] ASoC: audio-graph-card2.c: make Codec2Codec settings optional Kuninori Morimoto
2022-07-01  5:18 ` [PATCH 3/6] ASoC: audio-graph-card2.c: remove pre-alloced Codec2Codec space Kuninori Morimoto
2022-07-01  5:18 ` [PATCH 4/6] ASoC: audio-graph-card2-custom-sample.dtsi: add verbose explanation Kuninori Morimoto
2022-07-01  5:18 ` Kuninori Morimoto [this message]
2022-07-01  5:18 ` [PATCH 6/6] ASoC: simple-card-utils.c: care Codec2Codec vs DPCM:BE Kuninori Morimoto
2022-07-08 20:47 ` [PATCH 0/6] ASoC: audio-graph-card2.c: make Codec2Codec settings optional Mark Brown

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=87bku9s95b.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.