搭载 Linux 内核 5.4.0-60-generic 的 Alfawise X5 上声音无法正常工作

搭载 Linux 内核 5.4.0-60-generic 的 Alfawise X5 上声音无法正常工作

我有一台 Alfawise X5,它安装了两个声音设备,一个是由英特尔凌动 X5-Z8350 处理器(片上系统,Cherry Trail 系列)提供的 HDMI 声音,另一个是似乎由 RealTek ALC5651 驱动的耳机插孔(至少该芯片位于电路板上离音频插孔不远的地方,它是一个双通道音频芯片)。

我找到了这个帖子:

升级到 Linux 5.4(英特尔高清音频)后声音停止工作

因为有明显的相似性。也就是说,我在 PulseAudio 上看到的只是一个虚拟输出:

$ pacmd list-sinks
1 sink(s) available.
  * index: 0
    name: <auto_null>
    driver: <module-null-sink.c>
    flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
    state: SUSPENDED
    suspend cause: IDLE
    priority: 1000
    volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
            balance 0.00
    base volume: 65536 / 100% / 0.00 dB
    volume steps: 65537
    muted: no
    current latency: 0.00 ms
    max request: 375 KiB
    max rewind: 375 KiB
    monitor source: 0
    sample spec: s16le 2ch 48000Hz
    channel map: front-left,front-right
                 Stereo
    used by: 0
    linked by: 0
    configured latency: 0.00 ms; range is 0.50 .. 2000.00 ms
    module: 13
    properties:
        device.description = "Dummy Output"
        device.class = "abstract"
        device.icon_name = "audio-card"

但 ALSA 似乎看到了 HDMI 声音输出:

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Audio [Intel HDMI/DP LPE Audio], device 0: HdmiLpeAudio [Intel HDMI/DP LPE Audi]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Audio [Intel HDMI/DP LPE Audio], device 1: HdmiLpeAudio [Intel HDMI/DP LPE Audi]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Audio [Intel HDMI/DP LPE Audio], device 2: HdmiLpeAudio [Intel HDMI/DP LPE Audi]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

并且内核似乎无法找到RealTek ALC5651:

$ dmesg | grep -C1 -E 'ALSA|HDA|sof|HDMI|snd[_-]|sound|hda.codec|hda.intel'
[    0.000000] Linux version 5.4.0-60-generic (buildd@lgw01-amd64-001) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #67-Ubuntu SMP Tue Jan 5 18:31:36 UTC 2021 (Ubuntu 5.4.0-60.67-generic 5.4.78)
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.4.0-60-generic root=UUID=fa5731bf-76e3-41c2-874d-3d13a4d1b21d ro quiet splash snd_hda_intel.dmic_detect=0 snd-intel-dspcfg.dsp_driver=1
[    0.000000] KERNEL supported cpus:
--
[    0.048313] Policy zone: DMA32
[    0.048319] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.4.0-60-generic root=UUID=fa5731bf-76e3-41c2-874d-3d13a4d1b21d ro quiet splash snd_hda_intel.dmic_detect=0 snd-intel-dspcfg.dsp_driver=1
[    0.049834] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
--
[    0.185244] ACPI: Added _OSI(Linux-Dell-Video)
[    0.185247] ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio)
[    0.185250] ACPI: Added _OSI(Linux-HPI-Hybrid-Graphics)
--
[    4.441136] raid6: using ssse3x2 recovery algorithm
[    4.444645] xor: measuring software checksum speed
[    4.481073]    prefetch64-sse:  6851.000 MB/sec
--
[   10.285999] proc_thermal 0000:00:0b.0: Creating sysfs group for PROC_THERMAL_PCI
[   10.579113] input: Intel HDMI/DP LPE Audio HDMI/DP,pcm=0 as /devices/pci0000:00/0000:00:02.0/hdmi-lpe-audio/sound/card0/input15
[   10.582098] input: Intel HDMI/DP LPE Audio HDMI/DP,pcm=1 as /devices/pci0000:00/0000:00:02.0/hdmi-lpe-audio/sound/card0/input16
[   10.582567] input: Intel HDMI/DP LPE Audio HDMI/DP,pcm=2 as /devices/pci0000:00/0000:00:02.0/hdmi-lpe-audio/sound/card0/input17
[   10.637553] intel_sst_acpi 808622A8:00: No matching machine driver found
--
[   10.721085] Bluetooth: hci0: RTL: cfg_sz 64, total sz 24508
[   10.810374] sof-audio-acpi 808622A8:00: warning: No matching ASoC machine driver found
[   10.813937] sof-audio-acpi 808622A8:00: error: no matching ASoC machine driver found - aborting probe
[   10.813948] sof-audio-acpi 808622A8:00: error: failed to get machine info -19
[   10.813954] sof-audio-acpi 808622A8:00: error: sof_probe_work failed err: -19

从中您可以看到,当声音停止工作时,我尝试了几个通常推荐的 5.4 内核选项(老实说,我还尝试了更多,相当多)。

我运行了alsa-info它并将其上传到此处:

http://alsa-project.org/db/?f=661875506cd4920a7b7c6086518220c3603de257

我承认这让我有些困惑,因为它是一个 RealTek 声音芯片,它给我的印象(我承认我很天真)是一个相当强大的行业标准,而不是一些奇怪的声音芯片,Android 和 Windows 10 可以看到它,但我的 Linux 安装不能(Linux Mint 20,基于 Ubuntu 20.04 构建)。

我不需要 HDMI 声音,不过有人在这里发帖说他们通过回滚到 4.12 内核使它正常工作:

https://forum.freaktab.com/forum/tv-player-support/intel-based-tv-players/661771-alfawise-x5-mini-pc-intel-atom-x5-z8350-2gb-ddr3-32gb-rom-gig-lan-windows-10-android-5-1/page4#post718968

碰巧我不想要 HDMI 声音,它对我没什么用,但我希望耳机插孔能正常工作。回滚到长期使用的内核似乎很奇怪,因为我预计随着内核的发展,诸如 RealTek 和 Intel 芯片上的声音丢失之类的重大行为变化会被发现和修复……我明白这就是这些经常在线讨论的内核选项所实现的……尽管我还没有找到关于选项等的权威文档。)

相关内容