From: Tomoya MORINAGA <tomoya.rohm@gmail.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org, qi.wang@intel.com,
Takashi Iwai <tiwai@suse.de>,
linux-kernel@vger.kernel.org, yong.y.wang@intel.com,
kok.howg.ewe@intel.com, Liam Girdwood <lrg@ti.com>,
joel.clark@intel.com
Subject: Re: [PATCH v3] sound/soc/lapis: add platform driver for ML7213
Date: Wed, 7 Mar 2012 10:30:05 +0900 [thread overview]
Message-ID: <CANKRQngg+8LJvb-+Byv6XPqqWFyCU1U+-hppuxo_=CM1qLUF_Q@mail.gmail.com> (raw)
In-Reply-To: <20120306115246.GD19635@opensource.wolfsonmicro.com>
On Tue, Mar 6, 2012 at 8:52 PM, Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:
>> > I just merged Lars-Peter's dmaengine library code which has been on the
>> > list for a week or so - this should be updated to use that next time
>> > it's posted. That should save a lot of code from the driver and make
>> > sure it's following best practices for dmaengine use.
>> Sorry, we can't use this library.
> This sort of response really isn't on. Do you have some reason for
> saying this? Flat out refusing to do things with no reason is not
> useful.
Current Intel's dma driver (pch_dma) doesn't work on this library.
Because the library uses function which pch_dma doesn't support.
e.g. device_prep_dma_cyclic
So, we can't use this library.
>> >> +static struct ioh_i2s_data *i2s_data;
>> >> +static struct ioh_i2s_dma dmadata[MAX_I2S_CH];
>> > Why are these needed, aren't they dynamically allocated by the driver?
>> You mean ASoC driver can't use global variable ?
> In general no Linux driver should be using a global variable except for
> things like this.
I see. I'll use dynamic allocation.
>> >> + case SNDRV_PCM_FORMAT_S32_LE:
>> >> + byte = 24;
>> >> + break;
>> > That looks wrong... are you sure you don't support S24_LE or something?
>> This is correct.
>> Because maximum transmit size of ML7213's I2S hw is 24bit.
> Note we often lay out 24 bit audio in 32 bit blocks.
24bit data doesn't work on our system.
So, we don't support S24_LE.
>> >> +static struct platform_driver ioh_i2s_driver_plat = {
>> >
>> >> +static struct platform_driver ioh_dai_driver_plat = {
>> >
>> >> +static int ioh_i2s_pci_probe(struct pci_dev *pdev,
>> >> + const struct pci_device_id *id)
>> > Why are you creating these platform devices? I don't understand the
>> > function they serve. The code handling them looks to have quite a few
>> > problems but I'm not clear they should be there in the first place.
>> if these platform devices aren't used, device detection doesn't work correctly.
>> So, I added these.
> You've not actually mentioned the problem you were seeing...
I saw mapping problem between machine driver and platform driver.
e.g. cpu_dai_name "ml7213ioh"
>> >> + rv = request_irq(pdev->irq, ioh_i2s_irq, IRQF_SHARED, "ml7213_ioh",
>> >> + pdev);
>> >> + if (rv != 0) {
>> >> + printk(KERN_ERR "Failed to allocate irq\n");
>> >> + goto out_irq;
>> >> + }
>> > Are you *sure* you're ready to handle interrupts at this point?
>> This is just registering interrupt handler.
>> As long as interrupt register is not enabled, the interrupt handler is
>> not called.
>> This is common request_irq description.
>> What's is your concern ?
> Apart from anything else you've got the interrupt requested as
> IRQF_SHARED so the interrupt could get called at any time. It's also
> not clear that you've got the hardware in a known good state.
Do you mean request_irq should move to somewhere, like open() or
hw_params() or ... ?
thanks.
--
ROHM Co., Ltd.
tomoya
next prev parent reply other threads:[~2012-03-07 1:30 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-23 5:46 [PATCH v6] sound/soc/codecs: add LAPIS Semiconductor ML26124 Tomoya MORINAGA
2012-02-23 5:46 ` [PATCH v3] sound/soc/lapis: add platform driver for ML7213 Tomoya MORINAGA
2012-03-02 16:39 ` Mark Brown
2012-03-06 5:48 ` Tomoya MORINAGA
2012-03-06 11:52 ` Mark Brown
2012-03-07 1:30 ` Tomoya MORINAGA [this message]
2012-03-07 11:46 ` Mark Brown
2012-03-08 2:06 ` Tomoya MORINAGA
2012-03-08 11:05 ` Mark Brown
2012-03-09 6:26 ` Tomoya MORINAGA
2012-03-09 6:39 ` [PATCH v4] " Tomoya MORINAGA
2012-03-19 12:00 ` [PATCH v5] " Tomoya MORINAGA
2012-03-21 16:09 ` Mark Brown
2012-03-22 0:12 ` Tomoya MORINAGA
2012-03-26 15:40 ` Mark Brown
2012-05-23 4:17 ` Tomoya MORINAGA
2012-05-23 9:41 ` Mark Brown
2012-05-23 23:46 ` Tomoya MORINAGA
2012-05-24 10:07 ` Mark Brown
2012-05-25 9:30 ` Tomoya MORINAGA
2012-05-25 10:20 ` Vinod Koul
2012-05-27 22:19 ` Mark Brown
2012-05-30 10:50 ` Tomoya MORINAGA
2012-05-30 12:14 ` [alsa-devel] " Mark Brown
2012-05-31 5:38 ` Tomoya MORINAGA
2012-05-31 10:45 ` Mark Brown
2012-06-01 8:13 ` Tomoya MORINAGA
2012-06-01 8:30 ` Mark Brown
2012-06-11 7:05 ` Tomoya MORINAGA
2012-06-11 8:54 ` Mark Brown
2012-06-13 10:41 ` Tomoya MORINAGA
2012-06-13 12:11 ` Mark Brown
2012-05-28 5:35 ` Tomoya MORINAGA
2012-02-23 5:46 ` [PATCH v5] sound/soc/lapis: add machine driver for ML7213 Carrier Board Tomoya MORINAGA
2012-03-02 13:05 ` Mark Brown
2012-03-06 5:49 ` Tomoya MORINAGA
2012-03-06 11:54 ` Mark Brown
2012-03-07 1:57 ` Tomoya MORINAGA
2012-03-09 6:38 ` [PATCH v6] " Tomoya MORINAGA
2012-03-14 14:45 ` Mark Brown
2012-03-15 4:50 ` Tomoya MORINAGA
2012-03-15 10:50 ` Mark Brown
2012-03-16 4:07 ` Tomoya MORINAGA
2012-03-16 19:06 ` Mark Brown
2012-03-18 23:45 ` Tomoya MORINAGA
2012-03-19 12:02 ` [PATCH v7] " Tomoya MORINAGA
2012-03-19 19:21 ` Mark Brown
2012-03-21 0:51 ` Tomoya MORINAGA
2012-02-29 23:51 ` [PATCH v6] sound/soc/codecs: add LAPIS Semiconductor ML26124 Mark Brown
2012-03-02 8:16 ` Tomoya MORINAGA
2012-03-02 12:58 ` Mark Brown
2012-03-06 3:03 ` Tomoya MORINAGA
2012-03-06 10:00 ` Mark Brown
2012-03-06 10:49 ` Tomoya MORINAGA
2012-03-06 12:12 ` Mark Brown
2012-03-07 2:16 ` Tomoya MORINAGA
2012-03-07 11:48 ` Mark Brown
2012-03-08 2:24 ` Tomoya MORINAGA
2012-03-08 11:47 ` Mark Brown
2012-03-09 6:37 ` [PATCH v7] " Tomoya MORINAGA
2012-03-14 14:39 ` Mark Brown
2012-03-15 4:51 ` Tomoya MORINAGA
2012-03-14 17:40 ` [alsa-devel] [PATCH v6] " Lars-Peter Clausen
2012-03-14 17:45 ` Mark Brown
2012-03-15 6:29 ` Tomoya MORINAGA
2012-03-16 9:55 ` Tomoya MORINAGA
2012-03-17 21:52 ` [alsa-devel] " Mark Brown
2012-03-19 11:59 ` [PATCH v8] " Tomoya MORINAGA
2012-03-19 19:07 ` Mark Brown
2012-03-21 0:57 ` Tomoya MORINAGA
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='CANKRQngg+8LJvb-+Byv6XPqqWFyCU1U+-hppuxo_=CM1qLUF_Q@mail.gmail.com' \
--to=tomoya.rohm@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=joel.clark@intel.com \
--cc=kok.howg.ewe@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.com \
--cc=qi.wang@intel.com \
--cc=tiwai@suse.de \
--cc=yong.y.wang@intel.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).