1#
2# Low Latency playback pipeline with demux and volume.
3#
4# All attributes defined herein are namespaced by alsatplg to
5# "Object.Pipeline.volume-demux-playback.N.attribute_name"
6#
7# Usage: this component can be used by declaring in the top-level topology conf file as follows:
8#
9# 	Object.Pipeline.volume-demux-playback."N" {
10#		format		"s16le"
11#		period		1000
12#		time_domain	"timer"
13#		channels	2
14#		rate		48000
15#	}
16#
17# Where N is a unique integer for pipeline ID in the same alsaconf node.
18#
19
20#
21# (source) host.N.playback -> buffer.N.1 -> volume.N.1 -> buffer.N.2 -> muxdemux.N.1 -> buffer.N.3 (sink endpoint)
22#
23
24<include/common/route.conf>
25<include/components/buffer.conf>
26<include/components/host.conf>
27<include/components/muxdemux.conf>
28<include/components/pipeline.conf>
29<include/components/volume.conf>
30<include/controls/bytes.conf>
31
32Class.Pipeline."volume-demux-playback" {
33	# Include common pipeline attribute definitions
34	<include/pipelines/pipeline-common.conf>
35
36	attributes {
37		!constructor [
38			"index"
39		]
40		!mandatory [
41			"channels"
42		]
43		!immutable [
44			"direction"
45		]
46		unique	"instance"
47	}
48
49	Object.Widget {
50		pipeline."1" {}
51
52		host."playback" {
53			type		"aif_in"
54		}
55
56		buffer."1" {
57			periods	2
58			caps		"host"
59		}
60
61		pga."1" {
62			# set TLV scale for volume control mixer
63			Object.Control.mixer."1" {
64				Object.Base.tlv."vtlv_m64s2" {
65					Object.Base.scale."m64s2" {}
66				}
67			}
68		}
69
70		buffer."2" {
71			periods	2
72			caps		"comp"
73		}
74
75		muxdemux."1" {
76			# byte control for muxemux widget
77			Object.Control.bytes."0" {
78				max	304
79			}
80		}
81
82		buffer."3" {
83			periods	2
84			caps		"comp"
85		}
86	}
87
88	# Pipeline connections
89	Object.Base {
90		route."1" {
91			sink	buffer.$index.1
92			source  host.$index.playback
93		}
94
95		route."2" {
96			sink	pga.$index.1
97			source	buffer.$index.1
98		}
99
100		route."3" {
101			sink	buffer.$index.2
102			source	pga.$index.1
103		}
104
105		route."4" {
106			sink	muxdemux.$index.1
107			source	buffer.$index.2
108		}
109
110		route."5" {
111			sink	buffer.$index.3
112			source	muxdemux.$index.1
113		}
114	}
115
116	# default attribute values for volume-demux-playback pipeline
117	direction 	"playback"
118	time_domain	"timer"
119	period		1000
120	channels	2
121	rate		48000
122	priority	0
123	core 		0
124	frames		0
125	mips		5000
126}
127