Triggering is only needed if device is in mmap mode, and in mmap example the device is triggered as part of syncgroup. For non-mmap mode, triggering is not needed at all. Triggering mmap'ed device too early would start the IPTR/OPTR counters and that would cause those pointers to be out of sync, so let syncgroup do the triggering once the device is fully configured and ready for capture and playback.
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
I renamed the commit "sound examples" instead of just "sound", so make sure to update it in your local tree as well. That being said, unless I'm missing something, the commit message is misleading. You are saying "don't trigger the device unconditionally" but your patch removes triggering altogether. I know the syncgroup will do the triggering itself, but the title suggests that we keep some manual triggering, just not unconditionally, which is not exactly the case.
| share/examples/sound/oss.h | ||
|---|---|---|
| 219 | Is this needed if the triggering is done by sound(4)? | |
| share/examples/sound/oss.h | ||
|---|---|---|
| 219 | The triggering will still happen, just through syncgroup, so I think it is needed. I don't have any device that doesn't support triggering, so I can't say from experience. Do you know a way how to test it? | |
| share/examples/sound/oss.h | ||
|---|---|---|
| 219 | PCM_CAP_TRIGGER is set unconditionally in sound(4) and never actually used. The triggering happens without checking it, so the code here is practically a no-op. | |