1
0
mirror of https://github.com/ericonr/sndio.git synced 2024-02-18 04:45:21 -06:00
Commit Graph

357 Commits

Author SHA1 Message Date
Alexandre Ratchov
0c3fd96693 Fix confusion between ALSA output and input periods count.
This could cause the play start threshold to be larger than the play
buffer in turn causing playback to never start.
2020-06-12 22:28:44 +02:00
Alexandre Ratchov
c531dda0ad Reword and simplify certain sentinces
From schwarze@
2020-05-25 14:27:48 +02:00
Alexandre Ratchov
b043bfcf32 Use .Nm sndio to refer to the sndio library
From schwarze@
2020-05-25 14:27:44 +02:00
Alexandre Ratchov
0da4d5ba34 Add Xr for aucat, midicat and sndioctl
From schwarze@
2020-05-25 14:27:30 +02:00
Alexandre Ratchov
f8795c056d Replace off-topic parts of the desciption by an architecture overview
Remove useless (re)wording of what are audio(4) and midi(4), add a
quick description of sndiod as intermediate layer. Try to focuse on
what the sndio library and sndiod do instead of how they do it. As
suggested by schwarze, use the word "device descriptor" instead of
"device name" to avoid the common confusion with the device files.

Remove information already given in same sentence;

Tweaks from jmc@
2020-05-19 10:18:29 +02:00
Alexandre Ratchov
7433055e88 Use hardcoded rsnd/0 as openbsd default (hardware) device 2020-04-30 17:41:37 +02:00
Alexandre Ratchov
8d24dd3ef8 sioctl_sun.c: If no "xxx.mute" control is found, try "xxx_mute" 2020-04-30 17:25:22 +02:00
Alexandre Ratchov
fcb50e68af man pages to cvs 2020-04-24 08:59:57 +02:00
Alexandre Ratchov
0f21b42d41 mixerctl and audioctl moved to section 8 2020-04-24 08:56:27 +02:00
Alexandre Ratchov
1d644ba2a8 Fix .Dt and Mdocdate in man pages 2020-02-26 18:13:17 +01:00
Alexandre Ratchov
2c894cc701 Bump sioctl_open.3 copyright year. 2020-02-26 18:12:02 +01:00
Alexandre Ratchov
cc30ccae23 bump copyright year 2020-02-24 07:00:49 +01:00
Alexandre Ratchov
c2226012ed Remove SIOCTL_DEVANY 2020-02-22 14:55:40 +01:00
Alexandre Ratchov
e55971c61e Add "maxval" attribute to sioctl_desc structure.
As control may have different max values, make sndioctl
expose floats in the [0:1] range.
2020-02-22 14:52:20 +01:00
Alexandre Ratchov
2207b5e6db Represent sndioctl controls as floats in the [0:1] interval 2020-02-22 10:34:40 +01:00
Alexandre Ratchov
b62a7eef6f Expose sun mixer master knobs in the top-level group.
This allows the same master knobs to be available no matter
if sndiod is running or net.
2020-02-08 15:50:56 +01:00
Alexandre Ratchov
9bec976a73 Crank library minor as this sioctl_xxx are new interfaces 2020-02-06 22:21:48 +01:00
Alexandre Ratchov
94515589f5 Rename wskbd_vol to volume 2020-02-05 17:32:23 +01:00
Alexandre Ratchov
1bfe9a4f39 Filter redundant control settings 2020-02-04 15:49:34 +01:00
Alexandre Ratchov
7f7fce942f Use non-blocking mode for all sioctl_aucat_xxx bits. 2020-02-04 15:48:15 +01:00
Alexandre Ratchov
21e52f9c4c Remove more unused USE_ALSA_MIXER tests. 2020-01-29 07:15:07 +01:00
Alexandre Ratchov
0575c9f2e1 Use new /dev/audioctlN read(2) interface 2020-01-29 07:04:30 +01:00
Alexandre Ratchov
3030ab2c66 Remove unused USE_ALSA_MIXER tests. 2020-01-29 06:16:19 +01:00
Alexandre Ratchov
a077f6a7f3 Fix forgotten node->str to node->name changes 2020-01-23 12:20:13 +01:00
Alexandre Ratchov
0ac817ab82 Rename node->str to node->name3 2020-01-23 07:38:14 +01:00
Alexandre Ratchov
f51534ae26 Rename sioctl_chan to sioctl_node 2020-01-23 07:16:27 +01:00
Alexandre Ratchov
0031ec4a72 Use "hw" group for hw controls to get stable control names.
To ensure chained sndiod controls get unique names, we prefix
groups sndiod creates with "dev".
2020-01-21 06:39:00 +01:00
Alexandre Ratchov
d8e69e7e93 Remove SIOCTL_HALF 2020-01-17 06:34:38 +01:00
Alexandre Ratchov
1534d4f816 s/SIOCTL_INTMAX/SIOCTL_VALMAX 2020-01-16 07:47:23 +01:00
Alexandre Ratchov
74ae9cda72 Make the control group a simple string.
To handle nested devices, just prefix the group with the "dev."
prefix. To avoid namespace conflicts, put program controls in a
new "app" group.

