mirror of https://github.com/thesofproject/sof.git
topology2: sdw-amp-generic: add SDW_AMP_FMT_24 flag
To indicate the SoundWire amp need to use 24 bit format. I use a flag instead of a macro like $SDW_AMP_FMT to set valid_bit_depth because bit_depth and valid_bit_depth may not be the same. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
This commit is contained in:
parent
2541e55f2f
commit
ba98117818
|
@ -9,6 +9,7 @@ Define {
|
|||
SDW_AMP_IN_BE_ID 3
|
||||
AMP_FEEDBACK_CH 2
|
||||
SDW_AMP_FEEDBACK true
|
||||
SDW_AMP_FMT_24 false
|
||||
}
|
||||
|
||||
Object.Dai.ALH [
|
||||
|
@ -54,6 +55,19 @@ IncludeByKey.PASSTHROUGH {
|
|||
Object.Widget.alh-copier.1 {
|
||||
stream_name $SDW_SPK_STREAM
|
||||
node_type $ALH_LINK_OUTPUT_CLASS
|
||||
IncludeByKey.SDW_AMP_FMT_24 {
|
||||
"true" {
|
||||
num_output_audio_formats 1
|
||||
Object.Base.output_audio_format [
|
||||
{
|
||||
out_bit_depth 32
|
||||
out_valid_bit_depth 24
|
||||
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
|
||||
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Object.Widget.gain.1 {
|
||||
Object.Control.mixer.1 {
|
||||
|
@ -136,27 +150,44 @@ IncludeByKey.PASSTHROUGH {
|
|||
in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]"
|
||||
}
|
||||
]
|
||||
num_output_audio_formats 3
|
||||
Object.Base.output_audio_format [
|
||||
{
|
||||
out_bit_depth 16
|
||||
out_valid_bit_depth 16
|
||||
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
|
||||
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
|
||||
IncludeByKey.SDW_AMP_FMT_24 {
|
||||
"true" {
|
||||
num_output_audio_formats 1
|
||||
Object.Base.output_audio_format [
|
||||
{
|
||||
out_bit_depth 32
|
||||
out_valid_bit_depth 24
|
||||
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
|
||||
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
out_bit_depth 32
|
||||
out_valid_bit_depth 24
|
||||
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
|
||||
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
|
||||
"false" {
|
||||
num_output_audio_formats 3
|
||||
num_output_audio_formats 3
|
||||
Object.Base.output_audio_format [
|
||||
{
|
||||
out_bit_depth 16
|
||||
out_valid_bit_depth 16
|
||||
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
|
||||
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
|
||||
}
|
||||
{
|
||||
out_bit_depth 32
|
||||
out_valid_bit_depth 24
|
||||
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
|
||||
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
|
||||
}
|
||||
{
|
||||
out_bit_depth 32
|
||||
out_valid_bit_depth 32
|
||||
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
|
||||
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
out_bit_depth 32
|
||||
out_valid_bit_depth 32
|
||||
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
|
||||
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
pipeline [
|
||||
|
@ -190,8 +221,6 @@ IncludeByKey.NUM_SDW_AMP_LINKS {
|
|||
num_input_audio_formats 1
|
||||
num_output_audio_formats 1
|
||||
num_input_pins 1
|
||||
|
||||
# 32-bit 48KHz 2ch
|
||||
Object.Base.input_audio_format [
|
||||
{
|
||||
in_bit_depth 32
|
||||
|
@ -200,14 +229,28 @@ IncludeByKey.NUM_SDW_AMP_LINKS {
|
|||
in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]"
|
||||
}
|
||||
]
|
||||
Object.Base.output_audio_format [
|
||||
{
|
||||
out_bit_depth 32
|
||||
out_valid_bit_depth 32
|
||||
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
|
||||
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
|
||||
IncludeByKey.SDW_AMP_FMT_24 {
|
||||
"true" {
|
||||
Object.Base.output_audio_format [
|
||||
{
|
||||
out_bit_depth 32
|
||||
out_valid_bit_depth 24
|
||||
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
|
||||
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
"false" {
|
||||
Object.Base.output_audio_format [
|
||||
{
|
||||
out_bit_depth 32
|
||||
out_valid_bit_depth 32
|
||||
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
|
||||
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
IncludeByKey.SDW_AMP_FEEDBACK {
|
||||
|
@ -225,15 +268,28 @@ IncludeByKey.NUM_SDW_AMP_LINKS {
|
|||
num_output_audio_formats 1
|
||||
num_output_pins 1
|
||||
|
||||
# 32-bit 48KHz 2ch
|
||||
Object.Base.input_audio_format [
|
||||
{
|
||||
in_bit_depth 32
|
||||
in_valid_bit_depth 32
|
||||
in_sample_type $SAMPLE_TYPE_MSB_INTEGER
|
||||
in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]"
|
||||
IncludeByKey.SDW_AMP_FMT_24 {
|
||||
"true" {
|
||||
Object.Base.input_audio_format [
|
||||
{
|
||||
in_bit_depth 32
|
||||
in_valid_bit_depth 24
|
||||
in_sample_type $SAMPLE_TYPE_MSB_INTEGER
|
||||
in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
"false" {
|
||||
Object.Base.input_audio_format [
|
||||
{
|
||||
in_bit_depth 32
|
||||
in_valid_bit_depth 32
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue