No sound from front headphone jack on MSI TRX40 Pro WiFi

I'm trying to get sound working from the front headphone jack in Ubuntu 20.04 on an MSI TRX40 Pro WiFi. The motherboard has a slightly wonky setup where the audio apparently comes from a USB audio device, so it shows up in the various mixers (alsamixer, the Sound panel in Settings) as "USB Audio". When headphones are plugged in, the system correctly detects that they are plugged in, but no sound comes out of the headphones.

From searching around on Google, I found advice to disable auto-mute in alsamixer, but alsamixer doesn't have that option listed at all.

The really interesting thing is that I can get audio from the headphone jack by selecting the right device using aplay. The devices found by aplay -l:

**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA ATI HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA ATI HDMI], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA ATI HDMI], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: ALC1220VBDT [ALC1220-VB-DT], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: ALC1220VBDT [ALC1220-VB-DT], device 1: USB Audio [USB Audio #1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: ALC1220VBDT [ALC1220-VB-DT], device 2: USB Audio [USB Audio #2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: ALC1220VBDT [ALC1220-VB-DT], device 3: USB Audio [USB Audio #3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

[Ignore the HDMI audio; that's the GPU's audio support, which does actually work -- as long as I want to play sound out of the monitor speakers]

If I choose audio device hw:1,1 I can get aplay to play a wav file and hear it through the headphones on the front jack:

aplay -Dhw:1,1 a2002011001-e02.wav

So if I could somehow get the various systemwide mixers to use hw:1,1 as their output everything would work fine (I think).

I saw that this chipset has some issues in Linux, and read through this (long) kernel bug report. So maybe all this would be fixed by using the topic/usb-trx40 branch of https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/ ? But I'm hesitant to go that route if there's a simple way to get it working here.

Summary: front panel sound works if I manually select the right device using aplay -D, can't figure out how to get any other mixer to use that device.

1
задан 19 August 2020 в 03:43

1 ответ

I managed to fix this with the following combination of ALSA, PulseAudio, and kernel patches:

  1. ALSA: https://github.com/alsa-project/alsa-ucm-conf/pull/25 . I didn't rebuild the package, I just dropped the two new files in /usr/share/alsa/ucm2/USB-Audio/.
  2. PulseAudio: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/292 . I used apt-get source pulseaudio to get the source, applied the patch, and then used dpkg-source --commit to tell dpkg about the patch info. Then I rebuilt the pulseaudio packages with dpkg-buildpackage -rfakeroot and installed them.
  3. The topic/usb-trx40 branch of this kernel tree: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/log/?h=topic/usb-trx40 . This is slightly tricky because I'm using ZFS, so I had to apply the ZFS patches as well as documented here: https://forum.level1techs.com/t/building-custom-kernel-with-zfs-built-in/117464

I'm not completely certain that all three are necessary, but they are sufficient. Sound works now!

0
ответ дан 21 August 2020 в 07:55

Другие вопросы по тегам:

Похожие вопросы: