Skip to content

Commit 2831afe

Browse files
singalsukv2019i
authored andcommitted
Tools: Topology2: Easier controls create with bench_comp_generate.sh
This patch adds to benchmark topologies template .conf files generator commented out control examples types for easier ALSA controls create. The controls include files are renamed since they may contain all controls types and not just bytes. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
1 parent d4d0a0c commit 2831afe

1 file changed

Lines changed: 32 additions & 14 deletions

File tree

tools/topology/topology2/include/bench/bench_comp_generate.sh

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ generate_comp ()
3030
Object.Widget.${comp}.1 {
3131
index 1
3232
<include/bench/one_input_output_format_${format}.conf>
33-
<include/bench/${comp}_control_bytes_playback.conf>
33+
<include/bench/${comp}_controls_playback.conf>
3434
}
3535
Object.Widget.${comp}.2 {
3636
index 3
3737
<include/bench/one_input_output_format_${format}.conf>
38-
<include/bench/${comp}_control_bytes_capture.conf>
38+
<include/bench/${comp}_controls_capture.conf>
3939
}
4040
<include/bench/host_io_gateway_pipelines_${format}.conf>
4141
<include/bench/${comp}_hda_route.conf>
@@ -71,32 +71,50 @@ EOF_ROUTE
7171

7272
generate_playback_controls ()
7373
{
74-
fn=${comp}_control_bytes_playback.conf
74+
fn=${comp}_controls_playback.conf
7575
echo Creating file "$fn"
7676
cat > "$fn" <<EOF_PLAYBACK_BYTES
7777
# Created initially with script "${FULL_CMD[@]}"
7878
# may need edits to modify controls
79-
Object.Control.bytes."1" {
80-
name '\$ANALOG_PLAYBACK_PCM ${comp^^} bytes'
81-
IncludeByKey.BENCH_${comp^^}_PARAMS {
82-
"default" "include/components/${comp}/default.conf"
83-
}
79+
Object.Control {
80+
# Un-comment the supported controls in ${comp^^}
81+
#bytes."1" {
82+
# name '\$ANALOG_PLAYBACK_PCM ${comp^^} bytes'
83+
# IncludeByKey.BENCH_${comp^^}_PARAMS {
84+
# "default" "include/components/${comp}/default.conf"
85+
# }
86+
#}
87+
#mixer."1" {
88+
# name '\$ANALOG_PLAYBACK_PCM ${comp^^} switch or volume'
89+
#}
90+
#enum."1" {
91+
# name '\$ANALOG_PLAYBACK_PCM ${comp^^} enum'
92+
#}
8493
}
8594
EOF_PLAYBACK_BYTES
8695
}
8796

8897
generate_capture_controls ()
8998
{
90-
fn=${comp}_control_bytes_capture.conf
99+
fn=${comp}_controls_capture.conf
91100
echo Creating file "$fn"
92101
cat > "$fn" <<EOF_CAPTURE_BYTES
93102
# Created initially with script "${FULL_CMD[@]}"
94103
# may need edits to modify controls
95-
Object.Control.bytes."1" {
96-
name '\$ANALOG_CAPTURE_PCM ${comp^^} bytes'
97-
IncludeByKey.BENCH_${comp^^}_PARAMS {
98-
"default" "include/components/${comp}/default.conf"
99-
}
104+
Object.Control {
105+
# Un-comment the supported controls in ${comp^^}
106+
#bytes."1" {
107+
# name '\$ANALOG_CAPTURE_PCM ${comp^^} bytes'
108+
# IncludeByKey.BENCH_${comp^^}_PARAMS {
109+
# "default" "include/components/${comp}/default.conf"
110+
# }
111+
#}
112+
#mixer."1" {
113+
# name '\$ANALOG_CAPTURE_PCM ${comp^^} switch or volume'
114+
#}
115+
#enum."1" {
116+
# name '\$ANALOG_CAPTURE_PCM ${comp^^} enum'
117+
#}
100118
}
101119
EOF_CAPTURE_BYTES
102120
}

0 commit comments

Comments
 (0)