All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: SAMSUNG: 24-bit audio playback on Exynos4210
@ 2011-07-13 11:22 Giridhar Maruthy
  2011-07-13 11:48 ` Naveen Krishna Ch
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Giridhar Maruthy @ 2011-07-13 11:22 UTC (permalink / raw)
  To: naveenkrishna.ch, jassisinghbrar, linux-samsung-soc, dp,
	Kyung-Kwee.Ryu, broonie
  Cc: Giridhar Maruthy

Using 256fs or 512fs will result in distortion of 24-bit
audio samples. This is because the lrclk generated is not
proper. Using 384 fs generates proper output.

Signed-off-by: Giridhar Maruthy <giridhar.maruthy@linaro.org>
---
 sound/soc/samsung/smdk_wm8994.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/sound/soc/samsung/smdk_wm8994.c b/sound/soc/samsung/smdk_wm8994.c
index e7c1009..45fbe2b 100644
--- a/sound/soc/samsung/smdk_wm8994.c
+++ b/sound/soc/samsung/smdk_wm8994.c
@@ -8,6 +8,7 @@
  */
 
 #include "../codecs/wm8994.h"
+#include <sound/pcm_params.h>
 
  /*
   * Default CFG switch settings to use this driver:
@@ -44,7 +45,9 @@ static int smdk_hw_params(struct snd_pcm_substream *substream,
 	int ret;
 
 	/* AIF1CLK should be >=3MHz for optimal performance */
-	if (params_rate(params) == 8000 || params_rate(params) == 11025)
+	if (params_format(params) == SNDRV_PCM_FORMAT_S24_LE)
+		pll_out = params_rate(params) * 384;
+	else if (params_rate(params) == 8000 || params_rate(params) == 11025)
 		pll_out = params_rate(params) * 512;
 	else
 		pll_out = params_rate(params) * 256;
-- 
1.7.4.1

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

* Re: [PATCH] ASoC: SAMSUNG: 24-bit audio playback on Exynos4210
  2011-07-13 11:22 [PATCH] ASoC: SAMSUNG: 24-bit audio playback on Exynos4210 Giridhar Maruthy
@ 2011-07-13 11:48 ` Naveen Krishna Ch
  2011-07-13 14:06 ` Jassi Brar
  2011-07-13 23:26 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Naveen Krishna Ch @ 2011-07-13 11:48 UTC (permalink / raw)
  To: Giridhar Maruthy
  Cc: jassisinghbrar, linux-samsung-soc, dp, Kyung-Kwee.Ryu, broonie

It works fine with this change.

On 13 July 2011 16:52, Giridhar Maruthy <giridhar.maruthy@linaro.org> wrote:
> Using 256fs or 512fs will result in distortion of 24-bit
> audio samples. This is because the lrclk generated is not
> proper. Using 384 fs generates proper output.
>
> Signed-off-by: Giridhar Maruthy <giridhar.maruthy@linaro.org>
> ---
>  sound/soc/samsung/smdk_wm8994.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/sound/soc/samsung/smdk_wm8994.c b/sound/soc/samsung/smdk_wm8994.c
> index e7c1009..45fbe2b 100644
> --- a/sound/soc/samsung/smdk_wm8994.c
> +++ b/sound/soc/samsung/smdk_wm8994.c
> @@ -8,6 +8,7 @@
>  */
>
>  #include "../codecs/wm8994.h"
> +#include <sound/pcm_params.h>
>
>  /*
>   * Default CFG switch settings to use this driver:
> @@ -44,7 +45,9 @@ static int smdk_hw_params(struct snd_pcm_substream *substream,
>        int ret;
>
>        /* AIF1CLK should be >=3MHz for optimal performance */
> -       if (params_rate(params) == 8000 || params_rate(params) == 11025)
> +       if (params_format(params) == SNDRV_PCM_FORMAT_S24_LE)
> +               pll_out = params_rate(params) * 384;
> +       else if (params_rate(params) == 8000 || params_rate(params) == 11025)
>                pll_out = params_rate(params) * 512;
>        else
>                pll_out = params_rate(params) * 256;
> --
> 1.7.4.1
>
>



-- 
Shine bright,
(: Nav :)

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

* Re: [PATCH] ASoC: SAMSUNG: 24-bit audio playback on Exynos4210
  2011-07-13 11:22 [PATCH] ASoC: SAMSUNG: 24-bit audio playback on Exynos4210 Giridhar Maruthy
  2011-07-13 11:48 ` Naveen Krishna Ch
