Wim Taymans
9dfd261c71
add some more debug info
2020-09-25 17:01:52 +02:00
Wim Taymans
c6358c4ed5
alsa: add and install spa-acp-tool
2020-09-23 11:37:53 +02:00
Wim Taymans
66cc13cc56
acp: update properties correctly
...
After modifying the properties, update the exported dictionary again
because the memory might have changed.
Fixes #304
2020-09-22 12:40:21 +02:00
Wim Taymans
1bf6dead10
alsa: add option to force a samplerate
2020-09-16 15:14:26 +02:00
Wim Taymans
8332d3e3ed
alsa: don't change the resampler delay value
...
Don't change the resampler delay value, we need it to make sure
we keep samples around for the next round. With small period sizes,
we set the delay to 0 and mess up the resampler and cause dropouts
and clicking.
Fixes #287
2020-09-15 13:22:41 +02:00
Wim Taymans
2b0b44edc0
alsa: add option do use chmap from alsa, disable by default
...
This should be more in line with what PulseAudio does and so lead
to less surprises.
See #289
2020-09-14 20:19:44 +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
6e339200af
acp: improve port and profile index select
...
Keep 3 options, the available ports, unknown and highest priority
other ports.
2020-09-09 14:08:15 +02:00
Wim Taymans
5f38562d38
acp: remove active_port_index
...
It is not clear if the port index is in the card or device port array
and it doesn't work when many ports are active. So simply iterate the
device ports and find the ones with the active flag set.
2020-09-09 13:57:33 +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
cfdd6cab20
acp: fix UCM off profile
2020-08-18 16:52:09 +02:00
Wim Taymans
a67af43cad
alsa: sync with latest pulseaudio
...
Move some things around to make it easier to merge in changes.
2020-08-18 12:41:34 +02:00
Emmanuel Gil Peyrot
14fdf07e8f
Run codespell on the entire codebase
...
This tool detects and fixes common English spelling mistakes, with
generally very few mistakes.
Here is the command I used to generate this commit. There were a few
changes that had to be done manually, and of course adding the ignore
file:
```shell
codespell -I .codespell-ignore -x .codespell-ignore -w
```
I didn’t add it to the CI, but this would be a good place for it.
2020-08-17 17:16:31 +00: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
dadb3a884d
profile: refactor code to make EnumProfile and Profile params
...
Use the same code to enumerate the profiles and the current profile,
this makes sure we have all info in the Profile param as well and
don't need to do a lookup in the EnumProfile.
2020-08-17 11:08:26 +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
77bd687bac
acp: fix size of array
2020-08-04 12:05:56 +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
7f7a8ccc88
acp: use some existing keys and add some new ones
2020-08-03 17:08:46 +02:00
Wim Taymans
a655e8f6df
alsa-util: fix check for digit
...
Fix the check for a digit by checking if the value is between the
*character* '0' (not *value* 0) and '9'.
2020-08-03 10:10: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
1d7ca5bdae
add udev rules so we don't rely on pulseaudio
2020-07-28 13:11:17 +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
154f981f97
Add mixer paths and profile-sets as well
...
So we don't have to rely on pulseaudio installed ones
2020-07-28 12:30:32 +02:00
Wim Taymans
3f33c9c81d
acp: sync with latest
2020-07-28 10:16:47 +02:00
Wim Taymans
ca5836cdf4
alsa: fix delay parameter
...
We need to keep twice the delay of samples around. Fixes capture
with resampling.
2020-07-27 16:22:17 +02:00
Wim Taymans
8f3771a56c
alsa-pcm: also follow resampler insize when resampling
...
Use the input size of the resampler as the amount of samples to
read when we are resampling.
2020-07-27 15:57:27 +02:00
Wim Taymans
875236631f
acp: don't ignore return value
2020-07-21 15:42:04 +02:00
Wim Taymans
a459c1f226
acp: sync with master
2020-07-13 14:39:27 +02:00
Wim Taymans
ee59bcd632
acp: emit volume/mute changes on change
2020-07-08 17:24:23 +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
d80d593271
acp: add support for soft volume
...
Add a set_soft_volume/mute event.
If we can't configure the hardware volume completely, notify
the remainder with the soft_volume/mute events.
2020-07-06 17:22:42 +02:00
Wim Taymans
ea6dfe204c
acp: don't install library for now
2020-07-06 12:58:33 +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
Wim Taymans
698509ef55
alsa: set classes in the profile
...
parse classes in the pulse layer
2020-07-01 13:39:10 +02:00
Wim Taymans
1ee8944a2a
alsa: improve debug
2020-07-01 13:16:37 +02:00
Wim Taymans
8168dfdbc1
alsa-pcm: allow setting number of channels
...
Allow passing the number of channels when creating a device to
restrict the negotiated channels.
2020-07-01 12:54:27 +02:00
Wim Taymans
267eabaf69
alsa: add default channel map when not given
2020-07-01 12:46:03 +02:00
Wim Taymans
f65d71dd5b
alsa: support planar formats
2020-07-01 11:43:25 +02:00
Wim Taymans
7d88c37e5b
alsa-seq: clear the midi event queue on close to avoid leak
2020-06-02 17:13:53 +02:00
Wim Taymans
d2bd076a97
alsa: close output handler to avoid a leak
2020-06-02 17:13:26 +02:00
Wim Taymans
a19bab4b16
avoid following NULL pointers
2020-05-20 15:24:25 +02:00