* [PATCH] ASoC: WM8580: Debug BCLK and sample size
@ 2010-12-07 10:23 Jassi Brar
2010-12-07 12:48 ` Liam Girdwood
2010-12-08 7:50 ` [PATCHv2] " Jassi Brar
0 siblings, 2 replies; 5+ messages in thread
From: Jassi Brar @ 2010-12-07 10:23 UTC (permalink / raw)
To: alsa-devel; +Cc: sbkim73, kgene.kim, broonie, Jassi Brar, lrg
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.
Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
---
sound/soc/codecs/wm8580.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c
index cb7765f..45efc94 100644
--- a/sound/soc/codecs/wm8580.c
+++ b/sound/soc/codecs/wm8580.c
@@ -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;
--
1.6.2.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC: WM8580: Debug BCLK and sample size
2010-12-07 10:23 [PATCH] ASoC: WM8580: Debug BCLK and sample size Jassi Brar
@ 2010-12-07 12:48 ` Liam Girdwood
2010-12-07 13:41 ` Jassi Brar
2010-12-08 7:50 ` [PATCHv2] " Jassi Brar
1 sibling, 1 reply; 5+ messages in thread
From: Liam Girdwood @ 2010-12-07 12:48 UTC (permalink / raw)
To: Jassi Brar; +Cc: sbkim73, kgene.kim, alsa-devel, broonie
On Tue, 2010-12-07 at 19:23 +0900, Jassi Brar wrote:
> 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.
>
> Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
> ---
> sound/soc/codecs/wm8580.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c
> index cb7765f..45efc94 100644
> --- a/sound/soc/codecs/wm8580.c
> +++ b/sound/soc/codecs/wm8580.c
> @@ -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 ?
> 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;
Thanks
Liam
--
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC: WM8580: Debug BCLK and sample size
2010-12-07 12:48 ` Liam Girdwood
@ 2010-12-07 13:41 ` Jassi Brar
0 siblings, 0 replies; 5+ messages in thread
From: Jassi Brar @ 2010-12-07 13:41 UTC (permalink / raw)
To: Liam Girdwood; +Cc: sbkim73, alsa-devel, kgene.kim, Jassi Brar, broonie
On Tue, Dec 7, 2010 at 6:18 PM, Liam Girdwood <lrg@slimlogic.co.uk> wrote:
> On Tue, 2010-12-07 at 19:23 +0900, Jassi Brar wrote:
>> 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.
>>
>> Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
>> ---
>> sound/soc/codecs/wm8580.c | 8 ++++----
>> 1 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c
>> index cb7765f..45efc94 100644
>> --- a/sound/soc/codecs/wm8580.c
>> +++ b/sound/soc/codecs/wm8580.c
>> @@ -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
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCHv2] ASoC: WM8580: Debug BCLK and sample size
2010-12-07 10:23 [PATCH] ASoC: WM8580: Debug BCLK and sample size Jassi Brar
2010-12-07 12:48 ` Liam Girdwood
@ 2010-12-08 7:50 ` Jassi Brar
2010-12-08 8:06 ` Mark Brown
1 sibling, 1 reply; 5+ messages in thread
From: Jassi Brar @ 2010-12-08 7:50 UTC (permalink / raw)
To: alsa-devel; +Cc: sbkim73, kgene.kim, broonie, Jassi Brar, lrg
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.
Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
---
sound/soc/codecs/wm8580.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c
index cb7765f..6296946 100644
--- a/sound/soc/codecs/wm8580.c
+++ b/sound/soc/codecs/wm8580.c
@@ -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;
--
1.6.2.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCHv2] ASoC: WM8580: Debug BCLK and sample size
2010-12-08 7:50 ` [PATCHv2] " Jassi Brar
@ 2010-12-08 8:06 ` Mark Brown
0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2010-12-08 8:06 UTC (permalink / raw)
To: Jassi Brar; +Cc: sbkim73, alsa-devel, kgene.kim, lrg
On 8 Dec 2010, at 07:50, Jassi Brar wrote:
> 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.
>
> Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
The original version of this patch was already applied, though an
incremental patch dropping the |= 0 would be nice.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-12-08 8:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-07 10:23 [PATCH] ASoC: WM8580: Debug BCLK and sample size Jassi Brar
2010-12-07 12:48 ` Liam Girdwood
2010-12-07 13:41 ` Jassi Brar
2010-12-08 7:50 ` [PATCHv2] " Jassi Brar
2010-12-08 8:06 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox