Cleanup "tips and tricks" section + move "future stuff" section
This commit is contained in:
parent
d27be5c7f4
commit
0f5bec78c4
1 changed files with 18 additions and 14 deletions
32
alsa_info.md
32
alsa_info.md
|
|
@ -1052,6 +1052,9 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
---
|
---
|
||||||
## Tips and tricks
|
## Tips and tricks
|
||||||
|
|
||||||
|
### Threading
|
||||||
|
|
||||||
* Thread safety
|
* Thread safety
|
||||||
* Opening audio devices is thread safe and returns a handle
|
* Opening audio devices is thread safe and returns a handle
|
||||||
* User is responsible for serializing acces to handle-related functions
|
* User is responsible for serializing acces to handle-related functions
|
||||||
|
|
@ -1059,18 +1062,28 @@ int main(int argc, char **argv)
|
||||||
* Standalone (non-handle) functions are thread safe though
|
* Standalone (non-handle) functions are thread safe though
|
||||||
* Disable multi-thread support at runtime
|
* Disable multi-thread support at runtime
|
||||||
* LIBASOUND_THREAD_SAFE=0
|
* LIBASOUND_THREAD_SAFE=0
|
||||||
* Check the official examples
|
|
||||||
* The API doesn't work as you would think it works
|
|
||||||
* Check alsa-utils
|
|
||||||
|
|
||||||
|||
|
|||
|
||||||
## Tips and tricks
|
## Tips and tricks
|
||||||
|
|
||||||
|
### Where to get.... 'ideas'
|
||||||
|
|
||||||
|
* Check the official examples
|
||||||
|
* The API doesn't work as you would expect
|
||||||
|
* Check alsa-utils
|
||||||
|
* Contains more examples than listed on their doxygen website
|
||||||
* Check alsa-mixer for volume control implementation
|
* Check alsa-mixer for volume control implementation
|
||||||
* Human ear is an a-hole
|
* Human ear is an a-hole
|
||||||
* Check PortAudio/PulseAudio/JACK/...
|
* Check PortAudio/PulseAudio/JACK/...
|
||||||
* Not just for 'code ideas'
|
* Not just for 'code ideas'
|
||||||
* You can use them iso ALSA
|
* You can use them iso ALSA
|
||||||
* But check performance impact
|
* But check performance impact
|
||||||
|
|
||||||
|
|||
|
||||||
|
## Tips and tricks
|
||||||
|
|
||||||
|
#### Why doesn't X work?
|
||||||
|
|
||||||
* Useful tools
|
* Useful tools
|
||||||
* aplay
|
* aplay
|
||||||
* list all devices: aplay -l
|
* list all devices: aplay -l
|
||||||
|
|
@ -1079,22 +1092,13 @@ int main(int argc, char **argv)
|
||||||
* snd_pcm_drain
|
* snd_pcm_drain
|
||||||
* Comment in PortAudio:src/hostapi/alsa/pa_linux_alsa.c:AlsaStop: "snd_pcm_drain can hang forever."
|
* Comment in PortAudio:src/hostapi/alsa/pa_linux_alsa.c:AlsaStop: "snd_pcm_drain can hang forever."
|
||||||
* Commit from 2013...
|
* Commit from 2013...
|
||||||
|
|
||||||
|||
|
|
||||||
## Tips and tricks
|
|
||||||
* ALSA output devices startup behaviour
|
|
||||||
* Need to be prefilled with 2 * period_size
|
|
||||||
* Just because
|
|
||||||
* If not... xrun after a while
|
|
||||||
* Configured audio devices
|
* Configured audio devices
|
||||||
* /proc/asound/cards
|
* /proc/asound/cards
|
||||||
* State of sound devices stored persistently
|
* State of sound devices stored persistently by alsa-utils
|
||||||
* Alsa-utils
|
|
||||||
* /var/lib/alsa/asound.state
|
* /var/lib/alsa/asound.state
|
||||||
* Can be disabled
|
* Can be disabled
|
||||||
|
|
||||||
|
---
|
||||||
|||
|
|
||||||
## Future stuff
|
## Future stuff
|
||||||
ALSA/alsa-lib introduced usecase managers
|
ALSA/alsa-lib introduced usecase managers
|
||||||
* Headset
|
* Headset
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue