All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Sangbeom Kim <sbkim73@samsung.com>
Cc: alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org,
	jassisinghbrar@gmail.com, lrg@slimlogic.co.uk,
	kgene.kim@samsung.com, ben-linux@fluff.org
Subject: Re: [PATCH V2 2/2] ASoC: SAMSUNG: Add WM8994 PCM Machine driver
Date: Thu, 28 Apr 2011 13:16:22 +0100	[thread overview]
Message-ID: <20110428121621.GA9949@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1303954372-18565-3-git-send-email-sbkim73@samsung.com>

On Thu, Apr 28, 2011 at 10:32:52AM +0900, Sangbeom Kim wrote:

> +	/* Set the codec DAI configuration */
> +	ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_DSP_B
> +				| SND_SOC_DAIFMT_IB_NF
> +				| SND_SOC_DAIFMT_CBS_CFS);
> +	if (ret < 0)
> +		return ret;

> +	/* Set the cpu DAI configuration */
> +	ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_DSP_B
> +				| SND_SOC_DAIFMT_IB_NF
> +				| SND_SOC_DAIFMT_CBS_CFS);
> +	if (ret < 0)
> +		return ret;

> +	ret = snd_soc_dai_set_sysclk(codec_dai, WM8994_SYSCLK_FLL1,
> +					mclk_freq, SND_SOC_CLOCK_IN);
> +	if (ret < 0)
> +		return ret;

For optimal performance the CODEC AIFnCLK needs to be synchronous with
the audio interface clocks.  This means that you should either clock the
FLL from the CPU BCLK or you should make the CODEC master for the AIF.

> +static struct snd_soc_ops smdk_wm8994_pcm_ops = {
> +	.hw_params = smdk_wm8994_pcm_hw_params,
> +};

Note also that the FLL is never stopped in this system - this will not
be optimally power efficient.  It probably doesn't matter too much on
the reference board itself but on systems derived from it it would be an
issue.

> +static struct snd_soc_dai_link smdk_dai[] = {

> +static struct snd_soc_card smdk_pcm = {
> +	.name = "SMDK-PCM",
> +	.dai_link = smdk_dai,
> +	.num_links = 1,

Since the links are in an array using ARRAY_SIZE() would be better.

> +static int __init smdk_audio_init(void)
> +{
> +	return platform_driver_register(&snd_smdk_driver);
> +}
> +
> +module_init(smdk_audio_init);

Random blank line there.

  parent reply	other threads:[~2011-04-28 12:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-28  1:32 [PATCH V2 0/2] Add WM8994 PCM Machine driver for Exynos4210 Sangbeom Kim
2011-04-28  1:32 ` [PATCH V2 1/2] ARM: EXYNOS4: Add PCM audio support for WM8994 Sangbeom Kim
2011-04-28  4:58   ` Jassi Brar
2011-06-07  6:41   ` Marek Szyprowski
2011-06-13  7:48     ` Kukjin Kim
2011-06-08  9:45   ` [PATCH] ARM: EXYNOS4: Fix missing S5P_VA_AUDSS definition Naveen Krishna Chatradhi
2011-06-13  7:37     ` Kukjin Kim
2011-06-17  9:50   ` [PATCH V2 1/2] ARM: EXYNOS4: Add PCM audio support for WM8994 Marek Szyprowski
2011-04-28  1:32 ` [PATCH V2 2/2] ASoC: SAMSUNG: Add WM8994 PCM Machine driver Sangbeom Kim
2011-04-28  5:03   ` Jassi Brar
2011-04-28 12:16   ` Mark Brown [this message]
2011-04-28 10:38 ` [PATCH V2 0/2] Add WM8994 PCM Machine driver for Exynos4210 Mark Brown
2011-05-02  7:06   ` Kukjin Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110428121621.GA9949@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=ben-linux@fluff.org \
    --cc=jassisinghbrar@gmail.com \
    --cc=kgene.kim@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=lrg@slimlogic.co.uk \
    --cc=sbkim73@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.