All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: wm8741: Fix setting BCLK and LRCLK polarity
@ 2017-11-02 13:23 Sergej Sawazki
  2017-11-03 11:18 ` Charles Keepax
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Sergej Sawazki @ 2017-11-02 13:23 UTC (permalink / raw)
  To: broonie, lgirdwood, ckeepax; +Cc: ce3a, patches, alsa-devel, Sergej Sawazki

After checking the code and the datasheet, it seems like we are handling
the clock inversion (SND_SOC_DAIFMT_NB_IF and SND_SOC_DAIFMT_IB_IF) not
correctly.

>From the datasheet (Table 58):
R5 Format Control, BITS[5:4], [BCP:LRP]:
  (0) 00 =  normal   BCLK, normal   LRCLK
  (1) 01 =  normal   BCLK, inverted LRCLK <-- Fix this
  (2) 10 =  inverted BCLK, normal   LRCLK
  (3) 11 =  inverted BCLK, inverted LRCLK <-- Fix this

Signed-off-by: Sergej Sawazki <sergej@taudac.com>
---
 sound/soc/codecs/wm8741.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8741.c b/sound/soc/codecs/wm8741.c
index 3c96af0..a394dbe 100644
--- a/sound/soc/codecs/wm8741.c
+++ b/sound/soc/codecs/wm8741.c
@@ -333,13 +333,13 @@ static int wm8741_set_dai_fmt(struct snd_soc_dai *codec_dai,
 	switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
 	case SND_SOC_DAIFMT_NB_NF:
 		break;
-	case SND_SOC_DAIFMT_IB_IF:
+	case SND_SOC_DAIFMT_NB_IF:
 		iface |= 0x10;
 		break;
 	case SND_SOC_DAIFMT_IB_NF:
 		iface |= 0x20;
 		break;
-	case SND_SOC_DAIFMT_NB_IF:
+	case SND_SOC_DAIFMT_IB_IF:
 		iface |= 0x30;
 		break;
 	default:
-- 
2.7.4

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

* Re: [PATCH] ASoC: wm8741: Fix setting BCLK and LRCLK polarity
  2017-11-02 13:23 [PATCH] ASoC: wm8741: Fix setting BCLK and LRCLK polarity Sergej Sawazki
@ 2017-11-03 11:18 ` Charles Keepax
  2017-11-03 11:45 ` Mark Brown
  2017-11-03 18:50 ` Applied "ASoC: wm8741: Fix setting BCLK and LRCLK polarity" to the asoc tree Mark Brown
  2 siblings, 0 replies; 8+ messages in thread
From: Charles Keepax @ 2017-11-03 11:18 UTC (permalink / raw)
  To: Sergej Sawazki; +Cc: ce3a, patches, alsa-devel, broonie, lgirdwood

On Thu, Nov 02, 2017 at 02:23:02PM +0100, Sergej Sawazki wrote:
> After checking the code and the datasheet, it seems like we are handling
> the clock inversion (SND_SOC_DAIFMT_NB_IF and SND_SOC_DAIFMT_IB_IF) not
> correctly.
> 
> >From the datasheet (Table 58):
> R5 Format Control, BITS[5:4], [BCP:LRP]:
>   (0) 00 =  normal   BCLK, normal   LRCLK
>   (1) 01 =  normal   BCLK, inverted LRCLK <-- Fix this
>   (2) 10 =  inverted BCLK, normal   LRCLK
>   (3) 11 =  inverted BCLK, inverted LRCLK <-- Fix this
> 
> Signed-off-by: Sergej Sawazki <sergej@taudac.com>
> ---

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charle

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

* Re: [PATCH] ASoC: wm8741: Fix setting BCLK and LRCLK polarity
  2017-11-02 13:23 [PATCH] ASoC: wm8741: Fix setting BCLK and LRCLK polarity Sergej Sawazki
  2017-11-03 11:18 ` Charles Keepax
@ 2017-11-03 11:45 ` Mark Brown
  2017-11-03 13:05   ` Sergej Sawazki
  2017-11-03 18:50 ` Applied "ASoC: wm8741: Fix setting BCLK and LRCLK polarity" to the asoc tree Mark Brown
  2 siblings, 1 reply; 8+ messages in thread
From: Mark Brown @ 2017-11-03 11:45 UTC (permalink / raw)
  To: Sergej Sawazki; +Cc: ce3a, patches, alsa-devel, ckeepax, lgirdwood


