Skip to contentSkip to conversation

ASoC: WM8580: Debug BCLK and sample size

PATCH Superseded Jassi Brar 4 participants 5 messages Dec 7, 2010 – Dec 8, 2010

Subsystems (3)
lore
Share & tools
lore

Jassi Brar

author
#0 lore raw

PATCH 1/1 ASoC: WM8580: Debug BCLK and sample size

In case of SNDRV_PCM_FORMAT_S32_LE, we need to set WM8580_AIF_LENGTH_32, rather than WM8580_AIF_LENGTH_24.
Also, the BCLK has to be 64fs, for sample size of 20, 24 and 32 bits.

---
 sound/soc/codecs/wm8580.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
sound/soc/codecs/wm8580.c +4 -4
index cb7765f..45efc94 100644
@@ -491,16 +491,16 @@ static int wm8580_paif_hw_params(struct snd_pcm_substream *substream,
 		paifa |= 0x8;
 		break;
 	case SNDRV_PCM_FORMAT_S20_3LE:
-		paifa |= 0x10;
+		paifa |= 0x0;
 		paifb |= WM8580_AIF_LENGTH_20;
 		break;
 	case SNDRV_PCM_FORMAT_S24_LE:
-		paifa |= 0x10;
+		paifa |= 0x0;
 		paifb |= WM8580_AIF_LENGTH_24;
 		break;
 	case SNDRV_PCM_FORMAT_S32_LE:
-		paifa |= 0x10;
-		paifb |= WM8580_AIF_LENGTH_24;
+		paifa |= 0x0;
+		paifb |= WM8580_AIF_LENGTH_32;
 		break;
 	default:
 		return -EINVAL;
Signature · 1 line
1.6.2.5
#1 lore raw
Quoted 14 lines · Jassi Brar

In case of SNDRV_PCM_FORMAT_S32_LE, we need to set WM8580_AIF_LENGTH_32, rather than WM8580_AIF_LENGTH_24.
Also, the BCLK has to be 64fs, for sample size of 20, 24 and 32 bits.

---
 sound/soc/codecs/wm8580.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
sound/soc/codecs/wm8580.c +0 -0
index cb7765f..45efc94 100644

sound/soc/codecs/wm8580.c static int wm8580_paif_hw_params(struct snd_pcm_substream *substream, · line 494

Quoted 5 lines
sound/soc/codecs/wm8580.c +1 -1
@@ -491,16 +491,16 @@ static int wm8580_paif_hw_params(struct snd_pcm_substream *substream,
 		paifa |= 0x8;
 		break;
 	case SNDRV_PCM_FORMAT_S20_3LE:
-		paifa |= 0x10;
+		paifa |= 0x0;

Any reason why we are OR ing paifa with 0 ?

Quoted 5 lines
sound/soc/codecs/wm8580.c +1 -1
 		paifb |= WM8580_AIF_LENGTH_20;
 		break;
 	case SNDRV_PCM_FORMAT_S24_LE:
-		paifa |= 0x10;
+		paifa |= 0x0;

sound/soc/codecs/wm8580.c static int wm8580_paif_hw_params(struct snd_pcm_substream *substream, · line 506

Quoted 10 lines
sound/soc/codecs/wm8580.c +2 -2
 		paifb |= WM8580_AIF_LENGTH_24;
 		break;
 	case SNDRV_PCM_FORMAT_S32_LE:
-		paifa |= 0x10;
-		paifb |= WM8580_AIF_LENGTH_24;
+		paifa |= 0x0;
+		paifb |= WM8580_AIF_LENGTH_32;
 		break;
 	default:
 		return -EINVAL;

Thanks

Liam

Signature · 3 lines
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk
#2 lore raw
Quoted 10 lines · Liam Girdwood
Quoted 9 lines · Jassi Brar

In case of SNDRV_PCM_FORMAT_S32_LE, we need to set WM8580_AIF_LENGTH_32, rather than WM8580_AIF_LENGTH_24.
Also, the BCLK has to be 64fs, for sample size of 20, 24 and 32 bits.

---
 sound/soc/codecs/wm8580.c |    8 ++++----

 1 files changed, 4 insertions(+), 4 deletions(-)
Quoted 12 lines
Quoted 10 lines
sound/soc/codecs/wm8580.c +0 -0
index cb7765f..45efc94 100644
@@ -491,16 +491,16 @@ static int wm8580_paif_hw_params(struct snd_pcm_substream *substream,
               paifa |= 0x8;
               break;

      case SNDRV_PCM_FORMAT_S20_3LE:
-             paifa |= 0x10;
+             paifa |= 0x0;

Any reason why we are OR ing paifa with 0 ?

None really, just got carried away 'setting' correct value :) Will resend.
Thanks
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

author
#3 lore raw

PATCH v2 1/1 ASoC: WM8580: Debug BCLK and sample size

In reply to Jassi Brar

In case of SNDRV_PCM_FORMAT_S32_LE, we need to set WM8580_AIF_LENGTH_32, rather than WM8580_AIF_LENGTH_24. Also, the BCLK has to be 64fs, for sample size of 20, 24 and 32 bits.

---
 sound/soc/codecs/wm8580.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
sound/soc/codecs/wm8580.c +1 -4
index cb7765f..6296946 100644
@@ -491,16 +491,13 @@ static int wm8580_paif_hw_params(struct snd_pcm_substream *substream,
 		paifa |= 0x8;
 		break;
 	case SNDRV_PCM_FORMAT_S20_3LE:
-		paifa |= 0x10;
 		paifb |= WM8580_AIF_LENGTH_20;
 		break;
 	case SNDRV_PCM_FORMAT_S24_LE:
-		paifa |= 0x10;
 		paifb |= WM8580_AIF_LENGTH_24;
 		break;
 	case SNDRV_PCM_FORMAT_S32_LE:
-		paifa |= 0x10;
-		paifb |= WM8580_AIF_LENGTH_24;
+		paifb |= WM8580_AIF_LENGTH_32;
 		break;
 	default:
 		return -EINVAL;
Signature · 1 line
1.6.2.5
#4 lore raw
Quoted 5 lines · Jassi Brar

In case of SNDRV_PCM_FORMAT_S32_LE, we need to set WM8580_AIF_LENGTH_32, rather than WM8580_AIF_LENGTH_24. Also, the BCLK has to be 64fs, for sample size of 20, 24 and 32 bits.

The original version of this patch was already applied, though an incremental patch dropping the |= 0 would be nice.