Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
meta-nemo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
NemoMobile
meta-nemo
Commits
ab8b05d8
Commit
ab8b05d8
authored
Jan 27, 2017
by
Florent Revest
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pulseaudio-modules-droid: Adds a patch that forces a mono source for QCOM devices
parent
ea5184ab
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
0 deletions
+61
-0
0003-droid-util-Use-a-mono-input-stream.patch
...dules-droid/0003-droid-util-Use-a-mono-input-stream.patch
+61
-0
No files found.
recipes-multimedia/pulseaudio/pulseaudio-modules-droid/0003-droid-util-Use-a-mono-input-stream.patch
0 → 100644
View file @
ab8b05d8
From 7e24454a1498db6b186885fa2d11166129378db0 Mon Sep 17 00:00:00 2001
From: Florent Revest <revestflo@gmail.com>
Date: Fri, 27 Jan 2017 14:08:25 +0100
Subject: [PATCH] droid-util: Use a mono input stream
---
src/common/droid-util.c | 26 ++++++--------------------
1 file changed, 6 insertions(+), 20 deletions(-)
diff --git a/src/common/droid-util.c b/src/common/droid-util.c
index 87dea5b..e119f8d 100644
--- a/src/common/droid-util.c
+++ b/src/common/droid-util.c
@@ -1698,17 +1698,9 @@
pa_droid_stream *pa_droid_open_input_stream(pa_droid_hw_module *module,
audio_channel_mask_t hal_channel_mask = 0;
pa_channel_map channel_map;
pa_sample_spec sample_spec;
- bool voicecall_record = false;
struct audio_config config_in;
size_t buffer_size;
-#if DROID_HAL >= 2
- if ((devices & ~AUDIO_DEVICE_BIT_IN) & AUDIO_DEVICE_IN_VOICE_CALL)
-#else
- if (devices & AUDIO_DEVICE_IN_VOICE_CALL)
-#endif
- voicecall_record = true;
-
channel_map = *map;
sample_spec = *spec;
@@ -1726,20 +1718,14 @@
pa_droid_stream *pa_droid_open_input_stream(pa_droid_hw_module *module,
hal_channel_mask |= c;
}
- if (voicecall_record) {
- pa_channel_map_init_mono(&channel_map);
- sample_spec.channels = 1;
- /* Only allow recording both downlink and uplink. */
-#if defined(QCOM_HARDWARE)
- #if ANDROID_VERSION_MAJOR == 5 && ANDROID_VERSION_MINOR == 1
- hal_channel_mask = AUDIO_CHANNEL_IN_MONO;
- #else
- hal_channel_mask = AUDIO_CHANNEL_IN_VOICE_CALL_MONO;
- #endif
+ pa_channel_map_init_mono(&channel_map);
+ sample_spec.channels = 1;
+ /* Only allow recording both downlink and uplink. */
+#if ANDROID_VERSION_MAJOR == 5 && ANDROID_VERSION_MINOR == 1
+ hal_channel_mask = AUDIO_CHANNEL_IN_MONO;
#else
- hal_channel_mask = AUDIO_CHANNEL_IN_VOICE_UPLINK | AUDIO_CHANNEL_IN_VOICE_DNLINK;
+ hal_channel_mask = AUDIO_CHANNEL_IN_VOICE_CALL_MONO;
#endif
- }
memset(&config_in, 0, sizeof(struct audio_config));
config_in.sample_rate = sample_spec.rate;
--
2.11.0
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment