[-,Intervals,v2,1/1] interval: Interpret (x x+1] correctly and return x+1
diff mbox series

Message ID 1539862404-21955-1-git-send-email-twischer@de.adit-jv.com
State New
Headers show
Series
  • [-,Intervals,v2,1/1] interval: Interpret (x x+1] correctly and return x+1
Related show

Commit Message

Timo Wischer Oct. 18, 2018, 11:33 a.m. UTC
From: Timo Wischer <twischer@de.adit-jv.com>

Without this change an interval of (x x+1] will be interpreted as an
empty interval but the right value would be x+1.
This leads to a failing snd_pcm_hw_params() call which returns -EINVAL.

An example issue log is given in the following:
snd_pcm_hw_params failed with err -22 (Invalid argument)
ACCESS: MMAP_NONINTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 16
CHANNELS: 1
RATE: 16000
PERIOD_TIME: (15999 16000]
PERIOD_SIZE: (255 256]
PERIOD_BYTES: (510 512]
PERIODS: [2 3)
BUFFER_TIME: 32000
BUFFER_SIZE: 512
BUFFER_BYTES: 1024

In case of (x x+1) we have to interpret it anyway as a single value of x to
compensate rounding issues.
For example the period size will result in an interval of (352 353) when
the period time is 16ms and the sample rate 22050 Hz
(16ms * 22,05 kHz = 352,8 frames). But 352 has to be chosen to allow a
buffer size of 705 (32ms * 22,05 kHz = 705,6 frames) which has to be >= 2x
period size to avoid Xruns. The buffer size will not end up with an
interval of (705 706) simular to the period size because
snd_pcm_rate_hw_refine_cchange() calls snd_interval_floor() for the buffer
size. Therefore this value will be interpreted as an integer interval
instead of a real interval further on.