[-- Attachment #1.1: Type: text/plain, Size: 293 bytes --]

On Thu, Nov 02, 2017 at 02:23:02PM +0100, Sergej Sawazki wrote:
> After checking the code and the datasheet, it seems like we are handling
> the clock inversion (SND_SOC_DAIFMT_NB_IF and SND_SOC_DAIFMT_IB_IF) not
> correctly.

This doesn't apply against current code, please check and resend.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH] ASoC: wm8741: Fix setting BCLK and LRCLK polarity
  2017-11-03 11:45 ` Mark Brown
@ 2017-11-03 13:05   ` Sergej Sawazki
  2017-11-03 17:20     ` Mark Brown
  0 siblings, 1 reply; 8+ messages in thread
From: Sergej Sawazki @ 2017-11-03 13:05 UTC (permalink / raw)
  To: Mark Brown; +Cc: ce3a, patches, alsa-devel, ckeepax, lgirdwood


Am 03.11.2017 um 12:45 schrieb Mark Brown:
> On Thu, Nov 02, 2017 at 02:23:02PM +0100, Sergej Sawazki wrote:
>> After checking the code and the datasheet, it seems like we are handling
>> the clock inversion (SND_SOC_DAIFMT_NB_IF and SND_SOC_DAIFMT_IB_IF) not
>> correctly.
> 
> This doesn't apply against current code, please check and resend.
> 

It applies against "for-next" (e67852427fb). Is it the wrong branch?

Sergej

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

* Re: [PATCH] ASoC: wm8741: Fix setting BCLK and LRCLK polarity
  2017-11-03 13:05   ` Sergej Sawazki
@ 2017-11-03 17:20     ` Mark Brown
  2017-11-03 17:38       ` Sergej Sawazki
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Brown @ 2017-11-03 17:20 UTC (permalink / raw)
  To: Sergej Sawazki; +Cc: ce3a, patches, alsa-devel, ckeepax, lgirdwood


[-- Attachment #1.1: Type: text/plain, Size: 907 bytes --]

On Fri, Nov 03, 2017 at 02:05:30PM +0100, Sergej Sawazki wrote:
> Am 03.11.2017 um 12:45 schrieb Mark Brown:
> > On Thu, Nov 02, 2017 at 02:23:02PM +0100, Sergej Sawazki wrote:
> > > After checking the code and the datasheet, it seems like we are handling
> > > the clock inversion (SND_SOC_DAIFMT_NB_IF and SND_SOC_DAIFMT_IB_IF) not
> > > correctly.

> > This doesn't apply against current code, please check and resend.

> It applies against "for-next" (e67852427fb). Is it the wrong branch?

It didn't apply against my current for-next branch when I tried, are
you sure you were working with something up to date?  I don't even have
a copy of that commit locally, even in the reflog...

In general I apply things against any existing topic branch for the
part, or against any fixes branch, or against Linus' tags.  Exactly what
depends on what kind of change it is and if there's a branch already
there.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH] ASoC: wm8741: Fix setting BCLK and LRCLK polarity
  2017-11-03 17:20     ` Mark Brown
@ 2017-11-03 17:38       ` Sergej Sawazki
  2017-11-03 18:02         ` Mark Brown
  0 siblings, 1 reply; 8+ messages in thread
From: Sergej Sawazki @ 2017-11-03 17:38 UTC (permalink / raw)
  To: Mark Brown; +Cc: ce3a, patches, alsa-devel, ckeepax, lgirdwood



Am 03.11.2017 um 18:20 schrieb Mark Brown:
> On Fri, Nov 03, 2017 at 02:05:30PM +0100, Sergej Sawazki wrote:
>> Am 03.11.2017 um 12:45 schrieb Mark Brown:
>>> On Thu, Nov 02, 2017 at 02:23:02PM +0100, Sergej Sawazki wrote:
>>>> After checking the code and the datasheet, it seems like we are handling
>>>> the clock inversion (SND_SOC_DAIFMT_NB_IF and SND_SOC_DAIFMT_IB_IF) not
>>>> correctly.
> 
>>> This doesn't apply against current code, please check and resend.
> 
>> It applies against "for-next" (e67852427fb). Is it the wrong branch?
> 
> It didn't apply against my current for-next branch when I tried, are
> you sure you were working with something up to date?  I don't even have
> a copy of that commit locally, even in the reflog...
> 
> In general I apply things against any existing topic branch for the
> part, or against any fixes branch, or against Linus' tags.  Exactly what
> depends on what kind of change it is and if there's a branch already
> there.
> 

That commit is the head of my current for-next branch:

commit e67852427fb5e3ea794302f2d0b2939e07aca8cf (origin/for-next)
Merge: 16632a3 a10953f eaf8abc 6bd25aa b614583
Author: Mark Brown <broonie@kernel.org>
Date:   Fri Nov 3 12:49:29 2017 +0100

     Merge remote-tracking branches 'asoc/topic/ts3a277e', 'asoc/topic
     /wm8741', 'asoc/topic/wm97xx' and 'asoc/topic/zte' into asoc-next

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

* Re: [PATCH] ASoC: wm8741: Fix setting BCLK and LRCLK polarity
  2017-11-03 17:38       ` Sergej Sawazki
@ 2017-11-03 18:02         ` Mark Brown
  0 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2017-11-03 18:02 UTC (permalink / raw)
  To: Sergej Sawazki; +Cc: ce3a, patches, alsa-devel, ckeepax, lgirdwood


[-- Attachment #1.1: Type: text/plain, Size: 1072 bytes --]

On Fri, Nov 03, 2017 at 06:38:26PM +0100, Sergej Sawazki wrote:
> Am 03.11.2017 um 18:20 schrieb Mark Brown:

> > > It applies against "for-next" (e67852427fb). Is it the wrong branch?

> > It didn't apply against my current for-next branch when I tried, are
> > you sure you were working with something up to date?  I don't even have
> > a copy of that commit locally, even in the reflog...

> > In general I apply things against any existing topic branch for the
> > part, or against any fixes branch, or against Linus' tags.  Exactly what
> > depends on what kind of change it is and if there's a branch already
> > there.

> That commit is the head of my current for-next branch:

> commit e67852427fb5e3ea794302f2d0b2939e07aca8cf (origin/for-next)
> Merge: 16632a3 a10953f eaf8abc 6bd25aa b614583
> Author: Mark Brown <broonie@kernel.org>
> Date:   Fri Nov 3 12:49:29 2017 +0100

Hrm, so that's newer than what you sent against...  I did try for-next
at whatever point I was building things up and it didn't apply cleanly.
In any case, like I say you need to resend.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Applied "ASoC: wm8741: Fix setting BCLK and LRCLK polarity" to the asoc tree
  2017-11-02 13:23 [PATCH] ASoC: wm8741: Fix setting BCLK and LRCLK polarity Sergej Sawazki
  2017-11-03 11:18 ` Charles Keepax
  2017-11-03 11:45 ` Mark Brown
@ 2017-11-03 18:50 ` Mark Brown
  2 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2017-11-03 18:50 UTC (permalink / raw)
  To: Sergej Sawazki; +Cc: alsa-devel, ckeepax, patches, lgirdwood, broonie, ce3a

The patch

   ASoC: wm8741: Fix setting BCLK and LRCLK polarity

has been applied to the asoc tree at

   https://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 81b3cc55afc3cde54df98f93fbd4704fab7cc0e0 Mon Sep 17 00:00:00 2001
From: Sergej Sawazki <sergej@taudac.com>
Date: Fri, 3 Nov 2017 19:34:28 +0100
Subject: [PATCH] ASoC: wm8741: Fix setting BCLK and LRCLK polarity

After checking the code and the datasheet, it seems like we are handling
the clock inversion (SND_SOC_DAIFMT_NB_IF and SND_SOC_DAIFMT_IB_IF) not
correctly.

>From the datasheet (Table 58):
R5 Format Control, BITS[5:4], [BCP:LRP]:
  (0) 00 =  normal   BCLK, normal   LRCLK
  (1) 01 =  normal   BCLK, inverted LRCLK <-- Fix this
  (2) 10 =  inverted BCLK, normal   LRCLK
  (3) 11 =  inverted BCLK, inverted LRCLK <-- Fix this

Signed-off-by: Sergej Sawazki <sergej@taudac.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/wm8741.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8741.c b/sound/soc/codecs/wm8741.c
index 3c96af057a3e..a394dbee77aa 100644
--- a/sound/soc/codecs/wm8741.c
+++ b/sound/soc/codecs/wm8741.c
@@ -333,13 +333,13 @@ static int wm8741_set_dai_fmt(struct snd_soc_dai *codec_dai,
 	switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
 	case SND_SOC_DAIFMT_NB_NF:
 		break;
-	case SND_SOC_DAIFMT_IB_IF:
+	case SND_SOC_DAIFMT_NB_IF:
 		iface |= 0x10;
 		break;
 	case SND_SOC_DAIFMT_IB_NF:
 		iface |= 0x20;
 		break;
-	case SND_SOC_DAIFMT_NB_IF:
+	case SND_SOC_DAIFMT_IB_IF:
 		iface |= 0x30;
 		break;
 	default:
-- 
2.15.0

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

end of thread, other threads:[~2017-11-03 18:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-02 13:23 [PATCH] ASoC: wm8741: Fix setting BCLK and LRCLK polarity Sergej Sawazki
2017-11-03 11:18 ` Charles Keepax
2017-11-03 11:45 ` Mark Brown
2017-11-03 13:05   ` Sergej Sawazki
2017-11-03 17:20     ` Mark Brown
2017-11-03 17:38       ` Sergej Sawazki
2017-11-03 18:02         ` Mark Brown
2017-11-03 18:50 ` Applied "ASoC: wm8741: Fix setting BCLK and LRCLK polarity" to the asoc tree Mark Brown

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.