Signed-off-by: Seppo Ingalsuo seppo.ingalsuo@linux.intel.com --- .../audio/coefficients/pdm_decim/pdm_decim_fir.h | 43 ++++ .../pdm_decim_int32_02_4288_5100_010_095.h | 98 ++++++++ .../pdm_decim_int32_02_4375_5100_010_095.h | 108 +++++++++ .../pdm_decim_int32_03_3850_5100_010_095.h | 100 ++++++++ .../pdm_decim_int32_03_4375_5100_010_095.h | 164 +++++++++++++ .../pdm_decim_int32_04_4375_5100_010_095.h | 218 +++++++++++++++++ .../pdm_decim_int32_05_4331_5100_010_095.h | 258 +++++++++++++++++++++ .../pdm_decim_int32_06_4156_5100_010_095.h | 256 ++++++++++++++++++++ .../pdm_decim_int32_08_4156_5380_010_090.h | 254 ++++++++++++++++++++ .../audio/coefficients/pdm_decim/pdm_decim_table.h | 60 +++++ 10 files changed, 1559 insertions(+) create mode 100644 src/include/sof/audio/coefficients/pdm_decim/pdm_decim_fir.h create mode 100644 src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_02_4288_5100_010_095.h create mode 100644 src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_02_4375_5100_010_095.h create mode 100644 src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_03_3850_5100_010_095.h create mode 100644 src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_03_4375_5100_010_095.h create mode 100644 src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_04_4375_5100_010_095.h create mode 100644 src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_05_4331_5100_010_095.h create mode 100644 src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_06_4156_5100_010_095.h create mode 100644 src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_08_4156_5380_010_090.h create mode 100644 src/include/sof/audio/coefficients/pdm_decim/pdm_decim_table.h
diff --git a/src/include/sof/audio/coefficients/pdm_decim/pdm_decim_fir.h b/src/include/sof/audio/coefficients/pdm_decim/pdm_decim_fir.h new file mode 100644 index 0000000..788bf8c --- /dev/null +++ b/src/include/sof/audio/coefficients/pdm_decim/pdm_decim_fir.h @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2018, Intel Corporation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the Intel Corporation nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * Author: Seppo Ingalsuo seppo.ingalsuo@linux.intel.com + * + */ + +/* Format for generated coefficients tables */ + +struct pdm_decim { + int decim_factor; + int length; + int shift; + int relative_passband; + int relative_stopband; + int passband_ripple; + int stopband_ripple; + const int32_t *coef; +}; diff --git a/src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_02_4288_5100_010_095.h b/src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_02_4288_5100_010_095.h new file mode 100644 index 0000000..389a0a8 --- /dev/null +++ b/src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_02_4288_5100_010_095.h @@ -0,0 +1,98 @@ +const int32_t fir_int32_02_4288_5100_010_095[91] = { + -193886, + 104552, + 2140521, + 5355562, + 5945318, + 1216991, + -4511367, + -3527243, + 3415937, + 5526880, + -1935806, + -7515849, + -386524, + 9252379, + 3862172, + -10093681, + -8251552, + 9738620, + 13536988, + -7464432, + -19100785, + 2935187, + 24375729, + 4314479, + -28271418, + -14141458, + 29999307, + 26636531, + -28180625, + -41208987, + 21649022, + 57264356, + -8757879, + -73520802, + -12043366, + 88868414, + 43784598, + -101162825, + -91853580, + 106519993, + 169110273, + -94206010, + -317139630, + 5894310, + 739661049, + 1132200744, + 739661049, + 5894310, + -317139630, + -94206010, + 169110273, + 106519993, + -91853580, + -101162825, + 43784598, + 88868414, + -12043366, + -73520802, + -8757879, + 57264356, + 21649022, + -41208987, + -28180625, + 26636531, + 29999307, + -14141458, + -28271418, + 4314479, + 24375729, + 2935187, + -19100785, + -7464432, + 13536988, + 9738620, + -8251552, + -10093681, + 3862172, + 9252379, + -386524, + -7515849, + -1935806, + 5526880, + 3415937, + -3527243, + -4511367, + 1216991, + 5945318, + 5355562, + 2140521, + 104552, + -193886 + +}; + +struct pdm_decim pdm_decim_int32_02_4288_5100_010_095 = { + 2, 91, 0, 4288, 5100, 10, 95, fir_int32_02_4288_5100_010_095 +}; diff --git a/src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_02_4375_5100_010_095.h b/src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_02_4375_5100_010_095.h new file mode 100644 index 0000000..3825593 --- /dev/null +++ b/src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_02_4375_5100_010_095.h @@ -0,0 +1,108 @@ +const int32_t fir_int32_02_4375_5100_010_095[101] = { + -587830, + -2653881, + -5154608, + -4845367, + -226473, + 4220832, + 2571159, + -3184701, + -4043579, + 2206821, + 5554546, + -750496, + -6923900, + -1268584, + 8073360, + 4085183, + -8546477, + -7505364, + 8176185, + 11533751, + -6471060, + -15704256, + 3359707, + 19852409, + 1635593, + -23144509, + -8252640, + 25285013, + 16574479, + -25723227, + -26663304, + 23549736, + 38139664, + -17943366, + -50446983, + 8141043, + 63090267, + 7051351, + -75166959, + -29039894, + 85772627, + 60568979, + -93167356, + -106799776, + 94198973, + 180962815, + -78385592, + -324820245, + -12243140, + 742491441, + 1151461281, + 742491441, + -12243140, + -324820245, + -78385592, + 180962815, + 94198973, + -106799776, + -93167356, + 60568979, + 85772627, + -29039894, + -75166959, + 7051351, + 63090267, + 8141043, + -50446983, + -17943366, + 38139664, + 23549736, + -26663304, + -25723227, + 16574479, + 25285013, + -8252640, + -23144509, + 1635593, + 19852409, + 3359707, + -15704256, + -6471060, + 11533751, + 8176185, + -7505364, + -8546477, + 4085183, + 8073360, + -1268584, + -6923900, + -750496, + 5554546, + 2206821, + -4043579, + -3184701, + 2571159, + 4220832, + -226473, + -4845367, + -5154608, + -2653881, + -587830 + +}; + +struct pdm_decim pdm_decim_int32_02_4375_5100_010_095 = { + 2, 101, 0, 4375, 5100, 10, 95, fir_int32_02_4375_5100_010_095 +}; diff --git a/src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_03_3850_5100_010_095.h b/src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_03_3850_5100_010_095.h new file mode 100644 index 0000000..9b98d7e --- /dev/null +++ b/src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_03_3850_5100_010_095.h @@ -0,0 +1,100 @@ +const int32_t fir_int32_03_3850_5100_010_095[93] = { + 44212, + -302176, + -1360920, + -3291119, + -5495374, + -6588668, + -5102927, + -753403, + 4644861, + 7677973, + 5490212, + -1618066, + -9302333, + -11445730, + -4732005, + 7709057, + 17063964, + 14699335, + -457541, + -18980508, + -26202607, + -13319132, + 13695670, + 35545996, + 32740745, + 1994202, + -37267233, + -54079734, + -29355959, + 25448678, + 71128406, + 67328423, + 5964667, + -74773313, + -111583346, + -62643893, + 52737606, + 154899783, + 153311689, + 16759099, + -184962926, + -304661987, + -201939017, + 160731847, + 673585388, + 1122541471, + 1300561761, + 1122541471, + 673585388, + 160731847, + -201939017, + -304661987, + -184962926, + 16759099, + 153311689, + 154899783, + 52737606, + -62643893, + -111583346, + -74773313, + 5964667, + 67328423, + 71128406, + 25448678, + -29355959, + -54079734, + -37267233, + 1994202, + 32740745, + 35545996, + 13695670, + -13319132, + -26202607, + -18980508, + -457541, + 14699335, + 17063964, + 7709057, + -4732005, + -11445730, + -9302333, + -1618066, + 5490212, + 7677973, + 4644861, + -753403, + -5102927, + -6588668, + -5495374, + -3291119, + -1360920, + -302176, + 44212 + +}; + +struct pdm_decim pdm_decim_int32_03_3850_5100_010_095 = { + 3, 93, 1, 3850, 5100, 10, 95, fir_int32_03_3850_5100_010_095 +}; diff --git a/src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_03_4375_5100_010_095.h b/src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_03_4375_5100_010_095.h new file mode 100644 index 0000000..d8f2f27 --- /dev/null +++ b/src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_03_4375_5100_010_095.h @@ -0,0 +1,164 @@ +const int32_t fir_int32_03_4375_5100_010_095[157] = { + 350904, + 1127891, + 2233546, + 3059556, + 2752177, + 818057, + -2252661, + -4944515, + -5550704, + -3466227, + 53089, + 2496755, + 1904111, + -1421730, + -4818556, + -5204443, + -1721082, + 3155305, + 5311444, + 2454515, + -3518616, + -7589471, + -5713308, + 1327821, + 7901341, + 7958087, + 527903, + -8633996, + -11354795, + -4214518, + 7627116, + 13970242, + 8263364, + -5861946, + -16549651, + -13529964, + 2213919, + 17870757, + 19056207, + 2854066, + -18029728, + -24979102, + -9860164, + 16175117, + 30545984, + 18605951, + -11894271, + -35172531, + -28918160, + 4746528, + 38201092, + 40590666, + 5825429, + -38712951, + -53159148, + -20283384, + 35723256, + 66120531, + 39265868, + -27910967, + -78795928, + -63663750, + 13458962, + 90416047, + 95193346, + 10755142, + -99897049, + -137497231, + -51075841, + 105457455, + 200047804, + 124561003, + -101612190, + -313384381, + -297343743, + 53701878, + 639681661, + 1187800564, + 1411050887, + 1187800564, + 639681661, + 53701878, + -297343743, + -313384381, + -101612190, + 124561003, + 200047804, + 105457455, + -51075841, + -137497231, + -99897049, + 10755142, + 95193346, + 90416047, + 13458962, + -63663750, + -78795928, + -27910967, + 39265868, + 66120531, + 35723256, + -20283384, + -53159148, + -38712951, + 5825429, + 40590666, + 38201092, + 4746528, + -28918160, + -35172531, + -11894271, + 18605951, + 30545984, + 16175117, + -9860164, + -24979102, + -18029728, + 2854066, + 19056207, + 17870757, + 2213919, + -13529964, + -16549651, + -5861946, + 8263364, + 13970242, + 7627116, + -4214518, + -11354795, + -8633996, + 527903, + 7958087, + 7901341, + 1327821, + -5713308, + -7589471, + -3518616, + 2454515, + 5311444, + 3155305, + -1721082, + -5204443, + -4818556, + -1421730, + 1904111, + 2496755, + 53089, + -3466227, + -5550704, + -4944515, + -2252661, + 818057, + 2752177, + 3059556, + 2233546, + 1127891, + 350904 + +}; + +struct pdm_decim pdm_decim_int32_03_4375_5100_010_095 = { + 3, 157, 1, 4375, 5100, 10, 95, fir_int32_03_4375_5100_010_095 +}; diff --git a/src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_04_4375_5100_010_095.h b/src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_04_4375_5100_010_095.h new file mode 100644 index 0000000..a2a64fa --- /dev/null +++ b/src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_04_4375_5100_010_095.h @@ -0,0 +1,218 @@ +const int32_t fir_int32_04_4375_5100_010_095[211] = { + 126017, + 745791, + 1735783, + 3250059, + 4963537, + 6400069, + 6949502, + 6142229, + 3902336, + 705842, + -2485787, + -4540607, + -4626085, + -2636100, + 646448, + 3784383, + 5275090, + 4259502, + 1015665, + -3045153, + -5950963, + -6099091, + -3115593, + 1807814, + 6342508, + 8093924, + 5838000, + 296533, + -6011752, + -9879686, + -9013045, + -3339610, + 4700101, + 11152288, + 12461593, + 7387989, + -2085667, + -11448775, + -15769545, + -12252662, + -1940150, + 10437445, + 18576639, + 17768944, + 7550319, + -7626200, + -20251921, + -23428157, + -14572076, + 2797464, + 20329234, + 28790530, + 22864155, + 4330980, + -18201801, + -33211863, + -32081436, + -13923851, + 13233081, + 35870337, + 41620943, + 25914222, + -4896316, + -35895437, + -50712381, + -40042952, + -7212823, + 32428935, + 58525317, + 56015029, + 23582638, + -24374765, + -63897455, + -73234460, + -44550852, + 10604843, + 65540282, + 91054416, + 70624752, + 10408242, + -61706258, + -108584856, + -102490195, + -40744453, + 50090298, + 124919090, + 141743373, + 84173003, + -26760833, + -138851415, + -191966143, + -148464813, + -16173880, + 148695193, + 262835505, + 254088691, + 100293640, + -149816104, + -385869984, + -474827254, + -315628113, + 112831849, + 731720961, + 1381072959, + 1872325415, + 2055132469, + 1872325415, + 1381072959, + 731720961, + 112831849, + -315628113, + -474827254, + -385869984, + -149816104, + 100293640, + 254088691, + 262835505, + 148695193, + -16173880, + -148464813, + -191966143, + -138851415, + -26760833, + 84173003, + 141743373, + 124919090, + 50090298, + -40744453, + -102490195, + -108584856, + -61706258, + 10408242, + 70624752, + 91054416, + 65540282, + 10604843, + -44550852, + -73234460, + -63897455, + -24374765, + 23582638, + 56015029, + 58525317, + 32428935, + -7212823, + -40042952, + -50712381, + -35895437, + -4896316, + 25914222, + 41620943, + 35870337, + 13233081, + -13923851, + -32081436, + -33211863, + -18201801, + 4330980, + 22864155, + 28790530, + 20329234, + 2797464, + -14572076, + -23428157, + -20251921, + -7626200, + 7550319, + 17768944, + 18576639, + 10437445, + -1940150, + -12252662, + -15769545, + -11448775, + -2085667, + 7387989, + 12461593, + 11152288, + 4700101, + -3339610, + -9013045, + -9879686, + -6011752, + 296533, + 5838000, + 8093924, + 6342508, + 1807814, + -3115593, + -6099091, + -5950963, + -3045153, + 1015665, + 4259502, + 5275090, + 3784383, + 646448, + -2636100, + -4626085, + -4540607, + -2485787, + 705842, + 3902336, + 6142229, + 6949502, + 6400069, + 4963537, + 3250059, + 1735783, + 745791, + 126017 + +}; + +struct pdm_decim pdm_decim_int32_04_4375_5100_010_095 = { + 4, 211, 2, 4375, 5100, 10, 95, fir_int32_04_4375_5100_010_095 +}; diff --git a/src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_05_4331_5100_010_095.h b/src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_05_4331_5100_010_095.h new file mode 100644 index 0000000..25bb9eb --- /dev/null +++ b/src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_05_4331_5100_010_095.h @@ -0,0 +1,258 @@ +const int32_t fir_int32_05_4331_5100_010_095[251] = { + -250963, + -530472, + -956449, + -1440505, + -1861966, + -2058350, + -1862594, + -1155766, + 78930, + 1719645, + 3501958, + 5061143, + 6013975, + 6066039, + 5113131, + 3303104, + 1032343, + -1135681, + -2614668, + -2968117, + -2057986, + -118896, + 2276521, + 4363476, + 5409644, + 4953617, + 2982225, + -20415, + -3181416, + -5487913, + -6107986, + -4685208, + -1505051, + 2535666, + 6167372, + 8134966, + 7619351, + 4554012, + -280001, + -5435156, + -9220394, + -10246686, + -7922490, + -2726786, + 3853867, + 9734139, + 12878468, + 11991508, + 7020539, + -717311, + -8859727, + -14705610, + -16097433, + -12195790, + -3874308, + 6431337, + 15415517, + 19946809, + 18139792, + 10093658, + -1980159, + -14334496, + -22829097, + -24298020, + -17696570, + -4621840, + 11019276, + 24149376, + 30144976, + 26434112, + 13524367, + -4930822, + -23124320, + -34892082, + -35768599, + -24626114, + -4311380, + 19011680, + 37690383, + 45054463, + 37744852, + 17102968, + -10919933, + -37416293, + -53300866, + -52364722, + -33596881, + -1935268, + 32928131, + 59438198, + 67925581, + 54022129, + 20569914, + -22737901, + -62048140, + -83661289, + -78659667, + -46330665, + 4859442, + 59276671, + 98707953, + 108233225, + 81552245, + 23955872, + -48257755, + -112070264, + -144691658, + -131171943, + -70276392, + 23448172, + 122479978, + 193637242, + 208100323, + 151336952, + 29895897, + -127299559, + -274102498, + -357874627, + -333256339, + -175377009, + 111180608, + 490397234, + 900786668, + 1268179136, + 1522305381, + 1613059887, + 1522305381, + 1268179136, + 900786668, + 490397234, + 111180608, + -175377009, + -333256339, + -357874627, + -274102498, + -127299559, + 29895897, + 151336952, + 208100323, + 193637242, + 122479978, + 23448172, + -70276392, + -131171943, + -144691658, + -112070264, + -48257755, + 23955872, + 81552245, + 108233225, + 98707953, + 59276671, + 4859442, + -46330665, + -78659667, + -83661289, + -62048140, + -22737901, + 20569914, + 54022129, + 67925581, + 59438198, + 32928131, + -1935268, + -33596881, + -52364722, + -53300866, + -37416293, + -10919933, + 17102968, + 37744852, + 45054463, + 37690383, + 19011680, + -4311380, + -24626114, + -35768599, + -34892082, + -23124320, + -4930822, + 13524367, + 26434112, + 30144976, + 24149376, + 11019276, + -4621840, + -17696570, + -24298020, + -22829097, + -14334496, + -1980159, + 10093658, + 18139792, + 19946809, + 15415517, + 6431337, + -3874308, + -12195790, + -16097433, + -14705610, + -8859727, + -717311, + 7020539, + 11991508, + 12878468, + 9734139, + 3853867, + -2726786, + -7922490, + -10246686, + -9220394, + -5435156, + -280001, + 4554012, + 7619351, + 8134966, + 6167372, + 2535666, + -1505051, + -4685208, + -6107986, + -5487913, + -3181416, + -20415, + 2982225, + 4953617, + 5409644, + 4363476, + 2276521, + -118896, + -2057986, + -2968117, + -2614668, + -1135681, + 1032343, + 3303104, + 5113131, + 6066039, + 6013975, + 5061143, + 3501958, + 1719645, + 78930, + -1155766, + -1862594, + -2058350, + -1861966, + -1440505, + -956449, + -530472, + -250963 + +}; + +struct pdm_decim pdm_decim_int32_05_4331_5100_010_095 = { + 5, 251, 2, 4331, 5100, 10, 95, fir_int32_05_4331_5100_010_095 +}; diff --git a/src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_06_4156_5100_010_095.h b/src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_06_4156_5100_010_095.h new file mode 100644 index 0000000..01d149b --- /dev/null +++ b/src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_06_4156_5100_010_095.h @@ -0,0 +1,256 @@ +const int32_t fir_int32_06_4156_5100_010_095[249] = { + -145670, + -159762, + -183049, + -132077, + 40047, + 375196, + 897258, + 1599108, + 2433074, + 3308273, + 4097062, + 4651618, + 4829700, + 4525669, + 3700263, + 2402258, + 776038, + -950161, + -2496541, + -3579851, + -3970442, + -3547641, + -2337956, + -529617, + 1547925, + 3476297, + 4827277, + 5253398, + 4572039, + 2823110, + 284249, + -2564887, + -5127174, + -6808166, + -7148614, + -5940791, + -3300873, + 324045, + 4222816, + 7553233, + 9518313, + 9550081, + 7459490, + 3515883, + -1570147, + -6764980, + -10915019, + -12995804, + -12355318, + -8895306, + -3143626, + 3808819, + 10504528, + 15416643, + 17288185, + 15439779, + 9973227, + 1815303, + -7421871, + -15747713, + -21211963, + -22349384, + -18551421, + -10274491, + 976318, + 12902423, + 22867792, + 28468157, + 28093650, + 21356476, + 9275878, + -5840836, + -20818261, + -32262581, + -37311768, + -34324420, + -23346677, + -6234152, + 13625405, + 31957173, + 44495096, + 47945809, + 40808741, + 23856504, + 140921, + -25513494, + -47455167, + -60412143, + -60710132, + -47229950, + -21869611, + 10631696, + 43519737, + 69370312, + 81696614, + 76484113, + 53307373, + 15747228, + -29042608, + -71597234, + -102026296, + -112167649, + -97565632, + -58831316, + -2036750, + 62029440, + 119693403, + 157031723, + 162840122, + 131357475, + 64171528, + -29147598, + -131921532, + -222701994, + -278742412, + -280032642, + -213184166, + -74440208, + 128790505, + 378234661, + 646928572, + 902966510, + 1114231037, + 1253321369, + 1301843153, + 1253321369, + 1114231037, + 902966510, + 646928572, + 378234661, + 128790505, + -74440208, + -213184166, + -280032642, + -278742412, + -222701994, + -131921532, + -29147598, + 64171528, + 131357475, + 162840122, + 157031723, + 119693403, + 62029440, + -2036750, + -58831316, + -97565632, + -112167649, + -102026296, + -71597234, + -29042608, + 15747228, + 53307373, + 76484113, + 81696614, + 69370312, + 43519737, + 10631696, + -21869611, + -47229950, + -60710132, + -60412143, + -47455167, + -25513494, + 140921, + 23856504, + 40808741, + 47945809, + 44495096, + 31957173, + 13625405, + -6234152, + -23346677, + -34324420, + -37311768, + -32262581, + -20818261, + -5840836, + 9275878, + 21356476, + 28093650, + 28468157, + 22867792, + 12902423, + 976318, + -10274491, + -18551421, + -22349384, + -21211963, + -15747713, + -7421871, + 1815303, + 9973227, + 15439779, + 17288185, + 15416643, + 10504528, + 3808819, + -3143626, + -8895306, + -12355318, + -12995804, + -10915019, + -6764980, + -1570147, + 3515883, + 7459490, + 9550081, + 9518313, + 7553233, + 4222816, + 324045, + -3300873, + -5940791, + -7148614, + -6808166, + -5127174, + -2564887, + 284249, + 2823110, + 4572039, + 5253398, + 4827277, + 3476297, + 1547925, + -529617, + -2337956, + -3547641, + -3970442, + -3579851, + -2496541, + -950161, + 776038, + 2402258, + 3700263, + 4525669, + 4829700, + 4651618, + 4097062, + 3308273, + 2433074, + 1599108, + 897258, + 375196, + 40047, + -132077, + -183049, + -159762, + -145670 + +}; + +struct pdm_decim pdm_decim_int32_06_4156_5100_010_095 = { + 6, 249, 2, 4156, 5100, 10, 95, fir_int32_06_4156_5100_010_095 +}; diff --git a/src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_08_4156_5380_010_090.h b/src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_08_4156_5380_010_090.h new file mode 100644 index 0000000..b18df3d --- /dev/null +++ b/src/include/sof/audio/coefficients/pdm_decim/pdm_decim_int32_08_4156_5380_010_090.h @@ -0,0 +1,254 @@ +const int32_t fir_int32_08_4156_5380_010_090[247] = { + -337052, + -90075, + 37780, + 310298, + 762602, + 1418014, + 2279975, + 3324413, + 4495298, + 5703536, + 6831280, + 7740936, + 8289504, + 8346168, + 7812523, + 6641741, + 4854841, + 2549644, + -98570, + -2847418, + -5407472, + -7472951, + -8758755, + -9040926, + -8192669, + -6213693, + -3246278, + 424677, + 4395972, + 8180309, + 11265189, + 13176475, + 13545386, + 12170147, + 9059463, + 4454447, + -1180491, + -7196755, + -12830960, + -17296055, + -19885729, + -20077500, + -17621714, + -12601266, + -5452197, + 3062539, + 11925735, + 19980775, + 26075722, + 29220338, + 28734576, + 24368837, + 16375791, + 5519930, + -6982346, + -19587960, + -30609997, + -38433685, + -41741838, + -39718804, + -32202058, + -19758650, + -3667506, + 14195787, + 31565234, + 46060011, + 55497992, + 58207057, + 53292128, + 40817642, + 21874421, + -1487369, + -26460171, + -49799428, + -68227825, + -78875217, + -79697543, + -69816864, + -49730377, + -21350328, + 12143051, + 46630130, + 77532435, + 100390923, + 111473843, + 108334402, + 90240198, + 58408793, + 16001822, + -32138446, + -79996329, + -121085165, + -149268412, + -159601418, + -149086287, + -117235239, + -66355092, + -1494553, + 69965597, + 139055884, + 196228005, + 232526458, + 240790250, + 216740138, + 159811182, + 73611998, + -34070591, + -151754583, + -265210746, + -358796902, + -417052464, + -426388521, + -376691518, + -262659116, + -84707915, + 150664267, + 431125422, + 739363099, + 1054476937, + 1353781691, + 1614844650, + 1817552687, + 1945997296, + 1989982406, + 1945997296, + 1817552687, + 1614844650, + 1353781691, + 1054476937, + 739363099, + 431125422, + 150664267, + -84707915, + -262659116, + -376691518, + -426388521, + -417052464, + -358796902, + -265210746, + -151754583, + -34070591, + 73611998, + 159811182, + 216740138, + 240790250, + 232526458, + 196228005, + 139055884, + 69965597, + -1494553, + -66355092, + -117235239, + -149086287, + -159601418, + -149268412, + -121085165, + -79996329, + -32138446, + 16001822, + 58408793, + 90240198, + 108334402, + 111473843, + 100390923, + 77532435, + 46630130, + 12143051, + -21350328, + -49730377, + -69816864, + -79697543, + -78875217, + -68227825, + -49799428, + -26460171, + -1487369, + 21874421, + 40817642, + 53292128, + 58207057, + 55497992, + 46060011, + 31565234, + 14195787, + -3667506, + -19758650, + -32202058, + -39718804, + -41741838, + -38433685, + -30609997, + -19587960, + -6982346, + 5519930, + 16375791, + 24368837, + 28734576, + 29220338, + 26075722, + 19980775, + 11925735, + 3062539, + -5452197, + -12601266, + -17621714, + -20077500, + -19885729, + -17296055, + -12830960, + -7196755, + -1180491, + 4454447, + 9059463, + 12170147, + 13545386, + 13176475, + 11265189, + 8180309, + 4395972, + 424677, + -3246278, + -6213693, + -8192669, + -9040926, + -8758755, + -7472951, + -5407472, + -2847418, + -98570, + 2549644, + 4854841, + 6641741, + 7812523, + 8346168, + 8289504, + 7740936, + 6831280, + 5703536, + 4495298, + 3324413, + 2279975, + 1418014, + 762602, + 310298, + 37780, + -90075, + -337052 + +}; + +struct pdm_decim pdm_decim_int32_08_4156_5380_010_090 = { + 8, 247, 3, 4156, 5380, 10, 90, fir_int32_08_4156_5380_010_090 +}; diff --git a/src/include/sof/audio/coefficients/pdm_decim/pdm_decim_table.h b/src/include/sof/audio/coefficients/pdm_decim/pdm_decim_table.h new file mode 100644 index 0000000..8237252 --- /dev/null +++ b/src/include/sof/audio/coefficients/pdm_decim/pdm_decim_table.h @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2018, Intel Corporation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the Intel Corporation nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * Author: Seppo Ingalsuo seppo.ingalsuo@linux.intel.com + * + */ + +/* PDM decimation FIR filters */ + +#include "pdm_decim_fir.h" +#include "pdm_decim_int32_02_4288_5100_010_095.h" +#include "pdm_decim_int32_02_4375_5100_010_095.h" +#include "pdm_decim_int32_03_3850_5100_010_095.h" +#include "pdm_decim_int32_03_4375_5100_010_095.h" +#include "pdm_decim_int32_04_4375_5100_010_095.h" +#include "pdm_decim_int32_05_4331_5100_010_095.h" +#include "pdm_decim_int32_06_4156_5100_010_095.h" +#include "pdm_decim_int32_08_4156_5380_010_090.h" + +#define DMIC_FIR_LIST_LENGTH 8 + +/* Note: Higher spec filter must be before lower spec filter + * if there are multiple filters for a decimation factor. The naming + * scheme of coefficients set is: + * <type>_<decim factor>_<rel passband>_<rel stopband>_<ripple>_<attenuation> + */ +struct pdm_decim *fir_list[DMIC_FIR_LIST_LENGTH] = { + &pdm_decim_int32_02_4375_5100_010_095, + &pdm_decim_int32_02_4288_5100_010_095, + &pdm_decim_int32_03_4375_5100_010_095, + &pdm_decim_int32_03_3850_5100_010_095, + &pdm_decim_int32_04_4375_5100_010_095, + &pdm_decim_int32_05_4331_5100_010_095, + &pdm_decim_int32_06_4156_5100_010_095, + &pdm_decim_int32_08_4156_5380_010_090, +};