Re: [alsa-devel] [PATCH 15/27] ALSA: hda - Use timecounter_initialize interface

2018-01-09 Thread Sagar Arun Kamble
On 1/5/2018 9:13 PM, Pierre-Louis Bossart wrote: On 1/5/18 4:06 AM, Sagar Arun Kamble wrote: On 1/3/2018 1:23 AM, Pierre-Louis Bossart wrote: On 1/2/18 12:21 PM, Richard Cochran wrote: On Tue, Jan 02, 2018 at 11:15:45AM -0600, Pierre-Louis Bossart wrote: I wrote the code for HDaudio and I

Re: [alsa-devel] [PATCH 15/27] ALSA: hda - Use timecounter_initialize interface

2018-01-09 Thread Sagar Arun Kamble
On 1/5/2018 9:13 PM, Pierre-Louis Bossart wrote: On 1/5/18 4:06 AM, Sagar Arun Kamble wrote: On 1/3/2018 1:23 AM, Pierre-Louis Bossart wrote: On 1/2/18 12:21 PM, Richard Cochran wrote: On Tue, Jan 02, 2018 at 11:15:45AM -0600, Pierre-Louis Bossart wrote: I wrote the code for HDaudio and I

Re: [alsa-devel] [PATCH 15/27] ALSA: hda - Use timecounter_initialize interface

2018-01-05 Thread Pierre-Louis Bossart
On 1/5/18 4:06 AM, Sagar Arun Kamble wrote: On 1/3/2018 1:23 AM, Pierre-Louis Bossart wrote: On 1/2/18 12:21 PM, Richard Cochran wrote: On Tue, Jan 02, 2018 at 11:15:45AM -0600, Pierre-Louis Bossart wrote: I wrote the code for HDaudio and I remember wasting time trying to figure out the

Re: [alsa-devel] [PATCH 15/27] ALSA: hda - Use timecounter_initialize interface

2018-01-05 Thread Pierre-Louis Bossart
On 1/5/18 4:06 AM, Sagar Arun Kamble wrote: On 1/3/2018 1:23 AM, Pierre-Louis Bossart wrote: On 1/2/18 12:21 PM, Richard Cochran wrote: On Tue, Jan 02, 2018 at 11:15:45AM -0600, Pierre-Louis Bossart wrote: I wrote the code for HDaudio and I remember wasting time trying to figure out the

Re: [alsa-devel] [PATCH 15/27] ALSA: hda - Use timecounter_initialize interface

2018-01-05 Thread Sagar Arun Kamble
On 1/3/2018 1:23 AM, Pierre-Louis Bossart wrote: On 1/2/18 12:21 PM, Richard Cochran wrote: On Tue, Jan 02, 2018 at 11:15:45AM -0600, Pierre-Louis Bossart wrote: I wrote the code for HDaudio and I remember wasting time trying to figure out the gory details of the cycle counter stuff when

Re: [alsa-devel] [PATCH 15/27] ALSA: hda - Use timecounter_initialize interface

2018-01-05 Thread Sagar Arun Kamble
On 1/3/2018 1:23 AM, Pierre-Louis Bossart wrote: On 1/2/18 12:21 PM, Richard Cochran wrote: On Tue, Jan 02, 2018 at 11:15:45AM -0600, Pierre-Louis Bossart wrote: I wrote the code for HDaudio and I remember wasting time trying to figure out the gory details of the cycle counter stuff when

Re: [alsa-devel] [PATCH 15/27] ALSA: hda - Use timecounter_initialize interface

2018-01-02 Thread Pierre-Louis Bossart
On 1/2/18 12:21 PM, Richard Cochran wrote: On Tue, Jan 02, 2018 at 11:15:45AM -0600, Pierre-Louis Bossart wrote: 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

Re: [alsa-devel] [PATCH 15/27] ALSA: hda - Use timecounter_initialize interface

2018-01-02 Thread Pierre-Louis Bossart
On 1/2/18 12:21 PM, Richard Cochran wrote: On Tue, Jan 02, 2018 at 11:15:45AM -0600, Pierre-Louis Bossart wrote: 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

Re: [alsa-devel] [PATCH 15/27] ALSA: hda - Use timecounter_initialize interface

2018-01-02 Thread Richard Cochran
On Tue, Jan 02, 2018 at 11:15:45AM -0600, Pierre-Louis Bossart wrote: > 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

Re: [alsa-devel] [PATCH 15/27] ALSA: hda - Use timecounter_initialize interface

2018-01-02 Thread Richard Cochran
On Tue, Jan 02, 2018 at 11:15:45AM -0600, Pierre-Louis Bossart wrote: > 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

Re: [alsa-devel] [PATCH 15/27] ALSA: hda - Use timecounter_initialize interface

2018-01-02 Thread Pierre-Louis Bossart
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.

Re: [alsa-devel] [PATCH 15/27] ALSA: hda - Use timecounter_initialize interface

2018-01-02 Thread Pierre-Louis Bossart
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.