This issue seems to exist since the change of 9bb985c38 ("pcm:
snd_interval_refine_first/last: exclude value only if also excluded
before")

Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
---
> On 10/18/18 12:57, Takashi Iwai wrote:
> This change looks risky.  The snd_interval_value() might be called
> even if the interval isn't reduced to a single value.  Rather check
> openmin instead.

If I would do
"if (i->openmin)"
on an interval of (x x+1) x+1 would be returned. But this would result in
the second issue which I have tried to describe in the commit message:
x has to be returned otherwise it is not guaranteed that
buffer_size >= 2x period_size. And this would result in continuously Xruns.
Therefore I would like to prefer
"if (i->openmin && !i->openmax)"

Comments

Takashi Iwai Oct. 18, 2018, 1:19 p.m. UTC | #1
On Thu, 18 Oct 2018 14:28:47 +0200,
Timo Wischer wrote:
> 
> On 10/18/18 14:02, Takashi Iwai wrote:
> > On Thu, 18 Oct 2018 13:33:24 +0200,
> > <twischer@de.adit-jv.com> wrote:
> >> From: Timo Wischer <twischer@de.adit-jv.com>
> >>
> >> Without this change an interval of (x x+1] will be interpreted as an
> >> empty interval but the right value would be x+1.
> >> This leads to a failing snd_pcm_hw_params() call which returns -EINVAL.
> >>
> >> An example issue log is given in the following:
> >> snd_pcm_hw_params failed with err -22 (Invalid argument)
> >> ACCESS: MMAP_NONINTERLEAVED
> >> FORMAT: S16_LE
> >> SUBFORMAT: STD
> >> SAMPLE_BITS: 16
> >> FRAME_BITS: 16
> >> CHANNELS: 1
> >> RATE: 16000
> >> PERIOD_TIME: (15999 16000]
> >> PERIOD_SIZE: (255 256]
> >> PERIOD_BYTES: (510 512]
> >> PERIODS: [2 3)
> >> BUFFER_TIME: 32000
> >> BUFFER_SIZE: 512
> >> BUFFER_BYTES: 1024
> >>
> >> In case of (x x+1) we have to interpret it anyway as a single value of x to
> >> compensate rounding issues.
> >> For example the period size will result in an interval of (352 353) when
> >> the period time is 16ms and the sample rate 22050 Hz
> >> (16ms * 22,05 kHz = 352,8 frames). But 352 has to be chosen to allow a
> >> buffer size of 705 (32ms * 22,05 kHz = 705,6 frames) which has to be >= 2x
> >> period size to avoid Xruns. The buffer size will not end up with an
> >> interval of (705 706) simular to the period size because
> >> snd_pcm_rate_hw_refine_cchange() calls snd_interval_floor() for the buffer
> >> size. Therefore this value will be interpreted as an integer interval
> >> instead of a real interval further on.
> >>
> >> This issue seems to exist since the change of 9bb985c38 ("pcm:
> >> snd_interval_refine_first/last: exclude value only if also excluded
> >> before")
> >>
> >> Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
> >> ---
> >>> On 10/18/18 12:57, Takashi Iwai wrote:
> >>> This change looks risky.  The snd_interval_value() might be called
> >>> even if the interval isn't reduced to a single value.  Rather check
> >>> openmin instead.
> >> If I would do
> >> "if (i->openmin)"
> >> on an interval of (x x+1) x+1 would be returned. But this would result in
> >> the second issue which I have tried to describe in the commit message:
> >> x has to be returned otherwise it is not guaranteed that
> >> buffer_size >= 2x period_size. And this would result in continuously Xruns.
> >> Therefore I would like to prefer
> >> "if (i->openmin && !i->openmax)"
> > Hm, I overlooked that there is an assert() before that.  So a
> > single-value interval is a must at this execution, so it doesn't
> > matter which one to take.
> >
> > Didn't the assert() hit in your case with x+1, then?
> No. For the implementation of
> 
> snd_interval_value()
> (x x+1) is also a valid interval which has only a single value.
> This is also required because the ALSA neogation rules often end up with intervals like (x x+1)
> e.g. in case of rounding issues  32ms * 22,05 kHz = 705,6 frames -> (705 706)
> Therefore assert(snd_interval_single(i)) has to not fail in case of (705 706).

And this is a problematic case no matter which value to take.
Your change might "fix" your specific case, but it might break
others.  No matter which value (min or max) to take, it's basically
invalid.

If your fix is logically correct, it's fine.  But, judging from the
description, it looks like nothing but heuristic based on your
specific use cases.

IOW, if we have a good set of unit tests to cover most of possible use
cases and this is proven to improve all these, I'll happily take it.
But unfortunately there is no good test coverage, so far.


thanks,

Takashi

> 
> Best regards
> Timo
> 
> >
> >
> > Takashi
> >
> >> diff --git a/src/pcm/interval_inline.h b/src/pcm/interval_inline.h
> >> index a68e292..d9a30b2 100644
> >> --- a/src/pcm/interval_inline.h
> >> +++ b/src/pcm/interval_inline.h
> >> @@ -51,12 +51,14 @@ INTERVAL_INLINE int snd_interval_single(const snd_interval_t *i)
> >>   {
> >>   	assert(!snd_interval_empty(i));
> >>   	return (i->min == i->max ||
> >> -		(i->min + 1 == i->max && i->openmax));
> >> +		(i->min + 1 == i->max && (i->openmin || i->openmax)));
> >>   }
> >>     INTERVAL_INLINE int snd_interval_value(const snd_interval_t *i)
> >>   {
> >>   	assert(snd_interval_single(i));
> >> +	if (i->openmin && !i->openmax)
> >> +		return i->max;
> >>   	return i->min;
> >>   }
> >>   -- 
> >> 2.7.4
> >>
>
Timo Wischer Oct. 18, 2018, 2:31 p.m. UTC | #2
On 10/18/18 15:19, Takashi Iwai wrote:
> On Thu, 18 Oct 2018 14:28:47 +0200,
> Timo Wischer wrote:
>> On 10/18/18 14:02, Takashi Iwai wrote:
>>> On Thu, 18 Oct 2018 13:33:24 +0200,
>>> <twischer@de.adit-jv.com> wrote:
>>>> From: Timo Wischer <twischer@de.adit-jv.com>
>>>>
>>>> Without this change an interval of (x x+1] will be interpreted as an
>>>> empty interval but the right value would be x+1.
>>>> This leads to a failing snd_pcm_hw_params() call which returns -EINVAL.
>>>>
>>>> An example issue log is given in the following:
>>>> snd_pcm_hw_params failed with err -22 (Invalid argument)
>>>> ACCESS: MMAP_NONINTERLEAVED
>>>> FORMAT: S16_LE
>>>> SUBFORMAT: STD
>>>> SAMPLE_BITS: 16
>>>> FRAME_BITS: 16
>>>> CHANNELS: 1
>>>> RATE: 16000
>>>> PERIOD_TIME: (15999 16000]
>>>> PERIOD_SIZE: (255 256]
>>>> PERIOD_BYTES: (510 512]
>>>> PERIODS: [2 3)
>>>> BUFFER_TIME: 32000
>>>> BUFFER_SIZE: 512
>>>> BUFFER_BYTES: 1024
>>>>
>>>> In case of (x x+1) we have to interpret it anyway as a single value of x to
>>>> compensate rounding issues.
>>>> For example the period size will result in an interval of (352 353) when
>>>> the period time is 16ms and the sample rate 22050 Hz
>>>> (16ms * 22,05 kHz = 352,8 frames). But 352 has to be chosen to allow a
>>>> buffer size of 705 (32ms * 22,05 kHz = 705,6 frames) which has to be >= 2x
>>>> period size to avoid Xruns. The buffer size will not end up with an
>>>> interval of (705 706) simular to the period size because
>>>> snd_pcm_rate_hw_refine_cchange() calls snd_interval_floor() for the buffer
>>>> size. Therefore this value will be interpreted as an integer interval
>>>> instead of a real interval further on.
>>>>
>>>> This issue seems to exist since the change of 9bb985c38 ("pcm:
>>>> snd_interval_refine_first/last: exclude value only if also excluded
>>>> before")
>>>>
>>>> Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
>>>> ---
>>>>> On 10/18/18 12:57, Takashi Iwai wrote:
>>>>> This change looks risky.  The snd_interval_value() might be called
>>>>> even if the interval isn't reduced to a single value.  Rather check
>>>>> openmin instead.
>>>> If I would do
>>>> "if (i->openmin)"
>>>> on an interval of (x x+1) x+1 would be returned. But this would result in
>>>> the second issue which I have tried to describe in the commit message:
>>>> x has to be returned otherwise it is not guaranteed that
>>>> buffer_size >= 2x period_size. And this would result in continuously Xruns.
>>>> Therefore I would like to prefer
>>>> "if (i->openmin && !i->openmax)"
>>> Hm, I overlooked that there is an assert() before that.  So a
>>> single-value interval is a must at this execution, so it doesn't
>>> matter which one to take.
>>>
>>> Didn't the assert() hit in your case with x+1, then?
>> No. For the implementation of
>>
>> snd_interval_value()
>> (x x+1) is also a valid interval which has only a single value.
>> This is also required because the ALSA neogation rules often end up with intervals like (x x+1)
>> e.g. in case of rounding issues  32ms * 22,05 kHz = 705,6 frames -> (705 706)
>> Therefore assert(snd_interval_single(i)) has to not fail in case of (705 706).
> And this is a problematic case no matter which value to take.
> Your change might "fix" your specific case, but it might break
> others.  No matter which value (min or max) to take, it's basically
> invalid.
>
> If your fix is logically correct, it's fine.  But, judging from the
> description, it looks like nothing but heuristic based on your
> specific use cases.


The reason for this fix was an issue where an interval of (x x+1] is 
interpreted as not a single value.
Before the change in snd_interval_single() the following intervals were 
interpreted as a single value:

  * (x x) -> required for rounding issues e.g. 32ms * 22,05 kHz = 705,6
    frames => (705 706)
  * (x x]
  * [x x)
  * [x x]
  * (x x+1)
  * [x x+1)

With this change (x x+1] will also be interpreted as a single value 
(which looks reasonable for me).
But the interval [x x+1] is still not interpreted as a single value 
(which also sounds right for me)

Before the change in snd_interval_value() for all intervals x was returned.
With this change only in case (x x+1] x+1 will be returned. All other 
intervals are not changed.

Therefore this is a minimal change which solves issues. I have already 
at least two use cases which
are failing without this fix. (Somehow simple use cases with 
rate->dmix->hw where the hw truncates
the default period_time of 125ms and fails with EINVAL on 
snd_pcm_set_period_near()).
Therefore I would expect that these issues will be seen soon by other users.

If there is a use case which breaks in future due to the right 
interpretation of (x x+1] I think we should try
to find the root cause why this (x x+1] interval has to be interpreted 
wrongly to get the use case to work.

>
> IOW, if we have a good set of unit tests to cover most of possible use
> cases and this is proven to improve all these, I'll happily take it.
> But unfortunately there is no good test coverage, so far.

At least I have executed several tests on my end which are using 
different combination of ALSA plugins
(plug, rate, dmix, dsnoop), sample rates, channels, period and buffer 
sizes on different hardware with different
sound cards.
I would expect that you are talking about the tests in the test 
directory of the alsa-lib sources. Or is there
anything else? May be I could try to extend/add some tests at least to 
reproduce the issue of this patch.

Best regards and thanks for your time

Timo

>
>
> thanks,
>
> Takashi
>
>> Best regards
>> Timo
>>
>>>
>>> Takashi
>>>
>>>> diff --git a/src/pcm/interval_inline.h b/src/pcm/interval_inline.h
>>>> index a68e292..d9a30b2 100644
>>>> --- a/src/pcm/interval_inline.h
>>>> +++ b/src/pcm/interval_inline.h
>>>> @@ -51,12 +51,14 @@ INTERVAL_INLINE int snd_interval_single(const snd_interval_t *i)
>>>>    {
>>>>    	assert(!snd_interval_empty(i));
>>>>    	return (i->min == i->max ||
>>>> -		(i->min + 1 == i->max && i->openmax));
>>>> +		(i->min + 1 == i->max && (i->openmin || i->openmax)));
>>>>    }
>>>>      INTERVAL_INLINE int snd_interval_value(const snd_interval_t *i)
>>>>    {
>>>>    	assert(snd_interval_single(i));
>>>> +	if (i->openmin && !i->openmax)
>>>> +		return i->max;
>>>>    	return i->min;
>>>>    }
>>>>    --
>>>> 2.7.4
>>>>
Takashi Sakamoto Oct. 18, 2018, 2:45 p.m. UTC | #3
Hi,

On Thu, 18 Oct 2018, Timo Wischer wrote:
> The reason for this fix was an issue where an interval of (x x+1] is 
> interpreted as not a single value.
> Before the change in snd_interval_single() the following intervals were 
> interpreted as a single value:
>
> * (x x) -> required for rounding issues e.g. 32ms * 22,05 kHz = 705,6
>   frames => (705 706)
> * (x x]
> * [x x)
> * [x x]
> * (x x+1)
> * [x x+1)
>
> With this change (x x+1] will also be interpreted as a single value (which 
> looks reasonable for me).
> But the interval [x x+1] is still not interpreted as a single value (which 
> also sounds right for me)
>
> Before the change in snd_interval_value() for all intervals x was returned.
> With this change only in case (x x+1] x+1 will be returned. All other 
> intervals are not changed.
>
> Therefore this is a minimal change which solves issues. I have already at 
> least two use cases which
> are failing without this fix. (Somehow simple use cases with rate->dmix->hw 
> where the hw truncates
> the default period_time of 125ms and fails with EINVAL on 
> snd_pcm_set_period_near()).
> Therefore I would expect that these issues will be seen soon by other users.
>
> If there is a use case which breaks in future due to the right interpretation 
> of (x x+1] I think we should try
> to find the root cause why this (x x+1] interval has to be interpreted 
> wrongly to get the use case to work.

'struct snd_interval' has 'integer' flag. When this flag is off,
'(x, x + 1]' brings no single unique value. The inline function
'snd_interval_single()' should handle this case correctly.


Thanks

Takashi Sakamoto (@airport)
Takashi Iwai Oct. 18, 2018, 2:58 p.m. UTC | #4
On Thu, 18 Oct 2018 16:31:21 +0200,
Timo Wischer wrote:
> 
> On 10/18/18 15:19, Takashi Iwai wrote:
> > On Thu, 18 Oct 2018 14:28:47 +0200,
> > Timo Wischer wrote:
> >> On 10/18/18 14:02, Takashi Iwai wrote:
> >>> On Thu, 18 Oct 2018 13:33:24 +0200,
> >>> <twischer@de.adit-jv.com> wrote:
> >>>> From: Timo Wischer <twischer@de.adit-jv.com>
> >>>>
> >>>> Without this change an interval of (x x+1] will be interpreted as an
> >>>> empty interval but the right value would be x+1.
> >>>> This leads to a failing snd_pcm_hw_params() call which returns -EINVAL.
> >>>>
> >>>> An example issue log is given in the following:
> >>>> snd_pcm_hw_params failed with err -22 (Invalid argument)
> >>>> ACCESS: MMAP_NONINTERLEAVED
> >>>> FORMAT: S16_LE
> >>>> SUBFORMAT: STD
> >>>> SAMPLE_BITS: 16
> >>>> FRAME_BITS: 16
> >>>> CHANNELS: 1
> >>>> RATE: 16000
> >>>> PERIOD_TIME: (15999 16000]
> >>>> PERIOD_SIZE: (255 256]
> >>>> PERIOD_BYTES: (510 512]
> >>>> PERIODS: [2 3)
> >>>> BUFFER_TIME: 32000
> >>>> BUFFER_SIZE: 512
> >>>> BUFFER_BYTES: 1024
> >>>>
> >>>> In case of (x x+1) we have to interpret it anyway as a single value of x to
> >>>> compensate rounding issues.
> >>>> For example the period size will result in an interval of (352 353) when
> >>>> the period time is 16ms and the sample rate 22050 Hz
> >>>> (16ms * 22,05 kHz = 352,8 frames). But 352 has to be chosen to allow a
> >>>> buffer size of 705 (32ms * 22,05 kHz = 705,6 frames) which has to be >= 2x
> >>>> period size to avoid Xruns. The buffer size will not end up with an
> >>>> interval of (705 706) simular to the period size because
> >>>> snd_pcm_rate_hw_refine_cchange() calls snd_interval_floor() for the buffer
> >>>> size. Therefore this value will be interpreted as an integer interval
> >>>> instead of a real interval further on.
> >>>>
> >>>> This issue seems to exist since the change of 9bb985c38 ("pcm:
> >>>> snd_interval_refine_first/last: exclude value only if also excluded
> >>>> before")
> >>>>
> >>>> Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
> >>>> ---
> >>>>> On 10/18/18 12:57, Takashi Iwai wrote:
> >>>>> This change looks risky.  The snd_interval_value() might be called
> >>>>> even if the interval isn't reduced to a single value.  Rather check
> >>>>> openmin instead.
> >>>> If I would do
> >>>> "if (i->openmin)"
> >>>> on an interval of (x x+1) x+1 would be returned. But this would result in
> >>>> the second issue which I have tried to describe in the commit message:
> >>>> x has to be returned otherwise it is not guaranteed that
> >>>> buffer_size >= 2x period_size. And this would result in continuously Xruns.
> >>>> Therefore I would like to prefer
> >>>> "if (i->openmin && !i->openmax)"
> >>> Hm, I overlooked that there is an assert() before that.  So a
> >>> single-value interval is a must at this execution, so it doesn't
> >>> matter which one to take.
> >>>
> >>> Didn't the assert() hit in your case with x+1, then?
> >> No. For the implementation of
> >>
> >> snd_interval_value()
> >> (x x+1) is also a valid interval which has only a single value.
> >> This is also required because the ALSA neogation rules often end up with intervals like (x x+1)
> >> e.g. in case of rounding issues  32ms * 22,05 kHz = 705,6 frames -> (705 706)
> >> Therefore assert(snd_interval_single(i)) has to not fail in case of (705 706).
> > And this is a problematic case no matter which value to take.
> > Your change might "fix" your specific case, but it might break
> > others.  No matter which value (min or max) to take, it's basically
> > invalid.
> >
> > If your fix is logically correct, it's fine.  But, judging from the
> > description, it looks like nothing but heuristic based on your
> > specific use cases.
> 
> 
> The reason for this fix was an issue where an interval of (x x+1] is
> interpreted as not a single value.
> Before the change in snd_interval_single() the following intervals
> were interpreted as a single value:
> 
>  * (x x) -> required for rounding issues e.g. 32ms * 22,05 kHz = 705,6
>    frames => (705 706)

Wait... Isn't it (x x+1) at this point?
Otherwise they can't be a valid value, per definition.

>  * (x x]
>  * [x x)
>  * [x x]
>  * (x x+1)
>  * [x x+1)
> 
> With this change (x x+1] will also be interpreted as a single value
> (which looks reasonable for me).
> But the interval [x x+1] is still not interpreted as a single value
> (which also sounds right for me)
> 
> Before the change in snd_interval_value() for all intervals x was returned.
> With this change only in case (x x+1] x+1 will be returned. All other
> intervals are not changed.
> 
> Therefore this is a minimal change which solves issues. I have already
> at least two use cases which
> are failing without this fix. (Somehow simple use cases with
> rate->dmix->hw where the hw truncates
> the default period_time of 125ms and fails with EINVAL on
> snd_pcm_set_period_near()).
> Therefore I would expect that these issues will be seen soon by other users.
> 
> If there is a use case which breaks in future due to the right
> interpretation of (x x+1] I think we should try
> to find the root cause why this (x x+1] interval has to be interpreted
> wrongly to get the use case to work.

I'm not against fixing the handling of (x x+1] or (x x+1).
Although (x x+1) can't be handled correctly at obtaining the exact
value, often PERIOD_TIME or BUFFER_TIME may reach to this state, so
allowing it still makes sense.

But what I don't understand is why

snd_interval_value() {
	if (openmin)
		return min+1;
	return min;
}

doesn't work.  I don't mean that this is better than returning max
(like your v1 patch), but just want to understand the problem
correctly.


> > IOW, if we have a good set of unit tests to cover most of possible use
> > cases and this is proven to improve all these, I'll happily take it.
> > But unfortunately there is no good test coverage, so far.
> 
> At least I have executed several tests on my end which are using
> different combination of ALSA plugins
> (plug, rate, dmix, dsnoop), sample rates, channels, period and buffer
> sizes on different hardware with different
> sound cards.
> I would expect that you are talking about the tests in the test
> directory of the alsa-lib sources. Or is there
> anything else? May be I could try to extend/add some tests at least to
> reproduce the issue of this patch.

I'd think of a test program linked with these functions for executing
only this configuration stuff without actual plugins.  Then we can
give a bunch of sets to evaluate the extreme cases.


thanks,

Takashi
Timo Wischer Oct. 18, 2018, 3:16 p.m. UTC | #5
On 10/18/18 16:45, Takashi Sakamoto wrote:
> Hi,
>
> On Thu, 18 Oct 2018, Timo Wischer wrote:
>> The reason for this fix was an issue where an interval of (x x+1] is 
>> interpreted as not a single value.
>> Before the change in snd_interval_single() the following intervals 
>> were interpreted as a single value:
>>
>> * (x x) -> required for rounding issues e.g. 32ms * 22,05 kHz = 705,6
>>   frames => (705 706)
>> * (x x]
>> * [x x)
>> * [x x]
>> * (x x+1)
>> * [x x+1)
>>
>> With this change (x x+1] will also be interpreted as a single value 
>> (which looks reasonable for me).
>> But the interval [x x+1] is still not interpreted as a single value 
>> (which also sounds right for me)
>>
>> Before the change in snd_interval_value() for all intervals x was 
>> returned.
>> With this change only in case (x x+1] x+1 will be returned. All other 
>> intervals are not changed.
>>
>> Therefore this is a minimal change which solves issues. I have 
>> already at least two use cases which
>> are failing without this fix. (Somehow simple use cases with 
>> rate->dmix->hw where the hw truncates
>> the default period_time of 125ms and fails with EINVAL on 
>> snd_pcm_set_period_near()).
>> Therefore I would expect that these issues will be seen soon by other 
>> users.
>>
>> If there is a use case which breaks in future due to the right 
>> interpretation of (x x+1] I think we should try
>> to find the root cause why this (x x+1] interval has to be 
>> interpreted wrongly to get the use case to work.
>
> 'struct snd_interval' has 'integer' flag. When this flag is off,
> '(x, x + 1]' brings no single unique value. The inline function
> 'snd_interval_single()' should handle this case correctly.
Okay. Thanks for the hint. I think than I does not yet got the meaning 
of the integer flag correctly. My expectation was that the interval is 
interpreted as a real number interval in case integer is not set and 
interpreted as a natural number interval. Therefore in case of integer 
is not set the interval includes all real numbers which are >x and <=x+1 
e.g. the interval (1 2] includes 1.89 and 2.

In case of integer flag is set I would expect the same rule >x and <=x+1 
e.g. (1 2] only 2 is included because this is the only natural number 
which is >1 and <=2.

Please correct me if I am wrong.

>
>
> Thanks
>
> Takashi Sakamoto (@airport)
Timo Wischer Oct. 18, 2018, 3:55 p.m. UTC | #6
Best regards
*Timo Wischer*
Engineering Software Base (ADITG/ESB)

Tel. +49 5121 49 6938
On 10/18/18 16:58, Takashi Iwai wrote:
> On Thu, 18 Oct 2018 16:31:21 +0200,
> Timo Wischer wrote:
>> On 10/18/18 15:19, Takashi Iwai wrote:
>>> On Thu, 18 Oct 2018 14:28:47 +0200,
>>> Timo Wischer wrote:
>>>> On 10/18/18 14:02, Takashi Iwai wrote:
>>>>> On Thu, 18 Oct 2018 13:33:24 +0200,
>>>>> <twischer@de.adit-jv.com> wrote:
>>>>>> From: Timo Wischer <twischer@de.adit-jv.com>
>>>>>>
>>>>>> Without this change an interval of (x x+1] will be interpreted as an
>>>>>> empty interval but the right value would be x+1.
>>>>>> This leads to a failing snd_pcm_hw_params() call which returns -EINVAL.
>>>>>>
>>>>>> An example issue log is given in the following:
>>>>>> snd_pcm_hw_params failed with err -22 (Invalid argument)
>>>>>> ACCESS: MMAP_NONINTERLEAVED
>>>>>> FORMAT: S16_LE
>>>>>> SUBFORMAT: STD
>>>>>> SAMPLE_BITS: 16
>>>>>> FRAME_BITS: 16
>>>>>> CHANNELS: 1
>>>>>> RATE: 16000
>>>>>> PERIOD_TIME: (15999 16000]
>>>>>> PERIOD_SIZE: (255 256]
>>>>>> PERIOD_BYTES: (510 512]
>>>>>> PERIODS: [2 3)
>>>>>> BUFFER_TIME: 32000
>>>>>> BUFFER_SIZE: 512
>>>>>> BUFFER_BYTES: 1024
>>>>>>
>>>>>> In case of (x x+1) we have to interpret it anyway as a single value of x to
>>>>>> compensate rounding issues.
>>>>>> For example the period size will result in an interval of (352 353) when
>>>>>> the period time is 16ms and the sample rate 22050 Hz
>>>>>> (16ms * 22,05 kHz = 352,8 frames). But 352 has to be chosen to allow a
>>>>>> buffer size of 705 (32ms * 22,05 kHz = 705,6 frames) which has to be >= 2x
>>>>>> period size to avoid Xruns. The buffer size will not end up with an
>>>>>> interval of (705 706) simular to the period size because
>>>>>> snd_pcm_rate_hw_refine_cchange() calls snd_interval_floor() for the buffer
>>>>>> size. Therefore this value will be interpreted as an integer interval
>>>>>> instead of a real interval further on.
>>>>>>
>>>>>> This issue seems to exist since the change of 9bb985c38 ("pcm:
>>>>>> snd_interval_refine_first/last: exclude value only if also excluded
>>>>>> before")
>>>>>>
>>>>>> Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
>>>>>> ---
>>>>>>> On 10/18/18 12:57, Takashi Iwai wrote:
>>>>>>> This change looks risky.  The snd_interval_value() might be called
>>>>>>> even if the interval isn't reduced to a single value.  Rather check
>>>>>>> openmin instead.
>>>>>> If I would do
>>>>>> "if (i->openmin)"
>>>>>> on an interval of (x x+1) x+1 would be returned. But this would result in
>>>>>> the second issue which I have tried to describe in the commit message:
>>>>>> x has to be returned otherwise it is not guaranteed that
>>>>>> buffer_size >= 2x period_size. And this would result in continuously Xruns.
>>>>>> Therefore I would like to prefer
>>>>>> "if (i->openmin && !i->openmax)"
>>>>> Hm, I overlooked that there is an assert() before that.  So a
>>>>> single-value interval is a must at this execution, so it doesn't
>>>>> matter which one to take.
>>>>>
>>>>> Didn't the assert() hit in your case with x+1, then?
>>>> No. For the implementation of
>>>>
>>>> snd_interval_value()
>>>> (x x+1) is also a valid interval which has only a single value.
>>>> This is also required because the ALSA neogation rules often end up with intervals like (x x+1)
>>>> e.g. in case of rounding issues  32ms * 22,05 kHz = 705,6 frames -> (705 706)
>>>> Therefore assert(snd_interval_single(i)) has to not fail in case of (705 706).
>>> And this is a problematic case no matter which value to take.
>>> Your change might "fix" your specific case, but it might break
>>> others.  No matter which value (min or max) to take, it's basically
>>> invalid.
>>>
>>> If your fix is logically correct, it's fine.  But, judging from the
>>> description, it looks like nothing but heuristic based on your
>>> specific use cases.
>>
>> The reason for this fix was an issue where an interval of (x x+1] is
>> interpreted as not a single value.
>> Before the change in snd_interval_single() the following intervals
>> were interpreted as a single value:
>>
>>   * (x x) -> required for rounding issues e.g. 32ms * 22,05 kHz = 705,6
>>     frames => (705 706)
> Wait... Isn't it (x x+1) at this point?
> Otherwise they can't be a valid value, per definition.


Yes, you are right. May mistake.
I have also no idea why and if these intervals required

  * (x x)
  *

    [x x)

  *

    [x x]

At least snd_interval_checkempty() is interpreting them correctly and 
returning true


>
>>   * (x x]
>>   * [x x)
>>   * [x x]
>>   * (x x+1)
>>   * [x x+1)
>>
>> With this change (x x+1] will also be interpreted as a single value
>> (which looks reasonable for me).
>> But the interval [x x+1] is still not interpreted as a single value
>> (which also sounds right for me)
>>
>> Before the change in snd_interval_value() for all intervals x was returned.
>> With this change only in case (x x+1] x+1 will be returned. All other
>> intervals are not changed.
>>
>> Therefore this is a minimal change which solves issues. I have already
>> at least two use cases which
>> are failing without this fix. (Somehow simple use cases with
>> rate->dmix->hw where the hw truncates
>> the default period_time of 125ms and fails with EINVAL on
>> snd_pcm_set_period_near()).
>> Therefore I would expect that these issues will be seen soon by other users.
>>
>> If there is a use case which breaks in future due to the right
>> interpretation of (x x+1] I think we should try
>> to find the root cause why this (x x+1] interval has to be interpreted
>> wrongly to get the use case to work.
> I'm not against fixing the handling of (x x+1] or (x x+1).
> Although (x x+1) can't be handled correctly at obtaining the exact
> value, often PERIOD_TIME or BUFFER_TIME may reach to this state, so
> allowing it still makes sense.
>
> But what I don't understand is why
>
> snd_interval_value() {
> 	if (openmin)
> 		return min+1;
> 	return min;
> }
>
> doesn't work.  I don't mean that this is better than returning max
> (like your v1 patch), but just want to understand the problem
> correctly.
In the issue case which I had I got a buffer size < 2x period size while 
I have requested 16ms period and 32ms buffer. Unfortunately this results 
in continuously under runs.
The following audio path was used: aplay->rate->dmix->hw. aplay streams 
with 22050 Hz. Therefore we got the following intervals:
period: 16ms * 22,05 kHz = 352,8 frames => (352 353)
buffer: 32ms * 22,05 kHz = 705,6 frames => [705 706]
The buffer size will not end up with an interval of (705 706) similar to 
the period size because snd_pcm_rate_hw_refine_cchange() calls 
snd_interval_floor() for the buffer size. Therefore this value will be 
interpreted as an integer interval (integer flag is set) instead of a 
real interval further on.

With your solution we would use 353 frames for period and 705 frames for 
buffer. Therefore we will get Xruns because 2*353 > 705.

>
>
>>> IOW, if we have a good set of unit tests to cover most of possible use
>>> cases and this is proven to improve all these, I'll happily take it.
>>> But unfortunately there is no good test coverage, so far.
>> At least I have executed several tests on my end which are using
>> different combination of ALSA plugins
>> (plug, rate, dmix, dsnoop), sample rates, channels, period and buffer
>> sizes on different hardware with different
>> sound cards.
>> I would expect that you are talking about the tests in the test
>> directory of the alsa-lib sources. Or is there
>> anything else? May be I could try to extend/add some tests at least to
>> reproduce the issue of this patch.
> I'd think of a test program linked with these functions for executing
> only this configuration stuff without actual plugins.  Then we can
> give a bunch of sets to evaluate the extreme cases.
So you mean only testing the corner cases of the functions of 
src/pcm/interval_inline.h without any other alsa-lib dependencies?
>
>
> thanks,
>
> Takashi
Takashi Iwai Oct. 18, 2018, 6:57 p.m. UTC | #7
On Thu, 18 Oct 2018 17:55:32 +0200,
Timo Wischer wrote:
> 
> > But what I don't understand is why
> >
> > snd_interval_value() {
> > 	if (openmin)
> > 		return min+1;
> > 	return min;
> > }
> >
> > doesn't work.  I don't mean that this is better than returning max
> > (like your v1 patch), but just want to understand the problem
> > correctly.
> In the issue case which I had I got a buffer size < 2x period size
> while I have requested 16ms period and 32ms buffer. Unfortunately this
> results in continuously under runs.
> The following audio path was used: aplay->rate->dmix->hw. aplay
> streams with 22050 Hz. Therefore we got the following intervals:
> period: 16ms * 22,05 kHz = 352,8 frames => (352 353)
> buffer: 32ms * 22,05 kHz = 705,6 frames => [705 706]

But how can it be at the first place?  (352 353) is already empty as
the frames.  The time could be kept in this representation, but the
frames must be integer.

Which order of calls did it result in so?

We know that some order of calls make the selection impossible like
the above, especially when both time and bytes/frames are mixed.

> The buffer size will not end up with an interval of (705 706) similar
> to the period size because snd_pcm_rate_hw_refine_cchange() calls
> snd_interval_floor() for the buffer size. Therefore this value will be
> interpreted as an integer interval (integer flag is set) instead of a
> real interval further on.
> 
> With your solution we would use 353 frames for period and 705 frames
> for buffer. Therefore we will get Xruns because 2*353 > 705.
> 
> >
> >
> >>> IOW, if we have a good set of unit tests to cover most of possible use
> >>> cases and this is proven to improve all these, I'll happily take it.
> >>> But unfortunately there is no good test coverage, so far.
> >> At least I have executed several tests on my end which are using
> >> different combination of ALSA plugins
> >> (plug, rate, dmix, dsnoop), sample rates, channels, period and buffer
> >> sizes on different hardware with different
> >> sound cards.
> >> I would expect that you are talking about the tests in the test
> >> directory of the alsa-lib sources. Or is there
> >> anything else? May be I could try to extend/add some tests at least to
> >> reproduce the issue of this patch.
> > I'd think of a test program linked with these functions for executing
> > only this configuration stuff without actual plugins.  Then we can
> > give a bunch of sets to evaluate the extreme cases.
> So you mean only testing the corner cases of the functions of
> src/pcm/interval_inline.h without any other alsa-lib dependencies?

Yes.


Takashi
Timo Wischer Oct. 22, 2018, 7:19 a.m. UTC | #8
On 10/18/18 20:57, Takashi Iwai wrote:
> But how can it be at the first place?  (352 353) is already empty as
> the frames.  The time could be kept in this representation, but the
> frames must be integer.
>
> Which order of calls did it result in so?
>
> We know that some order of calls make the selection impossible like
> the above, especially when both time and bytes/frames are mixed.


I have used the following ALSA configuration:

pcm.test_rate {
     type rate
         slave.pcm hw:gmdcard
         slave.rate 48000
}

and used the following implementation:

INTERVAL_INLINE int snd_interval_single(const snd_interval_t *i)
{
     assert(!snd_interval_empty(i));
     return (i->min == i->max ||
         (i->min + 1 == i->max && (i->openmin || i->openmax)));
}

INTERVAL_INLINE int snd_interval_value(const snd_interval_t *i)
{
     assert(snd_interval_single(i));
     if (i->openmin)
         return (i->min + 1);
     return i->min;
}

In addition I have enabled RULES_DEBUG.
With the following aplay command I got a period of 353 frames and a 
buffer of 705 frames:

$ aplay -Dtest_rate -c2 -r22050 -fS16_LE /dev/urandom 
--period-time=16000 --buffer-time=32000 -v
Playing raw data '/dev/urandom' : Signed 16 bit Little Endian, Rate 
22050 Hz, Stereo
hw_refine_slave - enter 'test_rate'
schange 'test_rate' (client)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED RW_INTERLEAVED 
RW_NONINTERLEAVED
FORMAT:  S8 U8 S16_LE S16_BE U16_LE U16_BE S24_LE S24_BE U24_LE U24_BE 
S32_LE S32_BE U32_LE U32_BE S20_LE S20_BE U20_LE U20_BE S24_3LE S24_3BE 
U24_3LE U24_3BE S20_3LE S20_3BE U20_3LE U20_3BE S18_3LE S18_3BE U18_3LE 
U18_3BE
SUBFORMAT:  STD
SAMPLE_BITS: ALL
FRAME_BITS: ALL
CHANNELS: ALL
RATE: [4000 192000]
PERIOD_TIME: ALL
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: ALL
BUFFER_BYTES: ALL
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  ALL
SUBFORMAT:  ALL
SAMPLE_BITS: ALL
FRAME_BITS: ALL
CHANNELS: ALL
RATE: [48000 48001)
PERIOD_TIME: ALL
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: ALL
BUFFER_BYTES: ALL
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED RW_INTERLEAVED 
RW_NONINTERLEAVED
FORMAT:  S8 U8 S16_LE S16_BE U16_LE U16_BE S24_LE S24_BE U24_LE U24_BE 
S32_LE S32_BE U32_LE U32_BE S20_LE S20_BE U20_LE U20_BE S24_3LE S24_3BE 
U24_3LE U24_3BE S20_3LE S20_3BE U20_3LE U20_3BE S18_3LE S18_3BE U18_3LE 
U18_3BE
SUBFORMAT:  STD
SAMPLE_BITS: ALL
FRAME_BITS: ALL
CHANNELS: ALL
RATE: [4000 192000]
PERIOD_TIME: ALL
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: ALL
BUFFER_BYTES: ALL
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  S8 U8 S16_LE S16_BE U16_LE U16_BE S24_LE S24_BE U24_LE U24_BE 
S32_LE S32_BE U32_LE U32_BE S20_LE S20_BE U20_LE U20_BE S24_3LE S24_3BE 
U24_3LE U24_3BE S20_3LE S20_3BE U20_3LE U20_3BE S18_3LE S18_3BE U18_3LE 
U18_3BE
SUBFORMAT:  STD
SAMPLE_BITS: ALL
FRAME_BITS: ALL
CHANNELS: ALL
RATE: [48000 48001)
PERIOD_TIME: ALL
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: [0 4294967295)
BUFFER_BYTES: ALL
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED RW_INTERLEAVED 
RW_NONINTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [4000 192000]
PERIOD_TIME: (166 42667)
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: [0 131072]
BUFFER_BYTES: ALL
TICK_TIME: ALL
Rule 0 (0xffff80eae410): FORMAT= S16_LE ->  S16_LE SAMPLE_BITS=16
Rule 1 (0xffff80eae2f0): SAMPLE_BITS=16 -> 16 FORMAT= S16_LE SAMPLE_BITS=16
Rule 2 (0xffff80eae250): SAMPLE_BITS=16 -> 16 FRAME_BITS=32 CHANNELS=2
Rule 3 (0xffff80eae1b0): FRAME_BITS=32 -> 32 SAMPLE_BITS=16 CHANNELS=2
Rule 4 (0xffff80eae100): FRAME_BITS=32 -> 32 PERIOD_BYTES=ALL 
PERIOD_SIZE=ALL
Rule 5 (0xffff80eae100): FRAME_BITS=32 -> 32 BUFFER_BYTES=[1 4294967295] 
BUFFER_SIZE=[1 131072]
Rule 6 (0xffff80eae250): CHANNELS=2 -> 2 FRAME_BITS=32 SAMPLE_BITS=16
Rule 7 (0xffff80eae100): RATE=[4000 192000] -> [4000 192000] 
PERIOD_SIZE=ALL PERIOD_TIME=(166 42667)
Rule 8 (0xffff80eae100): RATE=[4000 192000] -> [4000 192000] 
BUFFER_SIZE=[1 131072] BUFFER_TIME=[1 4294967295]
Rule 9 (0xffff80eae250): PERIODS=ALL -> (0 4294967295] BUFFER_SIZE=[1 
131072] PERIOD_SIZE=ALL
Rule 10 (0xffff80eae250): PERIOD_SIZE=ALL -> (0 4294967295] 
BUFFER_SIZE=[1 131072] PERIODS=(0 4294967295]
Rule 11 (0xffff80eae100): PERIOD_SIZE=(0 4294967295] -> (0 1073741824) 
PERIOD_BYTES=ALL FRAME_BITS=32
Rule 12 (0xffff80eae050): PERIOD_SIZE=(0 1073741824) -> (0 8193) 
PERIOD_TIME=(166 42667) RATE=[4000 192000]
Rule 13 (0xffff80eae1b0): BUFFER_SIZE=[1 131072] -> [1 131072] 
PERIOD_SIZE=(0 8193) PERIODS=(0 4294967295]
Rule 14 (0xffff80eae100): BUFFER_SIZE=[1 131072] -> [1 131072] 
BUFFER_BYTES=[1 4294967295] FRAME_BITS=32
Rule 15 (0xffff80eae050): BUFFER_SIZE=[1 131072] -> [1 131072] 
BUFFER_TIME=[1 4294967295] RATE=[4000 192000]
Rule 16 (0xffff80eae050): PERIOD_BYTES=ALL -> (0 32772) PERIOD_SIZE=(0 
8193) FRAME_BITS=32
Rule 17 (0xffff80eae050): BUFFER_BYTES=[1 4294967295] -> [4 524288] 
BUFFER_SIZE=[1 131072] FRAME_BITS=32
Rule 18 (0xffff80eae100): PERIOD_TIME=(166 42667) -> (166 42667) 
PERIOD_SIZE=(0 8193) RATE=[4000 192000]
Rule 19 (0xffff80eae100): BUFFER_TIME=[1 4294967295] -> (5 32768000] 
BUFFER_SIZE=[1 131072] RATE=[4000 192000]
Rule 4 (0xffff80eae100): FRAME_BITS=32 -> 32 PERIOD_BYTES=(0 32772) 
PERIOD_SIZE=(0 8193)
Rule 5 (0xffff80eae100): FRAME_BITS=32 -> 32 BUFFER_BYTES=[4 524288] 
BUFFER_SIZE=[1 131072]
Rule 7 (0xffff80eae100): RATE=[4000 192000] -> [4000 192000] 
PERIOD_SIZE=(0 8193) PERIOD_TIME=(166 42667)
Rule 8 (0xffff80eae100): RATE=[4000 192000] -> [4000 192000] 
BUFFER_SIZE=[1 131072] BUFFER_TIME=(5 32768000]
Rule 9 (0xffff80eae250): PERIODS=(0 4294967295] -> (0 4294967295] 
BUFFER_SIZE=[1 131072] PERIOD_SIZE=(0 8193)
Rule 11 (0xffff80eae100): PERIOD_SIZE=(0 8193) -> (0 8193) 
PERIOD_BYTES=(0 32772) FRAME_BITS=32
Rule 14 (0xffff80eae100): BUFFER_SIZE=[1 131072] -> [1 131072] 
BUFFER_BYTES=[4 524288] FRAME_BITS=32
Rule 15 (0xffff80eae050): BUFFER_SIZE=[1 131072] -> [1 131072] 
BUFFER_TIME=(5 32768000] RATE=[4000 192000]
refine_soft ok 'test_rate'
schange 'test_rate' (client)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED RW_INTERLEAVED 
RW_NONINTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [4000 192000]
PERIOD_TIME: (166 42667)
PERIOD_SIZE: (0 8193)
PERIOD_BYTES: (0 32772)
PERIODS: (0 4294967295]
BUFFER_TIME: (5 32768000]
BUFFER_SIZE: [1 131072]
BUFFER_BYTES: [4 524288]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: (166 42667)
PERIOD_SIZE: [8 2048]
PERIOD_BYTES: [32 8192]
PERIODS: [1 32]
BUFFER_TIME: (166 682667)
BUFFER_SIZE: [8 32768]
BUFFER_BYTES: [32 131072]
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED RW_INTERLEAVED 
RW_NONINTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [4000 192000]
PERIOD_TIME: (166 42667)
PERIOD_SIZE: (0 8193)
PERIOD_BYTES: (0 32772)
PERIODS: (0 4294967295]
BUFFER_TIME: (5 32768000]
BUFFER_SIZE: [1 131072]
BUFFER_BYTES: [4 524288]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: (166 42667)
PERIOD_SIZE: [8 2048]
PERIOD_BYTES: [32 8192]
PERIODS: [1 32]
BUFFER_TIME: (166 682667)
BUFFER_SIZE: [8 32768]
BUFFER_BYTES: [32 131072]
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED RW_INTERLEAVED 
RW_NONINTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [4000 192000]
PERIOD_TIME: (166 42667)
PERIOD_SIZE: (0 8193)
PERIOD_BYTES: (0 32772)
PERIODS: (0 4294967295]
BUFFER_TIME: (5 32768000]
BUFFER_SIZE: [1 131072]
BUFFER_BYTES: [4 524288]
TICK_TIME: ALL
refine_soft ok 'test_rate'
refine_slave - leave 'test_rate'
hw_refine_slave - enter 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [4000 192000]
PERIOD_TIME: (166 42667)
PERIOD_SIZE: (0 8193)
PERIOD_BYTES: (0 32772)
PERIODS: (0 4294967295]
BUFFER_TIME: (5 32768000]
BUFFER_SIZE: [1 131072]
BUFFER_BYTES: [4 524288]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  ALL
SUBFORMAT:  ALL
SAMPLE_BITS: ALL
FRAME_BITS: ALL
CHANNELS: ALL
RATE: [48000 48001)
PERIOD_TIME: ALL
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: ALL
BUFFER_BYTES: ALL
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [4000 192000]
PERIOD_TIME: (166 42667)
PERIOD_SIZE: (0 8193)
PERIOD_BYTES: (0 32772)
PERIODS: (0 4294967295]
BUFFER_TIME: (5 32768000]
BUFFER_SIZE: [1 131072]
BUFFER_BYTES: [4 524288]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [48000 48001)
PERIOD_TIME: (166 42667)
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: (0 1572909)
BUFFER_BYTES: ALL
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [4000 192000]
PERIOD_TIME: (166 42667)
PERIOD_SIZE: (0 8193)
PERIOD_BYTES: (0 32772)
PERIODS: (0 4294967295]
BUFFER_TIME: (5 32768000]
BUFFER_SIZE: [1 131072]
BUFFER_BYTES: [4 524288]
TICK_TIME: ALL
refine_soft ok 'test_rate'
refine_slave - leave 'test_rate'
hw_refine_slave - enter 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [22050 192000]
PERIOD_TIME: (166 42667)
PERIOD_SIZE: (0 8193)
PERIOD_BYTES: (0 32772)
PERIODS: (0 4294967295]
BUFFER_TIME: (5 32768000]
BUFFER_SIZE: [1 131072]
BUFFER_BYTES: [4 524288]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  ALL
SUBFORMAT:  ALL
SAMPLE_BITS: ALL
FRAME_BITS: ALL
CHANNELS: ALL
RATE: [48000 48001)
PERIOD_TIME: ALL
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: ALL
BUFFER_BYTES: ALL
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [22050 192000]
PERIOD_TIME: (166 42667)
PERIOD_SIZE: (0 8193)
PERIOD_BYTES: (0 32772)
PERIODS: (0 4294967295]
BUFFER_TIME: (5 32768000]
BUFFER_SIZE: [1 131072]
BUFFER_BYTES: [4 524288]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [48000 48001)
PERIOD_TIME: (166 42667)
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: (0 285335)
BUFFER_BYTES: ALL
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [22050 192000]
PERIOD_TIME: (166 42667)
PERIOD_SIZE: (0 8193)
PERIOD_BYTES: (0 32772)
PERIODS: (0 4294967295]
BUFFER_TIME: (5 32768000]
BUFFER_SIZE: [3 131072]
BUFFER_BYTES: [4 524288]
TICK_TIME: ALL
Rule 5 (0xffff80eae100): FRAME_BITS=32 -> 32 BUFFER_BYTES=[4 524288] 
BUFFER_SIZE=[3 131072]
Rule 8 (0xffff80eae100): RATE=[22050 192000] -> [22050 192000] 
BUFFER_SIZE=[3 131072] BUFFER_TIME=(5 32768000]
Rule 9 (0xffff80eae250): PERIODS=(0 4294967295] -> (0 4294967295] 
BUFFER_SIZE=[3 131072] PERIOD_SIZE=(0 8193)
Rule 10 (0xffff80eae250): PERIOD_SIZE=(0 8193) -> (0 8193) 
BUFFER_SIZE=[3 131072] PERIODS=(0 4294967295]
Rule 12 (0xffff80eae050): PERIOD_SIZE=(0 8193) -> (3 8193) 
PERIOD_TIME=(166 42667) RATE=[22050 192000]
Rule 13 (0xffff80eae1b0): BUFFER_SIZE=[3 131072] -> [3 131072] 
PERIOD_SIZE=(3 8193) PERIODS=(0 4294967295]
Rule 15 (0xffff80eae050): BUFFER_SIZE=[3 131072] -> [3 131072] 
BUFFER_TIME=(5 32768000] RATE=[22050 192000]
Rule 16 (0xffff80eae050): PERIOD_BYTES=(0 32772) -> (12 32772) 
PERIOD_SIZE=(3 8193) FRAME_BITS=32
Rule 17 (0xffff80eae050): BUFFER_BYTES=[4 524288] -> [12 524288] 
BUFFER_SIZE=[3 131072] FRAME_BITS=32
Rule 18 (0xffff80eae100): PERIOD_TIME=(166 42667) -> (166 42667) 
PERIOD_SIZE=(3 8193) RATE=[22050 192000]
Rule 19 (0xffff80eae100): BUFFER_TIME=(5 32768000] -> (15 5944309) 
BUFFER_SIZE=[3 131072] RATE=[22050 192000]
Rule 4 (0xffff80eae100): FRAME_BITS=32 -> 32 PERIOD_BYTES=(12 32772) 
PERIOD_SIZE=(3 8193)
Rule 5 (0xffff80eae100): FRAME_BITS=32 -> 32 BUFFER_BYTES=[12 524288] 
BUFFER_SIZE=[3 131072]
Rule 7 (0xffff80eae100): RATE=[22050 192000] -> [22050 192000] 
PERIOD_SIZE=(3 8193) PERIOD_TIME=(166 42667)
Rule 8 (0xffff80eae100): RATE=[22050 192000] -> [22050 192000] 
BUFFER_SIZE=[3 131072] BUFFER_TIME=(15 5944309)
Rule 9 (0xffff80eae250): PERIODS=(0 4294967295] -> (0 43691) 
BUFFER_SIZE=[3 131072] PERIOD_SIZE=(3 8193)
Rule 10 (0xffff80eae250): PERIOD_SIZE=(3 8193) -> (3 8193) 
BUFFER_SIZE=[3 131072] PERIODS=(0 43691)
Rule 11 (0xffff80eae100): PERIOD_SIZE=(3 8193) -> (3 8193) 
PERIOD_BYTES=(12 32772) FRAME_BITS=32
Rule 13 (0xffff80eae1b0): BUFFER_SIZE=[3 131072] -> [3 131072] 
PERIOD_SIZE=(3 8193) PERIODS=(0 43691)
Rule 14 (0xffff80eae100): BUFFER_SIZE=[3 131072] -> [3 131072] 
BUFFER_BYTES=[12 524288] FRAME_BITS=32
Rule 15 (0xffff80eae050): BUFFER_SIZE=[3 131072] -> [3 131072] 
BUFFER_TIME=(15 5944309) RATE=[22050 192000]
refine_soft ok 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [22050 192000]
PERIOD_TIME: (166 42667)
PERIOD_SIZE: (3 8193)
PERIOD_BYTES: (12 32772)
PERIODS: (0 43691)
BUFFER_TIME: (15 5944309)
BUFFER_SIZE: [3 131072]
BUFFER_BYTES: [12 524288]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: (166 42667)
PERIOD_SIZE: [8 2048]
PERIOD_BYTES: [32 8192]
PERIODS: [1 32]
BUFFER_TIME: (166 682667)
BUFFER_SIZE: [8 32768]
BUFFER_BYTES: [32 131072]
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [22050 192000]
PERIOD_TIME: (166 42667)
PERIOD_SIZE: (3 8193)
PERIOD_BYTES: (12 32772)
PERIODS: (0 43691)
BUFFER_TIME: (15 5944309)
BUFFER_SIZE: [3 131072]
BUFFER_BYTES: [12 524288]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: (166 42667)
PERIOD_SIZE: [8 2048]
PERIOD_BYTES: [32 8192]
PERIODS: [1 32]
BUFFER_TIME: (166 682667)
BUFFER_SIZE: [8 32768]
BUFFER_BYTES: [32 131072]
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [22050 192000]
PERIOD_TIME: (166 42667)
PERIOD_SIZE: (3 8193)
PERIOD_BYTES: (12 32772)
PERIODS: (0 43691)
BUFFER_TIME: (15 5944309)
BUFFER_SIZE: [3 131072]
BUFFER_BYTES: [12 524288]
TICK_TIME: ALL
refine_soft ok 'test_rate'
refine_slave - leave 'test_rate'
hw_refine_slave - enter 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [22050 22050]
PERIOD_TIME: (166 42667)
PERIOD_SIZE: (3 8193)
PERIOD_BYTES: (12 32772)
PERIODS: (0 43691)
BUFFER_TIME: (15 5944309)
BUFFER_SIZE: [3 131072]
BUFFER_BYTES: [12 524288]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  ALL
SUBFORMAT:  ALL
SAMPLE_BITS: ALL
FRAME_BITS: ALL
CHANNELS: ALL
RATE: [48000 48001)
PERIOD_TIME: ALL
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: ALL
BUFFER_BYTES: ALL
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [22050 22050]
PERIOD_TIME: (166 42667)
PERIOD_SIZE: (3 8193)
PERIOD_BYTES: (12 32772)
PERIODS: (0 43691)
BUFFER_TIME: (15 5944309)
BUFFER_SIZE: [3 131072]
BUFFER_BYTES: [12 524288]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [48000 48001)
PERIOD_TIME: (166 42667)
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: (6 285335)
BUFFER_BYTES: ALL
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [22050 22050]
PERIOD_TIME: (166 42667)
PERIOD_SIZE: (3 8193)
PERIOD_BYTES: (12 32772)
PERIODS: (0 43691)
BUFFER_TIME: (15 5944309)
BUFFER_SIZE: [3 15052]
BUFFER_BYTES: [12 524288]
TICK_TIME: ALL
Rule 5 (0xffff80eae100): FRAME_BITS=32 -> 32 BUFFER_BYTES=[12 524288] 
BUFFER_SIZE=[3 15052]
Rule 8 (0xffff80eae100): RATE=22050 -> 22050 BUFFER_SIZE=[3 15052] 
BUFFER_TIME=(15 5944309)
Rule 9 (0xffff80eae250): PERIODS=(0 43691) -> (0 5018) BUFFER_SIZE=[3 
15052] PERIOD_SIZE=(3 8193)
Rule 10 (0xffff80eae250): PERIOD_SIZE=(3 8193) -> (3 8193) 
BUFFER_SIZE=[3 15052] PERIODS=(0 5018)
Rule 12 (0xffff80eae050): PERIOD_SIZE=(3 8193) -> (3 941) 
PERIOD_TIME=(166 42667) RATE=22050
Rule 13 (0xffff80eae1b0): BUFFER_SIZE=[3 15052] -> [3 15052] 
PERIOD_SIZE=(3 941) PERIODS=(0 5018)
Rule 15 (0xffff80eae050): BUFFER_SIZE=[3 15052] -> [3 15052] 
BUFFER_TIME=(15 5944309) RATE=22050
Rule 16 (0xffff80eae050): PERIOD_BYTES=(12 32772) -> (12 3764) 
PERIOD_SIZE=(3 941) FRAME_BITS=32
Rule 17 (0xffff80eae050): BUFFER_BYTES=[12 524288] -> [12 60208] 
BUFFER_SIZE=[3 15052] FRAME_BITS=32
Rule 18 (0xffff80eae100): PERIOD_TIME=(166 42667) -> (166 42667) 
PERIOD_SIZE=(3 941) RATE=22050
Rule 19 (0xffff80eae100): BUFFER_TIME=(15 5944309) -> (136 682631) 
BUFFER_SIZE=[3 15052] RATE=22050
Rule 4 (0xffff80eae100): FRAME_BITS=32 -> 32 PERIOD_BYTES=(12 3764) 
PERIOD_SIZE=(3 941)
Rule 5 (0xffff80eae100): FRAME_BITS=32 -> 32 BUFFER_BYTES=[12 60208] 
BUFFER_SIZE=[3 15052]
Rule 7 (0xffff80eae100): RATE=22050 -> 22050 PERIOD_SIZE=(3 941) 
PERIOD_TIME=(166 42667)
Rule 8 (0xffff80eae100): RATE=22050 -> 22050 BUFFER_SIZE=[3 15052] 
BUFFER_TIME=(136 682631)
Rule 9 (0xffff80eae250): PERIODS=(0 5018) -> (0 5018) BUFFER_SIZE=[3 
15052] PERIOD_SIZE=(3 941)
Rule 11 (0xffff80eae100): PERIOD_SIZE=(3 941) -> (3 941) 
PERIOD_BYTES=(12 3764) FRAME_BITS=32
Rule 14 (0xffff80eae100): BUFFER_SIZE=[3 15052] -> [3 15052] 
BUFFER_BYTES=[12 60208] FRAME_BITS=32
Rule 15 (0xffff80eae050): BUFFER_SIZE=[3 15052] -> [3 15052] 
BUFFER_TIME=(136 682631) RATE=22050
refine_soft ok 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: (166 42667)
PERIOD_SIZE: (3 941)
PERIOD_BYTES: (12 3764)
PERIODS: (0 5018)
BUFFER_TIME: (136 682631)
BUFFER_SIZE: [3 15052]
BUFFER_BYTES: [12 60208]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: (166 42667)
PERIOD_SIZE: [8 2048]
PERIOD_BYTES: [32 8192]
PERIODS: [1 32]
BUFFER_TIME: (166 682667)
BUFFER_SIZE: [8 32768]
BUFFER_BYTES: [32 131072]
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: (166 42667)
PERIOD_SIZE: (3 941)
PERIOD_BYTES: (12 3764)
PERIODS: (0 5018)
BUFFER_TIME: (136 682631)
BUFFER_SIZE: [3 15052]
BUFFER_BYTES: [12 60208]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: (166 42667)
PERIOD_SIZE: [8 2048]
PERIOD_BYTES: [32 8192]
PERIODS: [1 32]
BUFFER_TIME: (166 682667)
BUFFER_SIZE: [8 32768]
BUFFER_BYTES: [32 131072]
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: (166 42667)
PERIOD_SIZE: (3 941)
PERIOD_BYTES: (12 3764)
PERIODS: (0 5018)
BUFFER_TIME: (136 682631)
BUFFER_SIZE: [3 15052]
BUFFER_BYTES: [12 60208]
TICK_TIME: ALL
refine_soft ok 'test_rate'
refine_slave - leave 'test_rate'
hw_refine_slave - enter 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: [16000 42667)
PERIOD_SIZE: (3 941)
PERIOD_BYTES: (12 3764)
PERIODS: (0 5018)
BUFFER_TIME: (136 682631)
BUFFER_SIZE: [3 15052]
BUFFER_BYTES: [12 60208]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  ALL
SUBFORMAT:  ALL
SAMPLE_BITS: ALL
FRAME_BITS: ALL
CHANNELS: ALL
RATE: [48000 48001)
PERIOD_TIME: ALL
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: ALL
BUFFER_BYTES: ALL
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: [16000 42667)
PERIOD_SIZE: (3 941)
PERIOD_BYTES: (12 3764)
PERIODS: (0 5018)
BUFFER_TIME: (136 682631)
BUFFER_SIZE: [3 15052]
BUFFER_BYTES: [12 60208]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [48000 48001)
PERIOD_TIME: [16000 42667)
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: (6 32770)
BUFFER_BYTES: ALL
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: [16000 42667)
PERIOD_SIZE: (3 941)
PERIOD_BYTES: (12 3764)
PERIODS: (0 5018)
BUFFER_TIME: (136 682631)
BUFFER_SIZE: [352 15052]
BUFFER_BYTES: [12 60208]
TICK_TIME: ALL
Rule 5 (0xffff80eae100): FRAME_BITS=32 -> 32 BUFFER_BYTES=[12 60208] 
BUFFER_SIZE=[352 15052]
Rule 7 (0xffff80eae100): RATE=22050 -> 22050 PERIOD_SIZE=(3 941) 
PERIOD_TIME=[16000 42667)
Rule 8 (0xffff80eae100): RATE=22050 -> 22050 BUFFER_SIZE=[352 15052] 
BUFFER_TIME=(136 682631)
Rule 9 (0xffff80eae250): PERIODS=(0 5018) -> (0 5018) BUFFER_SIZE=[352 
15052] PERIOD_SIZE=(3 941)
Rule 10 (0xffff80eae250): PERIOD_SIZE=(3 941) -> (3 941) 
BUFFER_SIZE=[352 15052] PERIODS=(0 5018)
Rule 12 (0xffff80eae050): PERIOD_SIZE=(3 941) -> (352 941) 
PERIOD_TIME=[16000 42667) RATE=22050
Rule 13 (0xffff80eae1b0): BUFFER_SIZE=[352 15052] -> [352 15052] 
PERIOD_SIZE=(352 941) PERIODS=(0 5018)
Rule 16 (0xffff80eae050): PERIOD_BYTES=(12 3764) -> (1408 3764) 
PERIOD_SIZE=(352 941) FRAME_BITS=32
Rule 17 (0xffff80eae050): BUFFER_BYTES=[12 60208] -> [1408 60208] 
BUFFER_SIZE=[352 15052] FRAME_BITS=32
Rule 18 (0xffff80eae100): PERIOD_TIME=[16000 42667) -> [16000 42667) 
PERIOD_SIZE=(352 941) RATE=22050
Rule 19 (0xffff80eae100): BUFFER_TIME=(136 682631) -> (15963 682631) 
BUFFER_SIZE=[352 15052] RATE=22050
Rule 4 (0xffff80eae100): FRAME_BITS=32 -> 32 PERIOD_BYTES=(1408 3764) 
PERIOD_SIZE=(352 941)
Rule 5 (0xffff80eae100): FRAME_BITS=32 -> 32 BUFFER_BYTES=[1408 60208] 
BUFFER_SIZE=[352 15052]
Rule 7 (0xffff80eae100): RATE=22050 -> 22050 PERIOD_SIZE=(352 941) 
PERIOD_TIME=[16000 42667)
Rule 8 (0xffff80eae100): RATE=22050 -> 22050 BUFFER_SIZE=[352 15052] 
BUFFER_TIME=(15963 682631)
Rule 9 (0xffff80eae250): PERIODS=(0 5018) -> (0 43) BUFFER_SIZE=[352 
15052] PERIOD_SIZE=(352 941)
Rule 10 (0xffff80eae250): PERIOD_SIZE=(352 941) -> (352 941) 
BUFFER_SIZE=[352 15052] PERIODS=(0 43)
Rule 11 (0xffff80eae100): PERIOD_SIZE=(352 941) -> (352 941) 
PERIOD_BYTES=(1408 3764) FRAME_BITS=32
Rule 13 (0xffff80eae1b0): BUFFER_SIZE=[352 15052] -> [352 15052] 
PERIOD_SIZE=(352 941) PERIODS=(0 43)
Rule 14 (0xffff80eae100): BUFFER_SIZE=[352 15052] -> [352 15052] 
BUFFER_BYTES=[1408 60208] FRAME_BITS=32
Rule 15 (0xffff80eae050): BUFFER_SIZE=[352 15052] -> [352 15052] 
BUFFER_TIME=(15963 682631) RATE=22050
refine_soft ok 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: [16000 42667)
PERIOD_SIZE: (352 941)
PERIOD_BYTES: (1408 3764)
PERIODS: (0 43)
BUFFER_TIME: (15963 682631)
BUFFER_SIZE: [352 15052]
BUFFER_BYTES: [1408 60208]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: [16000 42667)
PERIOD_SIZE: [768 2048]
PERIOD_BYTES: [3072 8192]
PERIODS: [1 32]
BUFFER_TIME: [16000 682667)
BUFFER_SIZE: [768 32768]
BUFFER_BYTES: [3072 131072]
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: [16000 42667)
PERIOD_SIZE: (352 941)
PERIOD_BYTES: (1408 3764)
PERIODS: (0 43)
BUFFER_TIME: (15963 682631)
BUFFER_SIZE: [352 15052]
BUFFER_BYTES: [1408 60208]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: [16000 42667)
PERIOD_SIZE: [768 2048]
PERIOD_BYTES: [3072 8192]
PERIODS: [1 32]
BUFFER_TIME: [16000 682667)
BUFFER_SIZE: [768 32768]
BUFFER_BYTES: [3072 131072]
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: [16000 42667)
PERIOD_SIZE: (352 941)
PERIOD_BYTES: (1408 3764)
PERIODS: (0 43)
BUFFER_TIME: (15963 682631)
BUFFER_SIZE: [352 15052]
BUFFER_BYTES: [1408 60208]
TICK_TIME: ALL
refine_soft ok 'test_rate'
refine_slave - leave 'test_rate'
hw_refine_slave - enter 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: [16000 16000]
PERIOD_SIZE: (352 941)
PERIOD_BYTES: (1408 3764)
PERIODS: (0 43)
BUFFER_TIME: (15963 682631)
BUFFER_SIZE: [352 15052]
BUFFER_BYTES: [1408 60208]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  ALL
SUBFORMAT:  ALL
SAMPLE_BITS: ALL
FRAME_BITS: ALL
CHANNELS: ALL
RATE: [48000 48001)
PERIOD_TIME: ALL
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: ALL
BUFFER_BYTES: ALL
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: [16000 16000]
PERIOD_SIZE: (352 941)
PERIOD_BYTES: (1408 3764)
PERIODS: (0 43)
BUFFER_TIME: (15963 682631)
BUFFER_SIZE: [352 15052]
BUFFER_BYTES: [1408 60208]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [48000 48001)
PERIOD_TIME: 16000
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: (766 32770)
BUFFER_BYTES: ALL
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 941)
PERIOD_BYTES: (1408 3764)
PERIODS: (0 43)
BUFFER_TIME: (15963 682631)
BUFFER_SIZE: [352 11289]
BUFFER_BYTES: [1408 60208]
TICK_TIME: ALL
Rule 5 (0xffff80eae100): FRAME_BITS=32 -> 32 BUFFER_BYTES=[1408 60208] 
BUFFER_SIZE=[352 11289]
Rule 7 (0xffff80eae100): RATE=22050 -> 22050 PERIOD_SIZE=(352 941) 
PERIOD_TIME=16000
Rule 8 (0xffff80eae100): RATE=22050 -> 22050 BUFFER_SIZE=[352 11289] 
BUFFER_TIME=(15963 682631)
Rule 9 (0xffff80eae250): PERIODS=(0 43) -> (0 33) BUFFER_SIZE=[352 
11289] PERIOD_SIZE=(352 941)
Rule 10 (0xffff80eae250): PERIOD_SIZE=(352 941) -> (352 941) 
BUFFER_SIZE=[352 11289] PERIODS=(0 33)
Rule 12 (0xffff80eae050): PERIOD_SIZE=(352 941) -> (352 353) 
PERIOD_TIME=16000 RATE=22050
Rule 13 (0xffff80eae1b0): BUFFER_SIZE=[352 11289] -> [352 11289] 
PERIOD_SIZE=(352 353) PERIODS=(0 33)
Rule 16 (0xffff80eae050): PERIOD_BYTES=(1408 3764) -> (1408 1412) 
PERIOD_SIZE=(352 353) FRAME_BITS=32
Rule 17 (0xffff80eae050): BUFFER_BYTES=[1408 60208] -> [1408 45156] 
BUFFER_SIZE=[352 11289] FRAME_BITS=32
Rule 18 (0xffff80eae100): PERIOD_TIME=16000 -> 16000 PERIOD_SIZE=(352 
353) RATE=22050
Rule 19 (0xffff80eae100): BUFFER_TIME=(15963 682631) -> (15963 511973) 
BUFFER_SIZE=[352 11289] RATE=22050
Rule 4 (0xffff80eae100): FRAME_BITS=32 -> 32 PERIOD_BYTES=(1408 1412) 
PERIOD_SIZE=(352 353)
Rule 5 (0xffff80eae100): FRAME_BITS=32 -> 32 BUFFER_BYTES=[1408 45156] 
BUFFER_SIZE=[352 11289]
Rule 7 (0xffff80eae100): RATE=22050 -> 22050 PERIOD_SIZE=(352 353) 
PERIOD_TIME=16000
Rule 8 (0xffff80eae100): RATE=22050 -> 22050 BUFFER_SIZE=[352 11289] 
BUFFER_TIME=(15963 511973)
Rule 9 (0xffff80eae250): PERIODS=(0 33) -> (0 33) BUFFER_SIZE=[352 
11289] PERIOD_SIZE=(352 353)
Rule 11 (0xffff80eae100): PERIOD_SIZE=(352 353) -> (352 353) 
PERIOD_BYTES=(1408 1412) FRAME_BITS=32
Rule 14 (0xffff80eae100): BUFFER_SIZE=[352 11289] -> [352 11289] 
BUFFER_BYTES=[1408 45156] FRAME_BITS=32
Rule 15 (0xffff80eae050): BUFFER_SIZE=[352 11289] -> [352 11289] 
BUFFER_TIME=(15963 511973) RATE=22050
refine_soft ok 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (0 33)
BUFFER_TIME: (15963 511973)
BUFFER_SIZE: [352 11289]
BUFFER_BYTES: [1408 45156]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: 16000
PERIOD_SIZE: 768
PERIOD_BYTES: 3072
PERIODS: [1 32]
BUFFER_TIME: [16000 512000]
BUFFER_SIZE: [768 24576]
BUFFER_BYTES: [3072 98304]
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (0 33)
BUFFER_TIME: (15963 511973)
BUFFER_SIZE: [352 11289]
BUFFER_BYTES: [1408 45156]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: 16000
PERIOD_SIZE: 768
PERIOD_BYTES: 3072
PERIODS: [1 32]
BUFFER_TIME: [16000 512000]
BUFFER_SIZE: [768 24576]
BUFFER_BYTES: [3072 98304]
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (0 33)
BUFFER_TIME: (15963 511973)
BUFFER_SIZE: [352 11289]
BUFFER_BYTES: [1408 45156]
TICK_TIME: ALL
refine_soft ok 'test_rate'
refine_slave - leave 'test_rate'
hw_refine_slave - enter 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (0 33)
BUFFER_TIME: [32000 511973)
BUFFER_SIZE: [352 11289]
BUFFER_BYTES: [1408 45156]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  ALL
SUBFORMAT:  ALL
SAMPLE_BITS: ALL
FRAME_BITS: ALL
CHANNELS: ALL
RATE: [48000 48001)
PERIOD_TIME: ALL
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: ALL
BUFFER_BYTES: ALL
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (0 33)
BUFFER_TIME: [32000 511973)
BUFFER_SIZE: [352 11289]
BUFFER_BYTES: [1408 45156]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [48000 48001)
PERIOD_TIME: 16000
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: (766 24578)
BUFFER_BYTES: ALL
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (0 33)
BUFFER_TIME: [32000 511973)
BUFFER_SIZE: [352 11289]
BUFFER_BYTES: [1408 45156]
TICK_TIME: ALL
Rule 8 (0xffff80eae100): RATE=22050 -> 22050 BUFFER_SIZE=[352 11289] 
BUFFER_TIME=[32000 511973)
Rule 15 (0xffff80eae050): BUFFER_SIZE=[352 11289] -> [706 11289] 
BUFFER_TIME=[32000 511973) RATE=22050
Rule 17 (0xffff80eae050): BUFFER_BYTES=[1408 45156] -> [2824 45156] 
BUFFER_SIZE=[706 11289] FRAME_BITS=32
Rule 19 (0xffff80eae100): BUFFER_TIME=[32000 511973) -> (32018 511973) 
BUFFER_SIZE=[706 11289] RATE=22050
Rule 5 (0xffff80eae100): FRAME_BITS=32 -> 32 BUFFER_BYTES=[2824 45156] 
BUFFER_SIZE=[706 11289]
Rule 8 (0xffff80eae100): RATE=22050 -> 22050 BUFFER_SIZE=[706 11289] 
BUFFER_TIME=(32018 511973)
Rule 9 (0xffff80eae250): PERIODS=(0 33) -> (2 33) BUFFER_SIZE=[706 
11289] PERIOD_SIZE=(352 353)
Rule 10 (0xffff80eae250): PERIOD_SIZE=(352 353) -> (352 353) 
BUFFER_SIZE=[706 11289] PERIODS=(2 33)
Rule 13 (0xffff80eae1b0): BUFFER_SIZE=[706 11289] -> [706 11289] 
PERIOD_SIZE=(352 353) PERIODS=(2 33)
Rule 14 (0xffff80eae100): BUFFER_SIZE=[706 11289] -> [706 11289] 
BUFFER_BYTES=[2824 45156] FRAME_BITS=32
Rule 15 (0xffff80eae050): BUFFER_SIZE=[706 11289] -> [706 11289] 
BUFFER_TIME=(32018 511973) RATE=22050
refine_soft ok 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (2 33)
BUFFER_TIME: (32018 511973)
BUFFER_SIZE: [706 11289]
BUFFER_BYTES: [2824 45156]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: 16000
PERIOD_SIZE: 768
PERIOD_BYTES: 3072
PERIODS: [1 32]
BUFFER_TIME: [16000 512000]
BUFFER_SIZE: [768 24576]
BUFFER_BYTES: [3072 98304]
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (2 33)
BUFFER_TIME: (32018 511973)
BUFFER_SIZE: [706 11289]
BUFFER_BYTES: [2824 45156]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: 16000
PERIOD_SIZE: 768
PERIOD_BYTES: 3072
PERIODS: [1 32]
BUFFER_TIME: [16000 512000]
BUFFER_SIZE: [1537 24576]
BUFFER_BYTES: [3072 98304]
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (2 33)
BUFFER_TIME: (32018 511973)
BUFFER_SIZE: [1058 11289]
BUFFER_BYTES: [2824 45156]
TICK_TIME: ALL
Rule 5 (0xffff80eae100): FRAME_BITS=32 -> 32 BUFFER_BYTES=[2824 45156] 
BUFFER_SIZE=[1058 11289]
Rule 8 (0xffff80eae100): RATE=22050 -> 22050 BUFFER_SIZE=[1058 11289] 
BUFFER_TIME=(32018 511973)
Rule 9 (0xffff80eae250): PERIODS=(2 33) -> (2 33) BUFFER_SIZE=[1058 
11289] PERIOD_SIZE=(352 353)
Rule 10 (0xffff80eae250): PERIOD_SIZE=(352 353) -> (352 353) 
BUFFER_SIZE=[1058 11289] PERIODS=(2 33)
Rule 17 (0xffff80eae050): BUFFER_BYTES=[2824 45156] -> [4232 45156] 
BUFFER_SIZE=[1058 11289] FRAME_BITS=32
Rule 19 (0xffff80eae100): BUFFER_TIME=(32018 511973) -> (47981 511973) 
BUFFER_SIZE=[1058 11289] RATE=22050
Rule 5 (0xffff80eae100): FRAME_BITS=32 -> 32 BUFFER_BYTES=[4232 45156] 
BUFFER_SIZE=[1058 11289]
Rule 8 (0xffff80eae100): RATE=22050 -> 22050 BUFFER_SIZE=[1058 11289] 
BUFFER_TIME=(47981 511973)
Rule 14 (0xffff80eae100): BUFFER_SIZE=[1058 11289] -> [1058 11289] 
BUFFER_BYTES=[4232 45156] FRAME_BITS=32
Rule 15 (0xffff80eae050): BUFFER_SIZE=[1058 11289] -> [1058 11289] 
BUFFER_TIME=(47981 511973) RATE=22050
refine_soft ok 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (2 33)
BUFFER_TIME: (47981 511973)
BUFFER_SIZE: [1058 11289]
BUFFER_BYTES: [4232 45156]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: 16000
PERIOD_SIZE: 768
PERIOD_BYTES: 3072
PERIODS: [3 32]
BUFFER_TIME: [48000 512000]
BUFFER_SIZE: [2304 24576]
BUFFER_BYTES: [9216 98304]
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (2 33)
BUFFER_TIME: (47981 511973)
BUFFER_SIZE: [1058 11289]
BUFFER_BYTES: [4232 45156]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: 16000
PERIOD_SIZE: 768
PERIOD_BYTES: 3072
PERIODS: [3 32]
BUFFER_TIME: [48000 512000]
BUFFER_SIZE: [2304 24576]
BUFFER_BYTES: [9216 98304]
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (2 33)
BUFFER_TIME: (47981 511973)
BUFFER_SIZE: [1058 11289]
BUFFER_BYTES: [4232 45156]
TICK_TIME: ALL
refine_soft ok 'test_rate'
refine_slave - leave 'test_rate'
hw_refine_slave - enter 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (0 33)
BUFFER_TIME: (15963 32000)
BUFFER_SIZE: [352 11289]
BUFFER_BYTES: [1408 45156]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  ALL
SUBFORMAT:  ALL
SAMPLE_BITS: ALL
FRAME_BITS: ALL
CHANNELS: ALL
RATE: [48000 48001)
PERIOD_TIME: ALL
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: ALL
BUFFER_BYTES: ALL
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (0 33)
BUFFER_TIME: (15963 32000)
BUFFER_SIZE: [352 11289]
BUFFER_BYTES: [1408 45156]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [48000 48001)
PERIOD_TIME: 16000
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: (766 24578)
BUFFER_BYTES: ALL
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (0 33)
BUFFER_TIME: (15963 32000)
BUFFER_SIZE: [352 11289]
BUFFER_BYTES: [1408 45156]
TICK_TIME: ALL
Rule 8 (0xffff80eae100): RATE=22050 -> 22050 BUFFER_SIZE=[352 11289] 
BUFFER_TIME=(15963 32000)
Rule 15 (0xffff80eae050): BUFFER_SIZE=[352 11289] -> [352 705] 
BUFFER_TIME=(15963 32000) RATE=22050
Rule 17 (0xffff80eae050): BUFFER_BYTES=[1408 45156] -> [1408 2820] 
BUFFER_SIZE=[352 705] FRAME_BITS=32
Rule 19 (0xffff80eae100): BUFFER_TIME=(15963 32000) -> (15963 31973) 
BUFFER_SIZE=[352 705] RATE=22050
Rule 5 (0xffff80eae100): FRAME_BITS=32 -> 32 BUFFER_BYTES=[1408 2820] 
BUFFER_SIZE=[352 705]
Rule 8 (0xffff80eae100): RATE=22050 -> 22050 BUFFER_SIZE=[352 705] 
BUFFER_TIME=(15963 31973)
Rule 9 (0xffff80eae250): PERIODS=(0 33) -> (0 3) BUFFER_SIZE=[352 705] 
PERIOD_SIZE=(352 353)
Rule 10 (0xffff80eae250): PERIOD_SIZE=(352 353) -> (352 353) 
BUFFER_SIZE=[352 705] PERIODS=(0 3)
Rule 13 (0xffff80eae1b0): BUFFER_SIZE=[352 705] -> [352 705] 
PERIOD_SIZE=(352 353) PERIODS=(0 3)
Rule 14 (0xffff80eae100): BUFFER_SIZE=[352 705] -> [352 705] 
BUFFER_BYTES=[1408 2820] FRAME_BITS=32
Rule 15 (0xffff80eae050): BUFFER_SIZE=[352 705] -> [352 705] 
BUFFER_TIME=(15963 31973) RATE=22050
refine_soft ok 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (0 3)
BUFFER_TIME: (15963 31973)
BUFFER_SIZE: [352 705]
BUFFER_BYTES: [1408 2820]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: 16000
PERIOD_SIZE: 768
PERIOD_BYTES: 3072
PERIODS: [1 32]
BUFFER_TIME: [16000 512000]
BUFFER_SIZE: [768 24576]
BUFFER_BYTES: [3072 98304]
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (0 3)
BUFFER_TIME: (15963 31973)
BUFFER_SIZE: [352 705]
BUFFER_BYTES: [1408 2820]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: 16000
PERIOD_SIZE: 768
PERIOD_BYTES: 3072
PERIODS: [1 32]
BUFFER_TIME: [16000 512000]
BUFFER_SIZE: [768 1536]
BUFFER_BYTES: [3072 98304]
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (0 3)
BUFFER_TIME: (15963 31973)
BUFFER_SIZE: [352 705]
BUFFER_BYTES: [1408 2820]
TICK_TIME: ALL
refine_soft ok 'test_rate'
refine_slave - leave 'test_rate'
hw_refine_slave - enter 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (0 3)
BUFFER_TIME: [31972 31973)
BUFFER_SIZE: [352 705]
BUFFER_BYTES: [1408 2820]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  ALL
SUBFORMAT:  ALL
SAMPLE_BITS: ALL
FRAME_BITS: ALL
CHANNELS: ALL
RATE: [48000 48001)
PERIOD_TIME: ALL
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: ALL
BUFFER_BYTES: ALL
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (0 3)
BUFFER_TIME: [31972 31973)
BUFFER_SIZE: [352 705]
BUFFER_BYTES: [1408 2820]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [48000 48001)
PERIOD_TIME: 16000
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: (766 1537)
BUFFER_BYTES: ALL
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (0 3)
BUFFER_TIME: [31972 31973)
BUFFER_SIZE: [352 705]
BUFFER_BYTES: [1408 2820]
TICK_TIME: ALL
Rule 8 (0xffff80eae100): RATE=22050 -> 22050 BUFFER_SIZE=[352 705] 
BUFFER_TIME=[31972 31973)
Rule 15 (0xffff80eae050): BUFFER_SIZE=[352 705] -> 705 
BUFFER_TIME=[31972 31973) RATE=22050
Rule 17 (0xffff80eae050): BUFFER_BYTES=[1408 2820] -> 2820 
BUFFER_SIZE=705 FRAME_BITS=32
Rule 19 (0xffff80eae100): BUFFER_TIME=[31972 31973) -> (31972 31973) 
BUFFER_SIZE=705 RATE=22050
Rule 5 (0xffff80eae100): FRAME_BITS=32 -> 32 BUFFER_BYTES=2820 
BUFFER_SIZE=705
Rule 8 (0xffff80eae100): RATE=22050 -> 22050 BUFFER_SIZE=705 
BUFFER_TIME=(31972 31973)
Rule 9 (0xffff80eae250): PERIODS=(0 3) -> (1 3) BUFFER_SIZE=705 
PERIOD_SIZE=(352 353)
Rule 10 (0xffff80eae250): PERIOD_SIZE=(352 353) -> (352 353) 
BUFFER_SIZE=705 PERIODS=(1 3)
Rule 13 (0xffff80eae1b0): BUFFER_SIZE=705 -> 705 PERIOD_SIZE=(352 353) 
PERIODS=(1 3)
Rule 14 (0xffff80eae100): BUFFER_SIZE=705 -> 705 BUFFER_BYTES=2820 
FRAME_BITS=32
Rule 15 (0xffff80eae050): BUFFER_SIZE=705 -> 705 BUFFER_TIME=(31972 
31973) RATE=22050
refine_soft ok 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (1 3)
BUFFER_TIME: (31972 31973)
BUFFER_SIZE: 705
BUFFER_BYTES: 2820
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: 16000
PERIOD_SIZE: 768
PERIOD_BYTES: 3072
PERIODS: [1 2]
BUFFER_TIME: [16000 32000]
BUFFER_SIZE: [768 1536]
BUFFER_BYTES: [3072 6144]
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (1 3)
BUFFER_TIME: (31972 31973)
BUFFER_SIZE: 705
BUFFER_BYTES: 2820
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: 16000
PERIOD_SIZE: 768
PERIOD_BYTES: 3072
PERIODS: [1 2]
BUFFER_TIME: [16000 32000]
BUFFER_SIZE: [1535 1536]
BUFFER_BYTES: [3072 6144]
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (1 3)
BUFFER_TIME: (31972 31973)
BUFFER_SIZE: 705
BUFFER_BYTES: 2820
TICK_TIME: ALL
refine_soft ok 'test_rate'
refine_slave - leave 'test_rate'
hw_refine_slave - enter 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (1 3)
BUFFER_TIME: (31972 31973)
BUFFER_SIZE: 705
BUFFER_BYTES: 2820
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  ALL
SUBFORMAT:  ALL
SAMPLE_BITS: ALL
FRAME_BITS: ALL
CHANNELS: ALL
RATE: [48000 48001)
PERIOD_TIME: ALL
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: ALL
BUFFER_BYTES: ALL
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (1 3)
BUFFER_TIME: (31972 31973)
BUFFER_SIZE: 705
BUFFER_BYTES: 2820
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [48000 48001)
PERIOD_TIME: 16000
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: (1534 1537)
BUFFER_BYTES: ALL
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (1 3)
BUFFER_TIME: (31972 31973)
BUFFER_SIZE: 705
BUFFER_BYTES: 2820
TICK_TIME: ALL
refine_soft ok 'test_rate'
refine_slave - leave 'test_rate'
hw_refine_slave - enter 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (1 3)
BUFFER_TIME: (31972 31973)
BUFFER_SIZE: 705
BUFFER_BYTES: 2820
TICK_TIME: [0 0]
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  ALL
SUBFORMAT:  ALL
SAMPLE_BITS: ALL
FRAME_BITS: ALL
CHANNELS: ALL
RATE: [48000 48001)
PERIOD_TIME: ALL
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: ALL
BUFFER_BYTES: ALL
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (1 3)
BUFFER_TIME: (31972 31973)
BUFFER_SIZE: 705
BUFFER_BYTES: 2820
TICK_TIME: [0 0]
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [48000 48001)
PERIOD_TIME: 16000
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: (1534 1537)
BUFFER_BYTES: ALL
TICK_TIME: 0
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (1 3)
BUFFER_TIME: (31972 31973)
BUFFER_SIZE: 705
BUFFER_BYTES: 2820
TICK_TIME: 0
refine_soft ok 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (1 3)
BUFFER_TIME: (31972 31973)
BUFFER_SIZE: 705
BUFFER_BYTES: 2820
TICK_TIME: 0
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: 16000
PERIOD_SIZE: 768
PERIOD_BYTES: 3072
PERIODS: 2
BUFFER_TIME: 32000
BUFFER_SIZE: 1536
BUFFER_BYTES: 6144
TICK_TIME: 0
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (1 3)
BUFFER_TIME: (31972 31973)
BUFFER_SIZE: 705
BUFFER_BYTES: 2820
TICK_TIME: 0
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: 16000
PERIOD_SIZE: 768
PERIOD_BYTES: 3072
PERIODS: 2
BUFFER_TIME: 32000
BUFFER_SIZE: 1536
BUFFER_BYTES: 6144
TICK_TIME: 0
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (1 3)
BUFFER_TIME: (31972 31973)
BUFFER_SIZE: 705
BUFFER_BYTES: 2820
TICK_TIME: 0
refine_soft ok 'test_rate'
refine_slave - leave 'test_rate'
Rate conversion PCM (48000)
Converter: linear-interpolation
Protocol version: 10002
Its setup is:
   stream       : PLAYBACK
   access       : RW_INTERLEAVED
   format       : S16_LE
   subformat    : STD
   channels     : 2
   rate         : 22050
   exact rate   : 22050 (22050/1)
   msbits       : 16
   buffer_size  : 705
   period_size  : 353
   period_time  : 16000
   tstamp_mode  : NONE
   tstamp_type  : MONOTONIC
   period_step  : 1
   avail_min    : 353
   period_event : 0
   start_threshold  : 705
   stop_threshold   : 705
   silence_threshold: 0
   silence_size : 0
   boundary     : 3175037737296199680
Slave: Hardware PCM card 3 'gmd-card' device 0 subdevice 0
Its setup is:
   stream       : PLAYBACK
   access       : MMAP_INTERLEAVED
   format       : S16_LE
   subformat    : STD
   channels     : 2
   rate         : 48000
   exact rate   : 48000 (48000/1)
   msbits       : 16
   buffer_size  : 1536
   period_size  : 768
   period_time  : 16000
   tstamp_mode  : NONE
   tstamp_type  : MONOTONIC
   period_step  : 1
   avail_min    : 768
   period_event : 0
   start_threshold  : 1536
   stop_threshold   : 1536
   silence_threshold: 0
   silence_size : 0
   boundary     : 6917529027641081856
   appl_ptr     : 0
   hw_ptr       : 0
underrun!!! (at least 16.193 ms long)
Status:
   state       : XRUN
   trigger_time: 599.630072
   tstamp      : 0.000000
   delay       : 352
   avail       : 353
   avail_max   : 706


If I should provide anything else feel free to ask.

Best regards

Timo
Takashi Iwai Oct. 24, 2018, 7:06 a.m. UTC | #9
On Mon, 22 Oct 2018 09:19:28 +0200,
Timo Wischer wrote:
> 
> On 10/18/18 20:57, Takashi Iwai wrote:
> > But how can it be at the first place?  (352 353) is already empty as
> > the frames.  The time could be kept in this representation, but the
> > frames must be integer.
> >
> > Which order of calls did it result in so?
> >
> > We know that some order of calls make the selection impossible like
> > the above, especially when both time and bytes/frames are mixed.
> 
> 
> I have used the following ALSA configuration:
> 
> pcm.test_rate {
>     type rate
>         slave.pcm hw:gmdcard
>         slave.rate 48000
> }

And which driver is gmdcard?


Takashi
Timo Wischer Oct. 24, 2018, 7:44 a.m. UTC | #10
On 10/24/18 09:06, Takashi Iwai wrote:
> On Mon, 22 Oct 2018 09:19:28 +0200,
> Timo Wischer wrote:
>> On 10/18/18 20:57, Takashi Iwai wrote:
>>> But how can it be at the first place?  (352 353) is already empty as
>>> the frames.  The time could be kept in this representation, but the
>>> frames must be integer.
>>>
>>> Which order of calls did it result in so?
>>>
>>> We know that some order of calls make the selection impossible like
>>> the above, especially when both time and bytes/frames are mixed.
>>
>> I have used the following ALSA configuration:
>>
>> pcm.test_rate {
>>      type rate
>>          slave.pcm hw:gmdcard
>>          slave.rate 48000
>> }
> And which driver is gmdcard?
>
>
> Takashi


The driver is called Generic Machine Driver (unfortunately we have it 
not yet upstreamed) and it is using the Renesas RCar platform driver 
(https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/sound/soc/sh/rcar?h=v4.19)


But it is also reproducible with hw:Loopback with a slightly different 
rules negotiation but the same result at the end:

pcm.test_rate {
     type rate
         slave.pcm hw:Loopback
         slave.rate 48000
}

$ modprobe snd_aloop

$ aplay -Dtest_rate -c2 -r22050 -fS16_LE /dev/urandom 
--period-time=16000 --buffer-time=32000 -v
Playing raw data '/dev/urandom' : Signed 16 bit Little Endian, Rate 
22050 Hz, Stereo
hw_refine_slave - enter 'test_rate'
schange 'test_rate' (client)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED RW_INTERLEAVED 
RW_NONINTERLEAVED
FORMAT:  S8 U8 S16_LE S16_BE U16_LE U16_BE S24_LE S24_BE U24_LE U24_BE 
S32_LE S32_BE U32_LE U32_BE S20_LE S20_BE U20_LE U20_BE S24_3LE S24_3BE 
U24_3LE U24_3BE S20_3LE S20_3BE U20_3LE U20_3BE S18_3LE S18_3BE U18_3LE 
U18_3BE
SUBFORMAT:  STD
SAMPLE_BITS: ALL
FRAME_BITS: ALL
CHANNELS: ALL
RATE: [4000 192000]
PERIOD_TIME: ALL
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: ALL
BUFFER_BYTES: ALL
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  ALL
SUBFORMAT:  ALL
SAMPLE_BITS: ALL
FRAME_BITS: ALL
CHANNELS: ALL
RATE: [48000 48001)
PERIOD_TIME: ALL
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: ALL
BUFFER_BYTES: ALL
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED RW_INTERLEAVED 
RW_NONINTERLEAVED
FORMAT:  S8 U8 S16_LE S16_BE U16_LE U16_BE S24_LE S24_BE U24_LE U24_BE 
S32_LE S32_BE U32_LE U32_BE S20_LE S20_BE U20_LE U20_BE S24_3LE S24_3BE 
U24_3LE U24_3BE S20_3LE S20_3BE U20_3LE U20_3BE S18_3LE S18_3BE U18_3LE 
U18_3BE
SUBFORMAT:  STD
SAMPLE_BITS: ALL
FRAME_BITS: ALL
CHANNELS: ALL
RATE: [4000 192000]
PERIOD_TIME: ALL
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: ALL
BUFFER_BYTES: ALL
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  S8 U8 S16_LE S16_BE U16_LE U16_BE S24_LE S24_BE U24_LE U24_BE 
S32_LE S32_BE U32_LE U32_BE S20_LE S20_BE U20_LE U20_BE S24_3LE S24_3BE 
U24_3LE U24_3BE S20_3LE S20_3BE U20_3LE U20_3BE S18_3LE S18_3BE U18_3LE 
U18_3BE
SUBFORMAT:  STD
SAMPLE_BITS: ALL
FRAME_BITS: ALL
CHANNELS: ALL
RATE: [48000 48001)
PERIOD_TIME: ALL
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: [0 4294967295)
BUFFER_BYTES: ALL
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED RW_INTERLEAVED 
RW_NONINTERLEAVED
FORMAT:  S16_LE S16_BE S32_LE S32_BE
SUBFORMAT:  STD
SAMPLE_BITS: [16 32]
FRAME_BITS: [16 1024]
CHANNELS: [1 32]
RATE: [4000 192000]
PERIOD_TIME: (20 10922667)
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: [0 4194304]
BUFFER_BYTES: ALL
TICK_TIME: ALL
Rule 0 (0xffffa33ac410): FORMAT= S16_LE S16_BE S32_LE S32_BE ->  S16_LE 
S16_BE S32_LE S32_BE SAMPLE_BITS=[16 32]
Rule 1 (0xffffa33ac2f0): SAMPLE_BITS=[16 32] -> [16 32] FORMAT= S16_LE 
S16_BE S32_LE S32_BE SAMPLE_BITS=[16 32]
Rule 2 (0xffffa33ac250): SAMPLE_BITS=[16 32] -> [16 32] FRAME_BITS=[16 
1024] CHANNELS=[1 32]
Rule 3 (0xffffa33ac1b0): FRAME_BITS=[16 1024] -> [16 1024] 
SAMPLE_BITS=[16 32] CHANNELS=[1 32]
Rule 4 (0xffffa33ac100): FRAME_BITS=[16 1024] -> [16 1024] 
PERIOD_BYTES=ALL PERIOD_SIZE=ALL
Rule 5 (0xffffa33ac100): FRAME_BITS=[16 1024] -> [16 1024] 
BUFFER_BYTES=[1 4294967295] BUFFER_SIZE=[1 4194304]
Rule 6 (0xffffa33ac250): CHANNELS=[1 32] -> [1 32] FRAME_BITS=[16 1024] 
SAMPLE_BITS=[16 32]
Rule 7 (0xffffa33ac100): RATE=[4000 192000] -> [4000 192000] 
PERIOD_SIZE=ALL PERIOD_TIME=(20 10922667)
Rule 8 (0xffffa33ac100): RATE=[4000 192000] -> [4000 192000] 
BUFFER_SIZE=[1 4194304] BUFFER_TIME=[1 4294967295]
Rule 9 (0xffffa33ac250): PERIODS=ALL -> (0 4294967295] BUFFER_SIZE=[1 
4194304] PERIOD_SIZE=ALL
Rule 10 (0xffffa33ac250): PERIOD_SIZE=ALL -> (0 4294967295] 
BUFFER_SIZE=[1 4194304] PERIODS=(0 4294967295]
Rule 11 (0xffffa33ac100): PERIOD_SIZE=(0 4294967295] -> (0 2147483648) 
PERIOD_BYTES=ALL FRAME_BITS=[16 1024]
Rule 12 (0xffffa33ac050): PERIOD_SIZE=(0 2147483648) -> (0 2097153) 
PERIOD_TIME=(20 10922667) RATE=[4000 192000]
Rule 13 (0xffffa33ac1b0): BUFFER_SIZE=[1 4194304] -> [1 4194304] 
PERIOD_SIZE=(0 2097153) PERIODS=(0 4294967295]
Rule 14 (0xffffa33ac100): BUFFER_SIZE=[1 4194304] -> [1 4194304] 
BUFFER_BYTES=[1 4294967295] FRAME_BITS=[16 1024]
Rule 15 (0xffffa33ac050): BUFFER_SIZE=[1 4194304] -> [1 4194304] 
BUFFER_TIME=[1 4294967295] RATE=[4000 192000]
Rule 16 (0xffffa33ac050): PERIOD_BYTES=ALL -> (0 268435584) 
PERIOD_SIZE=(0 2097153) FRAME_BITS=[16 1024]
Rule 17 (0xffffa33ac050): BUFFER_BYTES=[1 4294967295] -> [2 536870912] 
BUFFER_SIZE=[1 4194304] FRAME_BITS=[16 1024]
Rule 18 (0xffffa33ac100): PERIOD_TIME=(20 10922667) -> (20 10922667) 
PERIOD_SIZE=(0 2097153) RATE=[4000 192000]
Rule 19 (0xffffa33ac100): BUFFER_TIME=[1 4294967295] -> (5 1048576000] 
BUFFER_SIZE=[1 4194304] RATE=[4000 192000]
Rule 4 (0xffffa33ac100): FRAME_BITS=[16 1024] -> [16 1024] 
PERIOD_BYTES=(0 268435584) PERIOD_SIZE=(0 2097153)
Rule 5 (0xffffa33ac100): FRAME_BITS=[16 1024] -> [16 1024] 
BUFFER_BYTES=[2 536870912] BUFFER_SIZE=[1 4194304]
Rule 7 (0xffffa33ac100): RATE=[4000 192000] -> [4000 192000] 
PERIOD_SIZE=(0 2097153) PERIOD_TIME=(20 10922667)
Rule 8 (0xffffa33ac100): RATE=[4000 192000] -> [4000 192000] 
BUFFER_SIZE=[1 4194304] BUFFER_TIME=(5 1048576000]
Rule 9 (0xffffa33ac250): PERIODS=(0 4294967295] -> (0 4294967295] 
BUFFER_SIZE=[1 4194304] PERIOD_SIZE=(0 2097153)
Rule 11 (0xffffa33ac100): PERIOD_SIZE=(0 2097153) -> (0 2097153) 
PERIOD_BYTES=(0 268435584) FRAME_BITS=[16 1024]
Rule 14 (0xffffa33ac100): BUFFER_SIZE=[1 4194304] -> [1 4194304] 
BUFFER_BYTES=[2 536870912] FRAME_BITS=[16 1024]
Rule 15 (0xffffa33ac050): BUFFER_SIZE=[1 4194304] -> [1 4194304] 
BUFFER_TIME=(5 1048576000] RATE=[4000 192000]
refine_soft ok 'test_rate'
schange 'test_rate' (client)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED RW_INTERLEAVED 
RW_NONINTERLEAVED
FORMAT:  S16_LE S16_BE S32_LE S32_BE
SUBFORMAT:  STD
SAMPLE_BITS: [16 32]
FRAME_BITS: [16 1024]
CHANNELS: [1 32]
RATE: [4000 192000]
PERIOD_TIME: (20 10922667)
PERIOD_SIZE: (0 2097153)
PERIOD_BYTES: (0 268435584)
PERIODS: (0 4294967295]
BUFFER_TIME: (5 1048576000]
BUFFER_SIZE: [1 4194304]
BUFFER_BYTES: [2 536870912]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE S16_BE S32_LE S32_BE
SUBFORMAT:  STD
SAMPLE_BITS: [16 32]
FRAME_BITS: [16 1024]
CHANNELS: [1 32]
RATE: [48000 48001)
PERIOD_TIME: (20 10922667)
PERIOD_SIZE: [1 524288]
PERIOD_BYTES: [64 1048576]
PERIODS: [1 1024]
BUFFER_TIME: (20 21845334)
BUFFER_SIZE: [1 1048576]
BUFFER_BYTES: [64 2097152]
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED RW_INTERLEAVED 
RW_NONINTERLEAVED
FORMAT:  S16_LE S16_BE S32_LE S32_BE
SUBFORMAT:  STD
SAMPLE_BITS: [16 32]
FRAME_BITS: [16 1024]
CHANNELS: [1 32]
RATE: [4000 192000]
PERIOD_TIME: (20 10922667)
PERIOD_SIZE: (0 2097153)
PERIOD_BYTES: (0 268435584)
PERIODS: (0 4294967295]
BUFFER_TIME: (5 1048576000]
BUFFER_SIZE: [1 4194304]
BUFFER_BYTES: [2 536870912]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE S16_BE S32_LE S32_BE
SUBFORMAT:  STD
SAMPLE_BITS: [16 32]
FRAME_BITS: [16 1024]
CHANNELS: [1 32]
RATE: [48000 48001)
PERIOD_TIME: (20 10922667)
PERIOD_SIZE: [1 524288]
PERIOD_BYTES: [64 1048576]
PERIODS: [1 1024]
BUFFER_TIME: (20 21845334)
BUFFER_SIZE: [1 1048576]
BUFFER_BYTES: [64 2097152]
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED RW_INTERLEAVED 
RW_NONINTERLEAVED
FORMAT:  S16_LE S16_BE S32_LE S32_BE
SUBFORMAT:  STD
SAMPLE_BITS: [16 32]
FRAME_BITS: [16 1024]
CHANNELS: [1 32]
RATE: [4000 192000]
PERIOD_TIME: (20 10922667)
PERIOD_SIZE: (0 2097153)
PERIOD_BYTES: (0 268435584)
PERIODS: (0 4294967295]
BUFFER_TIME: (5 1048576000]
BUFFER_SIZE: [1 4194304]
BUFFER_BYTES: [2 536870912]
TICK_TIME: ALL
refine_soft ok 'test_rate'
refine_slave - leave 'test_rate'
hw_refine_slave - enter 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE S16_BE S32_LE S32_BE
SUBFORMAT:  STD
SAMPLE_BITS: [16 32]
FRAME_BITS: [16 1024]
CHANNELS: [1 32]
RATE: [4000 192000]
PERIOD_TIME: (20 10922667)
PERIOD_SIZE: (0 2097153)
PERIOD_BYTES: (0 268435584)
PERIODS: (0 4294967295]
BUFFER_TIME: (5 1048576000]
BUFFER_SIZE: [1 4194304]
BUFFER_BYTES: [2 536870912]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  ALL
SUBFORMAT:  ALL
SAMPLE_BITS: ALL
FRAME_BITS: ALL
CHANNELS: ALL
RATE: [48000 48001)
PERIOD_TIME: ALL
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: ALL
BUFFER_BYTES: ALL
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE S16_BE S32_LE S32_BE
SUBFORMAT:  STD
SAMPLE_BITS: [16 32]
FRAME_BITS: [16 1024]
CHANNELS: [1 32]
RATE: [4000 192000]
PERIOD_TIME: (20 10922667)
PERIOD_SIZE: (0 2097153)
PERIOD_BYTES: (0 268435584)
PERIODS: (0 4294967295]
BUFFER_TIME: (5 1048576000]
BUFFER_SIZE: [1 4194304]
BUFFER_BYTES: [2 536870912]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  S16_LE S16_BE S32_LE S32_BE
SUBFORMAT:  STD
SAMPLE_BITS: [16 32]
FRAME_BITS: [16 1024]
CHANNELS: [1 32]
RATE: [48000 48001)
PERIOD_TIME: (20 10922667)
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: (0 50332709)
BUFFER_BYTES: ALL
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE S16_BE S32_LE S32_BE
SUBFORMAT:  STD
SAMPLE_BITS: [16 32]
FRAME_BITS: [16 1024]
CHANNELS: [1 32]
RATE: [4000 192000]
PERIOD_TIME: (20 10922667)
PERIOD_SIZE: (0 2097153)
PERIOD_BYTES: (0 268435584)
PERIODS: (0 4294967295]
BUFFER_TIME: (5 1048576000]
BUFFER_SIZE: [1 4194304]
BUFFER_BYTES: [2 536870912]
TICK_TIME: ALL
refine_soft ok 'test_rate'
refine_slave - leave 'test_rate'
hw_refine_slave - enter 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: [16 32]
FRAME_BITS: [16 1024]
CHANNELS: [1 32]
RATE: [4000 192000]
PERIOD_TIME: (20 10922667)
PERIOD_SIZE: (0 2097153)
PERIOD_BYTES: (0 268435584)
PERIODS: (0 4294967295]
BUFFER_TIME: (5 1048576000]
BUFFER_SIZE: [1 4194304]
BUFFER_BYTES: [2 536870912]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  ALL
SUBFORMAT:  ALL
SAMPLE_BITS: ALL
FRAME_BITS: ALL
CHANNELS: ALL
RATE: [48000 48001)
PERIOD_TIME: ALL
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: ALL
BUFFER_BYTES: ALL
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: [16 32]
FRAME_BITS: [16 1024]
CHANNELS: [1 32]
RATE: [4000 192000]
PERIOD_TIME: (20 10922667)
PERIOD_SIZE: (0 2097153)
PERIOD_BYTES: (0 268435584)
PERIODS: (0 4294967295]
BUFFER_TIME: (5 1048576000]
BUFFER_SIZE: [1 4194304]
BUFFER_BYTES: [2 536870912]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: [16 32]
FRAME_BITS: [16 1024]
CHANNELS: [1 32]
RATE: [48000 48001)
PERIOD_TIME: (20 10922667)
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: (0 50332709)
BUFFER_BYTES: ALL
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: [16 512]
CHANNELS: [1 32]
RATE: [4000 192000]
PERIOD_TIME: (20 10922667)
PERIOD_SIZE: (0 2097153)
PERIOD_BYTES: (0 268435584)
PERIODS: (0 4294967295]
BUFFER_TIME: (5 1048576000]
BUFFER_SIZE: [1 4194304]
BUFFER_BYTES: [2 536870912]
TICK_TIME: ALL
Rule 0 (0xffffa33ac410): FORMAT= S16_LE ->  S16_LE SAMPLE_BITS=16
Rule 1 (0xffffa33ac2f0): SAMPLE_BITS=16 -> 16 FORMAT= S16_LE SAMPLE_BITS=16
Rule 2 (0xffffa33ac250): SAMPLE_BITS=16 -> 16 FRAME_BITS=[16 512] 
CHANNELS=[1 32]
Rule 3 (0xffffa33ac1b0): FRAME_BITS=[16 512] -> [16 512] SAMPLE_BITS=16 
CHANNELS=[1 32]
Rule 6 (0xffffa33ac250): CHANNELS=[1 32] -> [1 32] FRAME_BITS=[16 512] 
SAMPLE_BITS=16
Rule 11 (0xffffa33ac100): PERIOD_SIZE=(0 2097153) -> (0 2097153) 
PERIOD_BYTES=(0 268435584) FRAME_BITS=[16 512]
Rule 14 (0xffffa33ac100): BUFFER_SIZE=[1 4194304] -> [1 4194304] 
BUFFER_BYTES=[2 536870912] FRAME_BITS=[16 512]
Rule 16 (0xffffa33ac050): PERIOD_BYTES=(0 268435584) -> (0 134217792) 
PERIOD_SIZE=(0 2097153) FRAME_BITS=[16 512]
Rule 17 (0xffffa33ac050): BUFFER_BYTES=[2 536870912] -> [2 268435456] 
BUFFER_SIZE=[1 4194304] FRAME_BITS=[16 512]
Rule 4 (0xffffa33ac100): FRAME_BITS=[16 512] -> [16 512] PERIOD_BYTES=(0 
134217792) PERIOD_SIZE=(0 2097153)
Rule 5 (0xffffa33ac100): FRAME_BITS=[16 512] -> [16 512] BUFFER_BYTES=[2 
268435456] BUFFER_SIZE=[1 4194304]
Rule 11 (0xffffa33ac100): PERIOD_SIZE=(0 2097153) -> (0 2097153) 
PERIOD_BYTES=(0 134217792) FRAME_BITS=[16 512]
Rule 14 (0xffffa33ac100): BUFFER_SIZE=[1 4194304] -> [1 4194304] 
BUFFER_BYTES=[2 268435456] FRAME_BITS=[16 512]
refine_soft ok 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: [16 512]
CHANNELS: [1 32]
RATE: [4000 192000]
PERIOD_TIME: (20 10922667)
PERIOD_SIZE: (0 2097153)
PERIOD_BYTES: (0 134217792)
PERIODS: (0 4294967295]
BUFFER_TIME: (5 1048576000]
BUFFER_SIZE: [1 4194304]
BUFFER_BYTES: [2 268435456]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: [16 512]
CHANNELS: [1 32]
RATE: [48000 48001)
PERIOD_TIME: (20 10922667)
PERIOD_SIZE: [1 524288]
PERIOD_BYTES: [64 1048576]
PERIODS: [1 1024]
BUFFER_TIME: (20 21845334)
BUFFER_SIZE: [1 1048576]
BUFFER_BYTES: [64 2097152]
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: [16 512]
CHANNELS: [1 32]
RATE: [4000 192000]
PERIOD_TIME: (20 10922667)
PERIOD_SIZE: (0 2097153)
PERIOD_BYTES: (0 134217792)
PERIODS: (0 4294967295]
BUFFER_TIME: (5 1048576000]
BUFFER_SIZE: [1 4194304]
BUFFER_BYTES: [2 268435456]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: [16 512]
CHANNELS: [1 32]
RATE: [48000 48001)
PERIOD_TIME: (20 10922667)
PERIOD_SIZE: [1 524288]
PERIOD_BYTES: [64 1048576]
PERIODS: [1 1024]
BUFFER_TIME: (20 21845334)
BUFFER_SIZE: [1 1048576]
BUFFER_BYTES: [64 2097152]
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: [16 512]
CHANNELS: [1 32]
RATE: [4000 192000]
PERIOD_TIME: (20 10922667)
PERIOD_SIZE: (0 2097153)
PERIOD_BYTES: (0 134217792)
PERIODS: (0 4294967295]
BUFFER_TIME: (5 1048576000]
BUFFER_SIZE: [1 4194304]
BUFFER_BYTES: [2 268435456]
TICK_TIME: ALL
refine_soft ok 'test_rate'
refine_slave - leave 'test_rate'
hw_refine_slave - enter 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: [16 512]
CHANNELS: 2
RATE: [4000 192000]
PERIOD_TIME: (20 10922667)
PERIOD_SIZE: (0 2097153)
PERIOD_BYTES: (0 134217792)
PERIODS: (0 4294967295]
BUFFER_TIME: (5 1048576000]
BUFFER_SIZE: [1 4194304]
BUFFER_BYTES: [2 268435456]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  ALL
SUBFORMAT:  ALL
SAMPLE_BITS: ALL
FRAME_BITS: ALL
CHANNELS: ALL
RATE: [48000 48001)
PERIOD_TIME: ALL
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: ALL
BUFFER_BYTES: ALL
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: [16 512]
CHANNELS: 2
RATE: [4000 192000]
PERIOD_TIME: (20 10922667)
PERIOD_SIZE: (0 2097153)
PERIOD_BYTES: (0 134217792)
PERIODS: (0 4294967295]
BUFFER_TIME: (5 1048576000]
BUFFER_SIZE: [1 4194304]
BUFFER_BYTES: [2 268435456]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: [16 512]
CHANNELS: 2
RATE: [48000 48001)
PERIOD_TIME: (20 10922667)
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: (0 50332709)
BUFFER_BYTES: ALL
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [4000 192000]
PERIOD_TIME: (333 5461334)
PERIOD_SIZE: (0 2097153)
PERIOD_BYTES: (0 134217792)
PERIODS: (0 4294967295]
BUFFER_TIME: (5 1048576000]
BUFFER_SIZE: [1 2097152]
BUFFER_BYTES: [2 268435456]
TICK_TIME: ALL
Rule 2 (0xffffa33ac250): SAMPLE_BITS=16 -> 16 FRAME_BITS=32 CHANNELS=2
Rule 3 (0xffffa33ac1b0): FRAME_BITS=32 -> 32 SAMPLE_BITS=16 CHANNELS=2
Rule 5 (0xffffa33ac100): FRAME_BITS=32 -> 32 BUFFER_BYTES=[2 268435456] 
BUFFER_SIZE=[1 2097152]
Rule 6 (0xffffa33ac250): CHANNELS=2 -> 2 FRAME_BITS=32 SAMPLE_BITS=16
Rule 7 (0xffffa33ac100): RATE=[4000 192000] -> [4000 192000] 
PERIOD_SIZE=(0 2097153) PERIOD_TIME=(333 5461334)
Rule 8 (0xffffa33ac100): RATE=[4000 192000] -> [4000 192000] 
BUFFER_SIZE=[1 2097152] BUFFER_TIME=(5 1048576000]
Rule 9 (0xffffa33ac250): PERIODS=(0 4294967295] -> (0 4294967295] 
BUFFER_SIZE=[1 2097152] PERIOD_SIZE=(0 2097153)
Rule 10 (0xffffa33ac250): PERIOD_SIZE=(0 2097153) -> (0 2097153) 
BUFFER_SIZE=[1 2097152] PERIODS=(0 4294967295]
Rule 11 (0xffffa33ac100): PERIOD_SIZE=(0 2097153) -> (0 2097153) 
PERIOD_BYTES=(0 134217792) FRAME_BITS=32
Rule 12 (0xffffa33ac050): PERIOD_SIZE=(0 2097153) -> (1 1048577) 
PERIOD_TIME=(333 5461334) RATE=[4000 192000]
Rule 13 (0xffffa33ac1b0): BUFFER_SIZE=[1 2097152] -> [1 2097152] 
PERIOD_SIZE=(1 1048577) PERIODS=(0 4294967295]
Rule 14 (0xffffa33ac100): BUFFER_SIZE=[1 2097152] -> [1 2097152] 
BUFFER_BYTES=[2 268435456] FRAME_BITS=32
Rule 16 (0xffffa33ac050): PERIOD_BYTES=(0 134217792) -> (4 4194308) 
PERIOD_SIZE=(1 1048577) FRAME_BITS=32
Rule 17 (0xffffa33ac050): BUFFER_BYTES=[2 268435456] -> [4 8388608] 
BUFFER_SIZE=[1 2097152] FRAME_BITS=32
Rule 18 (0xffffa33ac100): PERIOD_TIME=(333 5461334) -> (333 5461334) 
PERIOD_SIZE=(1 1048577) RATE=[4000 192000]
Rule 19 (0xffffa33ac100): BUFFER_TIME=(5 1048576000] -> (5 524288000] 
BUFFER_SIZE=[1 2097152] RATE=[4000 192000]
Rule 4 (0xffffa33ac100): FRAME_BITS=32 -> 32 PERIOD_BYTES=(4 4194308) 
PERIOD_SIZE=(1 1048577)
Rule 5 (0xffffa33ac100): FRAME_BITS=32 -> 32 BUFFER_BYTES=[4 8388608] 
BUFFER_SIZE=[1 2097152]
Rule 7 (0xffffa33ac100): RATE=[4000 192000] -> [4000 192000] 
PERIOD_SIZE=(1 1048577) PERIOD_TIME=(333 5461334)
Rule 8 (0xffffa33ac100): RATE=[4000 192000] -> [4000 192000] 
BUFFER_SIZE=[1 2097152] BUFFER_TIME=(5 524288000]
Rule 9 (0xffffa33ac250): PERIODS=(0 4294967295] -> (0 2097152) 
BUFFER_SIZE=[1 2097152] PERIOD_SIZE=(1 1048577)
Rule 10 (0xffffa33ac250): PERIOD_SIZE=(1 1048577) -> (1 1048577) 
BUFFER_SIZE=[1 2097152] PERIODS=(0 2097152)
Rule 11 (0xffffa33ac100): PERIOD_SIZE=(1 1048577) -> (1 1048577) 
PERIOD_BYTES=(4 4194308) FRAME_BITS=32
Rule 13 (0xffffa33ac1b0): BUFFER_SIZE=[1 2097152] -> [1 2097152] 
PERIOD_SIZE=(1 1048577) PERIODS=(0 2097152)
Rule 14 (0xffffa33ac100): BUFFER_SIZE=[1 2097152] -> [1 2097152] 
BUFFER_BYTES=[4 8388608] FRAME_BITS=32
Rule 15 (0xffffa33ac050): BUFFER_SIZE=[1 2097152] -> [1 2097152] 
BUFFER_TIME=(5 524288000] RATE=[4000 192000]
refine_soft ok 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [4000 192000]
PERIOD_TIME: (333 5461334)
PERIOD_SIZE: (1 1048577)
PERIOD_BYTES: (4 4194308)
PERIODS: (0 2097152)
BUFFER_TIME: (5 524288000]
BUFFER_SIZE: [1 2097152]
BUFFER_BYTES: [4 8388608]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [48000 48001)
PERIOD_TIME: (333 5461334)
PERIOD_SIZE: [16 262144]
PERIOD_BYTES: [64 1048576]
PERIODS: [1 1024]
BUFFER_TIME: (333 10922667)
BUFFER_SIZE: [16 524288]
BUFFER_BYTES: [64 2097152]
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [4000 192000]
PERIOD_TIME: (333 5461334)
PERIOD_SIZE: (1 1048577)
PERIOD_BYTES: (4 4194308)
PERIODS: (0 2097152)
BUFFER_TIME: (5 524288000]
BUFFER_SIZE: [1 2097152]
BUFFER_BYTES: [4 8388608]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [48000 48001)
PERIOD_TIME: (333 5461334)
PERIOD_SIZE: [16 262144]
PERIOD_BYTES: [64 1048576]
PERIODS: [1 1024]
BUFFER_TIME: (333 10922667)
BUFFER_SIZE: [16 524288]
BUFFER_BYTES: [64 2097152]
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [4000 192000]
PERIOD_TIME: (333 5461334)
PERIOD_SIZE: (1 1048577)
PERIOD_BYTES: (4 4194308)
PERIODS: (0 2097152)
BUFFER_TIME: (5 524288000]
BUFFER_SIZE: [1 2097152]
BUFFER_BYTES: [4 8388608]
TICK_TIME: ALL
refine_soft ok 'test_rate'
refine_slave - leave 'test_rate'
hw_refine_slave - enter 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [22050 192000]
PERIOD_TIME: (333 5461334)
PERIOD_SIZE: (1 1048577)
PERIOD_BYTES: (4 4194308)
PERIODS: (0 2097152)
BUFFER_TIME: (5 524288000]
BUFFER_SIZE: [1 2097152]
BUFFER_BYTES: [4 8388608]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  ALL
SUBFORMAT:  ALL
SAMPLE_BITS: ALL
FRAME_BITS: ALL
CHANNELS: ALL
RATE: [48000 48001)
PERIOD_TIME: ALL
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: ALL
BUFFER_BYTES: ALL
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [22050 192000]
PERIOD_TIME: (333 5461334)
PERIOD_SIZE: (1 1048577)
PERIOD_BYTES: (4 4194308)
PERIODS: (0 2097152)
BUFFER_TIME: (5 524288000]
BUFFER_SIZE: [1 2097152]
BUFFER_BYTES: [4 8388608]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [48000 48001)
PERIOD_TIME: (333 5461334)
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: (0 4565327)
BUFFER_BYTES: ALL
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [22050 192000]
PERIOD_TIME: (333 5461334)
PERIOD_SIZE: (1 1048577)
PERIOD_BYTES: (4 4194308)
PERIODS: (0 2097152)
BUFFER_TIME: (5 524288000]
BUFFER_SIZE: [7 2097152]
BUFFER_BYTES: [4 8388608]
TICK_TIME: ALL
Rule 5 (0xffffa33ac100): FRAME_BITS=32 -> 32 BUFFER_BYTES=[4 8388608] 
BUFFER_SIZE=[7 2097152]
Rule 8 (0xffffa33ac100): RATE=[22050 192000] -> [22050 192000] 
BUFFER_SIZE=[7 2097152] BUFFER_TIME=(5 524288000]
Rule 9 (0xffffa33ac250): PERIODS=(0 2097152) -> (0 2097152) 
BUFFER_SIZE=[7 2097152] PERIOD_SIZE=(1 1048577)
Rule 10 (0xffffa33ac250): PERIOD_SIZE=(1 1048577) -> (1 1048577) 
BUFFER_SIZE=[7 2097152] PERIODS=(0 2097152)
Rule 12 (0xffffa33ac050): PERIOD_SIZE=(1 1048577) -> (7 1048577) 
PERIOD_TIME=(333 5461334) RATE=[22050 192000]
Rule 13 (0xffffa33ac1b0): BUFFER_SIZE=[7 2097152] -> [7 2097152] 
PERIOD_SIZE=(7 1048577) PERIODS=(0 2097152)
Rule 15 (0xffffa33ac050): BUFFER_SIZE=[7 2097152] -> [7 2097152] 
BUFFER_TIME=(5 524288000] RATE=[22050 192000]
Rule 16 (0xffffa33ac050): PERIOD_BYTES=(4 4194308) -> (28 4194308) 
PERIOD_SIZE=(7 1048577) FRAME_BITS=32
Rule 17 (0xffffa33ac050): BUFFER_BYTES=[4 8388608] -> [28 8388608] 
BUFFER_SIZE=[7 2097152] FRAME_BITS=32
Rule 18 (0xffffa33ac100): PERIOD_TIME=(333 5461334) -> (333 5461334) 
PERIOD_SIZE=(7 1048577) RATE=[22050 192000]
Rule 19 (0xffffa33ac100): BUFFER_TIME=(5 524288000] -> (36 95108935) 
BUFFER_SIZE=[7 2097152] RATE=[22050 192000]
Rule 4 (0xffffa33ac100): FRAME_BITS=32 -> 32 PERIOD_BYTES=(28 4194308) 
PERIOD_SIZE=(7 1048577)
Rule 5 (0xffffa33ac100): FRAME_BITS=32 -> 32 BUFFER_BYTES=[28 8388608] 
BUFFER_SIZE=[7 2097152]
Rule 7 (0xffffa33ac100): RATE=[22050 192000] -> [22050 192000] 
PERIOD_SIZE=(7 1048577) PERIOD_TIME=(333 5461334)
Rule 8 (0xffffa33ac100): RATE=[22050 192000] -> [22050 192000] 
BUFFER_SIZE=[7 2097152] BUFFER_TIME=(36 95108935)
Rule 9 (0xffffa33ac250): PERIODS=(0 2097152) -> (0 299594) 
BUFFER_SIZE=[7 2097152] PERIOD_SIZE=(7 1048577)
Rule 10 (0xffffa33ac250): PERIOD_SIZE=(7 1048577) -> (7 1048577) 
BUFFER_SIZE=[7 2097152] PERIODS=(0 299594)
Rule 11 (0xffffa33ac100): PERIOD_SIZE=(7 1048577) -> (7 1048577) 
PERIOD_BYTES=(28 4194308) FRAME_BITS=32
Rule 13 (0xffffa33ac1b0): BUFFER_SIZE=[7 2097152] -> [7 2097152] 
PERIOD_SIZE=(7 1048577) PERIODS=(0 299594)
Rule 14 (0xffffa33ac100): BUFFER_SIZE=[7 2097152] -> [7 2097152] 
BUFFER_BYTES=[28 8388608] FRAME_BITS=32
Rule 15 (0xffffa33ac050): BUFFER_SIZE=[7 2097152] -> [7 2097152] 
BUFFER_TIME=(36 95108935) RATE=[22050 192000]
refine_soft ok 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [22050 192000]
PERIOD_TIME: (333 5461334)
PERIOD_SIZE: (7 1048577)
PERIOD_BYTES: (28 4194308)
PERIODS: (0 299594)
BUFFER_TIME: (36 95108935)
BUFFER_SIZE: [7 2097152]
BUFFER_BYTES: [28 8388608]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [48000 48001)
PERIOD_TIME: (333 5461334)
PERIOD_SIZE: [16 262144]
PERIOD_BYTES: [64 1048576]
PERIODS: [1 1024]
BUFFER_TIME: (333 10922667)
BUFFER_SIZE: [16 524288]
BUFFER_BYTES: [64 2097152]
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [22050 192000]
PERIOD_TIME: (333 5461334)
PERIOD_SIZE: (7 1048577)
PERIOD_BYTES: (28 4194308)
PERIODS: (0 299594)
BUFFER_TIME: (36 95108935)
BUFFER_SIZE: [7 2097152]
BUFFER_BYTES: [28 8388608]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [48000 48001)
PERIOD_TIME: (333 5461334)
PERIOD_SIZE: [16 262144]
PERIOD_BYTES: [64 1048576]
PERIODS: [1 1024]
BUFFER_TIME: (333 10922667)
BUFFER_SIZE: [16 524288]
BUFFER_BYTES: [64 2097152]
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [22050 192000]
PERIOD_TIME: (333 5461334)
PERIOD_SIZE: (7 1048577)
PERIOD_BYTES: (28 4194308)
PERIODS: (0 299594)
BUFFER_TIME: (36 95108935)
BUFFER_SIZE: [7 2097152]
BUFFER_BYTES: [28 8388608]
TICK_TIME: ALL
refine_soft ok 'test_rate'
refine_slave - leave 'test_rate'
hw_refine_slave - enter 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [22050 22050]
PERIOD_TIME: (333 5461334)
PERIOD_SIZE: (7 1048577)
PERIOD_BYTES: (28 4194308)
PERIODS: (0 299594)
BUFFER_TIME: (36 95108935)
BUFFER_SIZE: [7 2097152]
BUFFER_BYTES: [28 8388608]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  ALL
SUBFORMAT:  ALL
SAMPLE_BITS: ALL
FRAME_BITS: ALL
CHANNELS: ALL
RATE: [48000 48001)
PERIOD_TIME: ALL
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: ALL
BUFFER_BYTES: ALL
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [22050 22050]
PERIOD_TIME: (333 5461334)
PERIOD_SIZE: (7 1048577)
PERIOD_BYTES: (28 4194308)
PERIODS: (0 299594)
BUFFER_TIME: (36 95108935)
BUFFER_SIZE: [7 2097152]
BUFFER_BYTES: [28 8388608]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [48000 48001)
PERIOD_TIME: (333 5461334)
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: (15 4565327)
BUFFER_BYTES: ALL
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [22050 22050]
PERIOD_TIME: (333 5461334)
PERIOD_SIZE: (7 1048577)
PERIOD_BYTES: (28 4194308)
PERIODS: (0 299594)
BUFFER_TIME: (36 95108935)
BUFFER_SIZE: [7 240844]
BUFFER_BYTES: [28 8388608]
TICK_TIME: ALL
Rule 5 (0xffffa33ac100): FRAME_BITS=32 -> 32 BUFFER_BYTES=[28 8388608] 
BUFFER_SIZE=[7 240844]
Rule 8 (0xffffa33ac100): RATE=22050 -> 22050 BUFFER_SIZE=[7 240844] 
BUFFER_TIME=(36 95108935)
Rule 9 (0xffffa33ac250): PERIODS=(0 299594) -> (0 34407) BUFFER_SIZE=[7 
240844] PERIOD_SIZE=(7 1048577)
Rule 10 (0xffffa33ac250): PERIOD_SIZE=(7 1048577) -> (7 1048577) 
BUFFER_SIZE=[7 240844] PERIODS=(0 34407)
Rule 12 (0xffffa33ac050): PERIOD_SIZE=(7 1048577) -> (7 120423) 
PERIOD_TIME=(333 5461334) RATE=22050
Rule 13 (0xffffa33ac1b0): BUFFER_SIZE=[7 240844] -> [7 240844] 
PERIOD_SIZE=(7 120423) PERIODS=(0 34407)
Rule 15 (0xffffa33ac050): BUFFER_SIZE=[7 240844] -> [7 240844] 
BUFFER_TIME=(36 95108935) RATE=22050
Rule 16 (0xffffa33ac050): PERIOD_BYTES=(28 4194308) -> (28 481692) 
PERIOD_SIZE=(7 120423) FRAME_BITS=32
Rule 17 (0xffffa33ac050): BUFFER_BYTES=[28 8388608] -> [28 963376] 
BUFFER_SIZE=[7 240844] FRAME_BITS=32
Rule 18 (0xffffa33ac100): PERIOD_TIME=(333 5461334) -> (333 5461334) 
PERIOD_SIZE=(7 120423) RATE=22050
Rule 19 (0xffffa33ac100): BUFFER_TIME=(36 95108935) -> (317 10922631) 
BUFFER_SIZE=[7 240844] RATE=22050
Rule 4 (0xffffa33ac100): FRAME_BITS=32 -> 32 PERIOD_BYTES=(28 481692) 
PERIOD_SIZE=(7 120423)
Rule 5 (0xffffa33ac100): FRAME_BITS=32 -> 32 BUFFER_BYTES=[28 963376] 
BUFFER_SIZE=[7 240844]
Rule 7 (0xffffa33ac100): RATE=22050 -> 22050 PERIOD_SIZE=(7 120423) 
PERIOD_TIME=(333 5461334)
Rule 8 (0xffffa33ac100): RATE=22050 -> 22050 BUFFER_SIZE=[7 240844] 
BUFFER_TIME=(317 10922631)
Rule 9 (0xffffa33ac250): PERIODS=(0 34407) -> (0 34407) BUFFER_SIZE=[7 
240844] PERIOD_SIZE=(7 120423)
Rule 11 (0xffffa33ac100): PERIOD_SIZE=(7 120423) -> (7 120423) 
PERIOD_BYTES=(28 481692) FRAME_BITS=32
Rule 14 (0xffffa33ac100): BUFFER_SIZE=[7 240844] -> [7 240844] 
BUFFER_BYTES=[28 963376] FRAME_BITS=32
Rule 15 (0xffffa33ac050): BUFFER_SIZE=[7 240844] -> [7 240844] 
BUFFER_TIME=(317 10922631) RATE=22050
refine_soft ok 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: (333 5461334)
PERIOD_SIZE: (7 120423)
PERIOD_BYTES: (28 481692)
PERIODS: (0 34407)
BUFFER_TIME: (317 10922631)
BUFFER_SIZE: [7 240844]
BUFFER_BYTES: [28 963376]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [48000 48001)
PERIOD_TIME: (333 5461334)
PERIOD_SIZE: [16 262144]
PERIOD_BYTES: [64 1048576]
PERIODS: [1 1024]
BUFFER_TIME: (333 10922667)
BUFFER_SIZE: [16 524288]
BUFFER_BYTES: [64 2097152]
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: (333 5461334)
PERIOD_SIZE: (7 120423)
PERIOD_BYTES: (28 481692)
PERIODS: (0 34407)
BUFFER_TIME: (317 10922631)
BUFFER_SIZE: [7 240844]
BUFFER_BYTES: [28 963376]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [48000 48001)
PERIOD_TIME: (333 5461334)
PERIOD_SIZE: [16 262144]
PERIOD_BYTES: [64 1048576]
PERIODS: [1 1024]
BUFFER_TIME: (333 10922667)
BUFFER_SIZE: [16 524288]
BUFFER_BYTES: [64 2097152]
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: (333 5461334)
PERIOD_SIZE: (7 120423)
PERIOD_BYTES: (28 481692)
PERIODS: (0 34407)
BUFFER_TIME: (317 10922631)
BUFFER_SIZE: [7 240844]
BUFFER_BYTES: [28 963376]
TICK_TIME: ALL
refine_soft ok 'test_rate'
refine_slave - leave 'test_rate'
hw_refine_slave - enter 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: [16000 5461334)
PERIOD_SIZE: (7 120423)
PERIOD_BYTES: (28 481692)
PERIODS: (0 34407)
BUFFER_TIME: (317 10922631)
BUFFER_SIZE: [7 240844]
BUFFER_BYTES: [28 963376]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  ALL
SUBFORMAT:  ALL
SAMPLE_BITS: ALL
FRAME_BITS: ALL
CHANNELS: ALL
RATE: [48000 48001)
PERIOD_TIME: ALL
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: ALL
BUFFER_BYTES: ALL
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: [16000 5461334)
PERIOD_SIZE: (7 120423)
PERIOD_BYTES: (28 481692)
PERIODS: (0 34407)
BUFFER_TIME: (317 10922631)
BUFFER_SIZE: [7 240844]
BUFFER_BYTES: [28 963376]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [48000 48001)
PERIOD_TIME: [16000 5461334)
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: (15 524300)
BUFFER_BYTES: ALL
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: [16000 5461334)
PERIOD_SIZE: (7 120423)
PERIOD_BYTES: (28 481692)
PERIODS: (0 34407)
BUFFER_TIME: (317 10922631)
BUFFER_SIZE: [352 240844]
BUFFER_BYTES: [28 963376]
TICK_TIME: ALL
Rule 5 (0xffffa33ac100): FRAME_BITS=32 -> 32 BUFFER_BYTES=[28 963376] 
BUFFER_SIZE=[352 240844]
Rule 7 (0xffffa33ac100): RATE=22050 -> 22050 PERIOD_SIZE=(7 120423) 
PERIOD_TIME=[16000 5461334)
Rule 8 (0xffffa33ac100): RATE=22050 -> 22050 BUFFER_SIZE=[352 240844] 
BUFFER_TIME=(317 10922631)
Rule 9 (0xffffa33ac250): PERIODS=(0 34407) -> (0 34407) BUFFER_SIZE=[352 
240844] PERIOD_SIZE=(7 120423)
Rule 10 (0xffffa33ac250): PERIOD_SIZE=(7 120423) -> (7 120423) 
BUFFER_SIZE=[352 240844] PERIODS=(0 34407)
Rule 12 (0xffffa33ac050): PERIOD_SIZE=(7 120423) -> (352 120423) 
PERIOD_TIME=[16000 5461334) RATE=22050
Rule 13 (0xffffa33ac1b0): BUFFER_SIZE=[352 240844] -> [352 240844] 
PERIOD_SIZE=(352 120423) PERIODS=(0 34407)
Rule 16 (0xffffa33ac050): PERIOD_BYTES=(28 481692) -> (1408 481692) 
PERIOD_SIZE=(352 120423) FRAME_BITS=32
Rule 17 (0xffffa33ac050): BUFFER_BYTES=[28 963376] -> [1408 963376] 
BUFFER_SIZE=[352 240844] FRAME_BITS=32
Rule 18 (0xffffa33ac100): PERIOD_TIME=[16000 5461334) -> [16000 5461334) 
PERIOD_SIZE=(352 120423) RATE=22050
Rule 19 (0xffffa33ac100): BUFFER_TIME=(317 10922631) -> (15963 10922631) 
BUFFER_SIZE=[352 240844] RATE=22050
Rule 4 (0xffffa33ac100): FRAME_BITS=32 -> 32 PERIOD_BYTES=(1408 481692) 
PERIOD_SIZE=(352 120423)
Rule 5 (0xffffa33ac100): FRAME_BITS=32 -> 32 BUFFER_BYTES=[1408 963376] 
BUFFER_SIZE=[352 240844]
Rule 7 (0xffffa33ac100): RATE=22050 -> 22050 PERIOD_SIZE=(352 120423) 
PERIOD_TIME=[16000 5461334)
Rule 8 (0xffffa33ac100): RATE=22050 -> 22050 BUFFER_SIZE=[352 240844] 
BUFFER_TIME=(15963 10922631)
Rule 9 (0xffffa33ac250): PERIODS=(0 34407) -> (0 685) BUFFER_SIZE=[352 
240844] PERIOD_SIZE=(352 120423)
Rule 10 (0xffffa33ac250): PERIOD_SIZE=(352 120423) -> (352 120423) 
BUFFER_SIZE=[352 240844] PERIODS=(0 685)
Rule 11 (0xffffa33ac100): PERIOD_SIZE=(352 120423) -> (352 120423) 
PERIOD_BYTES=(1408 481692) FRAME_BITS=32
Rule 13 (0xffffa33ac1b0): BUFFER_SIZE=[352 240844] -> [352 240844] 
PERIOD_SIZE=(352 120423) PERIODS=(0 685)
Rule 14 (0xffffa33ac100): BUFFER_SIZE=[352 240844] -> [352 240844] 
BUFFER_BYTES=[1408 963376] FRAME_BITS=32
Rule 15 (0xffffa33ac050): BUFFER_SIZE=[352 240844] -> [352 240844] 
BUFFER_TIME=(15963 10922631) RATE=22050
refine_soft ok 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: [16000 5461334)
PERIOD_SIZE: (352 120423)
PERIOD_BYTES: (1408 481692)
PERIODS: (0 685)
BUFFER_TIME: (15963 10922631)
BUFFER_SIZE: [352 240844]
BUFFER_BYTES: [1408 963376]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [48000 48001)
PERIOD_TIME: [16000 5461334)
PERIOD_SIZE: [768 262144]
PERIOD_BYTES: [3072 1048576]
PERIODS: [1 682]
BUFFER_TIME: (15999 10922667)
BUFFER_SIZE: [768 524288]
BUFFER_BYTES: [3072 2097152]
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: [16000 5461334)
PERIOD_SIZE: (352 120423)
PERIOD_BYTES: (1408 481692)
PERIODS: (0 685)
BUFFER_TIME: (15963 10922631)
BUFFER_SIZE: [352 240844]
BUFFER_BYTES: [1408 963376]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [48000 48001)
PERIOD_TIME: [16000 5461334)
PERIOD_SIZE: [768 262144]
PERIOD_BYTES: [3072 1048576]
PERIODS: [1 682]
BUFFER_TIME: (15999 10922667)
BUFFER_SIZE: [768 524288]
BUFFER_BYTES: [3072 2097152]
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: [16000 5461334)
PERIOD_SIZE: (352 120423)
PERIOD_BYTES: (1408 481692)
PERIODS: (0 685)
BUFFER_TIME: (15963 10922631)
BUFFER_SIZE: [352 240844]
BUFFER_BYTES: [1408 963376]
TICK_TIME: ALL
refine_soft ok 'test_rate'
refine_slave - leave 'test_rate'
hw_refine_slave - enter 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: [16000 16000]
PERIOD_SIZE: (352 120423)
PERIOD_BYTES: (1408 481692)
PERIODS: (0 685)
BUFFER_TIME: (15963 10922631)
BUFFER_SIZE: [352 240844]
BUFFER_BYTES: [1408 963376]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  ALL
SUBFORMAT:  ALL
SAMPLE_BITS: ALL
FRAME_BITS: ALL
CHANNELS: ALL
RATE: [48000 48001)
PERIOD_TIME: ALL
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: ALL
BUFFER_BYTES: ALL
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: [16000 16000]
PERIOD_SIZE: (352 120423)
PERIOD_BYTES: (1408 481692)
PERIODS: (0 685)
BUFFER_TIME: (15963 10922631)
BUFFER_SIZE: [352 240844]
BUFFER_BYTES: [1408 963376]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [48000 48001)
PERIOD_TIME: 16000
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: (766 524300)
BUFFER_BYTES: ALL
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 120423)
PERIOD_BYTES: (1408 481692)
PERIODS: (0 685)
BUFFER_TIME: (15963 10922631)
BUFFER_SIZE: [352 240609]
BUFFER_BYTES: [1408 963376]
TICK_TIME: ALL
Rule 5 (0xffffa33ac100): FRAME_BITS=32 -> 32 BUFFER_BYTES=[1408 963376] 
BUFFER_SIZE=[352 240609]
Rule 7 (0xffffa33ac100): RATE=22050 -> 22050 PERIOD_SIZE=(352 120423) 
PERIOD_TIME=16000
Rule 8 (0xffffa33ac100): RATE=22050 -> 22050 BUFFER_SIZE=[352 240609] 
BUFFER_TIME=(15963 10922631)
Rule 9 (0xffffa33ac250): PERIODS=(0 685) -> (0 684) BUFFER_SIZE=[352 
240609] PERIOD_SIZE=(352 120423)
Rule 10 (0xffffa33ac250): PERIOD_SIZE=(352 120423) -> (352 120423) 
BUFFER_SIZE=[352 240609] PERIODS=(0 684)
Rule 12 (0xffffa33ac050): PERIOD_SIZE=(352 120423) -> (352 353) 
PERIOD_TIME=16000 RATE=22050
Rule 13 (0xffffa33ac1b0): BUFFER_SIZE=[352 240609] -> [352 240609] 
PERIOD_SIZE=(352 353) PERIODS=(0 684)
Rule 16 (0xffffa33ac050): PERIOD_BYTES=(1408 481692) -> (1408 1412) 
PERIOD_SIZE=(352 353) FRAME_BITS=32
Rule 17 (0xffffa33ac050): BUFFER_BYTES=[1408 963376] -> [1408 962436] 
BUFFER_SIZE=[352 240609] FRAME_BITS=32
Rule 18 (0xffffa33ac100): PERIOD_TIME=16000 -> 16000 PERIOD_SIZE=(352 
353) RATE=22050
Rule 19 (0xffffa33ac100): BUFFER_TIME=(15963 10922631) -> (15963 
10911973) BUFFER_SIZE=[352 240609] RATE=22050
Rule 4 (0xffffa33ac100): FRAME_BITS=32 -> 32 PERIOD_BYTES=(1408 1412) 
PERIOD_SIZE=(352 353)
Rule 5 (0xffffa33ac100): FRAME_BITS=32 -> 32 BUFFER_BYTES=[1408 962436] 
BUFFER_SIZE=[352 240609]
Rule 7 (0xffffa33ac100): RATE=22050 -> 22050 PERIOD_SIZE=(352 353) 
PERIOD_TIME=16000
Rule 8 (0xffffa33ac100): RATE=22050 -> 22050 BUFFER_SIZE=[352 240609] 
BUFFER_TIME=(15963 10911973)
Rule 9 (0xffffa33ac250): PERIODS=(0 684) -> (0 684) BUFFER_SIZE=[352 
240609] PERIOD_SIZE=(352 353)
Rule 11 (0xffffa33ac100): PERIOD_SIZE=(352 353) -> (352 353) 
PERIOD_BYTES=(1408 1412) FRAME_BITS=32
Rule 14 (0xffffa33ac100): BUFFER_SIZE=[352 240609] -> [352 240609] 
BUFFER_BYTES=[1408 962436] FRAME_BITS=32
Rule 15 (0xffffa33ac050): BUFFER_SIZE=[352 240609] -> [352 240609] 
BUFFER_TIME=(15963 10911973) RATE=22050
refine_soft ok 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (0 684)
BUFFER_TIME: (15963 10911973)
BUFFER_SIZE: [352 240609]
BUFFER_BYTES: [1408 962436]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: 16000
PERIOD_SIZE: 768
PERIOD_BYTES: 3072
PERIODS: [1 682]
BUFFER_TIME: [16000 10912000]
BUFFER_SIZE: [768 523776]
BUFFER_BYTES: [3072 2095104]
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (0 684)
BUFFER_TIME: (15963 10911973)
BUFFER_SIZE: [352 240609]
BUFFER_BYTES: [1408 962436]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: 16000
PERIOD_SIZE: 768
PERIOD_BYTES: 3072
PERIODS: [1 682]
BUFFER_TIME: [16000 10912000]
BUFFER_SIZE: [768 523776]
BUFFER_BYTES: [3072 2095104]
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (0 684)
BUFFER_TIME: (15963 10911973)
BUFFER_SIZE: [352 240609]
BUFFER_BYTES: [1408 962436]
TICK_TIME: ALL
refine_soft ok 'test_rate'
refine_slave - leave 'test_rate'
hw_refine_slave - enter 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (0 684)
BUFFER_TIME: [32000 10911973)
BUFFER_SIZE: [352 240609]
BUFFER_BYTES: [1408 962436]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  ALL
SUBFORMAT:  ALL
SAMPLE_BITS: ALL
FRAME_BITS: ALL
CHANNELS: ALL
RATE: [48000 48001)
PERIOD_TIME: ALL
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: ALL
BUFFER_BYTES: ALL
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (0 684)
BUFFER_TIME: [32000 10911973)
BUFFER_SIZE: [352 240609]
BUFFER_BYTES: [1408 962436]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [48000 48001)
PERIOD_TIME: 16000
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: (766 523788)
BUFFER_BYTES: ALL
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (0 684)
BUFFER_TIME: [32000 10911973)
BUFFER_SIZE: [352 240609]
BUFFER_BYTES: [1408 962436]
TICK_TIME: ALL
Rule 8 (0xffffa33ac100): RATE=22050 -> 22050 BUFFER_SIZE=[352 240609] 
BUFFER_TIME=[32000 10911973)
Rule 15 (0xffffa33ac050): BUFFER_SIZE=[352 240609] -> [706 240609] 
BUFFER_TIME=[32000 10911973) RATE=22050
Rule 17 (0xffffa33ac050): BUFFER_BYTES=[1408 962436] -> [2824 962436] 
BUFFER_SIZE=[706 240609] FRAME_BITS=32
Rule 19 (0xffffa33ac100): BUFFER_TIME=[32000 10911973) -> (32018 
10911973) BUFFER_SIZE=[706 240609] RATE=22050
Rule 5 (0xffffa33ac100): FRAME_BITS=32 -> 32 BUFFER_BYTES=[2824 962436] 
BUFFER_SIZE=[706 240609]
Rule 8 (0xffffa33ac100): RATE=22050 -> 22050 BUFFER_SIZE=[706 240609] 
BUFFER_TIME=(32018 10911973)
Rule 9 (0xffffa33ac250): PERIODS=(0 684) -> (2 684) BUFFER_SIZE=[706 
240609] PERIOD_SIZE=(352 353)
Rule 10 (0xffffa33ac250): PERIOD_SIZE=(352 353) -> (352 353) 
BUFFER_SIZE=[706 240609] PERIODS=(2 684)
Rule 13 (0xffffa33ac1b0): BUFFER_SIZE=[706 240609] -> [706 240609] 
PERIOD_SIZE=(352 353) PERIODS=(2 684)
Rule 14 (0xffffa33ac100): BUFFER_SIZE=[706 240609] -> [706 240609] 
BUFFER_BYTES=[2824 962436] FRAME_BITS=32
Rule 15 (0xffffa33ac050): BUFFER_SIZE=[706 240609] -> [706 240609] 
BUFFER_TIME=(32018 10911973) RATE=22050
refine_soft ok 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (2 684)
BUFFER_TIME: (32018 10911973)
BUFFER_SIZE: [706 240609]
BUFFER_BYTES: [2824 962436]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: 16000
PERIOD_SIZE: 768
PERIOD_BYTES: 3072
PERIODS: [1 682]
BUFFER_TIME: [16000 10912000]
BUFFER_SIZE: [768 523776]
BUFFER_BYTES: [3072 2095104]
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (2 684)
BUFFER_TIME: (32018 10911973)
BUFFER_SIZE: [706 240609]
BUFFER_BYTES: [2824 962436]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: 16000
PERIOD_SIZE: 768
PERIOD_BYTES: 3072
PERIODS: [1 682]
BUFFER_TIME: [16000 10912000]
BUFFER_SIZE: [1537 523776]
BUFFER_BYTES: [3072 2095104]
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (2 684)
BUFFER_TIME: (32018 10911973)
BUFFER_SIZE: [1058 240609]
BUFFER_BYTES: [2824 962436]
TICK_TIME: ALL
Rule 5 (0xffffa33ac100): FRAME_BITS=32 -> 32 BUFFER_BYTES=[2824 962436] 
BUFFER_SIZE=[1058 240609]
Rule 8 (0xffffa33ac100): RATE=22050 -> 22050 BUFFER_SIZE=[1058 240609] 
BUFFER_TIME=(32018 10911973)
Rule 9 (0xffffa33ac250): PERIODS=(2 684) -> (2 684) BUFFER_SIZE=[1058 
240609] PERIOD_SIZE=(352 353)
Rule 10 (0xffffa33ac250): PERIOD_SIZE=(352 353) -> (352 353) 
BUFFER_SIZE=[1058 240609] PERIODS=(2 684)
Rule 17 (0xffffa33ac050): BUFFER_BYTES=[2824 962436] -> [4232 962436] 
BUFFER_SIZE=[1058 240609] FRAME_BITS=32
Rule 19 (0xffffa33ac100): BUFFER_TIME=(32018 10911973) -> (47981 
10911973) BUFFER_SIZE=[1058 240609] RATE=22050
Rule 5 (0xffffa33ac100): FRAME_BITS=32 -> 32 BUFFER_BYTES=[4232 962436] 
BUFFER_SIZE=[1058 240609]
Rule 8 (0xffffa33ac100): RATE=22050 -> 22050 BUFFER_SIZE=[1058 240609] 
BUFFER_TIME=(47981 10911973)
Rule 14 (0xffffa33ac100): BUFFER_SIZE=[1058 240609] -> [1058 240609] 
BUFFER_BYTES=[4232 962436] FRAME_BITS=32
Rule 15 (0xffffa33ac050): BUFFER_SIZE=[1058 240609] -> [1058 240609] 
BUFFER_TIME=(47981 10911973) RATE=22050
refine_soft ok 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (2 684)
BUFFER_TIME: (47981 10911973)
BUFFER_SIZE: [1058 240609]
BUFFER_BYTES: [4232 962436]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: 16000
PERIOD_SIZE: 768
PERIOD_BYTES: 3072
PERIODS: [3 682]
BUFFER_TIME: [48000 10912000]
BUFFER_SIZE: [2304 523776]
BUFFER_BYTES: [9216 2095104]
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (2 684)
BUFFER_TIME: (47981 10911973)
BUFFER_SIZE: [1058 240609]
BUFFER_BYTES: [4232 962436]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: 16000
PERIOD_SIZE: 768
PERIOD_BYTES: 3072
PERIODS: [3 682]
BUFFER_TIME: [48000 10912000]
BUFFER_SIZE: [2304 523776]
BUFFER_BYTES: [9216 2095104]
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (2 684)
BUFFER_TIME: (47981 10911973)
BUFFER_SIZE: [1058 240609]
BUFFER_BYTES: [4232 962436]
TICK_TIME: ALL
refine_soft ok 'test_rate'
refine_slave - leave 'test_rate'
hw_refine_slave - enter 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (0 684)
BUFFER_TIME: (15963 32000)
BUFFER_SIZE: [352 240609]
BUFFER_BYTES: [1408 962436]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  ALL
SUBFORMAT:  ALL
SAMPLE_BITS: ALL
FRAME_BITS: ALL
CHANNELS: ALL
RATE: [48000 48001)
PERIOD_TIME: ALL
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: ALL
BUFFER_BYTES: ALL
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (0 684)
BUFFER_TIME: (15963 32000)
BUFFER_SIZE: [352 240609]
BUFFER_BYTES: [1408 962436]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [48000 48001)
PERIOD_TIME: 16000
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: (766 523788)
BUFFER_BYTES: ALL
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (0 684)
BUFFER_TIME: (15963 32000)
BUFFER_SIZE: [352 240609]
BUFFER_BYTES: [1408 962436]
TICK_TIME: ALL
Rule 8 (0xffffa33ac100): RATE=22050 -> 22050 BUFFER_SIZE=[352 240609] 
BUFFER_TIME=(15963 32000)
Rule 15 (0xffffa33ac050): BUFFER_SIZE=[352 240609] -> [352 705] 
BUFFER_TIME=(15963 32000) RATE=22050
Rule 17 (0xffffa33ac050): BUFFER_BYTES=[1408 962436] -> [1408 2820] 
BUFFER_SIZE=[352 705] FRAME_BITS=32
Rule 19 (0xffffa33ac100): BUFFER_TIME=(15963 32000) -> (15963 31973) 
BUFFER_SIZE=[352 705] RATE=22050
Rule 5 (0xffffa33ac100): FRAME_BITS=32 -> 32 BUFFER_BYTES=[1408 2820] 
BUFFER_SIZE=[352 705]
Rule 8 (0xffffa33ac100): RATE=22050 -> 22050 BUFFER_SIZE=[352 705] 
BUFFER_TIME=(15963 31973)
Rule 9 (0xffffa33ac250): PERIODS=(0 684) -> (0 3) BUFFER_SIZE=[352 705] 
PERIOD_SIZE=(352 353)
Rule 10 (0xffffa33ac250): PERIOD_SIZE=(352 353) -> (352 353) 
BUFFER_SIZE=[352 705] PERIODS=(0 3)
Rule 13 (0xffffa33ac1b0): BUFFER_SIZE=[352 705] -> [352 705] 
PERIOD_SIZE=(352 353) PERIODS=(0 3)
Rule 14 (0xffffa33ac100): BUFFER_SIZE=[352 705] -> [352 705] 
BUFFER_BYTES=[1408 2820] FRAME_BITS=32
Rule 15 (0xffffa33ac050): BUFFER_SIZE=[352 705] -> [352 705] 
BUFFER_TIME=(15963 31973) RATE=22050
refine_soft ok 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (0 3)
BUFFER_TIME: (15963 31973)
BUFFER_SIZE: [352 705]
BUFFER_BYTES: [1408 2820]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: 16000
PERIOD_SIZE: 768
PERIOD_BYTES: 3072
PERIODS: [1 682]
BUFFER_TIME: [16000 10912000]
BUFFER_SIZE: [768 523776]
BUFFER_BYTES: [3072 2095104]
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (0 3)
BUFFER_TIME: (15963 31973)
BUFFER_SIZE: [352 705]
BUFFER_BYTES: [1408 2820]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: 16000
PERIOD_SIZE: 768
PERIOD_BYTES: 3072
PERIODS: [1 682]
BUFFER_TIME: [16000 10912000]
BUFFER_SIZE: [768 1536]
BUFFER_BYTES: [3072 2095104]
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (0 3)
BUFFER_TIME: (15963 31973)
BUFFER_SIZE: [352 705]
BUFFER_BYTES: [1408 2820]
TICK_TIME: ALL
refine_soft ok 'test_rate'
refine_slave - leave 'test_rate'
hw_refine_slave - enter 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (0 3)
BUFFER_TIME: [31972 31973)
BUFFER_SIZE: [352 705]
BUFFER_BYTES: [1408 2820]
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  ALL
SUBFORMAT:  ALL
SAMPLE_BITS: ALL
FRAME_BITS: ALL
CHANNELS: ALL
RATE: [48000 48001)
PERIOD_TIME: ALL
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: ALL
BUFFER_BYTES: ALL
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (0 3)
BUFFER_TIME: [31972 31973)
BUFFER_SIZE: [352 705]
BUFFER_BYTES: [1408 2820]
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [48000 48001)
PERIOD_TIME: 16000
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: (766 1537)
BUFFER_BYTES: ALL
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (0 3)
BUFFER_TIME: [31972 31973)
BUFFER_SIZE: [352 705]
BUFFER_BYTES: [1408 2820]
TICK_TIME: ALL
Rule 8 (0xffffa33ac100): RATE=22050 -> 22050 BUFFER_SIZE=[352 705] 
BUFFER_TIME=[31972 31973)
Rule 15 (0xffffa33ac050): BUFFER_SIZE=[352 705] -> 705 
BUFFER_TIME=[31972 31973) RATE=22050
Rule 17 (0xffffa33ac050): BUFFER_BYTES=[1408 2820] -> 2820 
BUFFER_SIZE=705 FRAME_BITS=32
Rule 19 (0xffffa33ac100): BUFFER_TIME=[31972 31973) -> (31972 31973) 
BUFFER_SIZE=705 RATE=22050
Rule 5 (0xffffa33ac100): FRAME_BITS=32 -> 32 BUFFER_BYTES=2820 
BUFFER_SIZE=705
Rule 8 (0xffffa33ac100): RATE=22050 -> 22050 BUFFER_SIZE=705 
BUFFER_TIME=(31972 31973)
Rule 9 (0xffffa33ac250): PERIODS=(0 3) -> (1 3) BUFFER_SIZE=705 
PERIOD_SIZE=(352 353)
Rule 10 (0xffffa33ac250): PERIOD_SIZE=(352 353) -> (352 353) 
BUFFER_SIZE=705 PERIODS=(1 3)
Rule 13 (0xffffa33ac1b0): BUFFER_SIZE=705 -> 705 PERIOD_SIZE=(352 353) 
PERIODS=(1 3)
Rule 14 (0xffffa33ac100): BUFFER_SIZE=705 -> 705 BUFFER_BYTES=2820 
FRAME_BITS=32
Rule 15 (0xffffa33ac050): BUFFER_SIZE=705 -> 705 BUFFER_TIME=(31972 
31973) RATE=22050
refine_soft ok 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (1 3)
BUFFER_TIME: (31972 31973)
BUFFER_SIZE: 705
BUFFER_BYTES: 2820
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: 16000
PERIOD_SIZE: 768
PERIOD_BYTES: 3072
PERIODS: [1 2]
BUFFER_TIME: [16000 32000]
BUFFER_SIZE: [768 1536]
BUFFER_BYTES: [3072 6144]
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (1 3)
BUFFER_TIME: (31972 31973)
BUFFER_SIZE: 705
BUFFER_BYTES: 2820
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: 16000
PERIOD_SIZE: 768
PERIOD_BYTES: 3072
PERIODS: [1 2]
BUFFER_TIME: [16000 32000]
BUFFER_SIZE: [1535 1536]
BUFFER_BYTES: [3072 6144]
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (1 3)
BUFFER_TIME: (31972 31973)
BUFFER_SIZE: 705
BUFFER_BYTES: 2820
TICK_TIME: ALL
refine_soft ok 'test_rate'
refine_slave - leave 'test_rate'
hw_refine_slave - enter 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (1 3)
BUFFER_TIME: (31972 31973)
BUFFER_SIZE: 705
BUFFER_BYTES: 2820
TICK_TIME: ALL
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  ALL
SUBFORMAT:  ALL
SAMPLE_BITS: ALL
FRAME_BITS: ALL
CHANNELS: ALL
RATE: [48000 48001)
PERIOD_TIME: ALL
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: ALL
BUFFER_BYTES: ALL
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (1 3)
BUFFER_TIME: (31972 31973)
BUFFER_SIZE: 705
BUFFER_BYTES: 2820
TICK_TIME: ALL
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [48000 48001)
PERIOD_TIME: 16000
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: (1534 1537)
BUFFER_BYTES: ALL
TICK_TIME: ALL
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (1 3)
BUFFER_TIME: (31972 31973)
BUFFER_SIZE: 705
BUFFER_BYTES: 2820
TICK_TIME: ALL
refine_soft ok 'test_rate'
refine_slave - leave 'test_rate'
hw_refine_slave - enter 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (1 3)
BUFFER_TIME: (31972 31973)
BUFFER_SIZE: 705
BUFFER_BYTES: 2820
TICK_TIME: [0 0]
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  ALL
SUBFORMAT:  ALL
SAMPLE_BITS: ALL
FRAME_BITS: ALL
CHANNELS: ALL
RATE: [48000 48001)
PERIOD_TIME: ALL
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: ALL
BUFFER_BYTES: ALL
TICK_TIME: ALL
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (1 3)
BUFFER_TIME: (31972 31973)
BUFFER_SIZE: 705
BUFFER_BYTES: 2820
TICK_TIME: [0 0]
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [48000 48001)
PERIOD_TIME: 16000
PERIOD_SIZE: ALL
PERIOD_BYTES: ALL
PERIODS: ALL
BUFFER_TIME: ALL
BUFFER_SIZE: (1534 1537)
BUFFER_BYTES: ALL
TICK_TIME: 0
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (1 3)
BUFFER_TIME: (31972 31973)
BUFFER_SIZE: 705
BUFFER_BYTES: 2820
TICK_TIME: 0
refine_soft ok 'test_rate'
schange 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (1 3)
BUFFER_TIME: (31972 31973)
BUFFER_SIZE: 705
BUFFER_BYTES: 2820
TICK_TIME: 0
schange 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: 16000
PERIOD_SIZE: 768
PERIOD_BYTES: 3072
PERIODS: 2
BUFFER_TIME: 32000
BUFFER_SIZE: 1536
BUFFER_BYTES: 6144
TICK_TIME: 0
srefine 'test_rate' (client)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (1 3)
BUFFER_TIME: (31972 31973)
BUFFER_SIZE: 705
BUFFER_BYTES: 2820
TICK_TIME: 0
srefine 'test_rate' (slave)
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: 16000
PERIOD_SIZE: 768
PERIOD_BYTES: 3072
PERIODS: 2
BUFFER_TIME: 32000
BUFFER_SIZE: 1536
BUFFER_BYTES: 6144
TICK_TIME: 0
cchange 'test_rate'
refine_soft 'test_rate'
refine_soft 'test_rate' (begin)
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 22050
PERIOD_TIME: 16000
PERIOD_SIZE: (352 353)
PERIOD_BYTES: (1408 1412)
PERIODS: (1 3)
BUFFER_TIME: (31972 31973)
BUFFER_SIZE: 705
BUFFER_BYTES: 2820
TICK_TIME: 0
refine_soft ok 'test_rate'
refine_slave - leave 'test_rate'
Rate conversion PCM (48000)
Converter: linear-interpolation
Protocol version: 10002
Its setup is:
   stream       : PLAYBACK
   access       : RW_INTERLEAVED
   format       : S16_LE
   subformat    : STD
   channels     : 2
   rate         : 22050
   exact rate   : 22050 (22050/1)
   msbits       : 16
   buffer_size  : 705
   period_size  : 353
   period_time  : 16000
   tstamp_mode  : NONE
   tstamp_type  : MONOTONIC
   period_step  : 1
   avail_min    : 353
   period_event : 0
   start_threshold  : 705
   stop_threshold   : 705
   silence_threshold: 0
   silence_size : 0
   boundary     : 3175037737296199680
Slave: Hardware PCM card 0 'Loopback' device 0 subdevice 0
Its setup is:
   stream       : PLAYBACK
   access       : MMAP_INTERLEAVED
   format       : S16_LE
   subformat    : STD
   channels     : 2
   rate         : 48000
   exact rate   : 48000 (48000/1)
   msbits       : 16
   buffer_size  : 1536
   period_size  : 768
   period_time  : 16000
   tstamp_mode  : NONE
   tstamp_type  : MONOTONIC
   period_step  : 1
   avail_min    : 768
   period_event : 0
   start_threshold  : 1536
   stop_threshold   : 1536
   silence_threshold: 0
   silence_size : 0
   boundary     : 6917529027641081856
   appl_ptr     : 0
   hw_ptr       : 0
Takashi Iwai Oct. 24, 2018, 7:48 a.m. UTC | #11
On Wed, 24 Oct 2018 09:44:01 +0200,
Timo Wischer wrote:
> 
> On 10/24/18 09:06, Takashi Iwai wrote:
> > On Mon, 22 Oct 2018 09:19:28 +0200,
> > Timo Wischer wrote:
> >> On 10/18/18 20:57, Takashi Iwai wrote:
> >>> But how can it be at the first place?  (352 353) is already empty as
> >>> the frames.  The time could be kept in this representation, but the
> >>> frames must be integer.
> >>>
> >>> Which order of calls did it result in so?
> >>>
> >>> We know that some order of calls make the selection impossible like
> >>> the above, especially when both time and bytes/frames are mixed.
> >>
> >> I have used the following ALSA configuration:
> >>
> >> pcm.test_rate {
> >>      type rate
> >>          slave.pcm hw:gmdcard
> >>          slave.rate 48000
> >> }
> > And which driver is gmdcard?
> >
> >
> > Takashi
> 
> 
> The driver is called Generic Machine Driver (unfortunately we have it
> not yet upstreamed) and it is using the Renesas RCar platform driver
> (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/sound/soc/sh/rcar?h=v4.19)
> 
> 
> But it is also reproducible with hw:Loopback with a slightly different
> rules negotiation but the same result at the end:

If it can be reproduced with the loopback driver, it makes easier to
debug.  But you modified something?  Then it has to be clarified at
first; i.e. let others reproduce your problem.  Otherwise we have no
merit to debug it in our side :)


