Commit graph

323 commits

Author SHA1 Message Date
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
Juho Hämäläinen
5c4c8d0ea0 [build] Check for various enums in droid headers. 2017-01-19 18:31:25 +02:00
Juho Hämäläinen
1b3da56e22 [build] Add macro for testing droid header contents. 2017-01-19 18:31:25 +02:00
Juho Hämäläinen
6bc52dac61 [util] Lower logging level of unknown values. 2017-01-19 18:31:25 +02:00
Juho Hämäläinen
fb87162518 [util] Use API version from droid headers.
No need to define the API version in conversion headers.
2017-01-19 18:31:23 +02:00
elros34
c996f6bf25 [util] Use mako set_parameters hack also on moto_msm8960_jbbl based devices. 2017-01-17 00:39:54 +01:00
Juho Hämäläinen
e28d1e22d3 Merge pull request #56 from jusa/dev
Better implementation of combined profile and some fixes.
2016-06-14 15:27:49 +03:00
Juho Hämäläinen
24c4d5ca2a [util] Add all profiles with combined profile as well.
When creating combined profile add all normal profiles to the profile
set as well. This way all the possible configurations can be enabled
with combined profile use case as well.
2016-06-14 12:49:04 +03:00
Juho Hämäläinen
660d23a332 [util] Implement combined profile properly. Fixes JB#35462 2016-06-14 12:05:12 +03:00
Juho Hämäläinen
5658b693a1 [util] Make sure audio_config struct is cleared before use. 2016-06-10 12:04:37 +03:00
Juho Hämäläinen
aae59e6bbc [util] Set initial device to current active for new streams.
When a stream is created and there already exists a stream with active
routing use the device of currently active routing as the initial
device. This way we minimize the risk of confusing the HAL by writing to
two streams with differing routes.
2016-06-10 11:30:49 +03:00