linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Syn <john3909@gmail.com>
To: Mark Brown <broonie@kernel.org>
Cc: <linux-iio@vger.kernel.org>, Lars-Peter Clausen <lars@metafoo.de>
Subject: Re: DMA sampling and IIO
Date: Wed, 17 Sep 2014 21:06:12 -0700	[thread overview]
Message-ID: <D03F9E66.48538%john3909@gmail.com> (raw)
In-Reply-To: <20140917195328.GW7960@sirena.org.uk>


On 9/17/14, 12:53 PM, "Mark Brown" <broonie@kernel.org> wrote:

>On Wed, Sep 10, 2014 at 03:43:50PM -0700, John Syn wrote:
>> I¹m following Mark¹s suggestion and using the audio API to stream the
>> samples from the ADE7878. I created a small circuit that translates the
>
>Please don't top post; quote relevant context when replying so people
>can follow the discussion.
>
>> codec and then modified davinci-evm.c link in the ade78xx codec.
>> Everything seems to load OK and I see a /dev/snd/pcmC0D0c device. Now
>>when
>> I try to use arecord, it simply hangs and I think the problem occurs
>> because the ade7854-i2c driver is in the IIO folder and my ade78xx
>>driver
>> is in the audio folder and currently there is no coordination to start
>>and
>> stop streaming, which probably causes under runs, over run errors. In a
>> traditional Codec, the I2C and I2S functionality is in the same driver
>>so
>> it is easy to coordinate start streaming and stop streaming.
>
>The location of the files is not going to have any impact at all, the
>callbacks aren't based on link order at all.  If data isn't being
>transferred the most likely reason is that the clocks aren't being
>started which will be a driver issue.
Hi Mark,

The ADE7878 is the clock master and I enable that clock using a simple
script which uses /sys to write to the ADE7878 registers. I start the
clock after I start my user space capture app. On both my oscilloscope and
protocol analyzer I can see the clock running and I also see the data
streaming from the ADE7878. It looks like the McASP isn’t getting started
because my user space snd_pcm_readi call is failing. It looks like I need
some sort of trigger to start the McASP receive. I have a tlv320aic3106
codec working and I’ve captured the kernel calls using kernel function
tracer which I’m hoping will help me understand how the McASP gets
started. After that I’ll do the same with my ade78xx codec driver and
hopefully I’ll learn what is missing. I’ll keep you updated as I learn
more. 

Thank you for all your help,

Regards,
John






  reply	other threads:[~2014-09-18  4:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-05 18:42 DMA sampling and IIO John Syn
2014-02-06  9:56 ` Lars-Peter Clausen
2014-02-06 19:43   ` John Syn
2014-02-06 21:15     ` Lars-Peter Clausen
2014-02-07 13:20       ` Mark Brown
2014-02-07 22:19         ` John Syn
2014-09-10 22:19         ` John Syn
2014-09-10 22:43         ` John Syn
2014-09-17 19:53           ` Mark Brown
2014-09-18  4:06             ` John Syn [this message]
2014-02-06 20:53 ` Alessandro Rubini
2014-02-06 21:02   ` Lars-Peter Clausen
2014-02-06 21:16   ` Alessandro Rubini
2014-02-06 21:38     ` Lars-Peter Clausen
2014-02-07 18:18       ` John Syn

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=D03F9E66.48538%john3909@gmail.com \
    --to=john3909@gmail.com \
    --cc=broonie@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.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 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).