From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: javier Martin <javier.martin@vista-silicon.com>
Cc: alsa-devel@alsa-project.org, Liam Girdwood <lrg@slimlogic.co.uk>
Subject: Re: [PATCH 3/3] ASoC: add machine driver for i.mx27_visstrim_m10 board
Date: Tue, 4 Aug 2009 20:54:45 +0100 [thread overview]
Message-ID: <20090804195445.GD4342@sirena.org.uk> (raw)
In-Reply-To: <eedb5540908040818j3ba586ceq124016bb7eb9d7b5@mail.gmail.com>
On Tue, Aug 04, 2009 at 05:18:02PM +0200, javier Martin wrote:
> This adds support for i.mx27_visstrim_sm10 board machine driver which
> uses an i.mx27 processor plus a wm8974 codec.
> It has been tested on a visstrim_sm10 board.
> Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Again, this all looks good with some relatively small nits.
> +/**
> + * This function connects SSI1 (HPCR1) as slave to
> + * SSI1 external signals (PPCR1)
> + * As slave, HPCR1 must set TFSDIR and TCLKDIR as inputs from
> + * port 4
> + */
> +void audmux_connect_1_4(void)
> +{
Obviously this ought to get pulled out, either into an arch AUXMUX thing
or a separate file in here. However, neither of those things exist
right now. I'll just go prod the last AUXMUX thread on linux-arm-kernel.
> + return;
> +}
No need for the return; here.
> + /*
> + * The WM8974 is better at generating accurate audio clocks than the
> + * MX27 SSI controller, so we will use it as master when we can.
> + */
> + switch (params_rate(params)) {
> + case 8000:
Unless I'm missing something the "when we can" is "in all cases" :)
> + /* set codec DAI configuration */
> + ret = codec_dai->ops->set_fmt(codec_dai,
> + SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_IF |
> + SND_SOC_DAIFMT_SYNC | fmt);
> + if (ret < 0) {
> + printk(KERN_ERR "Error from codec DAI configuration\n");
> + return ret;
> + }
Printing the value of ret would be nice.
> + /* Put DC field of STCCR to 1 (not zero) */
> + ret = cpu_dai->ops->set_tdm_slot(cpu_dai, 0, 2);
Rats, you are using the TDM slot configuration. Oh well. Should check
this error.
> +static int mx27vis_suspend(struct platform_device *pdev, pm_message_t state)
> +{
> + return 0;
> +}
> +
> +static int mx27vis_resume(struct platform_device *pdev)
> +{
> + return 0;
> +}
These can be omitted if empty.
> + unsigned int ssi1_pins[] = {
> + PC20_PF_SSI1_FS,
> + PC21_PF_SSI1_RXD,
> + PC22_PF_SSI1_TXD,
> + PC23_PF_SSI1_CLK,
> + };
> + unsigned int ssi2_pins[] = {
> + PC24_PF_SSI2_FS,
> + PC25_PF_SSI2_RXD,
> + PC26_PF_SSI2_TXD,
> + PC27_PF_SSI2_CLK,
> + };
> + if (ssi_num == 0)
> + ret = mxc_gpio_setup_multiple_pins(ssi1_pins,
> + ARRAY_SIZE(ssi1_pins), "USB OTG");
> + else
> + ret = mxc_gpio_setup_multiple_pins(ssi2_pins,
> + ARRAY_SIZE(ssi2_pins), "USB OTG");
This would normally be done under arch/arm in the board setup code.
prev parent reply other threads:[~2009-08-04 19:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-04 15:18 [PATCH 3/3] ASoC: add machine driver for i.mx27_visstrim_m10 board javier Martin
2009-08-04 16:38 ` Controling wave amplitude using alsa api !! (pcm interface ???????) Guilherme Longo
2009-08-04 17:08 ` John L. Utz III
2009-08-05 11:35 ` Guilherme Longo
2009-08-04 19:54 ` Mark Brown [this message]
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=20090804195445.GD4342@sirena.org.uk \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=javier.martin@vista-silicon.com \
--cc=lrg@slimlogic.co.uk \
/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.