linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 5/6] ASoC: enable wm8753 in aspenite
@ 2010-03-19 15:54 Haojian Zhuang
  2010-03-20 16:42 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Haojian Zhuang @ 2010-03-19 15:54 UTC (permalink / raw)
  To: linux-arm-kernel



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

* [PATCH 5/6] ASoC: enable wm8753 in aspenite
  2010-03-19 15:54 [PATCH 5/6] ASoC: enable wm8753 in aspenite Haojian Zhuang
@ 2010-03-20 16:42 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2010-03-20 16:42 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Mar 19, 2010 at 11:54:40AM -0400, Haojian Zhuang wrote:

I note that you're not copying any of these ALSA patches to the ALSA
list...

> +	rate =  params_rate(params);
> +	width = snd_pcm_format_physical_width(params_format(params));
> +	channel = params_channels(params);
> +	ret = pxa168_seek_mclk_conf(rate, width, channel);
> +	if (ret < 0)
> +		return ret;
> +	index = ret;
> +	mclk = pxa168_get_mclk(ret);

Now that it's slightly clearer that this is exported from the SSP driver
the interface here looks odd - there doesn't seem to be any reason to
expose anything of the PXA internal configuration outside the SSP
driver, especially given that the configurations are expressed in terms
of an index into a table of configuration values which aren't much use
to anything outside the SSP driver.

A function allowing the MCLK rate to be queried seems reasonable since
this can be used to configure external devices (as you're doing here)
but this block of code and the subsequent passing of index back into the
driver both seem like boilerplate which every user (or at least most
users) will have to do so it'd be better to save them the effort.

> +	/* 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;

Each time you've posted this I've asked you why you're using an inverted
frame clock for the DAI.  IIRC last time you posted this you said that
you'd add a comment explaining this but I don't see one here?

I'd also suggest not running the SSP port in I2S mode if you can avoid
it - the controller is really just emulating I2S, which makes the
configuration rather fragile.  The DSP modes are more natural for the
PXA hardware, I'd suggest using one of those.

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

end of thread, other threads:[~2010-03-20 16:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-19 15:54 [PATCH 5/6] ASoC: enable wm8753 in aspenite Haojian Zhuang
2010-03-20 16:42 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).