And... we're back to 48Khz probing. Some devices fail to probe with
44.1KHz so when we need to choose between 2 bad things we choose to
do the right thing, which is probe in 48KHz.
Fixes#2857
Assume that capture and playback nodes from a device have different
clocks. This enables the adative resampler to match them. A lot of devices
actually have slightly different rates and would work out of the box
with this fix.
Make an exception when the card is configured in the pro audio profile.
Then we force the same clock on all device nodes and avoid resampling
and rate matching. This can still be changed with a session manager
override.
The pulseaudio channel map can only hold 32 AUX channels and we reuse
them when we need more. When we find a duplicate channel, map it to the
next AUX channels.
Just like the latency, move the codecs to the device Route param.
This way, it is easier for the session manager to save and restore
the codecs as part of the Route settings.
When we store the real_volume we get a hardware_volume as stored
in the mixer and a residual software_volume.
When we read the volume from the card, we need to compare this against
the hardware_volume we stored to check if something changed, not
against the real_volume that also contains the leftover software_volume.
Strip the alibpref from the device string in the mapping name. This
name is used to generate the node name eventually and we don't want
this random identifier in it.
Fixes#1362
Strip the _alibpref from the device name, it contains a local counter
to identify the ucm card that should remain internal. We set a flag on
the device to notify of this.
Re-add the _alibpref of the local card to the device name if the
device was flagged.
See #1286
The alibpref fallback does not contain the card number but it is
a local counter instead. Just check if it starts with something in
case the alsa library is not patched to return _alibpref.
Use _alibpref to check if a device needs a UCM local config. Mark
the device as such and use this to set the OPEN_UCM property on
the device.
Open the UCM for a card when the device has the property set. Use the
same logic for loading the UCM as the acp code.
See #1251
When we enable a device, the node will be created and its software
volume will be set to 100%. Update the device volume with this as
well so that changing the volume has an effect.
Fixes#1198
This replaces the manual check for "true" and some (inconsistent) return value
of atoi. All those instances now require either "true" or "1" to parse as
true, any other value (including NULL) is boolean false.
Reset the software volume when initializing the device and when the
hardware volume is updated.
The software volume was set to 0 by default and if the session manager
did not change the volume enough to cause a software volume change,
it would remain 0 and there would be silence.
Also improve the debug a little.
See #1160#1167#1164#1049#1117
This reverts commit 09106151d3.
We need the actual name and description of the mapping, not the
profile or else we end up with the full profile description in the
node description instead of the part of the profile that applies to
the device.
When we set the volume on a port, make sure we also set the save flag
so that the flag is put into the volume changed event and the session
manager can save it.
Fixes#995
Remove the soft mute/volume events, add a new method to get the soft
volume and use the volume_changed event to emit the changed soft and
monitor (real) volumes event for the node.
Make sure the monitor ports always uses the monitor volume, which is the
real volume unaffected by the mixer volumes.
This configures the soft and real volume on the sink/source in all
cases and makes the monitor port follow the real volume of the sink.
See #897
Add save property to Profile and Route params to notify the session
manager that they should be saved. Let the session manager only save
the Profile and Routes with the save flag.
Make pulse-server set the save flag on Profile and Route changes.
The result is that we can make a difference between user requested
changes and automatical changes and only remember the user preferences.
When a port changes availability, first check if we need to perform
a profile switch, if not select the new best port.
The Pro Audio profile exposes all devices and subdevices with maximum
channel count and no channel layout. It also have no hardware volume
and is more suited for Pro Audio usage.
See #731#704#57
Disable automatic port configuration in acp and move the logic
to the session manager.
Implement initial port selection and restore on profile activation.
Implement route switch when unavailable
Implement port settings save.