Wim Taymans
af3f18b489
acp: add channel layout and map channels
2020-11-23 15:31:10 +01:00
Wim Taymans
42dd52c7fe
acp: clean up card object
...
Fixes #369
2020-11-09 15:01:07 +01:00
Wim Taymans
5a98a9b1cd
alsa: reload alsa configuration
...
Fixes #332
2020-11-05 10:00:25 +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
0320eca79e
pulse-server: add port_type and availability-group
2020-10-28 12:18:26 +01:00
Wim Taymans
8116da41b9
acp: use properties for port type and available group
2020-10-28 11:48:24 +01:00
Wim Taymans
f3dda8e57b
pulse: Use the right conversion functions for volumes
...
PulseAudio uses cubic volumes and PipeWire uses linear volumes
so use the right conversion functions from one to the other.
2020-10-22 19:34:47 +02:00
Jan Grulich
743cf58fb7
Define SPA_FALLTHROUGH to make fall-through annotations work for all compilers
...
This is needed for example for Clang compiler which uses different
annotations than GCC. It will make WebRTC to happily use PipeWire
since the spa library is header-only and WebRTC defaults to use
Clang with -Wimplicit-fallthrough.
2020-10-22 13:31:19 +02:00
Wim Taymans
c1ea63fa7a
alsa-pcm: try to recover in all cases
...
Even if we can't get the current status, still try to recover the
device.
See #347
2020-10-22 09:16:45 +02:00
Wim Taymans
df912a9059
acp: fix > 2 channel maps
2020-10-15 09:46:14 +02:00
Wim Taymans
477d6e0b7f
acp: fixup impossible decibel ranges
2020-10-13 17:24:23 +02:00
Wim Taymans
4e9b81960f
acp: sync
2020-10-13 17:23:36 +02:00
Wim Taymans
e7585bd7b8
acp: handle devices with no ports
...
Make sure we don't crash when there are no ports on a device.
See #321
2020-10-08 18:05:49 +02:00
Wim Taymans
9e3ae3a045
acp: improve debug
2020-10-01 13:27:08 +02:00
Wim Taymans
c0c439ff76
acp: avoid profile switch to the current profile
2020-10-01 13:23:20 +02:00
Wim Taymans
971236e77a
acp: don't fall back to the highest priority unavailable
...
Use the Off profile in case there are no yes/unknown profiles.
2020-10-01 13:23:20 +02:00
Wim Taymans
e394c5145a
acp: only emit profile change for current profile
...
When a port is plugged/unplugged, first update all the profile states
and then emit a profile change only for the current profile. This way
the device can look at all the updated profiles to select the best one.
2020-10-01 13:23:20 +02: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
735eefa2fb
acp: pass right user_data to event
2020-10-01 11:31:52 +02:00
Wim Taymans
41db0f35b3
acp: sync with latests
2020-09-30 12:56:05 +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
d13181fb37
acp: prefer some other profile than Off
...
The Off profile is always available but we should only use it as the
ultimate fallback when all other profiles are NO.
Fixes #309
2020-09-28 11:39:09 +02:00
Wim Taymans
a97287351c
acp: use flag for the Off profile
2020-09-28 11:32:36 +02:00
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