From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Scott Jiang <scott.jiang.linux@gmail.com>
Cc: uclinux-dist-devel@blackfin.uclinux.org, alsa-devel@alsa-project.org
Subject: Re: [PATCH] asoc: bfin: add i2s driver for blackfin bf60x processor
Date: Mon, 4 Jun 2012 16:07:33 +0100 [thread overview]
Message-ID: <20120604150732.GM7538@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1338840199-19714-1-git-send-email-scott.jiang.linux@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 2300 bytes --]
On Mon, Jun 04, 2012 at 04:03:19PM -0400, Scott Jiang wrote:
> This driver includes i2s dai, dma and sport driver. It enables i2s
> mode support on blackfin bf60x platform.
This should be a patch series, for example the DAI, DMA and SPORT
drivers would normally all be split out.
Overall this is mostly good, the main thing that's jumping out at me is
that the SPORT API looks like it doesn't really have too many device
specifics in it so it's a bit surprising that we need completely
separate I2S and DMA drivers for the two chip generations.
> +config SND_BF6XX_I2S
> + tristate "SoC I2S Audio for the ADI BF6xx chip"
> + depends on BLACKFIN && BF60x
Shouldn't BF60x already depend on BLACKFIN?
> config SND_BF5XX_SOC_SSM2602
> tristate "SoC SSM2602 Audio support for BF52x ezkit"
This bit also needs updating...
> config SND_BF5XX_SPORT_NUM
> int "Set a SPORT for Sound chip"
> - depends on (SND_BF5XX_I2S || SND_BF5XX_AC97 || SND_BF5XX_TDM)
> + depends on (BLACKFIN && SND_SOC)
Shouldn't have a dependency on SND_SOC - this menu can't be entered
without ASoC being enabled.
> +static int __init snd_bfin_i2s_pcm_init(void)
> +{
> + return platform_driver_register(&bfin_i2s_pcm_driver);
> +}
> +module_init(snd_bfin_i2s_pcm_init);
module_platform_driver().
> +#ifdef CONFIG_PM
> +static int bfin_i2s_suspend(struct snd_soc_dai *dai)
> +{
> + struct sport_device *sport = snd_soc_dai_get_drvdata(dai);
> +
> + if (dai->capture_active)
> + sport_rx_stop(sport);
> + if (dai->playback_active)
> + sport_tx_stop(sport);
> + return 0;
> +}
The framework should do this for you, by the time we get to suspending
there shouldn't be any active streams that aren't supposed to stay
active over the time the device is suspended.
> +static int __init bfin_i2s_init(void)
> +{
> + return platform_driver_register(&bfin_i2s_driver);
> +}
> +
> +static void __exit bfin_i2s_exit(void)
> +{
> + platform_driver_unregister(&bfin_i2s_driver);
> +}
module_platform_driver().
> +void sport_tx_start(struct sport_device *sport)
> +{
Is it not possible to make the SPORT API the same between the 5xx and
the 6xx such that we can share all the drivers between the two chip
generations with just the SPORT code varying?
> + dev_info(dev, "SPORT create success\n");
Make this dev_dbg at most.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2012-06-04 15:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-04 20:03 [PATCH] asoc: bfin: add i2s driver for blackfin bf60x processor Scott Jiang
2012-06-04 15:07 ` Mark Brown [this message]
2012-06-05 3:41 ` Scott Jiang
2012-06-08 0:59 ` 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=20120604150732.GM7538@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=scott.jiang.linux@gmail.com \
--cc=uclinux-dist-devel@blackfin.uclinux.org \
/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.