alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: David Lambert <dlambert@ti.com>
Cc: Tony Lindgren <tony@atomide.com>,
	alsa-devel@alsa-project.org, linux-omap@vger.kernel.org,
	Paul Walmsley <paul@pwsan.com>,
	Liam Girdwood <lrg@slimlogic.co.uk>
Subject: Re: [PATCH v2 1/4] ASoC: DMIC: Adding the OMAP DMIC driver
Date: Thu, 6 Jan 2011 22:20:52 +0000	[thread overview]
Message-ID: <20110106222052.GC8408@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1294322439-16305-2-git-send-email-dlambert@ti.com>

On Thu, Jan 06, 2011 at 08:00:36AM -0600, David Lambert wrote:

> @@ -103,6 +106,7 @@ config SND_OMAP_SOC_SDP4430
>  	depends on TWL4030_CORE && SND_OMAP_SOC && MACH_OMAP_4430SDP
>  	select SND_OMAP_SOC_MCPDM
>  	select SND_SOC_TWL6040
> +	select SND_SOC_DMIC
>  	help
>  	  Say Y if you want to add support for SoC audio on Texas Instruments
>  	  SDP4430.

Any tweaks to specific machines should be done separately to adding the
new drivers.

> +	struct omap_dmic *dmic = snd_soc_dai_get_drvdata(dai);
> +	int ctrl, div_sel = -EINVAL;
> +
> +	if (div_id != OMAP_DMIC_CLKDIV)
> +		return -ENODEV;
> +
> +	switch (dmic->clk_freq) {
> +	case 19200000:
> +		if (div == 5)
> +			div_sel = 0x1;
> +		else if (div == 8)
> +			div_sel = 0x0;

I suggested switch statements previously; you didn't comment on my
reply.

> +static irqreturn_t omap_dmic_irq_handler(int irq, void *dev_id)
> +{
> +	struct omap_dmic *dmic = dev_id;

My comments on this function appear to have been mostly ignored also.

> +	switch (rate) {
> +	case 192000:
> +		div = 5;
> +		break;
> +	default:
> +		div = 8;

Shouldn't the default case be a case 96000?

> +	case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
> +		break;
> +	case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
> +		break;

Remove the empty cases, they're handled by the default.

> +
> +MODULE_AUTHOR("David Lambert <dlambert@ti.com>");
> +MODULE_DESCRIPTION("OMAP DMIC SoC Interface");
> +MODULE_LICENSE("GPL");

As also previously noted you should have a MODULE_ALIAS.

  reply	other threads:[~2011-01-06 22:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-06 14:00 [PATCH v2 0/4] Adding OMAP DMIC driver to kernel David Lambert
2011-01-06 14:00 ` [PATCH v2 1/4] ASoC: DMIC: Adding the OMAP DMIC driver David Lambert
2011-01-06 22:20   ` Mark Brown [this message]
2011-01-07 16:34     ` Lambert, David
2011-01-07 17:13       ` Mark Brown
2011-01-06 14:00 ` [PATCH v2 2/4] ASoC: DMIC codec: Adding a generic DMIC codec David Lambert
2011-01-12  0:54   ` [alsa-devel] " Liam Girdwood
2011-01-06 14:00 ` [PATCH v2 3/4] OMAP4: hwmod: add entries for DMIC driver David Lambert
2011-01-06 22:23   ` Mark Brown
2011-01-06 22:39   ` Kevin Hilman
2011-01-06 14:00 ` [PATCH v2 4/4] OMAP4: DMIC: Add DMIC codec platform devices David Lambert
2011-01-06 22:25   ` 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=20110106222052.GC8408@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=dlambert@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=lrg@slimlogic.co.uk \
    --cc=paul@pwsan.com \
    --cc=tony@atomide.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 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).