Skip to contentSkip to conversation

ASoC: simple-card: Fix property name for simple-audio-card, format

PATCH Applied Peter Ujfalusi 3 participants 5 messages Mar 7, 2014 – Mar 10, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: simple-card: Fix property name for simple-audio-card, format

The "format" part of the property name is missing from the code.

---
 sound/soc/generic/simple-card.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/generic/simple-card.c +1 -1
index 7cabcc5c8703..064b404ed252 100644
@@ -165,7 +165,7 @@ static int asoc_simple_card_parse_of(struct device_node *node,
 	snd_soc_of_parse_card_name(&priv->snd_card, "simple-audio-card,name");
 
 	/* get CPU/CODEC common format via simple-audio-card,format */
-	priv->daifmt = snd_soc_of_parse_daifmt(node, "simple-audio-card,") &
+	priv->daifmt = snd_soc_of_parse_daifmt(node, "simple-audio-card,format") &
 		(SND_SOC_DAIFMT_FORMAT_MASK | SND_SOC_DAIFMT_INV_MASK);
 
 	/* off-codec widgets */
Signature · 1 line
1.9.0
maintainer Applied
#1 lore raw
Quoted 1 line · Peter Ujfalusi

The "format" part of the property name is missing from the code.

Applied, thanks.

#2 lore raw
In reply to Peter Ujfalusi

sound/soc/generic/simple-card.c static int asoc_simple_card_parse_of(struct device_node · line 169

Quoted 9 lines
sound/soc/generic/simple-card.c +1 -1
@@ -165,7 +165,7 @@ static int asoc_simple_card_parse_of(struct device_node
 *node,
 	snd_soc_of_parse_card_name(&priv->snd_card, "simple-audio-card,name");
 
 	/* get CPU/CODEC common format via simple-audio-card,format */
-	priv->daifmt = snd_soc_of_parse_daifmt(node, "simple-audio-card,") &
+	priv->daifmt = snd_soc_of_parse_daifmt(node, "simple-audio-card,format")

@Peter

Sorry, the interface of snd_soc_of_parse_daifmt(struct device_node *np, const char *prefix), it's intended not only to parse the 'XXX,format', but also 'XXX,continuous-clock', 'XXX, bitclock-inversion', 'XXX, frame-inversion', 'XXX,bitclock-master' and 'XXX,frame-master' at the same time.

Maybe just the comment here is not very correct.

Thanks,

--
Best Regards,
Xiubo

Quoted 8 lines

&

sound/soc/generic/simple-card.c +0 -1
 		(SND_SOC_DAIFMT_FORMAT_MASK | SND_SOC_DAIFMT_INV_MASK);
 
 	/* off-codec widgets */
--

1.9.0

maintainer
#3 lore raw
Quoted 6 lines · On Mon, Mar 10, 2014 at 02:25:02AM +0000, [email protected] wrote:

Sorry, the interface of snd_soc_of_parse_daifmt(struct device_node *np, const char *prefix), it's intended not only to parse the 'XXX,format', but also 'XXX,continuous-clock', 'XXX, bitclock-inversion', 'XXX, frame-inversion', 'XXX,bitclock-master' and 'XXX,frame-master' at the same time.

Maybe just the comment here is not very correct.

Yes, the comment needs fixing. I've dropped the patch.

#4 lore raw
In reply to [email protected]
Quoted 13 lines · On 03/10/2014 04:25 AM, [email protected] wrote:

sound/soc/generic/simple-card.c static int asoc_simple_card_parse_of(struct device_node · line 169

Quoted 9 lines
sound/soc/generic/simple-card.c +1 -1
@@ -165,7 +165,7 @@ static int asoc_simple_card_parse_of(struct device_node
 *node,
 	snd_soc_of_parse_card_name(&priv->snd_card, "simple-audio-card,name");
 
 	/* get CPU/CODEC common format via simple-audio-card,format */
-	priv->daifmt = snd_soc_of_parse_daifmt(node, "simple-audio-card,") &
+	priv->daifmt = snd_soc_of_parse_daifmt(node, "simple-audio-card,format")

@Peter

Quoted 4 lines

Sorry, the interface of snd_soc_of_parse_daifmt(struct device_node *np, const char *prefix), it's intended not only to parse the 'XXX,format', but also 'XXX,continuous-clock', 'XXX, bitclock-inversion', 'XXX, frame-inversion', 'XXX,bitclock-master' and 'XXX,frame-master' at the same time.

Yes, I overlooked that. I have not checked the snd_soc_of_parse_daifmt() before.

Quoted 1 line

Maybe just the comment here is not very correct.

Probably it would be better to re-word it since the code at this point only interested on the i2s coding and the bit/frame inversion.

Quoted 16 lines

Thanks,

--
Best Regards,
Xiubo

Quoted 8 lines

&

sound/soc/generic/simple-card.c +0 -1
 		(SND_SOC_DAIFMT_FORMAT_MASK | SND_SOC_DAIFMT_INV_MASK);
 
 	/* off-codec widgets */
--

1.9.0

Signature · 1 line
Péter