Alexandre Ratchov
f330fa3d4a
If no -f options are used, expose first 4 midi(4) devices to sndiod clients
...
A single default device could be set at ./configure time with
the --default-dev option
2020-04-30 19:06:13 +02:00
Alexandre Ratchov
5750e312db
sndiod: Record if a client belongs to a session
2020-04-30 16:33:08 +02:00
Alexandre Ratchov
5736faa146
Get a reference to the device when "snd/N" MIDI ports are opened
...
As the master output level control is not in software any longer the
device needs to opened for adjustments to work.
2020-04-30 16:27:32 +02:00
Alexandre Ratchov
343f13e33f
Make sure devices are properly closed in case of an error
...
Fixes possible crashes if the contol device fails, while the audio
device continues to work.
2020-04-24 13:35:33 +02:00
Alexandre Ratchov
54839e409a
Properly log CTL_NONE controls
2020-04-15 14:41:21 +02:00
Alexandre Ratchov
573c328527
Don't forget to notify clients when a control is removed
2020-04-15 14:24:59 +02:00
Alexandre Ratchov
3b8a8de5f2
sndiod: Hide controls of unused slots
2020-04-14 05:39:31 +02:00
Alexandre Ratchov
e5f270a89f
If available, use the hardware output.level to control the volume.
...
With this change, there's a single outputs.level control: either the
hardware one or software one. Consequently, there can't be control
name clashes and there's no need to move hardware's top-level controls
into the "hw/" group.
2020-04-13 07:48:18 +02:00
Alexandre Ratchov
fab9b7cb7e
Call dev_ctlsync(), even if there's no control device
...
In the dev_reopen() code-path, the controls of the old device were
removed so all clients must be notified about the controls change.
2020-04-13 07:43:00 +02:00
Alexandre Ratchov
ea0520142e
If no -q options are used, expose first 8 midi(4) devices to sndiod clients
2020-04-02 09:18:44 +02:00
Alexandre Ratchov
3d5dbc6b9f
Don't send "control changed" messages when hardware controls are set.
2020-03-31 09:00:39 +02:00
Alexandre Ratchov
4f7c000acb
Don't forget to notify clients when controls list is ready.
...
This is needed because when devices are swapped, clients need to know
when to rebuild their user interface.
2020-03-08 16:51:37 +01:00
Alexandre Ratchov
cc30ccae23
bump copyright year
2020-02-24 07:00:49 +01:00
Alexandre Ratchov
1bbb66b0c0
Limit max ctl value to c->maxval, not 127.
2020-02-22 16:32:22 +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
012a6cf6db
Remove unused variable
2020-02-10 15:38:47 +01:00
Alexandre Ratchov
7189fcf749
Use '/' as separator in group components.
2020-02-10 15:07:22 +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
1bfe9a4f39
Filter redundant control settings
2020-02-04 15:49:34 +01:00
Alexandre Ratchov
8ca224184c
Merge branch 'master' into mixer
2020-01-28 06:48:49 +01:00
Alexandre Ratchov
cf2e5f1727
Merge xxx_openlist() changes from cvs.
2020-01-23 12:50:20 +01:00
Alexandre Ratchov
ae714a51c4
Merge branch 'master' into mixer
2020-01-23 12:15:06 +01:00
Alexandre Ratchov
f29da850c6
Factor slot->pstate change in slot_attach()
2020-01-23 12:14:46 +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
5f82859275
Put slot unit in its control name rather as control channel number
2020-01-18 12:24:56 +01:00
Alexandre Ratchov
9b20997f58
Make the device hold a reference to its controls.
...
Without this, if "-a on" is used, when the last control client
disconnects, references reach zero and controls are freed.
2020-01-14 18:04:16 +01:00
Alexandre Ratchov
8ecb6c1721
Remove unused variable
2020-01-13 18:36:39 +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
c64f25a5f8
Remove group for hardware controls.
2020-01-13 07:15:36 +01:00
Alexandre Ratchov
8653038e1d
Merge branch 'master' into mixer
2020-01-10 21:12:12 +01:00
Alexandre Ratchov
6d02c2e7a2
Unbreak channel duplication (aka -j option).
...
Fix from Peter Piwowarski <peterjpiwowarski at gmail.com> with few
tweaks from me. Thanks.
2020-01-10 20:04:26 +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
7afde07efd
Merge branch 'master' into mixer
2019-11-27 14:49:01 +01:00
Alexandre Ratchov
c38dfbf530
Initialize nfds fields of new file structures.
...
Fixes possible crash when a new file structure is added in
the time-out processing code-path.
2019-11-27 09:04:04 +01:00
Alexandre Ratchov
fb8bf93f11
Tolerate clients keeping state across sysex message
2019-10-21 00:40:00 +02:00
Alexandre Ratchov
07c9068ff9
Merge branch 'master' into mixer
2019-09-21 09:17:06 +02:00
Alexandre Ratchov
4fad29ecb6
Man-page tweaks from jmc@
2019-09-21 09:15:49 +02:00
Alexandre Ratchov
5536f474fe
Merge branch 'master' into mixer
2019-09-21 08:31:44 +02:00
Alexandre Ratchov
a9ee8951fd
Fix missing word in -F and -Q descriptions.
2019-09-21 07:04:01 +02:00
Alexandre Ratchov
9ba816d28e
Lower the default audio block size from 20ms to 10ms.
...
The new default block size is supported by virtually all devices
which allows switching between devices without further configuration.
The buffer size remains the same, so this change won't affect audio
stability.
ok mpi@
2019-09-21 06:54:59 +02:00
Alexandre Ratchov
441100e812
Allow switching between devices without disconnecting clients, again.
...
The new -F option allows alternate device to be specified. If the
device is disconnected, the one given with the last -f or -F options
will be used instead.
ok mpi@
2019-09-21 06:53:34 +02:00
Alexandre Ratchov
3935da37f6
Setup channel join/expand after channle mapping conversions.
...
The channel mapping conversion calculate the number of channels
actually present on the hardware. This allows to join/expand the right
number of channels.
2019-09-19 09:08:29 +02:00
Alexandre Ratchov
e922c66fc0
Don't set to NULL conversion buffers when initializing the slot.
...
Bug introduced when conversions setup moved to its own routine.
2019-09-18 15:56:08 +02:00
Alexandre Ratchov
7cd9c4b0a9
Don't attempt to join/expand nonexistent channels.
...
If the (hardware) device has fewer channels than the exposed
sub-device and -jon is used, then mix the samples only to channels
that exist on the device.
2019-09-18 09:36:33 +02:00
Alexandre Ratchov
5e033425c0
Move slot convertions setup in its own routine.
2019-09-18 09:34:59 +02:00
Alexandre Ratchov
cf94ce9ae8
Move device buffer allocation to its own routines.
...
This makes the code more readable as device and slot buffer allocation
routines are similar. No behavior change.
2019-09-18 09:30:00 +02:00
Alexandre Ratchov
0310ad45e9
Revert "Allow switching between devices without disconnecting clients."
...
This change was not right: First, upon SIGHUP, next device should be
opened before the old one is closed. Second the migration code doesn't
reinitialize the conversion layer which breaks audio when switching
between devices with different channel counts.
This reverts commit 5bc17e6cea
.
2019-09-18 09:16:58 +02:00