Re: [alsa-devel] [PATCH 15/27] ALSA: hda - Use timecounter_initialize interface

2018-01-01 Thread Sagar Arun Kamble
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

Re: [alsa-devel] [PATCH 15/27] ALSA: hda - Use timecounter_initialize interface

2018-01-01 Thread Sagar Arun Kamble
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

Re: [alsa-devel] [PATCH 15/27] ALSA: hda - Use timecounter_initialize interface

2017-12-28 Thread Richard Cochran
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

Re: [alsa-devel] [PATCH 15/27] ALSA: hda - Use timecounter_initialize interface

2017-12-28 Thread Richard Cochran
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

Re: [alsa-devel] [PATCH 15/27] ALSA: hda - Use timecounter_initialize interface

2017-12-25 Thread Sagar Arun Kamble
On 12/15/2017 10:40 PM, Takashi Iwai wrote: On Fri, 15 Dec 2017 17:51:25 +0100, Richard Cochran wrote: On Fri, Dec 15, 2017 at 12:10:47PM +0100, Takashi Iwai wrote: - struct cyclecounter *cc = _dev->tc.cc; - cc->read = azx_cc_read; - cc->mask = CLOCKSOURCE_MASK(32); -

Re: [alsa-devel] [PATCH 15/27] ALSA: hda - Use timecounter_initialize interface

2017-12-25 Thread Sagar Arun Kamble
On 12/15/2017 10:40 PM, Takashi Iwai wrote: On Fri, 15 Dec 2017 17:51:25 +0100, Richard Cochran wrote: On Fri, Dec 15, 2017 at 12:10:47PM +0100, Takashi Iwai wrote: - struct cyclecounter *cc = _dev->tc.cc; - cc->read = azx_cc_read; - cc->mask = CLOCKSOURCE_MASK(32); -

Re: [alsa-devel] [PATCH 15/27] ALSA: hda - Use timecounter_initialize interface

2017-12-15 Thread Takashi Iwai
On Fri, 15 Dec 2017 17:51:25 +0100, Richard Cochran wrote: > > On Fri, Dec 15, 2017 at 12:10:47PM +0100, Takashi Iwai wrote: > > > > - struct cyclecounter *cc = _dev->tc.cc; > > > > - cc->read = azx_cc_read; > > > - cc->mask = CLOCKSOURCE_MASK(32); > > > > - cc->mult = 125; /* saturation after

Re: [alsa-devel] [PATCH 15/27] ALSA: hda - Use timecounter_initialize interface

2017-12-15 Thread Takashi Iwai
On Fri, 15 Dec 2017 17:51:25 +0100, Richard Cochran wrote: > > On Fri, Dec 15, 2017 at 12:10:47PM +0100, Takashi Iwai wrote: > > > > - struct cyclecounter *cc = _dev->tc.cc; > > > > - cc->read = azx_cc_read; > > > - cc->mask = CLOCKSOURCE_MASK(32); > > > > - cc->mult = 125; /* saturation after

Re: [alsa-devel] [PATCH 15/27] ALSA: hda - Use timecounter_initialize interface

2017-12-15 Thread Richard Cochran
On Fri, Dec 15, 2017 at 12:10:47PM +0100, Takashi Iwai wrote: > > - struct cyclecounter *cc = _dev->tc.cc; > > - cc->read = azx_cc_read; > > - cc->mask = CLOCKSOURCE_MASK(32); > > - cc->mult = 125; /* saturation after 195 years */ > > - cc->shift = 0; I want to get away from this

Re: [alsa-devel] [PATCH 15/27] ALSA: hda - Use timecounter_initialize interface

2017-12-15 Thread Richard Cochran
On Fri, Dec 15, 2017 at 12:10:47PM +0100, Takashi Iwai wrote: > > - struct cyclecounter *cc = _dev->tc.cc; > > - cc->read = azx_cc_read; > > - cc->mask = CLOCKSOURCE_MASK(32); > > - cc->mult = 125; /* saturation after 195 years */ > > - cc->shift = 0; I want to get away from this

Re: [alsa-devel] [PATCH 15/27] ALSA: hda - Use timecounter_initialize interface

2017-12-15 Thread Takashi Iwai
On Fri, 15 Dec 2017 08:38:30 +0100, Sagar Arun Kamble wrote: > > With new interface timecounter_initialize we can initialize timecounter > fields and underlying cyclecounter together. Update azx timecounter > init with this new function. > > Signed-off-by: Sagar Arun Kamble

Re: [alsa-devel] [PATCH 15/27] ALSA: hda - Use timecounter_initialize interface

2017-12-15 Thread Takashi Iwai
On Fri, 15 Dec 2017 08:38:30 +0100, Sagar Arun Kamble wrote: > > With new interface timecounter_initialize we can initialize timecounter > fields and underlying cyclecounter together. Update azx timecounter > init with this new function. > > Signed-off-by: Sagar Arun Kamble > Cc: Richard