From: Mark Brown <broonie@kernel.org> To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Cc: Mark Brown <broonie@kernel.org>, Mark Brown <broonie@kernel.org>, linux-renesas-soc@vger.kernel.org, Linux-ALSA <alsa-devel@alsa-project.org>, Simon <horms@verge.net.au>, Liam Girdwood <lgirdwood@gmail.com> Subject: Applied "ASoC: rsrc-card: use asoc_simple_card_parse_daifmt()" to the asoc tree Date: Fri, 01 Jul 2016 17:59:36 +0200 [thread overview] Message-ID: <E1bJ0qu-0006Uz-4G@finisterre> (raw) In-Reply-To: <87fusyr45m.wl%kuninori.morimoto.gx@renesas.com> The patch ASoC: rsrc-card: use asoc_simple_card_parse_daifmt() 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 d6a4a9a45d072e3a27ea6e5f98192d78be621a9c Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Date: Thu, 30 Jun 2016 06:03:13 +0000 Subject: [PATCH] ASoC: rsrc-card: use asoc_simple_card_parse_daifmt() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org> --- sound/soc/sh/Kconfig | 1 + sound/soc/sh/rcar/rsrc-card.c | 38 ++++---------------------------------- 2 files changed, 5 insertions(+), 34 deletions(-) diff --git a/sound/soc/sh/Kconfig b/sound/soc/sh/Kconfig index c9902a6d6fa0..9311f119feb5 100644 --- a/sound/soc/sh/Kconfig +++ b/sound/soc/sh/Kconfig @@ -44,6 +44,7 @@ config SND_SOC_RCAR config SND_SOC_RSRC_CARD tristate "Renesas Sampling Rate Convert Sound Card" + select SND_SIMPLE_CARD_UTILS help This option enables simple sound if you need sampling rate convert diff --git a/sound/soc/sh/rcar/rsrc-card.c b/sound/soc/sh/rcar/rsrc-card.c index 1bc7ecfc42a9..984d8fed0dbd 100644 --- a/sound/soc/sh/rcar/rsrc-card.c +++ b/sound/soc/sh/rcar/rsrc-card.c @@ -20,6 +20,7 @@ #include <sound/jack.h> #include <sound/soc.h> #include <sound/soc-dai.h> +#include <sound/simple_card_utils.h> struct rsrc_card_of_data { const char *prefix; @@ -159,38 +160,6 @@ static int rsrc_card_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, return 0; } -static int rsrc_card_parse_daifmt(struct device_node *node, - struct device_node *codec, - struct rsrc_card_priv *priv, - struct snd_soc_dai_link *dai_link, - unsigned int *retfmt) -{ - struct device_node *bitclkmaster = NULL; - struct device_node *framemaster = NULL; - unsigned int daifmt; - - daifmt = snd_soc_of_parse_daifmt(node, NULL, - &bitclkmaster, &framemaster); - daifmt &= ~SND_SOC_DAIFMT_MASTER_MASK; - - if (!bitclkmaster && !framemaster) - return -EINVAL; - - if (codec == bitclkmaster) - daifmt |= (codec == framemaster) ? - SND_SOC_DAIFMT_CBM_CFM : SND_SOC_DAIFMT_CBM_CFS; - else - daifmt |= (codec == framemaster) ? - SND_SOC_DAIFMT_CBS_CFM : SND_SOC_DAIFMT_CBS_CFS; - - of_node_put(bitclkmaster); - of_node_put(framemaster); - - *retfmt = daifmt; - - return 0; -} - static int rsrc_card_parse_links(struct device_node *np, struct rsrc_card_priv *priv, int idx, bool is_fe) @@ -358,6 +327,7 @@ static int rsrc_card_dai_sub_link_of(struct device_node *node, static int rsrc_card_dai_link_of(struct device_node *node, struct rsrc_card_priv *priv) { + struct device *dev = rsrc_priv_to_dev(priv); struct snd_soc_dai_link *dai_link; struct device_node *np; unsigned int daifmt = 0; @@ -370,8 +340,8 @@ static int rsrc_card_dai_link_of(struct device_node *node, dai_link = rsrc_priv_to_link(priv, i); if (strcmp(np->name, "codec") == 0) { - ret = rsrc_card_parse_daifmt(node, np, priv, - dai_link, &daifmt); + ret = asoc_simple_card_parse_daifmt(dev, node, np, + NULL, &daifmt); if (ret < 0) return ret; break; -- 2.8.1
WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie@kernel.org> To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Cc: Mark Brown <broonie@kernel.org>Mark Brown <broonie@kernel.org>, linux-renesas-soc@vger.kernel.org, Linux-ALSA <alsa-devel@alsa-project.org>, Simon <horms@verge.net.au>, Liam Girdwood <lgirdwood@gmail.com> Subject: Applied "ASoC: rsrc-card: use asoc_simple_card_parse_daifmt()" to the asoc tree Date: Fri, 01 Jul 2016 17:59:36 +0200 [thread overview] Message-ID: <E1bJ0qu-0006Uz-4G@finisterre> (raw) In-Reply-To: <87fusyr45m.wl%kuninori.morimoto.gx@renesas.com> The patch ASoC: rsrc-card: use asoc_simple_card_parse_daifmt() 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 d6a4a9a45d072e3a27ea6e5f98192d78be621a9c Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Date: Thu, 30 Jun 2016 06:03:13 +0000 Subject: [PATCH] ASoC: rsrc-card: use asoc_simple_card_parse_daifmt() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org> --- sound/soc/sh/Kconfig | 1 + sound/soc/sh/rcar/rsrc-card.c | 38 ++++---------------------------------- 2 files changed, 5 insertions(+), 34 deletions(-) diff --git a/sound/soc/sh/Kconfig b/sound/soc/sh/Kconfig index c9902a6d6fa0..9311f119feb5 100644 --- a/sound/soc/sh/Kconfig +++ b/sound/soc/sh/Kconfig @@ -44,6 +44,7 @@ config SND_SOC_RCAR config SND_SOC_RSRC_CARD tristate "Renesas Sampling Rate Convert Sound Card" + select SND_SIMPLE_CARD_UTILS help This option enables simple sound if you need sampling rate convert diff --git a/sound/soc/sh/rcar/rsrc-card.c b/sound/soc/sh/rcar/rsrc-card.c index 1bc7ecfc42a9..984d8fed0dbd 100644 --- a/sound/soc/sh/rcar/rsrc-card.c +++ b/sound/soc/sh/rcar/rsrc-card.c @@ -20,6 +20,7 @@ #include <sound/jack.h> #include <sound/soc.h> #include <sound/soc-dai.h> +#include <sound/simple_card_utils.h> struct rsrc_card_of_data { const char *prefix; @@ -159,38 +160,6 @@ static int rsrc_card_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, return 0; } -static int rsrc_card_parse_daifmt(struct device_node *node, - struct device_node *codec, - struct rsrc_card_priv *priv, - struct snd_soc_dai_link *dai_link, - unsigned int *retfmt) -{ - struct device_node *bitclkmaster = NULL; - struct device_node *framemaster = NULL; - unsigned int daifmt; - - daifmt = snd_soc_of_parse_daifmt(node, NULL, - &bitclkmaster, &framemaster); - daifmt &= ~SND_SOC_DAIFMT_MASTER_MASK; - - if (!bitclkmaster && !framemaster) - return -EINVAL; - - if (codec == bitclkmaster) - daifmt |= (codec == framemaster) ? - SND_SOC_DAIFMT_CBM_CFM : SND_SOC_DAIFMT_CBM_CFS; - else - daifmt |= (codec == framemaster) ? - SND_SOC_DAIFMT_CBS_CFM : SND_SOC_DAIFMT_CBS_CFS; - - of_node_put(bitclkmaster); - of_node_put(framemaster); - - *retfmt = daifmt; - - return 0; -} - static int rsrc_card_parse_links(struct device_node *np, struct rsrc_card_priv *priv, int idx, bool is_fe) @@ -358,6 +327,7 @@ static int rsrc_card_dai_sub_link_of(struct device_node *node, static int rsrc_card_dai_link_of(struct device_node *node, struct rsrc_card_priv *priv) { + struct device *dev = rsrc_priv_to_dev(priv); struct snd_soc_dai_link *dai_link; struct device_node *np; unsigned int daifmt = 0; @@ -370,8 +340,8 @@ static int rsrc_card_dai_link_of(struct device_node *node, dai_link = rsrc_priv_to_link(priv, i); if (strcmp(np->name, "codec") == 0) { - ret = rsrc_card_parse_daifmt(node, np, priv, - dai_link, &daifmt); + ret = asoc_simple_card_parse_daifmt(dev, node, np, + NULL, &daifmt); if (ret < 0) return ret; break; -- 2.8.1
next prev parent reply other threads:[~2016-07-01 15:59 UTC|newest] Thread overview: 128+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-05-31 8:56 [PATCH 00/39 v2] ASoC: add simple-card-core and standardize "simple" card Kuninori Morimoto 2016-05-31 8:56 ` Kuninori Morimoto 2016-05-31 8:58 ` [PATCH 01/39 v2] ASoC: rsrc-card: remove unused dai_num Kuninori Morimoto 2016-05-31 8:58 ` Kuninori Morimoto 2016-05-31 8:59 ` [PATCH 02/39 v2] ASoC: simple-card: use common PREFIX for each DT property Kuninori Morimoto 2016-05-31 8:59 ` Kuninori Morimoto 2016-06-13 15:47 ` Applied "ASoC: simple-card: use common PREFIX for each DT property" to the asoc tree Mark Brown 2016-06-13 15:47 ` Mark Brown 2016-05-31 8:59 ` [PATCH 03/39 v2] ASoC: simple-card: add new asoc_simple_jack and use it Kuninori Morimoto 2016-05-31 8:59 ` Kuninori Morimoto 2016-06-29 18:20 ` Applied "ASoC: simple-card: add new asoc_simple_jack and use it" to the asoc tree Mark Brown 2016-06-29 18:20 ` Mark Brown 2016-05-31 9:00 ` [PATCH 04/39 v2] ASoC: add new simple-card-utils.c Kuninori Morimoto 2016-05-31 9:00 ` Kuninori Morimoto 2016-06-29 18:20 ` Applied "ASoC: add new simple-card-utils.c" to the asoc tree Mark Brown 2016-06-29 18:20 ` Mark Brown 2016-05-31 9:00 ` [PATCH 05/39 v2] ASoC: simple-card-utils: add asoc_simple_card_parse_tdm() Kuninori Morimoto 2016-05-31 9:00 ` Kuninori Morimoto 2016-06-29 18:11 ` Mark Brown 2016-06-30 0:03 ` Kuninori Morimoto 2016-06-30 0:03 ` Kuninori Morimoto 2016-05-31 9:01 ` [PATCH 06/39 v2] ASoC: simple-card-utils: add asoc_simple_card_parse_dailink_name() Kuninori Morimoto 2016-05-31 9:01 ` Kuninori Morimoto 2016-06-29 18:14 ` Mark Brown 2016-06-30 5:32 ` Kuninori Morimoto 2016-06-30 5:32 ` Kuninori Morimoto 2016-05-31 9:01 ` [PATCH 07/39 v2] ASoC: simple-card-utils: add asoc_simple_card_parse_card_name() Kuninori Morimoto 2016-05-31 9:01 ` Kuninori Morimoto 2016-06-29 18:15 ` Mark Brown 2016-06-29 18:15 ` Mark Brown 2016-06-30 2:55 ` Kuninori Morimoto 2016-06-30 2:55 ` Kuninori Morimoto 2016-07-01 9:52 ` Mark Brown 2016-07-03 23:54 ` Kuninori Morimoto 2016-07-03 23:54 ` Kuninori Morimoto 2016-07-04 0:20 ` Kuninori Morimoto 2016-07-04 0:20 ` Kuninori Morimoto 2016-07-04 8:50 ` Mark Brown 2016-07-04 8:59 ` Kuninori Morimoto 2016-07-04 8:59 ` Kuninori Morimoto 2016-07-05 12:10 ` Mark Brown 2016-07-05 12:10 ` Mark Brown 2016-07-05 23:12 ` Kuninori Morimoto 2016-07-05 23:12 ` Kuninori Morimoto 2016-05-31 9:01 ` [PATCH 08/39 v2] ASoC: simple-card-utils: add asoc_simple_card_parse_card_prefix() Kuninori Morimoto 2016-05-31 9:01 ` Kuninori Morimoto 2016-06-29 18:17 ` Mark Brown 2016-05-31 9:02 ` [PATCH 09/39 v2] ASoC: simple-card-utils: add asoc_simple_card_parse_clk() Kuninori Morimoto 2016-05-31 9:02 ` Kuninori Morimoto 2016-06-29 18:18 ` Mark Brown 2016-06-30 0:25 ` Kuninori Morimoto 2016-06-30 0:25 ` Kuninori Morimoto 2016-06-30 0:39 ` Kuninori Morimoto 2016-06-30 0:39 ` Kuninori Morimoto 2016-07-01 9:55 ` Mark Brown 2016-07-01 9:55 ` Mark Brown 2016-07-03 23:58 ` Kuninori Morimoto 2016-07-03 23:58 ` Kuninori Morimoto 2016-05-31 9:03 ` [PATCH 10/39 v2] ASoC: simple-card-utils: add asoc_simple_card_parse_endpoint() Kuninori Morimoto 2016-05-31 9:03 ` Kuninori Morimoto 2016-06-29 18:34 ` Mark Brown 2016-05-31 9:03 ` [PATCH 11/39 v2] ASoC: simple-card-utils: add asoc_simple_card_init_dai() Kuninori Morimoto 2016-05-31 9:03 ` Kuninori Morimoto 2016-05-31 9:03 ` [PATCH 12/39 v2] ASoC: simple-card-utils: add asoc_simple_card_canonicalize_dailink() Kuninori Morimoto 2016-05-31 9:03 ` Kuninori Morimoto 2016-05-31 9:04 ` [PATCH 13/39 v2] ASoC: simple-card-utils: add asoc_simple_card_canonicalize_cpu() Kuninori Morimoto 2016-05-31 9:04 ` Kuninori Morimoto 2016-05-31 9:04 ` [PATCH 14/39 v2] ASoC: simple-card-utils: add asoc_simple_card_clean_reference() Kuninori Morimoto 2016-05-31 9:04 ` Kuninori Morimoto 2016-05-31 9:05 ` [PATCH 15/39 v2] ASoC: simple-card: use asoc_simple_card_parse_daifmt() Kuninori Morimoto 2016-05-31 9:05 ` Kuninori Morimoto 2016-05-31 9:05 ` [PATCH 16/39 v2] ASoC: simple-card: use asoc_simple_card_parse_clk() Kuninori Morimoto 2016-05-31 9:05 ` Kuninori Morimoto 2016-05-31 9:05 ` [PATCH 17/39 v2] ASoC: simple-card: use asoc_simple_card_parse_endpoint() Kuninori Morimoto 2016-05-31 9:05 ` Kuninori Morimoto 2016-05-31 9:06 ` [PATCH 18/39 v2] ASoC: simple-card: use asoc_simple_card_parse_tdm() Kuninori Morimoto 2016-05-31 9:06 ` Kuninori Morimoto 2016-05-31 9:06 ` [PATCH 19/39 v2] ASoC: simple-card: use asoc_simple_card_parse_card_name() Kuninori Morimoto 2016-05-31 9:06 ` Kuninori Morimoto 2016-07-16 12:03 ` Applied "ASoC: simple-card: use asoc_simple_card_parse_card_name()" to the asoc tree Mark Brown 2016-07-16 12:03 ` Mark Brown 2016-05-31 9:07 ` [PATCH 20/39 v2] ASoC: simple-card: use asoc_simple_card_parse_dailink_name() Kuninori Morimoto 2016-05-31 9:07 ` Kuninori Morimoto 2016-05-31 9:07 ` [PATCH 21/39 v2] ASoC: simple-card: use asoc_simple_card_init_dai() Kuninori Morimoto 2016-05-31 9:07 ` Kuninori Morimoto 2016-05-31 9:07 ` [PATCH 22/39 v2] ASoC: simple-card: use asoc_simple_card_canonicalize_dailink() Kuninori Morimoto 2016-05-31 9:07 ` Kuninori Morimoto 2016-05-31 9:08 ` [PATCH 23/39 v2] ASoC: simple-card: use asoc_simple_card_canonicalize_cpu() Kuninori Morimoto 2016-05-31 9:08 ` Kuninori Morimoto 2016-05-31 9:08 ` [PATCH 24/39 v2] ASoC: simple-card: use asoc_simple_card_clean_reference() Kuninori Morimoto 2016-05-31 9:08 ` Kuninori Morimoto 2016-05-31 9:09 ` [PATCH 25/39 v2] ASoC: rsrc-card: use asoc_simple_card_parse_daifmt() Kuninori Morimoto 2016-05-31 9:09 ` Kuninori Morimoto 2016-07-01 15:59 ` Mark Brown [this message] 2016-07-01 15:59 ` Applied "ASoC: rsrc-card: use asoc_simple_card_parse_daifmt()" to the asoc tree Mark Brown 2016-05-31 9:09 ` [PATCH 26/39 v2] ASoC: rsrc-card: use asoc_simple_card_parse_dailink_name() Kuninori Morimoto 2016-05-31 9:09 ` Kuninori Morimoto 2016-05-31 9:09 ` [PATCH 27/39 v2] ASoC: rsrc-card: use asoc_simple_dai instead of rsrc_card_dai Kuninori Morimoto 2016-05-31 9:09 ` Kuninori Morimoto 2016-05-31 9:10 ` [PATCH 28/39 v2] ASoC: rsrc-card: use asoc_simple_card_parse_clk() Kuninori Morimoto 2016-05-31 9:10 ` Kuninori Morimoto 2016-05-31 9:10 ` [PATCH 29/39 v2] ASoC: rsrc-card: use asoc_simple_card_parse_endpoint() Kuninori Morimoto 2016-05-31 9:10 ` Kuninori Morimoto 2016-05-31 9:11 ` [PATCH 30/39 v2] ASoC: rsrc-card: use asoc_simple_card_parse_card_name() Kuninori Morimoto 2016-05-31 9:11 ` Kuninori Morimoto 2016-05-31 9:11 ` [PATCH 31/39 v2] ASoC: rsrc-card: use asoc_simple_card_parse_card_prefix() Kuninori Morimoto 2016-05-31 9:11 ` Kuninori Morimoto 2016-05-31 9:11 ` [PATCH 32/39 v2] ASoC: rsrc-card: use asoc_simple_card_parse_tdm() Kuninori Morimoto 2016-05-31 9:11 ` Kuninori Morimoto 2016-05-31 9:12 ` [PATCH 33/39 v2] ASoC: rsrc-card: use asoc_simple_card_init_dai() Kuninori Morimoto 2016-05-31 9:12 ` Kuninori Morimoto 2016-05-31 9:12 ` [PATCH 34/39 v2] ASoC: rsrc-card: use asoc_simple_card_canonicalize_cpu() Kuninori Morimoto 2016-05-31 9:12 ` Kuninori Morimoto 2016-05-31 9:13 ` [PATCH 35/39 v2] ASoC: rsrc-card: use asoc_simple_card_canonicalize_dailink() Kuninori Morimoto 2016-05-31 9:13 ` Kuninori Morimoto 2016-05-31 9:13 ` [PATCH 36/39 v2] ASoC: rsrc-card: use asoc_simple_card_clean_reference() Kuninori Morimoto 2016-05-31 9:13 ` Kuninori Morimoto 2016-05-31 9:13 ` [PATCH 37/39 v2] ASoC: rsrc-card: rename rsrc-card to simple-dpcm-card phase1 Kuninori Morimoto 2016-05-31 9:13 ` Kuninori Morimoto 2016-05-31 9:14 ` [PATCH 38/39 v2] ASoC: rsrc-card: rename rsrc-card to simple-dpcm-card phase2 Kuninori Morimoto 2016-05-31 9:14 ` Kuninori Morimoto 2016-05-31 9:14 ` [PATCH 39/39 v2] ASoC: rsrc-card: rename rsrc-card to simple-dpcm-card phase3 Kuninori Morimoto 2016-05-31 9:14 ` Kuninori Morimoto 2016-06-20 1:49 ` [PATCH 00/39 v2] ASoC: add simple-card-core and standardize "simple" card Kuninori Morimoto 2016-06-20 1:49 ` Kuninori Morimoto 2016-06-29 18:16 ` Mark Brown 2016-06-30 5:34 ` Kuninori Morimoto 2016-06-30 5:34 ` 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=E1bJ0qu-0006Uz-4G@finisterre \ --to=broonie@kernel.org \ --cc=alsa-devel@alsa-project.org \ --cc=horms@verge.net.au \ --cc=kuninori.morimoto.gx@renesas.com \ --cc=lgirdwood@gmail.com \ --cc=linux-renesas-soc@vger.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: linkBe 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.