[Replicant] PROBING AUDIO LINES ON THE i9305 Samsung Galaxy SIII LTE
Joshua Brown
lovell_josh at hotmail.co.uk
Fri Aug 11 12:52:52 UTC 2023
Oops ... forwarded the wrong thing ... manually forwarding this time
... sorry for spam ...
Hi yes. I got some data with tinymix from tinyalsa on lineageos. I am
yet to restore the settings whilst running scintill replicant 6 but will
keep you posted on that maybe. A bit early to be posting results yet
therefore, but will do so anyway.
Below is the diff I made from in-call vs out of call, and two scripts I
wrote to get/restore settings. The format is tab delimited: <controlnum>
<controlname> <value>
Hope this helps.
--- controls_nocall.txt 2023-08-09 22:13:49.164769816 +0100
+++ controls_call.txt 2023-08-09 22:13:56.744770041 +0100
@@ -22,14 +22,14 @@
21 IN1R Volume 10
22 IN1R Switch On
23 IN1R ZC Switch Off
-24 IN2L Volume 26
+24 IN2L Volume 28
25 IN2L Switch On
26 IN2L ZC Switch Off
27 IN2R Volume 11
28 IN2R Switch On
29 IN2R ZC Switch Off
30 MIXINL IN2L Volume 0
-31 MIXINL IN1L Volume 1
+31 MIXINL IN1L Volume 0
32 MIXINL Output Record Volume 0
33 MIXINL IN1LP Volume 0
34 MIXINL Direct Voice Volume 0
@@ -65,18 +65,18 @@
64 SPKR Input Volume 1
65 SPKR IN1RP Volume 1
66 SPKR Output Volume 1
-67 Speaker Mixer Volume 3 3
-68 Speaker Volume 57 57
+67 Speaker Mixer Volume 0 0
+68 Speaker Volume 0 0
69 Speaker Switch On On
70 Speaker ZC Switch Off Off
-71 Speaker Boost Volume 6 6
+71 Speaker Boost Volume 0 0
72 Speaker Reference SPKVDD/2
73 Speaker Mode Class D
74 Headphone Volume 45 45
75 Headphone Switch On On
76 Headphone ZC Switch Off Off
-77 LINEOUT1N Switch Off
-78 LINEOUT1P Switch Off
+77 LINEOUT1N Switch On
+78 LINEOUT1P Switch On
79 LINEOUT1 Volume 1
80 LINEOUT2N Switch Off
81 LINEOUT2P Switch Off
@@ -97,7 +97,7 @@
96 AIF2DAC Volume 96 96
97 AIF1 Boost Volume 0
98 AIF2 Boost Volume 0
-99 AIF1DAC1 EQ Switch On
+99 AIF1DAC1 EQ Switch Off
100 AIF1DAC2 EQ Switch Off
101 AIF2 EQ Switch Off
102 AIF1DAC1 DRC Switch Off
@@ -116,7 +116,7 @@
115 Sidetone HPF Mux 2.7kHz
116 Sidetone HPF Switch Off
117 AIF1ADC1 HPF Mode HiFi
-118 AIF1ADC1 HPF Switch On On
+118 AIF1ADC1 HPF Switch Off Off
119 AIF1ADC2 HPF Mode HiFi
120 AIF1ADC2 HPF Switch Off Off
121 AIF2ADC HPF Mode HiFi
@@ -150,8 +150,8 @@
149 AIF2ADCL DAT Invert Off
150 AIF2ADCR DAT Invert Off
151 HP Switch Off
-152 SPK Switch On
-153 RCV Switch Off
+152 SPK Switch Off
+153 RCV Switch On
154 FM In Switch Off
155 LINE Switch Off
156 HDMI Switch Off
@@ -184,12 +184,12 @@
183 AIF1DAC Mux AIF1DACDAT
184 DAC1R Mixer Right Sidetone Switch Off
185 DAC1R Mixer Left Sidetone Switch Off
-186 DAC1R Mixer AIF2 Switch Off
+186 DAC1R Mixer AIF2 Switch On
187 DAC1R Mixer AIF1.2 Switch Off
188 DAC1R Mixer AIF1.1 Switch On
189 DAC1L Mixer Right Sidetone Switch Off
190 DAC1L Mixer Left Sidetone Switch Off
-191 DAC1L Mixer AIF2 Switch Off
+191 DAC1L Mixer AIF2 Switch On
192 DAC1L Mixer AIF1.2 Switch Off
193 DAC1L Mixer AIF1.1 Switch On
194 Right Sidetone ADC/DMIC1
#!/system/bin/sh
#run with: ./get_control_values.sh 2>/dev/null 1>controls.txt
#format: <control num> <control name> <value>
if [ "$(which tinymix)" = "" ]; then
tinymix="./tinymix"
else
tinymix="tinymix"
fi
if [ "$tinymix" = "tinymix" ]; then
controls="$($tinymix -D 0)"
first="no"
second="no"
third="no"
printf "%s\n" "$controls" | while read line; do
if [ "$first" = "yes" ]; then
if [ "$second" = "yes" ]; then
if [ "$third" = "yes" ]; then
printf "%s\t%s\t%s\t%s\n"
"$(echo "$line" | cut -f 1)" "$(echo "$line" | cut -f 4 | rev | grep -o
" .*" | grep -o "[A-Z|a-z|0-9].*" | rev)" "$(echo "$line" | grep -o "
.*" | grep -o "[A-Z|a-z|0-9].*")" fi third="yes" fi
second="yes"
fi
first="yes"
done
else
controls="$($tinymix -D 0 controls)"
first="no"
second="no"
printf "%s\n" "$controls" | while read line; do
if [ "$first" = "yes" ]; then
if [ "$second" = "yes" ]; then
value="$($tinymix -D 0 get $(echo
"$line" | cut -f1) | cut -d "(" -f1)" if [ "$(echo "$value" |
grep ">")" != "" ]; then value="$(echo "$value" | cut -d '>'
-f2 2>/dev/null | cut -d ',' -f1 | tr -d " ")" elif [ "$(echo
$value | cut -d ',' -f1)" = "Off" ]; then value="0"
elif [ "$(echo $value | cut -d ','
-f1)" = "On" ]; then value="1"
fi
printf "%s\t%s\t%s\n" "$(echo "$line" |
cut -f1)" "$(echo "$line" | cut -f 4)" "$value" fi
second="yes"
fi
first=yes
done
fi
#!/system/bin/sh
#format: <control num> <control name> <value>
if [ -f "$1" ]; then
echo "Attempting to set controls using file $1"
fi
if [ "$(which tinymix)" = "" ]; then
tinymix="./tinymix"
else
tinymix="tinymix"
fi
cat "$1" | while read line; do
control="$(echo "$line" | cut -f 2)"
value="$(echo "$line" | cut -f 3)"
if [ "$value" != "unknown" ] && [ "$value" != "" ]; then
checkforerror="$($tinymix set "$control" $value 2>&1)"
if [ "$?" = 0 ] && [ "$(echo "$checkforerror" | grep
"Error:")" = "" ] ; then echo "Successfully set control $control"
else
echo "control $control ... $(echo
$checkforerror | grep -o "Error:.*")" fi
else
echo "control $control ... Not setting; value is
unknown or blank" fi
done
More information about the Replicant
mailing list