alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Rajeev Kumar <rajeev-dlh.kumar@st.com>
Cc: tiwai@suse.de, alsa-devel@alsa-project.org, lrg@slimlogic.co.uk,
	spear-devel@list.st.com
Subject: Re: [PATCH 6/8] sound:asoc: Add support for SPEAr ASoC machine driver.
Date: Tue, 20 Mar 2012 16:00:18 +0000	[thread overview]
Message-ID: <20120320160017.GH3445@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <4a7df1383ee0cf347e0c33e38d8e1171db28ee6d.1332242166.git.rajeev-dlh.kumar@st.com>


[-- Attachment #1.1: Type: text/plain, Size: 1339 bytes --]

On Tue, Mar 20, 2012 at 05:03:50PM +0530, Rajeev Kumar wrote:
> The patch add support for SPEAr ASoC machine driver.

This is the support for some particular board rather than for the SoC.

> +	if (cpu_is_spear1340()) {
> +#ifdef CONFIG_CPU_SPEAR1340
> +		u32 mode = 0;
> +		u32 val = readl(VA_SPEAR1340_PERIP_CFG);

Ick, no!  This should be in a driver for the SoC somewhere, not in the
board.  I've not really read most of the rest of the driver.

> +static int __init spear_audio_init(void)
> +{
> +	int ret;
> +	struct snd_soc_card *spear_soc_card;
> +
> +	if (machine_is_spear1340_lcad())
> +		spear_soc_card = &lcad_snd_card;
> +	else if (cpu_is_spear1340())
> +		spear_soc_card = &spear1340_snd_card;
> +	else if (cpu_is_spear320())
> +		spear_soc_card = &spear320s_snd_card;
> +	else
> +		spear_soc_card = &spear_snd_card;

Use snd_soc_register_card().

> +#if defined(CONFIG_CPU_SPEAR1340)
> +	if (cpu_is_spear1340()) {
> +		/* Create and register spdif platform devices */
> +		spdif_dit_device = platform_device_alloc("spdif-dit", -1);
> +		if (!spdif_dit_device) {
> +			printk(KERN_ERR "spdif transceiver " \
> +					"platform_device_alloc fails\n");
> +			return -ENOMEM;
> +		}

Absolutely no, all this setup of the devices for the SoC should be in
your arch/arm code somewhere.  This should only be a driver for the
board.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2012-03-20 16:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-20 11:33 [PATCH 0/8] Add ASoC drivers for SPEAr platform Rajeev Kumar
2012-03-20 11:33 ` [PATCH 1/8] sound:asoc: Add support for STA529 Audio Codec Rajeev Kumar
2012-03-20 15:25   ` Mark Brown
2012-03-23  3:42     ` Rajeev kumar
2012-03-23  9:07       ` Lars-Peter Clausen
2012-03-23  9:20         ` Rajeev kumar
2012-03-20 17:57   ` Lars-Peter Clausen
2012-03-23  4:00     ` Rajeev kumar
2012-03-23  8:51       ` Lars-Peter Clausen
2012-03-23  9:15         ` Rajeev kumar
2012-03-20 11:33 ` [PATCH 2/8] sound:asoc: Add support for synopsys i2s controller as per ASoC framework Rajeev Kumar
2012-03-20 15:44   ` Mark Brown
2012-03-26  9:03     ` Rajeev kumar
2012-03-26 11:10       ` Mark Brown
2012-03-27  3:51         ` Rajeev kumar
2012-03-20 11:33 ` [PATCH 3/8] sound:asoc: Add support for SPEAr ASoC pcm layer Rajeev Kumar
2012-03-20 15:50   ` Mark Brown
2012-03-20 11:33 ` [PATCH 4/8] sound:asoc:spdif_in: Add spdif IN support Rajeev Kumar
2012-03-20 15:55   ` Mark Brown
2012-03-27  9:25     ` Rajeev kumar
2012-03-20 11:33 ` [PATCH 5/8] sound:asoc:spdif_out: Add spdif out support Rajeev Kumar
2012-03-20 11:33 ` [PATCH 6/8] sound:asoc: Add support for SPEAr ASoC machine driver Rajeev Kumar
2012-03-20 16:00   ` Mark Brown [this message]
2012-03-20 11:33 ` [PATCH 7/8] sound:asoc: Add Kconfig and Makefile to support SPEAr audio driver Rajeev Kumar
2012-03-20 11:33 ` [PATCH 8/8] sound:asoc: Update Kconfig and Makefile(sound/soc/) to support SPEAr audio Rajeev Kumar

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=20120320160017.GH3445@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=lrg@slimlogic.co.uk \
    --cc=rajeev-dlh.kumar@st.com \
    --cc=spear-devel@list.st.com \
    --cc=tiwai@suse.de \
    /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).