You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] [TGL] [SDW] [DSM]: 2xCh ref capure slows down the playback #3567
Describe the bug
When playback is running with smart_amp_test module enabled, 2xch echo ref capture will slow down the playback noticeably, the playback speed resumes to normal upon ref capture exits.
Expected behavior
The echo reference can support 2 to 4 ch, the capture is running independently of smart playback. Use DMUX to change/select capture ch number should not influence the playback quality.
Impact
What impact does this issue have on your progress (e.g., annoyance, showstopper)
@yongzhi1 I wasn't able to open your attachments neither on Ubuntu nor Mac.
what does 'slow down' mean?
a) the time to render a file of 10s is larger than 10s? can you run a 'time aplay ... file_10s.wav' so that we know the speed difference
b) you get underflows in the output?
c) something else?
The left side is the playback console, I then start 2xch capture from right console, stop and they tried 4xch.
(also tried S16_LE for both play and record, same observation) Thanks!!
since our demux component accepts output channel configs via configuration only and runtime configuration is not supported, looks we should shrink the channel support range from the pcm capability, @bkokoszx change like this could help:
Thanks for the patches, cherry-picked them on top of tgl v10.0-rc1:
d3a6f84010de (HEAD -> v10.0-rc1) demux: add demux_prepare_active_look_up() function
ad9bad42c016 mux: add channels check in mux_prepare_active_look_up()
8d5ac579ee11 mux: change prepare_active_look_up() function name
Issue is still reproducible.
I also noticed the 4xch ref capture for L and R amp, the expected layout is VIVI, but what captured looks like IVIV. Right now I am using yongzhi1@085c460 as a workaround.
Capture DAI copies only 24 frames per one period all the time (should copy 48 frames) and
it slows down playback pipeline during smart amp processing. I suspect there could be
some problem with SDW configuration - maybe capture SDW is configured to 2 channels
(pcm params) instead of 4 channels (DAI channels). It requires more debugging.
Looks we can't support 2 channel FE + 4 channel BE for SDW at the moment, an alternate solution could be configuring SMART_REF_CH_NUM to 4. @RanderWang@slawblauciak please chime in.
Activity
plbossart commentedon Oct 29, 2020
@yongzhi1 I wasn't able to open your attachments neither on Ubuntu nor Mac.
what does 'slow down' mean?
a) the time to render a file of 10s is larger than 10s? can you run a 'time aplay ... file_10s.wav' so that we know the speed difference
b) you get underflows in the output?
c) something else?
yongzhi1 commentedon Oct 29, 2020
Hi, @plbossart
The zip file contains mp4 video, I uploaded it here:
https://www.youtube.com/watch?v=qMrD6ip_YHM&feature=youtu.be
The left side is the playback console, I then start 2xch capture from right console, stop and they tried 4xch.
(also tried S16_LE for both play and record, same observation) Thanks!!
keyonjie commentedon Oct 30, 2020
since our demux component accepts output channel configs via configuration only and runtime configuration is not supported, looks we should shrink the channel support range from the pcm capability, @bkokoszx change like this could help:
yongzhi1 commentedon Oct 30, 2020
Hi, @keyonjie
It makes sense to restrict pcm capability ch_min = ch_max, but the playback issue is still there when PIPELINE_CHANNELS=2, thanks!!
keyonjie commentedon Oct 30, 2020
@yongzhi1 after restrict ch_min=ch_max=4, you will not be able to run arecord with PIPELINE_CHANNELS=2, the '-c4' is the only one mode supported.
yongzhi1 commentedon Oct 30, 2020
Hi, @keyonjie, does above mean only 4 ch is supported to work correctly at the moment?
Right now, SMART_REF_CH_NUM is set to 2 for SSP 4893e70 followed by SDW version 2de5060, '-c2' is being used for 2 spk solution based on #3409.
keyonjie commentedon Nov 3, 2020
@yongzhi1 the SMART_REF_CH_NUM counts here, if it is set to 2, then our PCM should claim to support 2 channels only, some change like this:
bkokoszx commentedon Nov 4, 2020
@yongzhi1
Could you try to reproduce this issue with #3583 PR?
yongzhi1 commentedon Nov 5, 2020
Hi, @bkokoszx,
Thanks for the patches, cherry-picked them on top of tgl v10.0-rc1:
Issue is still reproducible.
I also noticed the 4xch ref capture for L and R amp, the expected layout is VIVI, but what captured looks like IVIV. Right now I am using yongzhi1@085c460 as a workaround.
keyonjie commentedon Nov 6, 2020
@yongzhi1 I add the capability restriction patch I mentioned above and try 'arecord -c2' with SSP and the playback speed looks correct here.
yongzhi1 commentedon Nov 6, 2020
Hi, @keyonjie , thanks for sharing, somehow this problem only manifested itself for SDW not SSP.
keyonjie commentedon Nov 10, 2020
@RanderWang do you think there is anything special here for SDW?
Anyway, let me submit the restriction PR as it is a right thing to do.
keyonjie commentedon Nov 10, 2020
@yongzhi1 here it is: #3599
RanderWang commentedon Nov 11, 2020
@keyonjie on FW side, SDW makes no difference.
yongzhi1 commentedon Nov 17, 2020
cc @naveen-manohar @ryans-lee
yongzhi1 commentedon Dec 3, 2020
Hi, @slawblauciak, anyone tried to repro the issue yet?
bkokoszx commentedon Dec 16, 2020
@yongzhi1 @lgirdwood
Yes, we can reproduce that issue.
When we start only capture pipeline (with some additional logs) we get:
Capture DAI copies only 24 frames per one period all the time (should copy 48 frames) and
it slows down playback pipeline during smart amp processing. I suspect there could be
some problem with SDW configuration - maybe capture SDW is configured to 2 channels
(pcm params) instead of 4 channels (DAI channels). It requires more debugging.
keyonjie commentedon Dec 17, 2020
Looks we can't support 2 channel FE + 4 channel BE for SDW at the moment, an alternate solution could be configuring SMART_REF_CH_NUM to 4.
@RanderWang @slawblauciak please chime in.
RanderWang commentedon Dec 17, 2020
@yongzhi1 please check thesofproject/linux#2643
yongzhi1 commentedon Dec 17, 2020
Hi, @RanderWang, confirm the reported issue was fixed by thesofproject/linux#2643, thanks @keyonjie, @bkokoszx and @slawblauciak for your support!!
lgirdwood commentedon Dec 18, 2020
@RanderWang @yongzhi1 feel free to close if this is now fixed.