Skip to content

Commit aed5d7b

Browse files
author
Mattijs Korpershoek
committed
feat(android): Document audio capture bug
We received an e2e error for an audio capture bug. Document the steps that are needed to solve it by providing a patch and links to other patches that need to be applied. Signed-off-by: Mattijs Korpershoek <[email protected]>
1 parent bd02d22 commit aed5d7b

File tree

4 files changed

+98
-0
lines changed

4 files changed

+98
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
From 110fbd20bfd39fec96fcfecc87be3c497a2cb5c3 Mon Sep 17 00:00:00 2001
2+
From: Guillaume La Roque <[email protected]>
3+
Date: Fri, 27 Sep 2024 09:57:44 +0200
4+
Subject: [PATCH] audio: update default value for audio capture(in)
5+
6+
Actually in code buffer size check is done to compare period size and count
7+
for xml with default value(IN_PCM_BUFFER_SIZE_DEFAULT), if xml value
8+
was higher than default we use default but default value was low.
9+
10+
To support more hardware we need to set a default value to higher
11+
value to give possibility to set period size and count with xml file and
12+
each hardware should define in audio_policy_configuration.xml period
13+
size and period count value accordly to hardware capabilities instead of
14+
doing limitation in source code.
15+
16+
For example on TI AM62P 256 for period size is too low we need actually 512
17+
to be able to do capture.
18+
19+
Signed-off-by: Guillaume La Roque <[email protected]>
20+
---
21+
audio/audio_hw.c | 6 +++---
22+
1 file changed, 3 insertions(+), 3 deletions(-)
23+
24+
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
25+
index 3aa24b0e8185..60f512da2fe2 100644
26+
--- a/audio/audio_hw.c
27+
+++ b/audio/audio_hw.c
28+
@@ -66,10 +66,10 @@
29+
#define OUT_CHANNEL_COUNT_DEFAULT 2
30+
#define OUT_RATE_DEFAULT 44100
31+
32+
-#define IN_PERIOD_SIZE_DEFAULT 256
33+
-#define IN_PERIOD_COUNT_DEFAULT 4
34+
+#define IN_PERIOD_SIZE_DEFAULT 1024
35+
+#define IN_PERIOD_COUNT_DEFAULT 16
36+
#define IN_CHANNEL_MASK_DEFAULT AUDIO_CHANNEL_IN_MONO
37+
-#define IN_CHANNEL_COUNT_DEFAULT 1
38+
+#define IN_CHANNEL_COUNT_DEFAULT 2
39+
#define IN_RATE_DEFAULT 44100
40+
41+
#define IN_PCM_BUFFER_SIZE_DEFAULT \
42+
--
43+
2.47.0
44+

source/devices/AM62PX/android/Release_Specific_Release_Notes.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,8 @@ Known Issues
119119
- Some commands don't work from native console, but work via adb shell
120120
- N/A
121121
- N/A
122+
123+
* - `e2e 1410786 <https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1410786/sk-am62p-lp-analog-input-microphone-connected-to-3-5mm-jack-not-working>`_
124+
- Analog Input Microphone connected to 3.5mm jack not working
125+
- Apply :download:`this patch <0001-audio-update-default-value-for-audio-capture-in.patch>` in :file:`external/tinyhal`, `patch 1 <https://git.ti.com/cgit/android/device-ti-am62x/commit/?h=d-android14-release&id=15025d9dc1039469dd1260c837684edb17f991c1>`_ and `patch 2 <https://git.ti.com/cgit/android/device-ti-am62x/commit/?h=d-android14-release&id=61f86f096f71825df6665bb4e15110a5f5d74aea>`_ in :file:`device/ti/am62x`
126+
- N/A
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
From 110fbd20bfd39fec96fcfecc87be3c497a2cb5c3 Mon Sep 17 00:00:00 2001
2+
From: Guillaume La Roque <[email protected]>
3+
Date: Fri, 27 Sep 2024 09:57:44 +0200
4+
Subject: [PATCH] audio: update default value for audio capture(in)
5+
6+
Actually in code buffer size check is done to compare period size and count
7+
for xml with default value(IN_PCM_BUFFER_SIZE_DEFAULT), if xml value
8+
was higher than default we use default but default value was low.
9+
10+
To support more hardware we need to set a default value to higher
11+
value to give possibility to set period size and count with xml file and
12+
each hardware should define in audio_policy_configuration.xml period
13+
size and period count value accordly to hardware capabilities instead of
14+
doing limitation in source code.
15+
16+
For example on TI AM62P 256 for period size is too low we need actually 512
17+
to be able to do capture.
18+
19+
Signed-off-by: Guillaume La Roque <[email protected]>
20+
---
21+
audio/audio_hw.c | 6 +++---
22+
1 file changed, 3 insertions(+), 3 deletions(-)
23+
24+
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
25+
index 3aa24b0e8185..60f512da2fe2 100644
26+
--- a/audio/audio_hw.c
27+
+++ b/audio/audio_hw.c
28+
@@ -66,10 +66,10 @@
29+
#define OUT_CHANNEL_COUNT_DEFAULT 2
30+
#define OUT_RATE_DEFAULT 44100
31+
32+
-#define IN_PERIOD_SIZE_DEFAULT 256
33+
-#define IN_PERIOD_COUNT_DEFAULT 4
34+
+#define IN_PERIOD_SIZE_DEFAULT 1024
35+
+#define IN_PERIOD_COUNT_DEFAULT 16
36+
#define IN_CHANNEL_MASK_DEFAULT AUDIO_CHANNEL_IN_MONO
37+
-#define IN_CHANNEL_COUNT_DEFAULT 1
38+
+#define IN_CHANNEL_COUNT_DEFAULT 2
39+
#define IN_RATE_DEFAULT 44100
40+
41+
#define IN_PCM_BUFFER_SIZE_DEFAULT \
42+
--
43+
2.47.0
44+

source/devices/AM62X/android/Release_Specific_Release_Notes.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,8 @@ Known Issues
115115
- Some commands don't work from native console, but work via adb shell
116116
- N/A
117117
- N/A
118+
119+
* - `e2e 1410786 <https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1410786/sk-am62p-lp-analog-input-microphone-connected-to-3-5mm-jack-not-working>`_
120+
- Analog Input Microphone connected to 3.5mm jack not working
121+
- Apply :download:`this patch <0001-audio-update-default-value-for-audio-capture-in.patch>` in :file:`external/tinyhal`, `patch 1 <https://git.ti.com/cgit/android/device-ti-am62x/commit/?h=d-android14-release&id=15025d9dc1039469dd1260c837684edb17f991c1>`_ and `patch 2 <https://git.ti.com/cgit/android/device-ti-am62x/commit/?h=d-android14-release&id=61f86f096f71825df6665bb4e15110a5f5d74aea>`_ in :file:`device/ti/am62x`
122+
- N/A

0 commit comments

Comments
 (0)