-
Notifications
You must be signed in to change notification settings - Fork 314
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
Tools: Topology2: Add enhanced audio capture development topologies #9176
Changes from all commits
904c9e2
c0a24fa
cae71ab
2fd1121
6ee1027
38e173b
dc0c1e2
450a841
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<include/components/tdfb.conf> | ||
|
||
Define { | ||
ANALOG_PLAYBACK_PCM 'Analog Playback' | ||
ANALOG_CAPTURE_PCM 'Analog Capture' | ||
|
@@ -7,6 +9,9 @@ Define { | |
DEEP_BUFFER_PIPELINE_SRC 'mixin.15.1' | ||
DEEP_BUFFER_PIPELINE_SINK 'mixout.2.1' | ||
DEEP_BUFFER_PCM_NAME 'Deepbuffer HDA Analog' | ||
HDA_ANALOG_CAPTURE_RATE 48000 | ||
HDA_ANALOG_PLAYBACK_RATE 48000 | ||
HDA_MIC_ENHANCED_CAPTURE 'false' | ||
} | ||
|
||
# include deep buffer config if buffer size is in 1 - 1000 ms. | ||
|
@@ -132,17 +137,42 @@ Object.Pipeline { | |
Object.Widget.host-copier.1 { | ||
stream_name $ANALOG_CAPTURE_PCM | ||
pcm_id 0 | ||
num_input_audio_formats 1 | ||
Object.Base.input_audio_format [ | ||
{ | ||
in_rate $HDA_ANALOG_CAPTURE_RATE | ||
in_bit_depth 32 | ||
in_valid_bit_depth 32 | ||
} | ||
] | ||
num_output_audio_formats 3 | ||
Object.Base.output_audio_format [ | ||
{ | ||
out_rate $HDA_ANALOG_CAPTURE_RATE | ||
out_bit_depth 16 | ||
out_valid_bit_depth 16 | ||
} | ||
{ | ||
out_rate $HDA_ANALOG_CAPTURE_RATE | ||
out_bit_depth 32 | ||
out_valid_bit_depth 24 | ||
} | ||
{ | ||
out_rate $HDA_ANALOG_CAPTURE_RATE | ||
out_bit_depth 32 | ||
out_valid_bit_depth 32 | ||
} | ||
] | ||
} | ||
} | ||
] | ||
|
||
io-gateway [ | ||
dai-copier-eqiir-module-copier-capture [ | ||
{ | ||
index 4 | ||
direction capture | ||
|
||
Object.Widget.dai-copier."1" { | ||
dai_type "HDA" | ||
dai_type "HDA" | ||
type "dai_out" | ||
copier_type "HDA" | ||
stream_name $HDA_ANALOG_DAI_NAME | ||
|
@@ -152,20 +182,148 @@ Object.Pipeline { | |
num_output_audio_formats 1 | ||
Object.Base.input_audio_format [ | ||
{ | ||
in_rate $HDA_ANALOG_CAPTURE_RATE | ||
in_bit_depth 32 | ||
in_valid_bit_depth 32 | ||
} | ||
] | ||
Object.Base.output_audio_format [ | ||
{ | ||
out_rate $HDA_ANALOG_CAPTURE_RATE | ||
out_bit_depth 32 | ||
out_valid_bit_depth 32 | ||
} | ||
] | ||
} | ||
Object.Widget.eqiir.1 { | ||
Object.Control.bytes."1" { | ||
name '$ANALOG_CAPTURE_PCM IIR Eq' | ||
<include/components/eqiir/highpass_40hz_0db_48khz.conf> | ||
} | ||
num_input_audio_formats 1 | ||
num_output_audio_formats 1 | ||
Object.Base.input_audio_format [ | ||
{ | ||
in_rate $HDA_ANALOG_CAPTURE_RATE | ||
in_bit_depth 32 | ||
in_valid_bit_depth 32 | ||
} | ||
] | ||
Object.Base.output_audio_format [ | ||
{ | ||
out_rate $HDA_ANALOG_CAPTURE_RATE | ||
out_bit_depth 32 | ||
out_valid_bit_depth 32 | ||
} | ||
] | ||
} | ||
Object.Widget.module-copier."2" { | ||
stream_name $HDA_ANALOG_DAI_NAME | ||
num_input_audio_formats 1 | ||
num_output_audio_formats 1 | ||
Object.Base.input_audio_format [ | ||
{ | ||
in_rate $HDA_ANALOG_CAPTURE_RATE | ||
in_bit_depth 32 | ||
in_valid_bit_depth 32 | ||
} | ||
] | ||
Object.Base.output_audio_format [ | ||
{ | ||
out_rate $HDA_ANALOG_CAPTURE_RATE | ||
out_bit_depth 32 | ||
out_valid_bit_depth 32 | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
|
||
IncludeByKey.HDA_MIC_ENHANCED_CAPTURE { | ||
"true" { | ||
Object.Widget.tdfb.1 { | ||
index 3 | ||
Object.Control { | ||
bytes."1" { | ||
name 'Analog Capture TDFB bytes' | ||
max 16384 | ||
IncludeByKey.EFX_HDA_MIC_TDFB_PARAMS { | ||
"line2_pass" "include/components/tdfb/line2_pass.conf" | ||
"line2_generic_pm10deg" "include/components/tdfb/line2_generic_pm10deg_48khz.conf" | ||
"line2_50mm" "include/components/tdfb/line2_50mm_pm0_30_90deg_48khz.conf" | ||
"line2_68mm" "include/components/tdfb/line2_68mm_pm0_30_90deg_48khz.conf" | ||
"line2_74mm" "include/components/tdfb/line2_74mm_pm0_30_90deg_48khz.conf" | ||
} | ||
} | ||
mixer."1" { | ||
name 'Analog Capture TDFB beam switch' | ||
} | ||
enum."1" { | ||
name 'Analog Capture TDFB angle set enum' | ||
} | ||
# Tracking is disabled from this topology, causes high MCPS | ||
#mixer."2" { | ||
# name 'Analog Capture TDFB track switch' | ||
#} | ||
#enum."2" { | ||
# name 'Analog Capture TDFB angle estimate enum' | ||
#} | ||
} | ||
num_input_audio_formats 1 | ||
Object.Base.input_audio_format [ | ||
{ | ||
in_rate $HDA_ANALOG_CAPTURE_RATE | ||
in_channels 2 | ||
in_bit_depth 32 | ||
in_valid_bit_depth 32 | ||
} | ||
] | ||
num_output_audio_formats 1 | ||
Object.Base.output_audio_format [ | ||
{ | ||
out_channels 2 | ||
out_rate $HDA_ANALOG_CAPTURE_RATE | ||
out_bit_depth 32 | ||
out_valid_bit_depth 32 | ||
} | ||
] | ||
} | ||
|
||
Object.Widget.drc.1 { | ||
index 3 | ||
Object.Control { | ||
bytes."1" { | ||
name 'Analog Capture DRC bytes' | ||
IncludeByKey.EFX_HDA_MIC_DRC_PARAMS { | ||
"passthrough" "include/components/drc/passthrough.conf" | ||
"amic_default" "include/components/drc/amic_default.conf" | ||
} | ||
} | ||
mixer."1" { | ||
name 'Analog Capture DRC switch' | ||
} | ||
} | ||
num_input_audio_formats 1 | ||
Object.Base.input_audio_format [ | ||
{ | ||
in_rate $HDA_ANALOG_CAPTURE_RATE | ||
in_bit_depth 32 | ||
in_valid_bit_depth 32 | ||
} | ||
] | ||
num_output_audio_formats 1 | ||
Object.Base.output_audio_format [ | ||
{ | ||
out_rate $HDA_ANALOG_CAPTURE_RATE | ||
out_bit_depth 32 | ||
out_valid_bit_depth 32 | ||
} | ||
] | ||
} | ||
} | ||
} | ||
|
||
Object.PCM.pcm [ | ||
{ | ||
id 0 | ||
|
@@ -188,45 +346,74 @@ Object.PCM.pcm [ | |
] | ||
|
||
# top-level pipeline connections | ||
|
||
IncludeByKey.EFX_DRC_COMPONENT { | ||
"singleband" { | ||
Object.Base.route [ | ||
{ | ||
sink 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.playback' | ||
source 'drc.2.1' | ||
source 'host-copier.0.playback' | ||
sink 'gain.1.1' | ||
} | ||
{ | ||
source 'mixin.1.1' | ||
sink 'mixout.2.1' | ||
} | ||
{ | ||
source 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.capture' | ||
sink 'host-copier.0.capture' | ||
} | ||
{ | ||
source 'host-copier.0.playback' | ||
sink 'gain.1.1' | ||
source 'drc.2.1' | ||
sink 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.playback' | ||
} | ||
] | ||
} | ||
"multiband" { | ||
Object.Base.route [ | ||
{ | ||
sink 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.playback' | ||
source 'multiband_drc.2.1' | ||
source 'host-copier.0.playback' | ||
sink 'gain.1.1' | ||
} | ||
{ | ||
source 'mixin.1.1' | ||
sink 'mixout.2.1' | ||
} | ||
{ | ||
source 'multiband_drc.2.1' | ||
sink 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.playback' | ||
} | ||
] | ||
} | ||
} | ||
|
||
IncludeByKey.HDA_MIC_ENHANCED_CAPTURE { | ||
"true" { | ||
Object.Base.route [ | ||
{ | ||
source 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.capture' | ||
sink 'eqiir.4.1' | ||
} | ||
{ | ||
source 'module-copier.4.2' | ||
sink 'tdfb.3.1' | ||
} | ||
{ | ||
source 'tdfb.3.1' | ||
sink 'drc.3.1' | ||
} | ||
{ | ||
source 'drc.3.1' | ||
sink 'host-copier.0.capture' | ||
} | ||
] | ||
} | ||
"false" { | ||
Object.Base.route [ | ||
{ | ||
source 'host-copier.0.playback' | ||
sink 'gain.1.1' | ||
source 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.capture' | ||
sink 'eqiir.4.1' | ||
} | ||
{ | ||
source 'module-copier.4.2' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. e.g. here there's no explicit route from eqiir.4.1 to module-copier.4.2 because it's implicit inside the pipeline number 4? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yep |
||
sink 'host-copier.0.capture' | ||
} | ||
] | ||
} | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ | |
<mixout-gain-dai-copier-playback.conf> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Slight concern how the first two interact. If you bisect git and hit the the tree between patches 1&2 in this series, you are left with e.g. SDW topologies without gain on the dmic capture, right? OTOH, this is pretty minor impact, we rarely bisect topology changes like these and I can understand the separate commits are easier to review. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a good point. Please think and let me know, combining patches 1 and 2 would be easy. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @singalsu I'm good with this if not other reasons to revisit the series. |
||
<mixout-gain-smart-amp-dai-copier-playback.conf> | ||
<dai-copier-gain-module-copier-capture.conf> | ||
<dai-copier-eqiir-module-copier-capture.conf> | ||
<dai-copier-eqiir-gain-module-copier-capture.conf> | ||
<gain-module-copier.conf> | ||
<gain-capture.conf> | ||
<gain-copier-capture.conf> | ||
|
@@ -57,10 +57,9 @@ Define { | |
# override DMIC default definitions | ||
DMIC0_HOST_PIPELINE_ID 13 | ||
DMIC0_DAI_PIPELINE_ID 14 | ||
DMIC0_HOST_PIPELINE_SINK 'gain.13.1' | ||
DMIC0_HOST_PIPELINE_SINK 'host-copier.10.capture' | ||
DMIC0_DAI_PIPELINE_SRC 'module-copier.14.2' | ||
DMIC0_DAI_COPIER 'dai-copier.DMIC.NoCodec-6.capture' | ||
DMIC0_DAI_GAIN 'eqiir.14.1' | ||
DMIC0_NAME 'NoCodec-6' | ||
DMIC1_NAME 'NoCodec-7' | ||
DMIC0_PCM_CAPS 'Gain Capture 13' | ||
|
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.
ok, this is now very explicit and easy to understand: a0->b0, b1->c0, c1->d0, where a, b, and c are objects / components, and 0 and 1 are their sinks and sources, but in other cases it isn't that explicit, so I'm confused.
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.
Yep, that earlier finding looks like my mistake.