From: Vinod Koul <vinod.koul@intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, patches.audio@intel.com,
Hardik T Shah <hardik.t.shah@intel.com>,
Guneshwor Singh <guneshwor.o.singh@intel.com>,
liam.r.girdwood@linux.intel.com, broonie@kernel.org
Subject: Re: [PATCH 2/3] ALSA - hda: Add support for link audio time reporting
Date: Mon, 11 Jul 2016 19:41:59 +0530 [thread overview]
Message-ID: <20160711141159.GI9681@localhost> (raw)
In-Reply-To: <s5h60scv520.wl-tiwai@suse.de>
On Mon, Jul 11, 2016 at 12:32:07PM +0200, Takashi Iwai wrote:
> On Mon, 11 Jul 2016 12:13:28 +0200,
> Vinod Koul wrote:
> >
> > From: Guneshwor Singh <guneshwor.o.singh@intel.com>
> >
> > Skylake onwards HDA controller supports reprting link audio
> > time, so add support for that.
>
> It's way too few description, the text is almost same as the previous
> patch. Please give more information.
Sure will add.
> > #define CREATE_TRACE_POINTS
> > #include "hda_controller_trace.h"
> >
> > +#define SEC_TO_NSEC 1000000000LL
>
> Can we use a definition in time64.h?
Yes NSEC_PER_SEC seems right, will update. Thanks for pointing
> >
> > +static u64 azx_scale64(u64 base, u32 num, u32 den)
> > +{
> > + u64 rem;
> > +
> > + rem = do_div(base, den);
> > +
> > + base *= num;
> > + rem *= num;
> > +
> > + do_div(rem, den);
> > +
> > + return base + rem;
> > +}
>
> What is this function supposed to do?
It is supposed to scale the timestamp values. Will try to add more comments
on this one.
> > + ll_counter = (ll_counter_h << LLPC_CCU_SHIFT) | ll_counter_l;
> > + wallclk_cycles = wallclk_ctr & WALFCC_CIF_MASK;
> > +
> > + if (wallclk_cycles < HDA_MAX_CYCLE_VALUE - HDA_MAX_CYCLE_OFFSET
> > + && wallclk_cycles > HDA_MAX_CYCLE_OFFSET)
> > + break;
>
> Is this condition really correct...? It's hard to understand.
Looks so, i will double check
> > + *device = ktime_add_ns(*device, (wallclk_cycles * SEC_TO_NSEC) /
> > + ((HDA_MAX_CYCLE_VALUE+1) * runtime->rate));
>
> Hmm, the calculation here looks as if there can be an optimization...
Hmmm, let me try to optimize this bit
--
~Vinod
next prev parent reply other threads:[~2016-07-11 14:04 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-11 10:13 [PATCH 0/3] ALSA - hda: Add support for link audio time reporting Vinod Koul
2016-07-11 10:13 ` [PATCH 1/3] ALSA - hda: Add support for GTS capability Vinod Koul
2016-07-11 10:22 ` Takashi Iwai
2016-07-11 14:07 ` Vinod Koul
2016-07-11 14:06 ` Takashi Iwai
2016-07-11 14:22 ` Vinod Koul
2016-07-11 14:17 ` Takashi Iwai
2016-07-11 10:13 ` [PATCH 2/3] ALSA - hda: Add support for link audio time reporting Vinod Koul
2016-07-11 10:32 ` Takashi Iwai
2016-07-11 14:11 ` Vinod Koul [this message]
[not found] ` <201607111916.R5HdrB76%fengguang.wu@intel.com>
2016-07-15 4:37 ` Vinod Koul
2016-07-15 5:00 ` Takashi Iwai
2016-07-15 5:19 ` Vinod Koul
2016-07-15 5:17 ` Takashi Iwai
2016-07-15 5:39 ` Vinod Koul
2016-07-15 5:39 ` Takashi Iwai
2016-07-15 5:50 ` Vinod Koul
2016-07-15 5:56 ` Takashi Iwai
2016-07-11 10:13 ` [PATCH 3/3] ALSA - hda: Fix timestamping documentation Vinod Koul
2016-07-11 10:46 ` Takashi Iwai
2016-07-11 14:12 ` Vinod Koul
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=20160711141159.GI9681@localhost \
--to=vinod.koul@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=guneshwor.o.singh@intel.com \
--cc=hardik.t.shah@intel.com \
--cc=liam.r.girdwood@linux.intel.com \
--cc=patches.audio@intel.com \
--cc=tiwai@suse.de \
/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