All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Looijmans <mike.looijmans@topic.nl>
To: alsa-devel@alsa-project.org
Subject: Re: davici-mcasp: "tx-num-evt" confusion with number of serializers
Date: Tue, 26 Feb 2013 19:40:37 +0100	[thread overview]
Message-ID: <512D01A5.8050206@topic.nl> (raw)
In-Reply-To: <1631475.f7GPhLiLxV@ganymedes>

On 02/26/2013 03:06 PM, Michal Bachraty wrote:
> Hi,
> I'm  working on multichannel version of davinci-mcasp and also davinci-pcm. I
> have first version running and now I want to refine code. I found one confusion
> in davinci-mcasp with using of DT property "tx-num-evt".  In DT binding
> documentation "tx-num-evt" is defined as "FIFO levels", but in Mcasp src, there
> is code, which mixes tx-num-evt with number of serializers (i2s data lines)
> that are enabled for data playback and receive (dev->txnumevt * tx_ser)
>
> mcasp_mod_bits(dev->base + MCASP_VER3_WFIFOCTL,
>                  (((dev->txnumevt * tx_ser) << 8), NUMEVT_MASK);
>
>  From dacinci pcm,  DMA data tranfer use txnumevt as number of serializers and
> also for data prefetching.
> I undestand definition "FIFO levels" as how many prefetched data are in FIFO.
> Prefetched data are for me frame data / 2  ( all left or right channels for
> one sampling time). This results me from AM335x FIFO documantation.
> What is original purpose for "tx-num-evt" parameter?

 From what I remember (I'm using the davinci to record from up to 8 
codecs chips simultaneously) the value sets a threshold for the DMA 
request (if the FIFO is enabled - and I can't think of a reason why 
anyone would NOT want to enable the fifo...).

Postponing the DMA request until there are #channels data entries in the 
fifo buffer makes sense to me. Setting the txnumevt to a higher value 
might reduce the load on the memory controller (that's what TI claims), 
at the cost of a higher risk of overrunning the fifo, and increased 
latency. Setting it to less than the number of channels isn't useful 
either - which application would be interested in "half" the channel data?

I have always considered the parameter to be a boolean (please use the 
fifo) rather than an integer setting.

-- 
Mike Looijmans - Topic Automation

  reply	other threads:[~2013-02-26 18:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-26 14:06 davici-mcasp: "tx-num-evt" confusion with number of serializers Michal Bachraty
2013-02-26 18:40 ` Mike Looijmans [this message]
2013-02-27 11:36   ` Michal Bachraty
2013-02-27 12:05     ` Mike Looijmans
2013-02-28  9:06       ` Michal Bachraty
2013-02-28  9:32         ` Mike Looijmans
2013-02-28 11:02           ` Michal Bachraty
2013-02-28 13:19             ` Daniel Mack
2013-02-28 13:26               ` Daniel Mack
2013-03-01 10:08                 ` Mark Brown
2013-03-06 10:51                   ` Bedia, Vaibhav
2013-03-08 16:11                     ` Michal Bachraty
2013-03-11  7:09                       ` Bedia, Vaibhav

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=512D01A5.8050206@topic.nl \
    --to=mike.looijmans@topic.nl \
    --cc=alsa-devel@alsa-project.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.