Commit c739e0f
committed
ASoC: q6apm-dai: make use of q6apm_get_hw_pointer
JIRA: https://issues.redhat.com/browse/RHEL-80657
commit a93dad6
Author: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Date: Fri Mar 14 17:47:58 2025 +0000
ASoC: q6apm-dai: make use of q6apm_get_hw_pointer
With the existing code, the buffer position is only reset in pointer
callback, which leaves the possiblity of it going over the size of
buffer size and reporting incorrect position to userspace.
Without this patch, its possible to see errors like:
snd-x1e80100 sound: invalid position: pcmC0D0p:0, pos = 12288, buffer size = 12288, period size = 1536
snd-x1e80100 sound: invalid position: pcmC0D0p:0, pos = 12288, buffer size = 12288, period size = 1536
Fixes: 9b4fe0f ("ASoC: qdsp6: audioreach: add q6apm-dai support")
Cc: stable@vger.kernel.org
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tested-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://patch.msgid.link/20250314174800.10142-4-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Jaroslav Kysela <jkysela@redhat.com>1 parent e3c9f36 commit c739e0f
1 file changed
+4
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | 67 | | |
69 | 68 | | |
70 | 69 | | |
| |||
124 | 123 | | |
125 | 124 | | |
126 | 125 | | |
127 | | - | |
128 | 126 | | |
129 | 127 | | |
130 | 128 | | |
131 | 129 | | |
132 | 130 | | |
133 | 131 | | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | 132 | | |
138 | 133 | | |
139 | 134 | | |
140 | 135 | | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | 136 | | |
145 | 137 | | |
146 | 138 | | |
| |||
247 | 239 | | |
248 | 240 | | |
249 | 241 | | |
250 | | - | |
251 | 242 | | |
252 | 243 | | |
253 | 244 | | |
| |||
446 | 437 | | |
447 | 438 | | |
448 | 439 | | |
449 | | - | |
450 | 440 | | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
457 | 444 | | |
458 | | - | |
| 445 | + | |
459 | 446 | | |
460 | 447 | | |
461 | 448 | | |
| |||
670 | 657 | | |
671 | 658 | | |
672 | 659 | | |
673 | | - | |
674 | | - | |
675 | 660 | | |
676 | 661 | | |
677 | 662 | | |
| |||
0 commit comments