Commit graph

627 commits

Author SHA1 Message Date
Juho Hämäläinen
9ffca4ecd5 common: Remove set_parameters callback from card data. 2022-02-24 14:48:12 +02:00
Juho Hämäläinen
c359126658 common: Remove unused enums. 2022-02-24 14:48:12 +02:00
Juho Hämäläinen
73f93f1967 common: Remove _VSID define. 2022-02-24 14:48:12 +02:00
Juho Hämäläinen
5d4a5af1f5 common: Rename quirks to options and use normal modargs for parsing. 2022-02-24 14:48:10 +02:00
Juho Hämäläinen
532f6c55bf common: Update audio enum header.
Use current droid version 11 as base.
2022-02-24 09:08:28 +02:00
Juho Hämäläinen
1ac75ed3b0 common: Remove legacy from converter, parse channels as values. 2022-02-24 09:08:26 +02:00
Juho Hämäläinen
c02f917ebb common: Parser uses new config structures. 2022-02-24 09:08:21 +02:00
Juho Hämäläinen
4ca8716bd1 common: Use replace in place from utils in parser. 2022-02-24 09:08:21 +02:00
Juho Hämäläinen
67eeb83105 common: Parser supports new xml attributes. 2022-02-24 09:08:21 +02:00
Juho Hämäläinen
9e4c6fa8f1 common: Update config structures.
Match xml format style.
2022-02-24 09:08:17 +02:00
Juho Hämäläinen
40c320bc07 common: Add two string utility functions. 2022-02-24 09:08:14 +02:00
Juho Hämäläinen
eefdb31f57 common: Simple list implementation. 2022-02-24 09:08:11 +02:00
Juho Hämäläinen
b4fb20eafe common: Always use expat implementation for parser. 2022-02-23 10:27:49 +02:00
Juho Hämäläinen
fdd22b6949 common: Remove legacy conversion header. 2022-02-23 10:22:22 +02:00
Juho Hämäläinen
17fcb9e074 common: Remove legacy parser. 2022-02-23 10:21:03 +02:00
Juho Hämäläinen
1e992b6954 build: Update flag checks for current version. 2022-02-23 09:23:27 +02:00
Juho Hämäläinen
1daab94724 build: Expat is mandatory. 2022-02-23 09:23:03 +02:00
Juho Hämäläinen
0898217179 Bump packaging version. 2022-02-21 09:34:20 +02:00
Juho Hämäläinen
dbc7d678bb
Merge pull request #112 from jusa/new-api
New API for calling HAL functions.
2022-02-21 09:31:03 +02:00
Juho Hämäläinen
ef56dd4964 README: Add section about pa_shared based API. 2022-02-18 15:45:32 +02:00
Juho Hämäläinen
1cc2a0822e common: New API for calling HAL functions.
New pa_shared based API for calling HAL functions so that other modules
needing these functions don't need to link with libdroid.

[common] New API for calling HAL functions. JB#55832
2022-02-18 15:45:32 +02:00
Juho Hämäläinen
8df3961333
Merge pull request #111 from g7/for-upstream/mer-hybris/no-channels
common: Handle profiles with no supported channels
2022-02-18 15:10:19 +02:00
Eugenio Paolantonio (g7)
b23e20db5c common: Handle profiles with no supported channels
When a profile doesn't have any supported channels, pa_conversion_parse_*_channels
returns false even though the parsing itself succeeded.
This in turn makes the parsing to be aborted altogether.

Handle this case by properly ignoring the profile.

This commit changes the pa_conversion_parse_*_channels functions so that
they return the channel count, or -1 if the parsing has been unsuccessful.

[common] Handle profiles with no supported channels

Signed-off-by: Eugenio Paolantonio (g7) <me@medesimo.eu>
2022-02-18 13:15:21 +01:00
Juho Hämäläinen
9c6842e7d9 Bump packaging version. 2021-10-08 15:43:09 +03:00
Juho Hämäläinen
0d739ca587
Merge pull request #109 from jusa/jb55711
Use more generic stream property for audio source.
2021-10-08 15:42:31 +03:00
Juho Hämäläinen
1781dab3b8 common: Use more generic stream property for audio source.
[common] Use more generic stream property for audio source. JB#55711
2021-10-08 15:20:58 +03:00
Juho Hämäläinen
98d2c7358a Bump packaging version. 2021-10-08 08:32:35 +03:00
Juho Hämäläinen
11a09b005d
Merge pull request #108 from jusa/jb55711
Enable custom audio sources with input streams.
2021-10-08 08:31:12 +03:00
Juho Hämäläinen
d9e2ddfd72 common: Fix segfault with adaptations which assume empty adress is not NULL.
Some adaptations don't check for NULL before using the address which
leads to a crash. Let's just use empty string for address.

[common] Fix segfault with adaptations which assume empty adress is not NULL. Fixes JB#55831
2021-10-08 08:30:12 +03:00
Juho Hämäläinen
baecfc7cdd source: Use source-output proplist when reconfiguring input stream.
Use updated functions from common which utilize proplist when reconfiguring
input stream.

