Still unsolved for me.
Details (analysis, learning)
- The phone is running pulseaudio in user mode, started via systemd, as seen by
systemctl --user status pulseaudio.
- The pulseaudio source for regular sound can be found by
pacmd list-sources | grep -A11 'index: 2'
flags: HARDWARE HW_MUTE_CTRL DECIBEL_VOLUME
- However during a call all pulseaudio sources are suspended, as verified by
pacmd list-sources | grep 'state:'
- So for a regular run of the Jolla app “Audio recorder”, the source
source.droid is active and thus command like
pacmd set-source-volume source.droid 50000 will work, and will reduce the microphone sensitivity.
- The description of the used pulseaudio module from
https://github.com/mer-hybris/pulseaudio-modules-droid-jb2q has a hint, it says that
When voicecall virtual profile is enabled, active droid-sink is internally switched to voicecall volume control mode. What this means is changing the sink volume or volume of normal streams connected to the sink do not change active voicecall volume.
- Used version and arguments of the module can be seen by
argument: <rate=48000 quirks=+unload_call_exit,+audio_cal_wait,+no_hw_volume,+speaker_before_voice,+standby_set_route>
load once: no
module.author = "Juho Hämäläinen"
module.description = "Droid card"
module.version = "14.2.94"
- During calls the pulseaudio card is set to profile
voicecall and there is a virtual sink-input now, detectable with
1 sink input(s) available.
flags: START_CORKED NO_REMAP NO_REMIX
sink: 2 <sink.null>
volume: front-left: 48211 / 74% / -8,00 dB, front-right: 48211 / 74% / -8,00 dB
current latency: 0,00 ms
requested latency: n/a
sample spec: s16le 2ch 44100Hz
channel map: front-left,front-right
resample method: speex-fixed-2
media.name = "Virtual Stream for MainVolume Volume Control"
media.role = "phone"
policy.group = "internal"
policy.stream_flags = hex:00000000
module-stream-restore.id = "sink-input-by-media-role:phone"
- Using the hardware sound volume buttons, I can change the volume of this virtual sink-input, but I have yet to find a way to change the microphone sensitivity, it seems that this has to be done elsewhere and is not done in pulseaudio.
- In a search for where pulseaudio might get its idea of microphone sensitivity, I found the configuration that are read by
- In a neigbouring file
/vendor/etc/audio_platform_info.xml there is data about microphone sensitivity, but it is unclear who interprets this file.
- There is an official(?) repo for the Android port to the phone device-sony-pdx201/rootdir/vendor/etc at master · sonyxperiadev/device-sony-pdx201 · GitHub
- There are people developing a LineageOS port, which also have these files like GitHub - lineageos-on-pdx201/android_device_sony_pdx201
- It may make a difference at which sensitivity levels the phone is set to before flashing.
- It may make a difference when the phone is flashed because of the Android version on there. (I did flash the phone late and upgraded a lot of Android versions.)
Both could explain the difference some people are seeing with the same device.
Still puzzled, hints welcome.