Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save javelinanddart/51c6a70481252d36c643c9cbcc5a5b56 to your computer and use it in GitHub Desktop.
Save javelinanddart/51c6a70481252d36c643c9cbcc5a5b56 to your computer and use it in GitHub Desktop.
From d91907ea59bfe7cb7d1cce5e06a80b60bc3c920a Mon Sep 17 00:00:00 2001
From: Paul Keith <javelinanddart@gmail.com>
Date: Thu, 26 Apr 2018 15:47:34 +0200
Subject: [PATCH 1/1] hlte-common: audio: Override pcm_id for
USECASE_VOICE2_CALL
* Samsung appears to use PCM ID 43 for USECASE_VOICE2_CALL on stock
* The tipoff for an incorrect PCM ID was that the audio HAL was
complaining about being unable to open /dev/snd/pcmC0D22p
because of an invalid argument, even though the device existed
(/dev/snd/pcmC0D22p is the PCM playback device with id 22, which
is the default PCM ID for USECASE_VOICE2_CALL for MSM8974)
* The correct PCM ID was discovered by checking lsof during a call
using USECASE_VOICE2_CALL on stock, and finding that the open
devices were /dev/snd/pcmC0D43p and /dev/snd/pcmC0D43c, which
are the PCM playback and capture devices with id 43 - which
happens to be the proper PCM ID for USECASE_VOICE2_CALL for us
Change-Id: I1d886e4f22fc3a1884ed39ae3c08d17652b3f17b
---
audio/audio_platform_info.xml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/audio/audio_platform_info.xml b/audio/audio_platform_info.xml
index c93c89c..0df7867 100644
--- a/audio/audio_platform_info.xml
+++ b/audio/audio_platform_info.xml
@@ -55,7 +55,11 @@
</backend_names>
<pcm_ids>
- <!-- empty -->
+ <!-- Output devices -->
+ <usecase name="USECASE_VOICE2_CALL" type="out" id="43"/>
+
+ <!-- Input devices -->
+ <usecase name="USECASE_VOICE2_CALL" type="in" id="43"/>
</pcm_ids>
<device_names>
--
2.7.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment