Verification done on the Disco, it fixed the problem.
On the lenovo P520, I installed the disco (19.04), edit the /etc/apt/sources.list to add disco-proposed repository, then run apt-get update abd sudo apt install pulseaudio, now the pulseaudio is:
ii pulseaudio 1:12.2-2ubuntu3.1 amd64 PulseAudio sound server
ii pulseaudio-utils 1:12.2-2ubuntu3.1 amd64 Command line tools for the PulseAudio sound server
recording: plug a mic into the front audio jack, and select it from sound-setting, use arecord to record sound, after recording, unplug the front mic and plug it to rear mic, use arecord to record sound again, it still can record sound.
playback: plug a headphone to rear lineout and select lineout as output device, then play sound via totem, after a while, close the totem and unplug the rear lineout and plug the headphone to front headphone jack, use totem to play sound, I can hear the sound from front headphone.
Verification done on the Disco, it fixed the problem.
On the lenovo P520, I installed the disco (19.04), edit the /etc/apt/ sources. list to add disco-proposed repository, then run apt-get update abd sudo apt install pulseaudio, now the pulseaudio is:
ii pulseaudio 1:12.2-2ubuntu3.1 amd64 PulseAudio sound server
ii pulseaudio-utils 1:12.2-2ubuntu3.1 amd64 Command line tools for the PulseAudio sound server
recording: plug a mic into the front audio jack, and select it from sound-setting, use arecord to record sound, after recording, unplug the front mic and plug it to rear mic, use arecord to record sound again, it still can record sound.
playback: plug a headphone to rear lineout and select lineout as output device, then play sound via totem, after a while, close the totem and unplug the rear lineout and plug the headphone to front headphone jack, use totem to play sound, I can hear the sound from front headphone.