Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: simple-card-utils: remove strict limitation of bit/frame master
@ 2017-05-25  1:51 Kuninori Morimoto
  2017-05-26 11:41 ` Applied "ASoC: simple-card-utils: remove strict limitation of bit/frame master" to the asoc tree Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Kuninori Morimoto @ 2017-05-25  1:51 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, linux-renesas-soc

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

Current asoc_simple_card_parse_daifmt is keeping backward compatibility
for bitmaster/framemaster which didn't use phandle.
The keep compatibility, it is checking prefix length, but it is
too strict. let's loosen it. Otherwise, OF-graph base sound card
which doesn't have prefix can't detect daifmt.

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

diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c
index b5047e2..f5a3e32 100644
--- a/sound/soc/generic/simple-card-utils.c
+++ b/sound/soc/generic/simple-card-utils.c
@@ -21,14 +21,13 @@ int asoc_simple_card_parse_daifmt(struct device *dev,
 {
 	struct device_node *bitclkmaster = NULL;
 	struct device_node *framemaster = NULL;
-	int prefix_len = prefix ? strlen(prefix) : 0;
 	unsigned int daifmt;
 
 	daifmt = snd_soc_of_parse_daifmt(node, prefix,
 					 &bitclkmaster, &framemaster);
 	daifmt &= ~SND_SOC_DAIFMT_MASTER_MASK;
 
-	if (prefix_len && !bitclkmaster && !framemaster) {
+	if (!bitclkmaster && !framemaster) {
 		/*
 		 * No dai-link level and master setting was not found from
 		 * sound node level, revert back to legacy DT parsing and
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Applied "ASoC: simple-card-utils: remove strict limitation of bit/frame master" to the asoc tree
  2017-05-25  1:51 [PATCH] ASoC: simple-card-utils: remove strict limitation of bit/frame master Kuninori Morimoto
@ 2017-05-26 11:41 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2017-05-26 11:41 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: Mark Brown

The patch

   ASoC: simple-card-utils: remove strict limitation of bit/frame master

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 155b8f3aa633dbce887cded6b6b9399a3c62683e Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Thu, 25 May 2017 01:51:31 +0000
Subject: [PATCH] ASoC: simple-card-utils: remove strict limitation of
 bit/frame master

Current asoc_simple_card_parse_daifmt is keeping backward compatibility
for bitmaster/framemaster which didn't use phandle.
The keep compatibility, it is checking prefix length, but it is
too strict. let's loosen it. Otherwise, OF-graph base sound card
which doesn't have prefix can't detect daifmt.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/generic/simple-card-utils.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c
index fe726e83d0bd..9c7f5b91b90a 100644
--- a/sound/soc/generic/simple-card-utils.c
+++ b/sound/soc/generic/simple-card-utils.c
@@ -21,14 +21,13 @@ int asoc_simple_card_parse_daifmt(struct device *dev,
 {
 	struct device_node *bitclkmaster = NULL;
 	struct device_node *framemaster = NULL;
-	int prefix_len = prefix ? strlen(prefix) : 0;
 	unsigned int daifmt;
 
 	daifmt = snd_soc_of_parse_daifmt(node, prefix,
 					 &bitclkmaster, &framemaster);
 	daifmt &= ~SND_SOC_DAIFMT_MASTER_MASK;
 
-	if (prefix_len && !bitclkmaster && !framemaster) {
+	if (!bitclkmaster && !framemaster) {
 		/*
 		 * No dai-link level and master setting was not found from
 		 * sound node level, revert back to legacy DT parsing and
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-26 11:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-25  1:51 [PATCH] ASoC: simple-card-utils: remove strict limitation of bit/frame master Kuninori Morimoto
2017-05-26 11:41 ` Applied "ASoC: simple-card-utils: remove strict limitation of bit/frame master" to the asoc tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox