Commit graph

333 commits

Author SHA1 Message Date
Juho Hämäläinen
18154fa18a Merge pull request #68 from jusa/jb40147
Fix voicecall record with certain devices.
2017-10-24 10:35:48 +03:00
Juho Hämäläinen
3fdfa2cfcd [common] Use correct input mapping with voicecall record. Fixes JB#40147 2017-10-23 17:53:09 +03:00
Juho Hämäläinen
5d3b262d75 [build] Check for voice uplink and downlink enums. JB#40147 2017-10-23 17:49:35 +03:00
Juho Hämäläinen
c37905ab01 Merge pull request #66 from jusa/dev
Use hooks with voice volume control.
2017-09-27 11:02:27 +03:00
Juho Hämäläinen
49636784a3 [sink] Use hooks for voice volume control. Fixes JB#39621
With hooks we have less of a chance of race issue when switching to and
from voice volume control. Using subscription system is bad as the
messages are not passed synchronously, whereas hooks are.
2017-09-26 16:25:58 +03:00
Juho Hämäläinen
67a9ab3922 [sink] Set volume control callbacks properly with hw volume.
Volume control callbacks wouldn't be properly set for a device with
hardware volume when starting the sink, only after switching to voice
volume control and back.
2017-09-26 16:13:13 +03:00
Juho Hämäläinen
dc698c834e Merge pull request #65 from jusa/dev
Fix output channel conversion.
2017-09-04 14:42:17 +03:00
Juho Hämäläinen
887177a194 [common] Fix output channel conversion. JB#39594
AUDIO_DEVICE_IN_ALL contains AUDIO_DEVICE_BIT_DEFAULT,
like AUDIO_DEVICE_OUT_ALL, which meant that config was
always filled with input channels, even when device
was output device. Fix the logic so that correct channel
mask is generated for output device as well.
2017-09-04 12:48:11 +03:00
Juho Hämäläinen
f0e679dbc1 [sink] Fix segfault when running standalone sink.
We need to check droid mapping pointer as well.
2017-09-04 12:48:04 +03:00
Juho Hämäläinen
d0ae6ca081 [common] Have correct type for function. 2017-09-04 10:46:10 +03:00
Juho Hämäläinen
d53995823d Merge pull request #64 from jusa/jb38419
Update droid source's input stream handling.
2017-04-27 14:09:59 +03:00
Juho Hämäläinen
d6ddfd2397 [common] Add AUDIO_SOURCE_FM_TUNER to input source table. 2017-04-27 14:05:49 +03:00
Juho Hämäläinen
a5c6c0cba8 [source] Remove extra routing control functions. JB#38419 2017-04-27 14:05:49 +03:00
Juho Hämäläinen
8a0ffcd174 [card] Remove voicecall-record implementation. JB#38419
New source doesn't need any special control with different devices,
so we can just remove the whole voicecall source controlling
functionality and handle everything in the source.
2017-04-27 14:05:49 +03:00
Juho Hämäläinen
9055f905f2 [common] Log active quirks only once. 2017-04-27 14:05:49 +03:00
Juho Hämäläinen
3727a32daf [source] Add inline function for reading. 2017-04-27 14:05:47 +03:00
Juho Hämäläinen
dd5db1f3a2 [sink] Add inline function for writing. 2017-04-27 14:05:47 +03:00
Juho Hämäläinen
f164adfccf [source] Remove voicecall source code. JB#38419
Since the changes to channel map etc are done in the route changing
code, we don't need special voicecall source anymore. Remove all code
related to that from source and card.
2017-04-27 14:05:47 +03:00
Juho Hämäläinen
18e52c31bf [common] Refactor stream route set function.
As we are now updating source route in the IO thread we cannot update
the source proplist when changing routing. Since it's not really that
important information and updating the audio source in main context is
quite a lot of work for small benefit, remove the proplist changing code
and refactor route setting to one function.
2017-04-27 14:05:47 +03:00
Juho Hämäläinen
c59e5b3d0a [source] Close input stream by default. Fixes JB#38419
When changing source port, by default we will now close the input
stream, set the new parameters, and reopen the stream. At the same time
it is possible that the channel count or buffer size of the input stream
needs to change (mainly for voicecall recording case, where we need to
use mono channel map for best compatibility across different devices).
It is also possible to revert to older behavior where input stream is
always around, using quirks=-close_input

