Skip to content

Commit

Permalink
TEST: 16k16b2c loopback
Browse files Browse the repository at this point in the history
Move 16k to the top of hw_config for test since
FW uses fsync_freq info to choose hw config.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
  • Loading branch information
yongzhi1 committed Apr 26, 2024
1 parent 278ecc5 commit 312a523
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 16 deletions.
48 changes: 40 additions & 8 deletions tools/topology/topology2/platform/intel/bt-generic.conf
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ Object.Pipeline {
copier_type "SSP"
stream_name $BT_NAME
node_type $I2S_LINK_OUTPUT_CLASS
num_input_audio_formats 3
num_output_audio_formats 3
num_input_audio_formats 4
num_output_audio_formats 4
num_input_pins 1

CombineArrays.Object.Base.output_audio_format [
Expand All @@ -37,6 +37,10 @@ Object.Pipeline {
}
# 2ch 16-bit 48k
{
out_rate [
16000
48000
]
out_bit_depth [ 16 ]
out_valid_bit_depth [ 16 ]
out_channels [ 2 ]
Expand All @@ -53,6 +57,10 @@ Object.Pipeline {
}
# 2ch 16-bit 48k
{
in_rate [
16000
48000
]
in_bit_depth [ 16 ]
in_valid_bit_depth [ 16 ]
in_channels [ 2 ]
Expand All @@ -71,8 +79,8 @@ Object.Pipeline {
Object.Widget.host-copier.1 {
stream_name $BT_PB_PCM_CAPS
pcm_id $BT_PCM_ID
num_input_audio_formats 3
num_output_audio_formats 3
num_input_audio_formats 4
num_output_audio_formats 4
CombineArrays.Object.Base.output_audio_format [
# array of 2ch format with range of rates
{
Expand All @@ -84,6 +92,10 @@ Object.Pipeline {
}
# 2ch 16-bit 48k
{
out_rate [
16000
48000
]
out_bit_depth [ 16 ]
out_valid_bit_depth [ 16 ]
out_channels [ 2 ]
Expand All @@ -100,6 +112,10 @@ Object.Pipeline {
}
# 2ch 16-bit 48k
{
in_rate [
16000
48000
]
in_bit_depth [ 16 ]
in_valid_bit_depth [ 16 ]
in_channels [ 2 ]
Expand All @@ -119,8 +135,8 @@ Object.Pipeline {
Object.Widget.host-copier.1 {
stream_name $BT_CP_PCM_CAPS
pcm_id $BT_PCM_ID
num_input_audio_formats 3
num_output_audio_formats 3
num_input_audio_formats 4
num_output_audio_formats 4
CombineArrays.Object.Base.output_audio_format [
# array of 2ch format with range of rates
{
Expand All @@ -132,6 +148,10 @@ Object.Pipeline {
}
# 2ch 16-bit 48k
{
out_rate [
16000
48000
]
out_bit_depth [ 16 ]
out_valid_bit_depth [ 16 ]
out_channels [ 2 ]
Expand All @@ -148,6 +168,10 @@ Object.Pipeline {
}
# 2ch 16-bit 48k
{
in_rate [
16000
48000
]
in_bit_depth [ 16 ]
in_valid_bit_depth [ 16 ]
in_channels [ 2 ]
Expand All @@ -172,8 +196,8 @@ Object.Pipeline {
copier_type "SSP"
stream_name $BT_NAME
node_type $I2S_LINK_INPUT_CLASS
num_input_audio_formats 3
num_output_audio_formats 3
num_input_audio_formats 4
num_output_audio_formats 4
CombineArrays.Object.Base.output_audio_format [
# array of 2ch format with range of rates
{
Expand All @@ -185,6 +209,10 @@ Object.Pipeline {
}
# 2ch 16-bit 48k
{
out_rate [
16000
48000
]
out_bit_depth [ 16 ]
out_valid_bit_depth [ 16 ]
out_channels [ 2 ]
Expand All @@ -201,6 +229,10 @@ Object.Pipeline {
}
# 2ch 16-bit 48k
{
in_rate [
16000
48000
]
in_bit_depth [ 16 ]
in_valid_bit_depth [ 16 ]
in_channels [ 2 ]
Expand Down
31 changes: 25 additions & 6 deletions tools/topology/topology2/platform/intel/bt-ssp-config-lbm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ Object.Dai.SSP [
sample_bits 16
quirks "lbm_mode"
io_clk $BT_MCLK

Object.Base.hw_config.1 {
id 0
name "BT-SCO-WB"
name "BT-16K"
mclk_freq $BT_MCLK
bclk_freq 256000
bclk_invert true
bclk_freq 512000
tdm_slot_width 16
format "DSP_A"
bclk "codec_consumer"
fsync "codec_consumer"
fsync_freq 16000
tdm_slots 1
tx_slots 1
rx_slots 1
tdm_slots 2
tx_slots 3
rx_slots 3
Object.Base.link_config.1 {
clock_source 1
}
Expand All @@ -46,6 +46,24 @@ Object.Dai.SSP [
}
Object.Base.hw_config.3 {
id 2
name "BT-SCO-WB"
mclk_freq $BT_MCLK
bclk_freq 256000
bclk_invert true
tdm_slot_width 16
format "DSP_A"
bclk "codec_consumer"
fsync "codec_consumer"
fsync_freq 16000
tdm_slots 1
tx_slots 1
rx_slots 1
Object.Base.link_config.1 {
clock_source 1
}
}
Object.Base.hw_config.4 {
id 3
name "BT-A2DP"
mclk_freq $BT_MCLK
bclk_freq 1536000
Expand All @@ -61,5 +79,6 @@ Object.Dai.SSP [
clock_source 1
}
}

}
]
5 changes: 3 additions & 2 deletions tools/topology/topology2/production/tplg-targets-ace1.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ BT_NAME=SSP2-BT,BT_ID=7,BT_PCM_NAME=Bluetooth,GOOGLE_RTC_AEC_SUPPORT=1"
PDM1_MIC_B_ENABLE=1,DMIC0_PCM_ID=99,PREPROCESS_PLUGINS=nhlt,\
NHLT_BIN=nhlt-sof-mtl-max98357a-rt5682-ssp2-ssp0.bin,DEEPBUFFER_FW_DMA_MS=10,HEADSET_SSP_DAI_INDEX=2,\
SPK_ID=6,SPEAKER_SSP_DAI_INDEX=0,HEADSET_CODEC_NAME=SSP2-Codec,SPEAKER_CODEC_NAME=SSP0-Codec,\
BT_NAME=SSP1-BT,BT_INDEX=1,BT_ID=7,BT_PCM_NAME=Bluetooth,INCLUDE_ECHO_REF=true,DEEP_BUF_SPK=true"
BT_NAME=SSP1-BT,BT_INDEX=1,BT_ID=7,BT_PCM_NAME=Bluetooth,INCLUDE_ECHO_REF=true,DEEP_BUF_SPK=true,\
BT_LOOPBACK_MODE=true"

"cavs-rt5682\;sof-mtl-max98357a-rt5682-ssp2-ssp0-google-aec\;PLATFORM=mtl,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,\
PDM1_MIC_B_ENABLE=1,DMIC0_PCM_ID=99,PREPROCESS_PLUGINS=nhlt,\
Expand Down Expand Up @@ -137,5 +138,5 @@ PDM1_MIC_B_ENABLE=1,DMIC0_ID=3,DMIC1_ID=4,\
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-mtl-sdw-cs42l42-l0-max98363-l2.bin,\
BT_NAME=SSP1-BT,BT_INDEX=1,BT_PCM_ID=20,BT_ID=8,BT_PCM_NAME=Bluetooth,ADD_BT=true,\
NUM_SDW_AMP_LINKS=1,SDW_SPK_STREAM=SDW2-Playback,SDW_AMP_FEEDBACK=false,\
SDW_JACK_CAPTURE_CH=1"
SDW_JACK_CAPTURE_CH=1,BT_LOOPBACK_MODE=true"
)

0 comments on commit 312a523

Please sign in to comment.