Commit graph

72 commits

Author SHA1 Message Date
Wim Taymans
42dd52c7fe acp: clean up card object
Fixes #369
2020-11-09 15:01:07 +01:00
George Kiagiadakis
5c749cf7c3 alsa-acp: bind the acp log func to the spa_log object directly
When the acp-device impl struct is passed to the log func, it is
possible that when this device is removed, another device using acp
is going to crash while logging a message
2020-11-02 08:10:29 +00:00
Wim Taymans
38276d126c acp: improve debug 2020-10-01 13:23:16 +02:00
Wim Taymans
62b882c13d acp: improve debug 2020-10-01 11:32:28 +02:00
Wim Taymans
08438903e5 acp: reset soft volume
When we have accurate enough hardware volume, set the software volume to
1.0. Also fixes the issue of going to 0 volume and then staying silent
until we raise the volume above 1.0.
2020-09-28 12:40:16 +02:00
Wim Taymans
d456893f31 acp-device: just always select the best port/profile for now 2020-09-09 14:12:00 +02:00
Wim Taymans
4a35fcaf09 acp: update Route and Profile param on availability change 2020-09-09 14:10:17 +02:00
Wim Taymans
a956c265a2 acp: also act on new available ports 2020-09-08 16:49:07 +02:00
Wim Taymans
5e368b1ad6 acp: add option to switch profile and ports
Enable an option to switch to the next best profile and port when
the current one becomes unavailable.
2020-09-08 16:39:47 +02:00
Wim Taymans
185a3d4c36 alsa: update route param when profile changed
When the profile changes, also update the route param.
Use defines to index the parameters
2020-09-07 14:32:56 +02:00
Wim Taymans
03f1dfcf99 acp: handle unset profile
The active profile is set to -1 initially, don't try to do anything
with the profile if it is invalid.

See rhbz#1868332
2020-08-17 11:33:17 +02:00
Wim Taymans
90e12299f1 acp: add current profile in the route 2020-08-14 15:09:00 +02:00
Wim Taymans
374210c890 acp: add per device port list
Add the list of possible ports for a device.
Pass the allowed devices in the routes.
Store the active port in the device.

Fixes enumeration of ports on devices with UCM.
2020-08-10 14:25:03 +02:00
Wim Taymans
9943733b8c acp: pass all properties when creating a card
They might contain other info like prefered card name etc.
2020-08-03 18:15:04 +02:00
Wim Taymans
d2452e1340 acp-device: remove sources when destroyed
Or we end up polling wrong fds in an infinite loop.
2020-07-29 12:19:33 +02:00
Wim Taymans
eaf7606e3f acp: pass udev PROFILE_SETS to acp device 2020-07-28 13:00:45 +02:00
Wim Taymans
e478ba7e34 alsa: be safer when parsing device string 2020-07-28 12:51:33 +02:00
Wim Taymans
b896d65723 acp: emit param change when port changed 2020-07-08 16:16:43 +02:00
Wim Taymans
e030445e49 acp: add volume base and step
Add a READONLY property flag to makr properties READONLY
Set the base_volume and volume_step in the acp device
Send the base volume and step as REAONLY properties. Use these
in pulse layer.
2020-07-07 13:12:57 +02:00
Wim Taymans
cf8db93cd4 pod: add HARDWARE flag to spa_pod_prop
Add HARDWARE flag to mark a property that does some hardware control.
Mark the device volume/mute property as HARDWARE or not.
Use the HARDWARE property in pulse to set the right flags.
2020-07-06 17:46:32 +02:00
Wim Taymans
b9d412e618 monitor: add device event
Add device events and signal soft volume with an object config
event.
2020-07-06 17:25:05 +02:00
Wim Taymans
1612f5e4d2 alsa-acp: Add libacp based card device
libacp is a port and wrapper around the pulseaudio card profile code.
It uses a set of templates for construct a card profile and mixer port
settings. It also has support for UCM when available for the hardware.
2020-07-06 12:20:09 +02:00