From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Sagar Arun Kamble <sagar.a.kamble@intel.com>,
Richard Cochran <richardcochran@gmail.com>
Cc: Takashi Iwai <tiwai@suse.de>, Vinod Koul <vinod.koul@intel.com>,
alsa-devel@alsa-project.org, Thomas Gleixner <tglx@linutronix.de>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 15/27] ALSA: hda - Use timecounter_initialize interface
Date: Tue, 2 Jan 2018 11:15:45 -0600 [thread overview]
Message-ID: <3c5734a2-8f97-4a8b-26d4-42852cc86352@linux.intel.com> (raw)
In-Reply-To: <1a9a1507-7ca3-459b-c2ce-02fc2afad2ff@intel.com>
On 1/2/18 12:03 AM, Sagar Arun Kamble wrote:
>
>
> On 12/28/2017 10:19 PM, Richard Cochran wrote:
>> On Tue, Dec 26, 2017 at 01:07:35PM +0530, Sagar Arun Kamble wrote:
>>>> Or can we provide simpler versions for covering some defaults? At
>>>> least reducing the number of arguments would make things easier.
>>> Thought about specifying 1. cyclecounter read func 2. frequency 3.
>>> width of
>>> counter as parameters here
>>> which can get rid of mult, shift params. But this is not easy as most
>>> of the
>>> drivers do not specify
>>> cyclecounter frequency and instead hard-code the mult/shift factors.
>> You are talking about using clocks_calc_mult_shift() here, right? (See
>> the usage example in drivers/net/ethernet/ti/cpts.c).
> Yes
>> This is a good idea, and it is worth getting the driver authors' input
>> to figure out the correct parameters.
I wrote the code for HDaudio and I remember wasting time trying to
figure out the gory details of the cycle counter stuff when all I wanted
was a conversion from a 24MHz counter to ns values using a 125/3
operation in the right order - as explained in the comments
If there was a helper to set those mult/shift values it'd make the
HDaudio code clearer (and also help support newer modes of operation
with a 12 and 6 MHz MCLK).
The initial proposal with hard-coded values in arguments instead of
structure members didn't really make the code clearer.
>>
>> I bet we can use that almost everywhere. If there are any drivers
>> that cannot be converted, then we can leave some sort of low level
>> legacy initialization method.
> Agree
>> Thanks,
>> Richard
>>
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2018-01-02 17:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1513323522-15021-1-git-send-email-sagar.a.kamble@intel.com>
2017-12-15 7:38 ` [PATCH 01/27] timecounter: Make cyclecounter struct part of timecounter struct Sagar Arun Kamble
[not found] ` <1513323522-15021-2-git-send-email-sagar.a.kamble-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2018-01-08 22:20 ` [Intel-wired-lan] " Brown, Aaron F
2018-01-09 9:01 ` Sagar Arun Kamble
2017-12-15 7:38 ` [PATCH 15/27] ALSA: hda - Use timecounter_initialize interface Sagar Arun Kamble
2017-12-15 11:10 ` [alsa-devel] " Takashi Iwai
2017-12-15 16:51 ` Richard Cochran
2017-12-15 17:10 ` [alsa-devel] " Takashi Iwai
2017-12-26 7:37 ` Sagar Arun Kamble
2017-12-28 16:49 ` [alsa-devel] " Richard Cochran
2018-01-02 6:03 ` Sagar Arun Kamble
2018-01-02 17:15 ` Pierre-Louis Bossart [this message]
2018-01-02 18:21 ` Richard Cochran
2018-01-02 19:53 ` Pierre-Louis Bossart
2018-01-05 10:06 ` [alsa-devel] " Sagar Arun Kamble
2018-01-05 15:43 ` Pierre-Louis Bossart
2018-01-09 10:09 ` Sagar Arun Kamble
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=3c5734a2-8f97-4a8b-26d4-42852cc86352@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=linux-kernel@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=sagar.a.kamble@intel.com \
--cc=tglx@linutronix.de \
--cc=tiwai@suse.de \
--cc=vinod.koul@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