We also now start droid source always in suspended state. We still need
to open the input stream for a while to get stream buffer size and
sample rate.
2017-04-27 14:05:47 +03:00
Juho Hämäläinen
eebd937511 [common] Refactor buffer round up. 2017-04-27 14:05:47 +03:00
Juho Hämäläinen
0f76cd2adb [source] Move standby call to stream open. 2017-04-27 14:05:47 +03:00
Juho Hämäläinen
0565eee3b5 [common] Refactor stream opening operations. JB#38419 2017-04-27 14:05:44 +03:00
Juho Hämäläinen
a4ffe4e44b Merge pull request #63 from jusa/quirks
Add dynamic setup for quirks.
2017-03-17 10:15:04 +02:00
Juho Hämäläinen
41f2ad8881 [card] Add module arg for setting quirks. JB#38005 2017-03-16 17:24:58 +02:00
Juho Hämäläinen
cbeb0f1b2e [common] Use dynamic quirks in addition to compile time setup. JB#38005
Instead of determining only on compile time which quirks to use, add
possibility to change which quirks are enabled.
2017-03-16 17:24:55 +02:00
Juho Hämäläinen
e0c325217f [README] Update readme about new header defines. 2017-02-13 11:26:21 +02:00
Juho Hämäläinen
06578a7665 Revert "[util] Use mako set_parameters hack also on moto_msm8960_jbbl based devices."
This reverts commit c996f6bf25.

Using ATOI fix for the device fixes input device routing without side
effects.
2017-02-13 11:16:45 +02:00
Juho Hämäläinen
0255b44106 Merge pull request #62 from kimmoli/mer1752
MER#1752
2017-02-13 11:15:25 +02:00
Kimmo Lindholm
4cdd88ba7b [util] Fix last ifdefs to have_enum checks 2017-02-12 17:34:00 +02:00
Kimmo Lindholm
d1104fd113 [util] Audio api major version bitwise operation fix 2017-02-12 16:03:38 +02:00
Kimmo Lindholm
0316c62cc1 [util] define QCOM_HARDWARE earlier 2017-02-12 14:49:39 +02:00
Kimmo Lindholm
ccdbb52cf0 [build] use android-config include during enum check 2017-02-12 13:21:11 +02:00
Juho Hämäläinen
4ea95ed6ed Merge pull request #61 from jusa/mer1744
Extend config parser.
2017-01-27 10:35:44 +02:00
Juho Hämäläinen
0719b25a86 [util] Extend config parser. Fixes MER#1744
New audio_policy.conf files contain new sections with new values as well
as global_configuration section per-module.

Currently other than using per-module global_configuration we ignore all
the values, but extend the parser so that when the new config values are
needed it's easier to parse them.
2017-01-26 14:57:50 +02:00
Simonas Leleiva
08f19dad20 Merge pull request #60 from jusa/mer1741
Fix build for various devices and parse audio configuration a bit better.
2017-01-24 16:37:50 +02:00
Juho Hämäläinen
5319729574 [util] Don't use IN_VOICE_CALL_MONO if it's not defined. 2017-01-23 17:18:17 +02:00
Juho Hämäläinen
96df77fadf [modules] Fix some warnings. 2017-01-23 17:18:17 +02:00
Juho Hämäläinen
f9c51119c8 [build] Check for a couple more enums. 2017-01-23 17:18:17 +02:00
Juho Hämäläinen
2017e6193a [util-audio] Conditional IN_ALL_USB. 2017-01-23 17:18:17 +02:00
Juho Hämäläinen
4a41dcd33e [util] Allow dynamic module/output/input count. Fixes MER#1741 2017-01-23 17:18:14 +02:00
Juho Hämäläinen
9486de758e Merge pull request #59 from jusa/dev
Fix build.
2017-01-20 12:06:10 +02:00
Juho Hämäläinen
46ffb90e5e [util] Fix warning. 2017-01-20 12:00:07 +02:00
Juho Hämäläinen
036c877c67 [util] Relocate VSID define.
Since AUDIO_API_VERSION_MAJ is defined outside current header, need to
move the definition.
2017-01-20 11:58:43 +02:00
Juho Hämäläinen
c14265b8c8 [util] Test for surround channel availability. Fixes JB#37353
Also remove incorrect duplicate _TELEPHONY_RX entry.
2017-01-20 11:48:23 +02:00
Juho Hämäläinen
6377270467 [build] Check for surround channel enum. 2017-01-20 11:46:22 +02:00
Juho Hämäläinen
54c8642d95 [util] Check for all input flags separately. Fixes JB#37353 2017-01-19 18:45:30 +02:00
Juho Hämäläinen
0515ff85df Merge pull request #57 from elros34/master
Use mako set_parameters hack also on moto_msm8960_jbbl based devices.
2017-01-19 18:36:32 +02:00
Juho Hämäläinen
4774b1b876 Merge pull request #58 from jusa/dev
Better support for future droid versions.
2017-01-19 18:35:07 +02:00
Juho Hämäläinen
996a8dd2eb [util] Replace version specific conversion headers. Fixes JB#37353
Instead of having version specific header files use one where most of
the values are common and device/version specific values are compile
time dynamic.

See configure.ac CC_CHECK_DROID_ENUM lines for how to add checks for
additional enum values.
2017-01-19 18:31:25 +02:00