thanks,

Takashi
Timo Wischer Oct. 24, 2018, 8:05 a.m. UTC | #12
On 10/24/18 09:48, Takashi Iwai wrote:
> If it can be reproduced with the loopback driver, it makes easier to
> debug.  But you modified something?  Then it has to be clarified at
> first; i.e. let others reproduce your problem.  Otherwise we have no
> merit to debug it in our side :)

Okay. Sorry for the inconvenience.

To reproduce the issue the following patch has to be applied:

 From fa6b0fd0470de4e05fab12223df7b79c0b2f7259 Mon Sep 17 00:00:00 2001
From: Timo Wischer <twischer@de.adit-jv.com>
Date: Mon, 15 Oct 2018 11:06:19 +0200
Subject: [PATCH 1/1] interval: Reproduce 2*period < buffer issue

Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>

diff --git a/src/pcm/interval_inline.h b/src/pcm/interval_inline.h
index a68e292..765f364 100644
--- a/src/pcm/interval_inline.h
+++ b/src/pcm/interval_inline.h
@@ -51,12 +51,14 @@ INTERVAL_INLINE int snd_interval_single(const 
snd_interval_t *i)
  {
      assert(!snd_interval_empty(i));
      return (i->min == i->max ||
-        (i->min + 1 == i->max && i->openmax));
+        (i->min + 1 == i->max && (i->openmin || i->openmax)));
  }

  INTERVAL_INLINE int snd_interval_value(const snd_interval_t *i)
  {
      assert(snd_interval_single(i));
+    if (i->openmin)
+        return (i->min + 1);
      return i->min;
  }

