1.8 KiB
title, type, source, source_url, author, handle, post_id, date, archived, draft, tags, description, in_reply_to
| title | type | source | source_url | author | handle | post_id | date | archived | draft | tags | description | in_reply_to | |||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Settings I'm using for snd_pcm_sw_params for ALSA, don't have docs for all of this, seems to work. | archive | https://x.com/NOTimothyLottes/status/2072506103401754653 | NOTimothyLottes | NOTimothyLottes | 2072506103401754653 | 2026-07-02 | 2026-08-23 | true |
|
Settings I'm using for snd_pcm_sw_params for ALSA, don't have docs for all of this, seems to work. |
Source
- URL: https://x.com/NOTimothyLottes/status/2072506103401754653
- Author: NOTimothyLottes (@NOTimothyLottes)
- Posted: 2026-07-02 02:22:15
Thread
1/
Settings I'm using for snd_pcm_sw_params for ALSA, don't have docs for all of this, seems to work. I'm doing 64 frame period size on a double buffer right now without any thread priority, and not getting xruns, so not yet sure of bad behavior
I put in a forced thread sleep between writes to force a xrun, and SNDRV_PCM_IOCTL_WRITEI_FRAMES kernel call then returns -32, in which case I run a SNDRV_PCM_IOCTL_PREPARE and then just get back to the write loop, seems to restore normal playback just fine.
3/
I reduced asound.h to this basically, the most minimal thing I found I needed. Now I also rename a few things (like structure names), and my IOCTL macros are slightly different in composition than standard.
After getting this far, it actually looks quite easy, but the route to this was filled with garbage sifting because I couldn't easily find someone else who did this kind of minimalization. I'm only supporting 48KHz stereo 16-bit signed, with double buffering = keep it simple.