All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: alsa-devel@alsa-project.org, Eric Miao <eric.y.miao@gmail.com>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 3/4] ASoC: enable ssp on aspenite
Date: Wed, 10 Mar 2010 14:44:51 +0000	[thread overview]
Message-ID: <20100310144451.GC24422@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <771cded01003100515j755b781bif9c73947c28969c1@mail.gmail.com>

On Wed, Mar 10, 2010 at 08:15:28AM -0500, Haojian Zhuang wrote:

> Append ssp driver for pxa168 since PLL could be generated by a new way.

This really doesn't seem like an optimal solution - if all that's
changed is that there's a new PLL then it should be possible to handle
that through either librification like the Samsung IISv2 block or with
runtime conditional code like the existing support for the clock
dithering on the PXA3xx.  Forking the entire driver makes maintinance
much harder.

> Append aspenite also that could support pxa168-ssp.

This should be a separate patch.

> +	ret = seek_mclk_conf(rate, width, channel);
> +	if (ret < 0)
> +		return ret;
> +	index = ret;
> +	mclk = get_mclk(ret);

seek_mclk_conf() doesn't appear to have been declared anywhere.

> +	/* set codec DAI configuration */
> +	ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S
> +				  | SND_SOC_DAIFMT_NB_IF
> +				  | SND_SOC_DAIFMT_CBS_CFS);
> +	if (ret < 0)
> +		return ret;

Why are you inverting the frame?  It shouldn't hurt but it's an odd
choice.

> +static int aspenite_hifi_hw_free(struct snd_pcm_substream *substream)
> +{
> +	return 0;
> +}

Remove this if it's empty.

> +	/* Static setup for now */
> +	snd_soc_dapm_enable_pin(codec, "Headset Speaker");
> +	snd_soc_dapm_enable_pin(codec, "Headset Mic");
> +	snd_soc_dapm_enable_pin(codec, "Headphone");

No need to do this, pins are enaled by default.

> +	snd_soc_dapm_sync(codec);

This shouldn't be needed any more, it should get done by the core.

WARNING: multiple messages have this Message-ID (diff)
From: broonie@opensource.wolfsonmicro.com (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] ASoC: enable ssp on aspenite
Date: Wed, 10 Mar 2010 14:44:51 +0000	[thread overview]
Message-ID: <20100310144451.GC24422@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <771cded01003100515j755b781bif9c73947c28969c1@mail.gmail.com>

On Wed, Mar 10, 2010 at 08:15:28AM -0500, Haojian Zhuang wrote:

> Append ssp driver for pxa168 since PLL could be generated by a new way.

This really doesn't seem like an optimal solution - if all that's
changed is that there's a new PLL then it should be possible to handle
that through either librification like the Samsung IISv2 block or with
runtime conditional code like the existing support for the clock
dithering on the PXA3xx.  Forking the entire driver makes maintinance
much harder.

> Append aspenite also that could support pxa168-ssp.

This should be a separate patch.

> +	ret = seek_mclk_conf(rate, width, channel);
> +	if (ret < 0)
> +		return ret;
> +	index = ret;
> +	mclk = get_mclk(ret);

seek_mclk_conf() doesn't appear to have been declared anywhere.

> +	/* set codec DAI configuration */
> +	ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S
> +				  | SND_SOC_DAIFMT_NB_IF
> +				  | SND_SOC_DAIFMT_CBS_CFS);
> +	if (ret < 0)
> +		return ret;

Why are you inverting the frame?  It shouldn't hurt but it's an odd
choice.

> +static int aspenite_hifi_hw_free(struct snd_pcm_substream *substream)
> +{
> +	return 0;
> +}

Remove this if it's empty.

> +	/* Static setup for now */
> +	snd_soc_dapm_enable_pin(codec, "Headset Speaker");
> +	snd_soc_dapm_enable_pin(codec, "Headset Mic");
> +	snd_soc_dapm_enable_pin(codec, "Headphone");

No need to do this, pins are enaled by default.

> +	snd_soc_dapm_sync(codec);

This shouldn't be needed any more, it should get done by the core.

  reply	other threads:[~2010-03-10 14:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-10 13:15 [PATCH 3/4] ASoC: enable ssp on aspenite Haojian Zhuang
2010-03-10 13:15 ` Haojian Zhuang
2010-03-10 14:44 ` Mark Brown [this message]
2010-03-10 14:44   ` Mark Brown

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=20100310144451.GC24422@rakim.wolfsonmicro.main \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=eric.y.miao@gmail.com \
    --cc=haojian.zhuang@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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.