diff --git a/src/pcm/pcm_params.c b/src/pcm/pcm_params.c
index 8826bc3..4bd5ac0 100644
--- a/src/pcm/pcm_params.c
+++ b/src/pcm/pcm_params.c
@@ -2064,7 +2064,7 @@ static const snd_interval_t 
refine_intervals[SND_PCM_HW_PARAM_LAST_INTERVAL - SN
      },
  };

-#if 0
+#if 1
  #define RULES_DEBUG
  #endif
Jaroslav Kysela Oct. 24, 2018, 10:15 a.m. UTC | #13
Dne 24.10.2018 v 10:05 Timo Wischer napsal(a):
> On 10/24/18 09:48, Takashi Iwai wrote:
>> If it can be reproduced with the loopback driver, it makes easier to
>> debug.  But you modified something?  Then it has to be clarified at
>> first; i.e. let others reproduce your problem.  Otherwise we have no
>> merit to debug it in our side :)
> 
> Okay. Sorry for the inconvenience.

I am working on a regression which was caused with your
9bb985c382bab8c3bf83c0d23f50195288d3cf9f change:


http://git.alsa-project.org/?p=alsa-lib.git;a=commit;h=9bb985c382bab8c3bf83c0d23f50195288d3cf9f

Regression bug: https://bugzilla.redhat.com/show_bug.cgi?id=1640602