[source] Use source-output proplist when reconfiguring input stream. JB#55711
2021-10-07 12:06:31 +03:00
Juho Hämäläinen
2d7ee841ed common: Allow custom audio source based on property.
When reconfiguring input stream set custom audio source if one
is defined in droid.input.source property. Allowed values are
audio source fancy names listed in
string_conversion_table_audio_source_fancy.

[common] Allow custom audio source based on property. JB#55711
2021-10-07 12:04:52 +03:00
Juho Hämäläinen
4103c31aec common: Add generic converter for fancy audio sources.
[common] Add generic converter for fancy audio sources.
2021-10-07 12:00:59 +03:00
Juho Hämäläinen
8283bbe5c9 Bump packaging version. 2021-05-06 13:11:14 +03:00
Juho Hämäläinen
42af5e85c5
Merge pull request #107 from jusa/jb53992
Add quirks standby_set_route and speaker_before_voice.
2021-05-06 13:10:28 +03:00
Juho Hämäläinen
a676accf88 common: Add quirk speaker_before_voice.
Set route to speaker before changing audio mode to AUDIO_MODE_IN_CALL.
Some devices don't get routing right if the route is something else
(like AUDIO_DEVICE_OUT_WIRED_HEADSET) before calling set_mode().

[common] Add quirk speaker_before_voice. JB#53992
2021-05-05 16:05:36 +03:00
Juho Hämäläinen
446ac62a6e common: Add quirk standby_set_route.
Some devices don't like to receive set_parameters() call while they
are in write(), even if it seems the mutexes are correctly in place.
Standby is another synchronization point which seems to work better.

[common] Add quirk standby_set_route. JB#53992
2021-05-05 16:02:51 +03:00
Juho Hämäläinen
edec25347e Bump packaging version. 2021-04-22 15:40:52 +03:00
Juho Hämäläinen
8f936ba66f
Merge pull request #104 from jusa/bt_sco
Set BT_SCO parameter for Bluetooth routes.
2021-04-22 15:39:48 +03:00
Juho Hämäläinen
5be0189b91 common: Set BT_SCO parameter for Bluetooth routes.
Some adaptations need parameter BT_SCO set before enabling Bluetooth
HFP/HSP routes. It should be fine to set this parameter for adaptations
which don't need it as they would just ignore a parameter that is
unknown.

[common] Set BT_SCO parameter for Bluetooth routes. Fixes JB#53996
2021-04-21 22:59:19 +03:00
Juho Hämäläinen
38b07e6d45 Bump packaging version. 2021-03-25 21:43:13 +02:00
Juho Hämäläinen
eac4b34d39
Merge pull request #103 from jusa/volume_control
Avoid segfault when voice call starts with deferred volume.
2021-03-25 21:42:14 +02:00
Juho Hämäläinen
3f1cc042bc sink: Avoid segfault when voice call starts with deferred volume.
Calling pa_sink_set_write_volume_callback() from main
thread changes a callback pointer in pa_sink which is
accessed from io thread.

When audio is playing and voice call starts there is a
window where the callback is changed to NULL while io
thread is using it, causing a segfault.

[sink] Avoid segfault when voice call starts with deferred volume. JB#53687
2021-03-25 13:52:56 +02:00
Juho Hämäläinen
b310103c0f Bump packaging version. 2021-03-23 18:11:06 +02:00
Juho Hämäläinen
898aacd38e
Merge pull request #102 from jusa/volume_control
Improvements to volume control.
2021-03-23 18:09:28 +02:00
Juho Hämäläinen
4414037c47 sink: Add option to prewrite silence always.
In some cases silence prewrite needs to be done even if the target
device is already active. In this case new "/always" modifier can
be used to enable prewriting always. For example:

prewrite_on_resume=deep_buffer=AUDIO_DEVICE_OUT_SPEAKER:2/always

[sink] Add option to prewrite silence always. JB#53590
2021-03-23 18:08:41 +02:00
Juho Hämäläinen
c9c66b4750 sink: Apply channel average volume to stream.
HAL implementations expect identical volume for both channels
anyway.

[sink] Apply channel average volume to stream. JB#53590
2021-03-23 18:08:02 +02:00
Juho Hämäläinen
65483884ae sink: Enable deferred volume for hw volume control.
Make sure volume changes are applied in between writing to hardware
to avoid volume glitches. As the writing is blocking we cannot synchronize
the changes from main thread easily so better to apply the changes
when nothing is written.

[sink] Enable deferred volume for hw volume control. JB#53590
2021-03-23 18:08:02 +02:00
Juho Hämäläinen
6ef0459669
Merge pull request #101 from jusa/cal
Add quirk for audio calibration.
2021-03-23 18:06:48 +02:00
Juho Hämäläinen
f01f0a53a7 source: Get hw module with new function in stand alone mode.
[source] Get hw module with new function in stand alone mode.
2021-03-18 11:54:12 +02:00
Juho Hämäläinen
997a9c87de sink: Get hw module with new function in stand alone mode.
[sink] Get hw module with new function in stand alone mode.
2021-03-18 11:53:53 +02:00