@ 2011-07-13 14:06 ` Jassi Brar
  2011-07-13 23:26 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Jassi Brar @ 2011-07-13 14:06 UTC (permalink / raw)
  To: Giridhar Maruthy
  Cc: naveenkrishna.ch, linux-samsung-soc, dp, Kyung-Kwee.Ryu, broonie

On Wed, Jul 13, 2011 at 4:52 PM, Giridhar Maruthy
<giridhar.maruthy@linaro.org> wrote:
> Using 256fs or 512fs will result in distortion of 24-bit
> audio samples. This is because the lrclk generated is not
> proper. Using 384 fs generates proper output.
>
> Signed-off-by: Giridhar Maruthy <giridhar.maruthy@linaro.org>
> ---
>  sound/soc/samsung/smdk_wm8994.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/sound/soc/samsung/smdk_wm8994.c b/sound/soc/samsung/smdk_wm8994.c
> index e7c1009..45fbe2b 100644
> --- a/sound/soc/samsung/smdk_wm8994.c
> +++ b/sound/soc/samsung/smdk_wm8994.c
> @@ -8,6 +8,7 @@
>  */
>
>  #include "../codecs/wm8994.h"
> +#include <sound/pcm_params.h>
>
>  /*
>   * Default CFG switch settings to use this driver:
> @@ -44,7 +45,9 @@ static int smdk_hw_params(struct snd_pcm_substream *substream,
>        int ret;
>
>        /* AIF1CLK should be >=3MHz for optimal performance */
> -       if (params_rate(params) == 8000 || params_rate(params) == 11025)
> +       if (params_format(params) == SNDRV_PCM_FORMAT_S24_LE)
> +               pll_out = params_rate(params) * 384;
> +       else if (params_rate(params) == 8000 || params_rate(params) == 11025)
>                pll_out = params_rate(params) * 512;
>        else
>                pll_out = params_rate(params) * 256;

It might be a good idea to maintain a matrix of sample rates and sizes
tested cleanly.
Thanks,
Jassi

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

* Re: [PATCH] ASoC: SAMSUNG: 24-bit audio playback on Exynos4210
  2011-07-13 11:22 [PATCH] ASoC: SAMSUNG: 24-bit audio playback on Exynos4210 Giridhar Maruthy
  2011-07-13 11:48 ` Naveen Krishna Ch
  2011-07-13 14:06 ` Jassi Brar
@ 2011-07-13 23:26 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2011-07-13 23:26 UTC (permalink / raw)
  To: Giridhar Maruthy
  Cc: naveenkrishna.ch, jassisinghbrar, linux-samsung-soc, dp, Kyung-Kwee.Ryu

On Wed, Jul 13, 2011 at 04:52:06PM +0530, Giridhar Maruthy wrote:
> Using 256fs or 512fs will result in distortion of 24-bit
> audio samples. This is because the lrclk generated is not
> proper. Using 384 fs generates proper output.

Applied, thanks.

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

end of thread, other threads:[~2011-07-13 23:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-13 11:22 [PATCH] ASoC: SAMSUNG: 24-bit audio playback on Exynos4210 Giridhar Maruthy
2011-07-13 11:48 ` Naveen Krishna Ch
2011-07-13 14:06 ` Jassi Brar
2011-07-13 23:26 ` 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.