]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda - let hs_mic be picked ahead of hp_mic
authorHui Wang <hui.wang@canonical.com>
Thu, 25 Jun 2020 08:38:33 +0000 (16:38 +0800)
committerTakashi Iwai <tiwai@suse.de>
Thu, 25 Jun 2020 13:00:45 +0000 (15:00 +0200)
commit627a046da8456e4338763b1c9a00f04de1f2fcd9
tree668ea2971b4bb37756c23561163a0d6d7ca5b622
parentb539d91238ca4ff3e07d18c6c79a78a9c11be511
ALSA: hda - let hs_mic be picked ahead of hp_mic

We have a Dell AIO, there is neither internal speaker nor internal
mic, only a multi-function audio jack on it.

Users reported that after freshly installing the OS and plug
a headset to the audio jack, the headset can't output sound. I
reproduced this bug, at that moment, the Input Source is as below:
Simple mixer control 'Input Source',0
  Capabilities: cenum
  Items: 'Headphone Mic' 'Headset Mic'
  Item0: 'Headphone Mic'

That is because the patch_realtek will set this audio jack as mic_in
mode if Input Source's value is hp_mic.

If it is not fresh installing, this issue will not happen since the
systemd will run alsactl restore -f /var/lib/alsa/asound.state, this
will set the 'Input Source' according to history value.

If there is internal speaker or internal mic, this issue will not
happen since there is valid sink/source in the pulseaudio, the PA will
set the 'Input Source' according to active_port.

To fix this issue, change the parser function to let the hs_mic be
stored ahead of hp_mic.

Cc: stable@vger.kernel.org
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20200625083833.11264-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_auto_parser.c