Commit 4abf19c
committed
ASoC: SOF: Intel: hda: reserve link/host DMA channels with same ID
The sequence of PCM ops upon starting a PCM stream in SOF is as
follows (Showing only the hw_params and trigger ops):
Host hw_params -> Link hw_params -> Host START -> Link START
For HDA streams, the host DMA channel would be assigned during
host hw_params and the corresponding link DMA channel would be
assigned in link hw_params.
But for non-HDA streams such as I2S, DMIC and trace DMA,
only the host DMA is used. Therefore, the link DMA channel
corresponding to the host DMA channel will not be
assigned as there is no link hw_params as shown in the sequence above
The recommended HDA HW programming sequence requires that the host DMA
channel and link DMA channel with the same ID be coupled before DMA
format setting and decoupled right after. This would lead to issues
with concurrent usecases when the host DMA and link DMA channels for
a HDA stream do not match. Therefore, when the link DMA channel
corresponding to the host DMA channel for non-HDA streams
must be reserved by setting link_locked in the host START
trigger op to prevent it from being assigned to another stream.
Similar logic applies to hostless streams, where the link DMA
is in use but the host DMA is not in use. The host DMA
channel corresponding to the link DMA channel must be reserved
to prevent it from being assigned to another stream.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>1 parent 043e5a3 commit 4abf19c
3 files changed
+49
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
| 149 | + | |
148 | 150 | | |
149 | 151 | | |
150 | 152 | | |
| |||
161 | 163 | | |
162 | 164 | | |
163 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
164 | 177 | | |
165 | 178 | | |
166 | | - | |
167 | 179 | | |
168 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
169 | 185 | | |
170 | 186 | | |
171 | 187 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
217 | 216 | | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
218 | 233 | | |
219 | 234 | | |
220 | 235 | | |
| |||
229 | 244 | | |
230 | 245 | | |
231 | 246 | | |
232 | | - | |
233 | 247 | | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
234 | 253 | | |
235 | 254 | | |
236 | 255 | | |
| |||
241 | 260 | | |
242 | 261 | | |
243 | 262 | | |
| 263 | + | |
244 | 264 | | |
245 | 265 | | |
246 | 266 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
54 | 63 | | |
55 | 64 | | |
56 | 65 | | |
| |||
78 | 87 | | |
79 | 88 | | |
80 | 89 | | |
| 90 | + | |
81 | 91 | | |
82 | 92 | | |
83 | 93 | | |
| |||
0 commit comments