This change reordered/corrected intervals and I can confirm that
snd_interval_single() and snd_interval_value() functions must be updated
otherwise refining fails with some parameters.

Reproducer:

~/.asoundrc:

  pcm.aloop44100 {
    type rate
    slave.pcm hw:Loopback
    slave.rate 44100
  }

$ LD_PRELOAD=./src/.libs/libasound.so.2.0.0 aplay -Daloop44100 -c2  -r
44100 -fS16_LE --period-time=62500 --buffer-size=11025  -v -d 1 /dev/zero

This command works with 9bb985c382bab8c3bf83c0d23f50195288d3cf9f
reverted and with your new patch applied. It does not work only with
9bb985c382bab8c3bf83c0d23f50195288d3cf9f.

I applied your patch to alsa-lib repo:

http://git.alsa-project.org/?p=alsa-lib.git;a=commit;h=b420056604f06117c967b65d43d01536c5ffcbc9

Thanks for your work.

					Jaroslav

Patch
diff mbox series

diff --git a/src/pcm/interval_inline.h b/src/pcm/interval_inline.h
index a68e292..d9a30b2 100644
--- a/src/pcm/interval_inline.h
+++ b/src/pcm/interval_inline.h
@@ -51,12 +51,14 @@  INTERVAL_INLINE int snd_interval_single(const snd_interval_t *i)
 {
 	assert(!snd_interval_empty(i));
 	return (i->min == i->max || 
-		(i->min + 1 == i->max && i->openmax));
+		(i->min + 1 == i->max && (i->openmin || i->openmax)));
 }
 
 INTERVAL_INLINE int snd_interval_value(const snd_interval_t *i)
 {
 	assert(snd_interval_single(i));
+	if (i->openmin && !i->openmax)
+		return i->max;
 	return i->min;
 }