-
Notifications
You must be signed in to change notification settings - Fork 321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
topology2: google-rtc-aec: adjust the IBS/OBS size based on process needs #8403
Conversation
This is written by @ranj063 , posted for review upon her request. |
@@ -181,4 +181,8 @@ Object.Base.VendorToken { | |||
node_type 1980 | |||
deep_buffer_dma_ms 1981 | |||
} | |||
"19" { | |||
name "process" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems currently, you only want this used for RTC-AEC, is it possible to make it as a common attribute?
CPC calculation need set different input/output buffer size, so maybe we can start from here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rander suggested to hide IBS/OBS adjustments inside the tplg instead of asking driver to run the math, which is fine.
please check my comments in Linux kernel side, thanks! |
@@ -138,4 +143,6 @@ Class.Widget."google-rtc-aec" { | |||
is_pages 1 | |||
num_input_pins 2 | |||
num_output_pins 1 | |||
# AEC requires 10ms buffers for processing | |||
buffer_period_size 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be buffer_period_ms ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can use BUFFER_PERIOD_MS in the 2nd version.
V2 Update: Taka a different approach to update buffer_size with IBS/OBS adjusted in tplg. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, may I know this IBS setting is for AEC module intermediate buffer or AEC's source buffer size?
@@ -96,6 +98,7 @@ Class.Widget."google-rtc-aec" { | |||
input_pin_index 0 | |||
in_bit_depth 16 | |||
in_valid_bit_depth 16 | |||
ibs "$[(($in_channels * ($[($in_rate + 999)] / 1000)) * ($in_bit_depth / 8)) * $M ]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lgirdwood @singalsu @ranj063 @marcinszkudlinski , we may need unify these ibs/obs setting.
currently, when we try to set ibs/obs, we always try to do some rounding, like "+999" or "+4", based on discuss in:
77a12d5
from DP perspective, those rounding is not necessary, i, e we should use:
ibs "$[((
this can reduce delay for pipeline, if with rounding, take 11025 as example, it need 12 samples, if current is 11, it have to wait until next come to meet 12 samples, then if set ibs as 11 based, when input 11 samples arrived, it can go without waiting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack, thanks for the inputs, can we make a cross-tree changes with the improved formula in a seperate patch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please change the PR title. It look good for me
@@ -14,6 +14,8 @@ | |||
# Where N is the unique instance number for the google-rtc-aec object within the same alsaconf node. | |||
Define { | |||
AEC_UUID "a6:a0:80:b7:9f:26:6f:46:b4:77:23:df:a0:5a:f7:58" | |||
# AEC requires 10ms buffers for processing | |||
M 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
M is too simple, is it duration or period?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about BUFFER_PERIOD_MS?
Ack. |
This should be the source buffer size according to the definition found here |
…eeds Example: if a module has 2 input pins, one 16000/16/2, second 48000/16/2 and one output pin 48000/32/4 and is designed to process 10ms data chunks: in pin1 IBS should be 16(samples/1ms) * 2 bytes * 2 * 10(ms) = 640 in pin2 IBS should be 48(samples/1ms) * 2 bytes * 2 * 10(ms) = 1920 out pin1 OBS should be 48(samples/1ms) * 4 bytes * 4 * 10(ms) = 7680 Signed-off-by: Ranjani Sridharan <[email protected]> Signed-off-by: Yong Zhi <[email protected]>
Update:
|
Add new token to adjust the input/output buffer size for process modules.