All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: alsa-devel@alsa-project.org, tiwai@suse.de,
	liam.r.girdwood@linux.intel.com, vinod.koul@intel.com,
	broonie@kernel.org, andriy.shevchenko@linux.intel.com
Subject: Applied "ASoC: Add helper to find codec_dai from dai_name" to the asoc tree
Date: Wed, 18 Oct 2017 12:27:14 +0100	[thread overview]
Message-ID: <E1e4mVG-0003PZ-LC@debutante> (raw)
In-Reply-To: <20171012233805.30055-7-pierre-louis.bossart@linux.intel.com>

The patch

   ASoC: Add helper to find codec_dai from dai_name

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 7c761b593e2c1dc6bc6c0c15ec338af1f00cabd7 Mon Sep 17 00:00:00 2001
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Date: Thu, 12 Oct 2017 18:38:02 -0500
Subject: [PATCH] ASoC: Add helper to find codec_dai from dai_name

Create a helper function to remove duplicate code used in machine drivers

Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 include/sound/soc.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/include/sound/soc.h b/include/sound/soc.h
index d22de9712c45..deacbafbae17 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1720,6 +1720,20 @@ struct snd_soc_dai *snd_soc_find_dai(
 
 #include <sound/soc-dai.h>
 
+static inline
+struct snd_soc_dai *snd_soc_card_get_codec_dai(struct snd_soc_card *card,
+					       const char *dai_name)
+{
+	struct snd_soc_pcm_runtime *rtd;
+
+	list_for_each_entry(rtd, &card->rtd_list, list) {
+		if (!strcmp(rtd->codec_dai->name, dai_name))
+			return rtd->codec_dai;
+	}
+
+	return NULL;
+}
+
 #ifdef CONFIG_DEBUG_FS
 extern struct dentry *snd_soc_debugfs_root;
 #endif
-- 
2.14.1

  reply	other threads:[~2017-10-18 11:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-12 23:37 [PATCH v2 0/9] Baytrail-Cherrytrail updates Pierre-Louis Bossart
2017-10-12 23:37 ` [PATCH v2 1/9] ASoC: Intel: bytcr_rt5651: add MCLK, quirks and cleanups Pierre-Louis Bossart
2017-10-18 11:31   ` Applied "ASoC: Intel: bytcr_rt5651: add MCLK, quirks and cleanups" to the asoc tree Mark Brown
2017-10-12 23:37 ` [PATCH v2 2/9] ASoC: Intel: bytcr_rt5640: cosmetic fixes Pierre-Louis Bossart
2017-10-12 23:37 ` [PATCH v2 3/9] ASoC: Intel: cht_bsw_rt5645: " Pierre-Louis Bossart
2017-10-12 23:38 ` [PATCH v2 4/9] ASoC: Intel: bytcht_da7213: " Pierre-Louis Bossart
2017-10-12 23:38 ` [PATCH v2 5/9] ASoC: Intel: bytcht_es8316: remove useless code Pierre-Louis Bossart
2017-10-18 11:31   ` Applied "ASoC: Intel: bytcht_es8316: remove useless code" to the asoc tree Mark Brown
2017-10-12 23:38 ` [PATCH v2 6/9] ASoC: Add helper to find codec_dai from dai_name Pierre-Louis Bossart
2017-10-18 11:27   ` Mark Brown [this message]
2017-10-12 23:38 ` [PATCH v2 7/9] ASoC: Intel: boards: use helper to get codec_dai Pierre-Louis Bossart
2017-10-18 11:31   ` Applied "ASoC: Intel: boards: use helper to get codec_dai" to the asoc tree Mark Brown
2017-10-12 23:38 ` [PATCH v2 8/9] ASoC: Intel: boards: fix off-by-one dailink id Pierre-Louis Bossart
2017-10-18 11:31   ` Applied "ASoC: Intel: boards: fix off-by-one dailink id" to the asoc tree Mark Brown
2017-10-12 23:38 ` [PATCH v2 9/9] ASoC: Intel: boards: remove hard-coded compressed dailinks Pierre-Louis Bossart
2017-10-13 15:49 ` [PATCH v2 0/9] Baytrail-Cherrytrail updates Liam Girdwood
2017-10-13 16:23 ` Andy Shevchenko
2017-10-13 16:23 ` Andy Shevchenko

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=E1e4mVG-0003PZ-LC@debutante \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=tiwai@suse.de \
    --cc=vinod.koul@intel.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.