From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: alsa-devel@alsa-project.org
Cc: "eric.y.miao@gmail.com" <eric.y.miao@gmail.com>,
Liam Girdwood <lrg@ti.com>,
Haojian Zhuang <haojian.zhuang@gmail.com>,
"alsa-devel@vger.kernel.org" <alsa-devel@vger.kernel.org>
Subject: Re: [PATCH 2/2] ASoC: add pxa-squ dma support
Date: Tue, 22 May 2012 10:24:20 +0100 [thread overview]
Message-ID: <20120522092419.GA21999@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <B2A7C617B3AB7F44B7B44C7D374B431E13A04DBEBC@sc-vexch3.marvell.com>
[-- Attachment #1.1: Type: text/plain, Size: 2641 bytes --]
On Mon, May 21, 2012 at 05:33:42PM -0700, Qiao Zhou wrote:
> Is there any suggestion/comment for this patch? Thanks!
Don't top post.
> +config SND_PXA_SOC_SQU
> + tristate
> + select GENERIC_ALLOCATOR
> +
The main reason I've left this is that I'm trying to decide what to say
about the fact that it's not using dmaengine - why is it not doing so?
There's also a few smaller issues below:
> + for (i = 0; i < 2; i++) {
> + dint = SDISR(i);
> + if (dint) {
> + substream = squ_data->stream[i];
> + prtd = substream->runtime->private_data;
> + if (SDISR(i) & 0x1)
> + snd_pcm_period_elapsed(substream);
> + else
> + pr_debug("%s: SQU error on channel %d\n",
> + prtd->params->name, i);
Should be dev_err().
> + SDISR(i) = 0;
> + }
> + }
> +
> + return IRQ_HANDLED;
This interrupt handler unconditionally returns IRQ_HANDLED even if there
were no interrupts reported. It should probably only do this if one of
the tests in the loop returned true.
> + /* return if this is a bufferless transfer e.g.
> + * codec <--> BT codec or GSM modem -- lg FIXME */
> + if (!dma)
> + return 0;
Remove this, systems should use the framework features for this (and I
don't think you're Liam...).
> + prtd = kzalloc(sizeof(struct pxa_runtime_data), GFP_KERNEL);
> + if (prtd == NULL) {
> + ret = -ENOMEM;
> + goto out;
> + }
devm_kzalloc().
> +struct snd_soc_platform_driver pxa_squ_soc_platform = {
> + .ops = &pxa_squ_pcm_ops,
> + .pcm_new = pxa_squ_pcm_new,
> + .pcm_free = pxa_squ_pcm_free,
> +};
> +EXPORT_SYMBOL_GPL(pxa_squ_soc_platform);
This should never need to be exported.
> + squ_data = kzalloc(sizeof(struct pxa_squ_priv), GFP_KERNEL);
> + if (!squ_data)
> + return -ENOMEM;
devm_kzalloc().
> + squ_data->irq = pdata->irq;
Shouldn't the interrupt be supplied via a resource?
> + ret =
> + request_irq(squ_data->irq, pxa_squ_dma_irq, IRQF_DISABLED,
> + "pxa-squ", pdev);
> + if (ret) {
> + pr_err("Wow! Can't register IRQ for SQU\n");
dev_err() and print the error code.
> +static int __init pxa_squ_pcm_modinit(void)
> +{
> + return platform_driver_register(&pxa_squ_driver);
> +}
> +
> +module_init(pxa_squ_pcm_modinit);
module_platform_driver().
[-- 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-05-22 9:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1337330621-9072-1-git-send-email-zhouqiao@marvell.com>
2012-05-22 1:36 ` [PATCH 1/2] ARM: MMP: add pxa-squ header file Haojian Zhuang
[not found] ` <1337330621-9072-2-git-send-email-zhouqiao@marvell.com>
[not found] ` <B2A7C617B3AB7F44B7B44C7D374B431E13A04DBEBC@sc-vexch3.marvell.com>
2012-05-22 9:24 ` Mark Brown [this message]
[not found] <1337308751-6126-1-git-send-email-zhouqiao@marvell.com>
[not found] ` <1337308751-6126-2-git-send-email-zhouqiao@marvell.com>
2012-05-18 4:25 ` [PATCH 2/2] ASoC: add pxa-squ dma support Haojian Zhuang
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=20120522092419.GA21999@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=alsa-devel@vger.kernel.org \
--cc=eric.y.miao@gmail.com \
--cc=haojian.zhuang@gmail.com \
--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.