Skip to content
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

Support a larger range of amp feedback channel counts #9624

Merged
merged 2 commits into from
Oct 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
161 changes: 126 additions & 35 deletions tools/topology/topology2/platform/intel/sdw-amp-generic.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Define {
SDW_AMP_BE_ID 2
SDW_AMP_IN_BE_ID 3
AMP_FEEDBACK_CH 2
AMP_FEEDBACK_CH_PER_LINK 2
SDW_AMP_FEEDBACK true
}

Expand Down Expand Up @@ -181,6 +182,7 @@ IncludeByKey.NUM_SDW_AMP_LINKS {
"2" {
Define {
AMP_FEEDBACK_CH 4
AMP_FEEDBACK_CH_PER_LINK 2
}

Object.Widget {
Expand Down Expand Up @@ -353,7 +355,7 @@ IncludeByKey.SDW_AMP_FEEDBACK {
name $SDW_SPK_IN_STREAM
default_hw_conf_id 1
rate 48000
channels 2
channels $AMP_FEEDBACK_CH_PER_LINK

Object.Base.hw_config.1 {
id 1
Expand All @@ -369,6 +371,81 @@ IncludeByKey.SDW_AMP_FEEDBACK {
Object.Widget.host-copier.1 {
stream_name "amp feedback"
pcm_id 3

IncludeByKey.AMP_FEEDBACK_CH {
"6" {
num_input_audio_formats 1
num_output_audio_formats 3
Object.Base.input_audio_format [
{
in_channels 6
in_bit_depth 32
in_valid_bit_depth 32
in_ch_cfg $CHANNEL_CONFIG_5_POINT_1
in_ch_map $CHANNEL_MAP_5_POINT_1
}
]
Object.Base.output_audio_format [
{
out_channels 6
out_bit_depth 32
out_valid_bit_depth 24
out_ch_cfg $CHANNEL_CONFIG_5_POINT_1
out_ch_map $CHANNEL_MAP_5_POINT_1
}
{
out_channels 6
out_bit_depth 32
out_valid_bit_depth 32
out_ch_cfg $CHANNEL_CONFIG_5_POINT_1
out_ch_map $CHANNEL_MAP_5_POINT_1
}
{
out_channels 6
out_bit_depth 16
out_valid_bit_depth 16
out_ch_cfg $CHANNEL_CONFIG_5_POINT_1
out_ch_map $CHANNEL_MAP_5_POINT_1
}
]
}
"8" {
num_input_audio_formats 1
num_output_audio_formats 3
Object.Base.input_audio_format [
{
in_channels 8
in_bit_depth 32
in_valid_bit_depth 32
in_ch_cfg $CHANNEL_CONFIG_7_POINT_1
in_ch_map $CHANNEL_MAP_7_POINT_1
}
]
Object.Base.output_audio_format [
{
out_channels 8
out_bit_depth 32
out_valid_bit_depth 24
out_ch_cfg $CHANNEL_CONFIG_7_POINT_1
out_ch_map $CHANNEL_MAP_7_POINT_1
}
{
out_channels 8
out_bit_depth 32
out_valid_bit_depth 32
out_ch_cfg $CHANNEL_CONFIG_7_POINT_1
out_ch_map $CHANNEL_MAP_7_POINT_1
}
{
out_channels 8
out_bit_depth 16
out_valid_bit_depth 16
out_ch_cfg $CHANNEL_CONFIG_7_POINT_1
out_ch_map $CHANNEL_MAP_7_POINT_1
}
]
}
}
}
}
]
Expand All @@ -386,47 +463,61 @@ IncludeByKey.SDW_AMP_FEEDBACK {
num_output_audio_formats 1
num_output_pins 1

IncludeByKey.NUM_SDW_AMP_LINKS {
"2" {
Object.Base.input_audio_format [
{
in_channels 4
in_bit_depth 32
in_valid_bit_depth $SDW_LINK_VALID_BITS
Object.Base.input_audio_format [
{
in_channels $AMP_FEEDBACK_CH
in_bit_depth 32
in_valid_bit_depth $SDW_LINK_VALID_BITS

IncludeByKey.AMP_FEEDBACK_CH {
"2" {
in_ch_cfg $CHANNEL_CONFIG_STEREO
in_ch_map $CHANNEL_MAP_STEREO
}
"4" {
in_ch_cfg $CHANNEL_CONFIG_3_POINT_1
in_ch_map $CHANNEL_MAP_3_POINT_1
in_sample_type $SAMPLE_TYPE_MSB_INTEGER
in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]"
}
]
Object.Base.output_audio_format [
{
out_channels 4
out_bit_depth 32
out_valid_bit_depth 32
"6" {
in_ch_cfg $CHANNEL_CONFIG_5_POINT_1
in_ch_map $CHANNEL_MAP_5_POINT_1
}
"8" {
in_ch_cfg $CHANNEL_CONFIG_7_POINT_1
in_ch_map $CHANNEL_MAP_7_POINT_1
}
}

in_sample_type $SAMPLE_TYPE_MSB_INTEGER
in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]"
}
]
Object.Base.output_audio_format [
{
out_channels $AMP_FEEDBACK_CH
out_bit_depth 32
out_valid_bit_depth 32

IncludeByKey.AMP_FEEDBACK_CH {
"2" {
out_ch_cfg $CHANNEL_CONFIG_STEREO
out_ch_map $CHANNEL_MAP_STEREO
}
"4" {
out_ch_cfg $CHANNEL_CONFIG_3_POINT_1
out_ch_map $CHANNEL_MAP_3_POINT_1
}
]
}
"1" {
# 32-bit 48KHz 2ch
Object.Base.input_audio_format [
{
in_bit_depth 32
in_valid_bit_depth $SDW_LINK_VALID_BITS
in_sample_type $SAMPLE_TYPE_MSB_INTEGER
in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]"
}
]
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
"6" {
out_ch_cfg $CHANNEL_CONFIG_5_POINT_1
out_ch_map $CHANNEL_MAP_5_POINT_1
}
"8" {
out_ch_cfg $CHANNEL_CONFIG_7_POINT_1
out_ch_map $CHANNEL_MAP_7_POINT_1
}
}
]
}
}
}
]
}
]
pipeline [
Expand Down
Loading