The "master.level" control is renamed to "output.level" to match the
hardware name. This way snd/0 and rsnd/0 end-up with the same control
name.
2020-01-13 09:27:06 +01:00
Alexandre Ratchov
9edbee2bc1 sioctl_sun: Rename spkr->output, mic->input. 2020-01-13 07:19:55 +01:00
Alexandre Ratchov
c64f25a5f8 Remove group for hardware controls. 2020-01-13 07:15:36 +01:00
Alexandre Ratchov
5a0fc8feb7 Move hw control in "inputs" and "outputs" groups 2020-01-11 11:01:56 +01:00
Alexandre Ratchov
ddf18ab3e1 Allow "snd/default" style syntax 2020-01-03 15:41:30 +01:00
Alexandre Ratchov
d2057194b1 Rename _setctl -> _setval and _onctl -> _onval 2020-01-03 15:30:06 +01:00
Alexandre Ratchov
6e83bb6a4f Rename siomix -> sioctl, stop using "mixer" word. 2020-01-03 15:19:25 +01:00
Alexandre Ratchov
df7fa2512c Revert "siomix_sun: poll the mixer fd to detect when device is gone."
This reverts commit aceffe4729.
2019-08-31 10:18:49 +02:00
Alexandre Ratchov
aceffe4729 siomix_sun: poll the mixer fd to detect when device is gone.
This doesn't work yet, as the audio(4) driver doesn't properly
wakeup processes waiting in the poll syscall, see audio_detach()
2019-08-30 17:02:54 +02:00
Alexandre Ratchov
f92eed1da9 Add SIOMIX_NONE control, to represent deleted controls. 2019-08-30 16:43:35 +02:00
Alexandre Ratchov
4f5ac3cdb6 Merge branch 'master' into mixer 2019-07-28 11:27:10 +02:00
Alexandre Ratchov
436f0dbfff Fix builds with no DEBUG defined. 2019-07-28 11:26:51 +02:00
Alexandre Ratchov
939300b1bb Merge branch 'master' into mixer 2019-07-12 08:31:01 +02:00
Alexandre Ratchov
285eafeec0 Add affinity between the program and its mixer control.
Currently, if there are two instances of the same program, sndiod will
allocate one volume control to each. If both programs disconnect and
reconnect, the information of which control is assigned to which
program is lost. This makes difficult to run two instances of a player
and crossfade between each other with a MIDI controller.

To address this, the program chooses a 32-bit "id" (for now the
process pid) and sends it to the server. The server records the id in
the client's slot structure.  When the server accepts a new
connection, it uses the id to identify the slot the client used during
the previous connection; if it was not recycled yet, it's assigned to
the program.
2019-07-12 08:31:01 +02:00
Alexandre Ratchov
7e15b80ed3 Add forgottend copyright notice. 2019-07-06 00:34:06 +02:00
Alexandre Ratchov
cbdd29c403 alsa: use (blksz - round) as start threshold.
The threshold making poll() return POLLOUT is one block (according to
alsa library sources). If a poll-based program writes blksz - 1
samples, playback never starts but poll won't return POLLOUT either.
In turn the program deadlocks. The problem could be observed in the
sio_alsa_xrun() routine.
2019-07-01 17:12:00 +02:00
Alexandre Ratchov
f9c0bed6d9 Check return values of syscalls against -1 in OSS code 2019-07-01 17:10:55 +02:00
Alexandre Ratchov
9e13d35c30 Merge branch 'master' into mixer 2019-07-01 09:24:43 +02:00
Alexandre Ratchov
934e1611e8 Check return values of syscalls against -1, from deraadt@. 2019-07-01 09:20:22 +02:00
Alexandre Ratchov
3886e0681d Merge branch 'master' into mixer 2019-03-28 11:18:37 +01:00
Alexandre Ratchov
6ac10f167b Wait until the server disconnects before closing the socket.
When the socket is closed, the last bytes written may be lost.
2019-03-28 08:13:59 +01:00