Go to the source code of this file.
◆ SNDSRV_DATA_OFFSET
| #define SNDSRV_DATA_OFFSET 4096 |
◆ SNDSRV_E_BUSY
◆ SNDSRV_E_INVAL
| #define SNDSRV_E_INVAL -2 |
◆ SNDSRV_E_PERM
◆ SNDSRV_IOC_ATTACH
◆ SNDSRV_IOC_DETACH
| #define SNDSRV_IOC_DETACH 0x5302 |
◆ SNDSRV_IOC_STATS
◆ SNDSRV_OK
◆ SNDSRV_RING_MAGIC
| #define SNDSRV_RING_MAGIC 0x31565253u /* 'SRV1' */ |
Shared kernel/user ABI between the kernel sound proxy card and a user-space sound server (Process/sndsrv).
The server allocates one DMA buffer through /dev/hwdev, lays a SndRingHdr at its start and a power-of-two data area at SNDSRV_DATA_OFFSET, then passes the buffer's physical address to /dev/sndsrv (SNDSRV_IOC_ATTACH). The kernel only accepts a buffer that really is one of the caller's own DMA allocations. From then on the kernel sound card "virtio-sound" copies the mixer's PCM into the ring (single producer) and the server drains it into the device (single consumer). head/tail are free-running byte counters.