diff --git a/tools/rimage/config/tgl-h.toml b/tools/rimage/config/tgl-h.toml index 6146fb89eef8..28f5e4fe9759 100644 --- a/tools/rimage/config/tgl-h.toml +++ b/tools/rimage/config/tgl-h.toml @@ -60,7 +60,7 @@ name = "ADSPFW" load_offset = "0x30000" [module] -count = 25 +count = 26 [[module.entry]] name = "BRNGUP" uuid = "61EB0CB9-34D8-4F59-A21D-04C54C21D3A4" @@ -562,3 +562,31 @@ count = 25 pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xf, 0x1ff] # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 4096, 1000000, 128, 128, 0, 0, 0] + + # ASRC module config + [[module.entry]] + name = "ASRC" + uuid = "66B4402D-B468-42F2-81A7-B37121863DD4" + affinity_mask = "0x3" + instance_count = "2" + domain_types = "0" + load_type = "0" + module_type = "9" + auto_start = "0" + sched_caps = [1, 0x00008000] + pin = [0, 0, 0xfeef, 0xc, 0x8, 0x45ff, 1, 0, 0xfeef, 0xc, 0x8, 0x45ff] + mod_cfg = [1, 0, 0, 0, 20480, 21808000, 64, 192, 0, 21808, 0, + 2, 0, 0, 0, 20480, 45820000, 64, 384, 0, 45820, 0, + 3, 0, 0, 0, 20480, 75236000, 512, 1440, 0, 75236, 0, + 4, 0, 0, 0, 20480, 79732000, 512, 1536, 0, 79732, 0, + 5, 0, 0, 0, 20480, 50411000, 184, 384, 0, 50411, 0, + 6, 0, 0, 0, 20480, 24236000, 192, 128, 0, 24236, 0, + 7, 0, 0, 0, 20480, 46753000, 192, 384, 0, 46753, 0, + 8, 0, 0, 0, 20480, 30032000, 256, 256, 0, 30032, 0, + 9, 0, 0, 0, 20480, 48676000, 256, 384, 0, 48676, 0, + 10, 0, 0, 0, 20480, 46548000, 360, 360, 0, 46548, 0, + 11, 0, 0, 0, 20480, 94372000, 1440, 1536, 0, 94372, 0, + 12, 0, 0, 0, 20480, 42912000, 1536, 512, 0, 42912, 0, + 13, 0, 0, 0, 20480, 31871000, 384, 192, 0, 31871, 0, + 14, 0, 0, 0, 20480, 34216000, 384, 256, 0, 34216, 0, + 15, 0, 0, 0, 20480, 83448000, 1536, 1440, 0, 83448, 0] diff --git a/tools/rimage/config/tgl.toml b/tools/rimage/config/tgl.toml index 8bd36d4c8da6..8f58618087c1 100644 --- a/tools/rimage/config/tgl.toml +++ b/tools/rimage/config/tgl.toml @@ -60,7 +60,7 @@ name = "ADSPFW" load_offset = "0x30000" [module] -count = 25 +count = 26 [[module.entry]] name = "BRNGUP" uuid = "61EB0CB9-34D8-4F59-A21D-04C54C21D3A4" @@ -562,3 +562,31 @@ count = 25 pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xf, 0x1ff] # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 4096, 1000000, 128, 128, 0, 0, 0] + + # ASRC module config + [[module.entry]] + name = "ASRC" + uuid = "66B4402D-B468-42F2-81A7-B37121863DD4" + affinity_mask = "0x3" + instance_count = "2" + domain_types = "0" + load_type = "0" + module_type = "9" + auto_start = "0" + sched_caps = [1, 0x00008000] + pin = [0, 0, 0xfeef, 0xc, 0x8, 0x45ff, 1, 0, 0xfeef, 0xc, 0x8, 0x45ff] + mod_cfg = [1, 0, 0, 0, 20480, 21808000, 64, 192, 0, 21808, 0, + 2, 0, 0, 0, 20480, 45820000, 64, 384, 0, 45820, 0, + 3, 0, 0, 0, 20480, 75236000, 512, 1440, 0, 75236, 0, + 4, 0, 0, 0, 20480, 79732000, 512, 1536, 0, 79732, 0, + 5, 0, 0, 0, 20480, 50411000, 184, 384, 0, 50411, 0, + 6, 0, 0, 0, 20480, 24236000, 192, 128, 0, 24236, 0, + 7, 0, 0, 0, 20480, 46753000, 192, 384, 0, 46753, 0, + 8, 0, 0, 0, 20480, 30032000, 256, 256, 0, 30032, 0, + 9, 0, 0, 0, 20480, 48676000, 256, 384, 0, 48676, 0, + 10, 0, 0, 0, 20480, 46548000, 360, 360, 0, 46548, 0, + 11, 0, 0, 0, 20480, 94372000, 1440, 1536, 0, 94372, 0, + 12, 0, 0, 0, 20480, 42912000, 1536, 512, 0, 42912, 0, + 13, 0, 0, 0, 20480, 31871000, 384, 192, 0, 31871, 0, + 14, 0, 0, 0, 20480, 34216000, 384, 256, 0, 34216, 0, + 15, 0, 0, 0, 20480, 83448000, 1536, 1440, 0, 83448, 0] diff --git a/tools/topology/topology2/include/bench/asrc_s16.conf b/tools/topology/topology2/include/bench/asrc_s16.conf index 82647eea960f..3ba56b0c0622 100644 --- a/tools/topology/topology2/include/bench/asrc_s16.conf +++ b/tools/topology/topology2/include/bench/asrc_s16.conf @@ -1,16 +1,18 @@ # Created with script "./bench_comp_generate.sh asrc" + # Edited/added: + # - operation mode 1 for push for playback, 2 for pull for playback + # - rate_out 48000 for the fixed playback sink rate + # - rate_out 0 for the capture PCM defined sink rate Object.Widget.asrc.1 { - index 1 - asynchronous_mode 0 - operation_mode 0 - rate_out 48000 + index 1 + operation_mode 1 + rate_out 48000 } Object.Widget.asrc.2 { - index 3 - rate_in 48000 - asynchronous_mode 0 - operation_mode 1 + index 3 + operation_mode 2 + rate_out 0 } diff --git a/tools/topology/topology2/include/bench/asrc_s24.conf b/tools/topology/topology2/include/bench/asrc_s24.conf index 4121e4aa7447..1c7288cd01a3 100644 --- a/tools/topology/topology2/include/bench/asrc_s24.conf +++ b/tools/topology/topology2/include/bench/asrc_s24.conf @@ -1,16 +1,18 @@ # Created with script "./bench_comp_generate.sh asrc" + # Edited/added: + # - operation mode 1 for push for playback, 2 for pull for playback + # - rate_out 48000 for the fixed playback sink rate + # - rate_out 0 for the capture PCM defined sink rate Object.Widget.asrc.1 { - index 1 - asynchronous_mode 0 - operation_mode 0 - rate_out 48000 + index 1 + operation_mode 1 + rate_out 48000 } Object.Widget.asrc.2 { - index 3 - asynchronous_mode 0 - operation_mode 1 - rate_in 48000 + index 3 + operation_mode 2 + rate_out 0 } diff --git a/tools/topology/topology2/include/bench/asrc_s32.conf b/tools/topology/topology2/include/bench/asrc_s32.conf index 2de2edaa08b5..2a0e3387f84e 100644 --- a/tools/topology/topology2/include/bench/asrc_s32.conf +++ b/tools/topology/topology2/include/bench/asrc_s32.conf @@ -1,16 +1,18 @@ # Created with script "./bench_comp_generate.sh asrc" + # Edited/added: + # - operation mode 1 for push for playback, 2 for pull for playback + # - rate_out 48000 for the fixed playback sink rate + # - rate_out 0 for the capture PCM defined sink rate Object.Widget.asrc.1 { - index 1 - asynchronous_mode 0 - operation_mode 0 - rate_out 48000 + index 1 + operation_mode 1 + rate_out 48000 } Object.Widget.asrc.2 { - index 3 - asynchronous_mode 0 - operation_mode 1 - rate_in 48000 + index 3 + operation_mode 2 + rate_out 0 } diff --git a/tools/topology/topology2/include/common/tokens.conf b/tools/topology/topology2/include/common/tokens.conf index dadfc162483c..46b172bb08e2 100644 --- a/tools/topology/topology2/include/common/tokens.conf +++ b/tools/topology/topology2/include/common/tokens.conf @@ -63,9 +63,7 @@ Object.Base.VendorToken { "7" { name "asrc" - rate_in 320 - rate_out 321 - asynchronous_mode 322 + rate_out 321 operation_mode 323 } diff --git a/tools/topology/topology2/include/components/asrc.conf b/tools/topology/topology2/include/components/asrc.conf index 1adcb9b457de..5ea82b0e7882 100644 --- a/tools/topology/topology2/include/components/asrc.conf +++ b/tools/topology/topology2/include/components/asrc.conf @@ -8,7 +8,6 @@ # Object.Widget.asrc."N" { # format "s24le" # rate_out 48000 -# asynchronous_mode 1 # operation_mode 0 # } # @@ -32,24 +31,12 @@ Class.Widget."asrc" { # Bespoke attributes for ASRC # - # Source sample rate - DefineAttribute."rate_in" { - # Token set reference name and type - token_ref "asrc.word" - - } - # Target sample rate DefineAttribute."rate_out" { # Token set reference name and type token_ref "asrc.word" } - DefineAttribute."asynchronous_mode" { - # Token set reference name and type - token_ref "asrc.word" - } - DefineAttribute."operation_mode" { # Token set reference name and type token_ref "asrc.word" @@ -66,7 +53,6 @@ Class.Widget."asrc" { ] !mandatory [ - "asynchronous_mode" "operation_mode" "num_input_audio_formats" "num_output_audio_formats"