Uh oh!
There was an error while loading. Please reload this page.
Audio: TDFB: Track sound direction of arrival - #4826
Conversation
singalsu
commented
Sep 29, 2021
First draft, needs a lot of cleanup and testing and optimization. It tracked in simulated 2mic acoustics in testbench quite well a 360 degree rotating sound source within -90 .. +90 deg that the 2D array can handle. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
singalsu
commented
Oct 4, 2021
I just pushed a version that "worked" correctly in a notebook device. I will next tune it to be more responsive, now only fairly loud sounds trigger angle update. Also I should change the enum scale for line array topologies for better precision. Alsatplg allows 16 different values and now 12 is used to cover 0-330 degrees. I could use 15 steps for -90..0..+90 with ~13 degrees precision. Or 13 steps with exactly 15 degrees step. |
lgirdwood
commented
Oct 15, 2021
Best to use integer step size for alsamixer rendering. |
singalsu
commented
Oct 18, 2021
Yep, my working version is using exact 15 degree step for line arrays now. I will share soon a testbench PR to enable testing of different input and output channels count in pipeline and improved TDFB test scripts. Then share the update to this PR. |
singalsu
commented
Nov 17, 2021
This PR needs #4941. I will meanwhile share related parts to this work (TDFB comp bug fixes, TDFB tool improvement, testbench improvement, TDFB test improvement). Also avoids huge single PR since I had to change plenty of things to be able to test this. This version with internal math functions remains [WIP]. |
lgirdwood
commented
Nov 18, 2021
@singalsu ok pls work with @ShriramShastry for #4941. Changes are localized so can be included for rc2 |
5d03612 to
4ca2747Comparelgirdwood
commented
Nov 23, 2021
@singalsu ready for review now ? |
Uh oh!
There was an error while loading. Please reload this page.
singalsu
commented
Nov 26, 2021
singalsu
commented
Nov 26, 2021
@lgirdwood I'm now testing this with PR #5034 . |
4ca2747 to
0f71036Comparesingalsu
commented
Nov 30, 2021
New WIP draft with Sriram's sqrt() lib patch temporarily included. |
0f71036 to
f8dba81CompareThere was a problem hiding this comment.
is this the same as ((a + 180) % 360) - 180? Maybe the below can be similarly simplified too, but be careful with division remainder of negative numbers
There was a problem hiding this comment.
Thanks, that worked, and slightly different version for negative angles.
There was a problem hiding this comment.
nitpicking: how about
cd->direction.rp = cd->direction.d;
cd->direction.wp = cd->direction.d + ch_count * (cd->direction.max_lag + 1);
There was a problem hiding this comment.
Good catch, this was a quick bug fix test that I forgot to clean up.
There was a problem hiding this comment.
you could use goto for clean up
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
something above makes me suspicious. If the first test ds2 < ds1 was true, 360 was subtracted from az. And now you add 360 back to az for another test? An else missing somewhere?
There was a problem hiding this comment.
There could be an else. The second squared error eval is unnecessary if the first 360 deg addition was done. The second test is false if first was true. One multiplication saved in that case.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
cbf96c8 to
98a604fCompareUh oh!
There was an error while loading. Please reload this page.
310d25b to
aa32c9fComparelgirdwood
commented
Dec 23, 2021
@cujomalainey good for you ? |
singalsu
commented
Jan 18, 2022
I just updated the emphasis IIR response from 2nd order 2 kHz high-pass to 1 - 4 kHz 4th order band-pass. It prevents highest frequencies to alias spatially and add error to angle. The lower high-pass picks up a bit more voice signal while still attenuates lowest frequencies those are usually noise. No other changes. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
lgirdwood
commented
Jan 26, 2022
@singalsu any updates ? |
Uh oh!
There was an error while loading. Please reload this page.
The DF2T IIR core has been moved earlier to library but the helper functions for configuring it were left to EQ component. This patch eases use of IIR core from other components. The file src/audio/eq_iir/iir.c is moved to src/math. There are no changes except of remove iir.h since the contents specific for DF2T type were merged to iir_df2t.h Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds function cross_product_s16(). Cross product is commonly used function in computational geometry. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds sound direction estimation. TDFB component updates the sound direction control to user space. User space may control the beam direction towards the source with help of the reported angle. Sound direction estimation is based on cross correlation maximums pattern and match of theoretical propagation delays to measured pattern. Cross correlation search is triggered by short term level when it exceeds the estimated background noise level. An emphasis filter is used to filter out typical low frequency noise. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Comment text is added to tdfb.c to help find the settings generator shell script. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
singalsu
commented
Feb 2, 2022
I just added a commit that adds to tdfb.c a comment about settings generator script to help find it. No other changes done. |
lgirdwood
commented
Feb 3, 2022
@cujomalainey good for you ? |
This patch adds sound direction tracking. TDFB component updates
the sound direction control to user space. User space may control
the beam direction with help of this.
Signed-off-by: Seppo Ingalsuo seppo.ingalsuo@linux.intel.com