Commit 48f30a3
Yu-Hsuan Hsu
ASoC: SOF: Use high-priority workqueue for PCM period elapsed
The snd_sof_pcm_period_elapsed function currently schedules work on the
system-wide workqueue. This can lead to potential delays or jitter in
audio processing if the system workqueue is busy with other tasks.
To improve real-time performance and ensure timely processing of PCM
periods, create a dedicated high-priority, unbound workqueue
("sof_pcm_wq") specifically for this purpose.
Update the period elapsed handling to queue work onto this new
workqueue, while maintaining a fallback to the system workqueue if the
dedicated one is not initialized.
Signed-off-by: Yu-Hsuan Hsu <yuhsuan@google.com>1 parent 58baae7 commit 48f30a3
3 files changed
Lines changed: 21 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
696 | 696 | | |
697 | 697 | | |
698 | 698 | | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
699 | 705 | | |
700 | 706 | | |
701 | 707 | | |
| |||
797 | 803 | | |
798 | 804 | | |
799 | 805 | | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
800 | 812 | | |
801 | 813 | | |
802 | 814 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
65 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
66 | 72 | | |
67 | 73 | | |
68 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
701 | 701 | | |
702 | 702 | | |
703 | 703 | | |
| 704 | + | |
| 705 | + | |
704 | 706 | | |
705 | 707 | | |
706 | 708 | | |
| |||
0 commit comments