All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Leon Romanovsky <leon@leon.nu>
Cc: alsa-devel@alsa-project.org, Andrey Danin <danindrey@mail.ru>,
	lrg@ti.com
Subject: Re: [PATCH] ASoC: Tegra: Add support of tegra boards based on ALC5632 codec
Date: Wed, 23 Nov 2011 15:38:09 +0000	[thread overview]
Message-ID: <20111123153809.GC30049@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1321906088-29964-1-git-send-email-leon@leon.nu>

On Mon, Nov 21, 2011 at 10:08:08PM +0200, Leon Romanovsky wrote:

Mostly OK, a few things below but they're very minor.

> +	err = snd_soc_dai_set_fmt(cpu_dai,
> +					SND_SOC_DAIFMT_I2S |
> +					SND_SOC_DAIFMT_NB_NF |
> +					SND_SOC_DAIFMT_CBS_CFS);
> +	if (err < 0) {
> +		dev_err(card->dev, "cpu_dai fmt not set\n");
> +		return err;
> +	}
> +
> +	err = snd_soc_dai_set_sysclk(codec_dai, 0, mclk,
> +					SND_SOC_CLOCK_IN);
> +	if (err < 0) {
> +		dev_err(card->dev, "codec_dai clock not set\n");
> +		return err;
> +	}

These should use the .dai_fmt member in the dai_link struct.

> +	ret = snd_soc_add_controls(codec, tegra_alc5632_controls,
> +				   ARRAY_SIZE(tegra_alc5632_controls));
> +	if (ret < 0)
> +		return ret;
> +
> +	snd_soc_dapm_new_controls(dapm, tegra_alc5632_dapm_widgets,
> +		ARRAY_SIZE(tegra_alc5632_dapm_widgets));
> +
> +	snd_soc_dapm_add_routes(dapm, tegra_alc5632_audio_map,
> +		ARRAY_SIZE(tegra_alc5632_audio_map));

These should use the controls, dapm_widgets and dapm_routes members of
the card structure.

> +
> +	snd_soc_dapm_sync(dapm);

No need for this, the core will sync for you.

> +	if (!machine_is_paz00()) {
> +		dev_err(&pdev->dev, "Not running on Toshiba AC100!\n");
> +		return -ENODEV;
> +	}

Should be no need to check for htis as you're using an explicit platform
device - if the device is registered you should be OK.

> +static int __init tegra_alc5632_init(void)
> +{
> +	return platform_driver_register(&tegra_alc5632_driver);
> +}
> +module_init(tegra_alc5632_init);
> +
> +static void __exit tegra_alc5632_exit(void)
> +{
> +	platform_driver_unregister(&tegra_alc5632_driver);
> +}
> +module_exit(tegra_alc5632_exit);

Use platform_module_driver for this.

  parent reply	other threads:[~2011-11-23 15:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-21 20:08 [PATCH] ASoC: Tegra: Add support of tegra boards based on ALC5632 codec Leon Romanovsky
     [not found] ` <1321906088-29964-1-git-send-email-leon-2ukJVAZIZ/Y@public.gmane.org>
2011-11-22 13:30   ` [alsa-devel] [PATCH] ASoC: Tegra: Add support of tegra boards basedon " Marc Dietrich
2011-11-23  8:04     ` Leon Romanovsky
     [not found]       ` <CALq1K=Ka0JYut22FwovAyAcZSbqcQssjUPrk6rUU0Fq2iOZG_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-11-23 17:37         ` [alsa-devel] " Stephen Warren
     [not found]           ` <74CDBE0F657A3D45AFBB94109FB122FF174F08C6FF-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-11-27  8:37             ` Leon Romanovsky
2011-11-23 15:38 ` Mark Brown [this message]
2011-11-23 21:50 ` [PATCH] ASoC: Tegra: Add support of tegra boards based on " Stephen Warren
2011-11-23 21:58   ` Mark Brown
2011-11-23 22:30     ` Stephen Warren
2011-11-23 22:46       ` Mark Brown
2011-11-23 23:31         ` Stephen Warren
2011-11-27  8:48   ` Leon Romanovsky
2011-11-28 16:52     ` Stephen Warren
2011-11-29  5:35       ` Leon Romanovsky

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=20111123153809.GC30049@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=danindrey@mail.ru \
    --cc=leon@leon.nu \
    --cc=lrg@ti.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.