即使升级到内核 6 后,我仍然没有音频,据说内核 6 已经修复了 es8336 英特尔内置高清声卡的这个问题。我做了大量工作,试图在以前的内核下修复这个问题。
我有一台中国制造的普通笔记本电脑,不知为何似乎没有 Linux 发行版支持它(关于音频)。我的是使用 Jasper Lake 芯片组的 ALLDOCUBE i1405S。当然,其他一切都运行良好,包括通过 HDMI、USB 音频接口(Behringer UCA202)或通过蓝牙耳机传输音频。
音频由 Everest 编解码器(臭名昭著的 es8336)处理。
我现在使用 pipewire,因为它在最近的几次 Ubuntu 更新中取代了 pulseaudio。
今天我想尝试一些不同的东西。我做了一个简单的 dmesg 来查看启动时弹出的错误。以下是 dmesg 的相关部分:
[ 6.507569] sof-essx8336 sof-essx8336: quirk mask 0x21
[ 6.507577] sof-essx8336 sof-essx8336: quirk SSP1
[ 6.507578] sof-essx8336 sof-essx8336: quirk DMIC enabled
[ 6.509764] sof-audio-pci-intel-icl 0000:00:1f.3: Direct firmware load for intel/sof-tplg/sof-jsl-es8336-dmic2ch-ssp1.tplg failed with error -2
[ 6.509770] sof-audio-pci-intel-icl 0000:00:1f.3: error: tplg request firmware intel/sof-tplg/sof-jsl-es8336-dmic2ch-ssp1.tplg failed err: -2
[ 6.509774] sof-audio-pci-intel-icl 0000:00:1f.3: you may need to download the firmware from https://github.com/thesofproject/sof-bin/
[ 6.509777] sof-audio-pci-intel-icl 0000:00:1f.3: error: failed to load DSP topology -2
[ 6.509779] sof-audio-pci-intel-icl 0000:00:1f.3: ASoC: error at snd_soc_component_probe on 0000:00:1f.3: -2
[ 6.509791] sof-essx8336 sof-essx8336: ASoC: failed to instantiate card -2
[ 6.509855] sof-essx8336 sof-essx8336: snd_soc_register_card failed: -2
[ 6.509858] sof-essx8336: probe of sof-essx8336 failed with error -2}
当然,这是我的系统信息:
inxi -Fx
输出:
System:
Host: myusername Kernel: 6.0.0-060000-generic x86_64 bits: 64
compiler: N/A Desktop: KDE Plasma 5.24.7
Distro: Ubuntu 22.04.1 LTS (Jammy Jellyfish)
Machine:
Type: Laptop System: ALLDOCUBE product: i1405S v: N/A
serial: <superuser required>
Mobo: ALLDOCUBE model: ALLDOCUBE serial: <superuser required>
UEFI: American Megatrends LLC. v: Z362D.2112031.003.2133 date: 12/30/2021
Battery:
ID-1: BAT0 charge: 37.2 Wh (97.9%) condition: 38.0/38.0 Wh (100.0%)
volts: 7.6 min: N/A model: Intel SR 1 SR Real Battery status: Discharging
CPU:
Info: quad core model: Intel Celeron N5100 bits: 64 type: MCP arch: Tremont
rev: 0 cache: L1: 256 KiB L2: 1.5 MiB L3: 4 MiB
Speed (MHz): avg: 2078 high: 2800 min/max: 800/2800 cores: 1: 1421
2: 2800 3: 2741 4: 1353 bogomips: 8908
Flags: ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
Device-1: Intel JasperLake [UHD Graphics] driver: i915 v: kernel
bus-ID: 00:02.0
Device-2: Realtek USB Camera type: USB driver: uvcvideo bus-ID: 1-5:2
Display: x11 server: X.Org v: 1.21.1.3 driver: X: loaded: modesetting
unloaded: fbdev,vesa gpu: i915 resolution: 1920x1080~60Hz
OpenGL: renderer: Mesa Intel UHD Graphics (JSL) v: 4.6 Mesa 22.0.5
direct render: Yes
Audio:
Device-1: Intel vendor: Realtek driver: sof-audio-pci-intel-icl
bus-ID: 00:1f.3
Sound Server-1: ALSA v: k6.0.0-060000-generic running: yes
Sound Server-2: PulseAudio v: 15.99.1 running: no
Sound Server-3: PipeWire v: 0.3.60 running: yes
Network:
Device-1: Intel Wi-Fi 6 AX201 160MHz driver: iwlwifi v: kernel
bus-ID: 00:14.3
IF: wlo1 state: up mac: 38:87:d5:e4:53:e0
Bluetooth:
Device-1: Intel AX201 Bluetooth type: USB driver: btusb v: 0.8
bus-ID: 1-8:4
Report: hciconfig ID: hci0 rfk-id: 0 state: up address: 38:87:D5:E4:53:E4
bt-v: 3.0 lmp-v: 5.2
Drives:
Local Storage: total: 644.89 GiB used: 250.52 GiB (38.8%)
ID-1: /dev/sda vendor: Western Digital
model: WD Blue SA510 M.2 2280 500GB size: 465.76 GiB
ID-2: /dev/sdb type: USB model: Multiple Card Reader size: 119.38 GiB
ID-3: /dev/sdc type: USB vendor: Samsung model: Flash Drive
size: 59.75 GiB
Partition:
ID-1: / size: 320.36 GiB used: 97.52 GiB (30.4%) fs: ext4 dev: /dev/sda5
ID-2: /boot/efi size: 96 MiB used: 34 MiB (35.4%) fs: vfat dev: /dev/sda1
Swap:
ID-1: swap-1 type: file size: 2 GiB used: 0 KiB (0.0%) file: /swapfile
Sensors:
System Temperatures: cpu: 57.0 C mobo: N/A
Fan Speeds (RPM): N/A
Info:
Processes: 287 Uptime: 1h 51m Memory: 11.51 GiB used: 4.71 GiB (40.9%)
Init: systemd runlevel: 5 Compilers: gcc: 11.3.0 Packages: 2878 Shell: Bash
v: 5.1.16 inxi: 3.3.13
伙计,我喜欢那个 inxi 脚本。
更多信息:
hwinfo --short
输出:
cpu:
Intel(R) Celeron(R) N5100 @ 1.10GHz, 2800 MHz
Intel(R) Celeron(R) N5100 @ 1.10GHz, 2780 MHz
Intel(R) Celeron(R) N5100 @ 1.10GHz, 2800 MHz
Intel(R) Celeron(R) N5100 @ 1.10GHz, 2800 MHz
keyboard:
/dev/input/event4 AT Translated Set 2 keyboard
mouse:
/dev/input/mice SYNA3602:00 093A:1336 Mouse
/dev/input/mice SYNA3602:00 093A:1336 Touchpad
monitor:
BOE CQ LCD Monitor
graphics card:
Intel VGA compatible controller
sound:
Intel Audio device
storage:
Intel SATA controller
network:
wlo1 Intel WLAN controller
network interface:
wlo1 Ethernet network interface
lo Loopback network interface
disk:
/dev/sdb Multiple Card Reader
/dev/sdc Samsung Flash Drive
/dev/sda WD Blue SA510 M.
partition:
/dev/sdb1 Partition
/dev/sdc1 Partition
/dev/sda1 Partition
/dev/sda2 Partition
/dev/sda3 Partition
/dev/sda4 Partition
/dev/sda5 Partition
usb controller:
Intel USB Controller
bios:
BIOS
bridge:
Intel ISA bridge
Intel Host bridge
hub:
Linux Foundation 2.0 root hub
Linux Foundation 3.0 root hub
memory:
Main Memory
bluetooth:
Intel Bluetooth Device
unknown:
FPU
DMA controller
PIC
Keyboard controller
Intel Serial bus controller
Intel SD Host controller
Intel Signal processing controller
Intel Communication controller
Intel Serial bus controller
Intel Serial bus controller
Intel Communication controller
Intel Serial bus controller
Intel Serial bus controller
Intel SD Host controller
Intel Serial bus controller
Intel RAM memory
Intel SMBus
Intel Serial bus controller
Realtek USB Camera}
没什么奇怪的,对吧?不过有趣的是,RAM 内存被列在“未知”下。
aplay -l
输出:aplay:device_list:274:未找到声卡... 是的。没什么好惊讶的。
lspci -v | grep -A7 -i "audio"
输出:
00:1f.3 Audio device: Intel Corporation Device 4dc8 (rev 01) (prog-if 80)
DeviceName: Onboard - Sound
Subsystem: Realtek Semiconductor Co., Ltd. Device 1242
Flags: bus master, fast devsel, latency 32, IRQ 135
Memory at 6001120000 (64-bit, non-prefetchable) [size=16K]
Memory at 6001000000 (64-bit, non-prefetchable) [size=1M]
Capabilities: <access denied>
Kernel driver in use: sof-audio-pci-intel-icl
Kernel modules: snd_hda_intel, snd_sof_pci_intel_icl
00:1f.4 SMBus: Intel Corporation JaserLake SMBus (rev 01)
DeviceName: Onboard - Other
Subsystem: Intel Corporation JaserLake SMBus
Flags: medium devsel, IRQ 16
Memory at 600112a000 (64-bit, non-prefetchable) [size=256]
音频命令:
/sbin/lsmod | grep snd
输出:
snd_seq_dummy 16384 0
snd_hrtimer 16384 1
snd_soc_sof_es8336 20480 0
snd_soc_intel_hda_dsp_common 20480 1
snd_soc_sof_es8336
snd_sof_probes 20480 0
snd_hda_codec_hdmi 81920 0
snd_soc_dmic 16384 0
snd_sof_pci_intel_icl 16384 0
snd_sof_intel_hda_common 143360 1
snd_sof_pci_intel_icl
soundwire_intel 40960 1
snd_sof_intel_hda_common
snd_sof_intel_hda 20480 1
snd_sof_intel_hda_common
snd_sof_pci 24576 2
snd_sof_pci_intel_icl,
snd_sof_intel_hda_common
snd_sof_xtensa_dsp 16384 1
snd_sof_intel_hda_common
snd_sof 245760 3
snd_sof_pci,
snd_sof_intel_hda_common,
snd_sof_probes
snd_sof_utils 20480 1
snd_sof
snd_soc_hdac_hda 24576 1
snd_sof_intel_hda_common
snd_hda_ext_core 36864 3
snd_sof_intel_hda_common,
snd_soc_hdac_hda,
snd_sof_intel_hda
snd_soc_acpi_intel_match 69632 2
snd_sof_pci_intel_icl,
snd_sof_intel_hda_common
snd_soc_acpi 16384 2
snd_soc_acpi_intel_match,
snd_sof_intel_hda_common
snd_seq_midi 20480 0
snd_hda_intel 53248 0
snd_soc_es8316 49152 0
snd_seq_midi_event 16384 1
snd_seq_midi
snd_intel_dspcfg 36864 3
snd_hda_intel,
snd_sof,
snd_sof_intel_hda_common
snd_intel_sdw_acpi 20480 2
snd_sof_intel_hda_common,
snd_intel_dspcfg
snd_rawmidi 45056 1
snd_seq_midi
snd_hda_codec 172032 4
snd_hda_codec_hdmi,snd_hda_intel,
snd_soc_intel_hda_dsp_common,
snd_soc_hdac_hda
snd_soc_core 368640 8 soundwire_intel,
snd_sof,
snd_sof_intel_hda_common,
snd_soc_hdac_hda,
snd_soc_sof_es8336,
snd_sof_probes,
snd_soc_es8316,
snd_soc_dmic
snd_compress 24576 2
snd_soc_core,
snd_sof_probes
snd_hda_core 118784 8
snd_hda_codec_hdmi,
snd_hda_intel,
snd_hda_ext_core,
snd_hda_codec,
snd_soc_intel_hda_dsp_common,
snd_sof_intel_hda_common,
snd_soc_hdac_hda,
snd_sof_intel_hda
ac97_bus 16384 1
snd_soc_core
snd_pcm_dmaengine 20480 1
snd_soc_core
snd_seq 77824 9
snd_seq_midi,
snd_seq_midi_event,
snd_seq_dummy
snd_hwdep 20480 1
snd_hda_codec
snd_seq_device 16384 3
snd_seq,
snd_seq_midi,
snd_rawmidi
snd_pcm 159744 12
snd_hda_codec_hdmi,
snd_hda_intel,
snd_hda_codec,
soundwire_intel,
snd_sof,
snd_sof_intel_hda_common,
snd_compress,
snd_soc_core,
snd_sof_utils,
snd_soc_es8316,
snd_hda_core,
snd_pcm_dmaengine
snd_timer 40960 3
snd_seq,
snd_hrtimer,
snd_pcm
snd 114688 15
snd_seq,
snd_seq_device,
snd_hda_codec_hdmi,
snd_hwdep,
snd_hda_intel,
snd_hda_codec,
snd_sof,
snd_timer,
snd_compress,
snd_soc_core,
snd_soc_sof_es8336,
snd_pcm,
snd_rawmidi
soundcore 16384 1
snd
有趣的是,es8336 在几个地方被提及。但计算机却无法将设备连接到硬件。
我尝试了很多发行版,但都不能用。Windows 的音频播放效果很好。Fedora、Arch、Debian、任何 Ubuntu 衍生产品、Tuxedo、Mint、DeepinOS 和其他发行版都不能用。
我尝试过许多建议修改 alsa-base.conf 的程序,但最终都无济于事。内核启动行编辑不起作用。
我发现另一个帖子,其中用户说他们找到了一个临时解决方法,即手动将 sof-bin 固件复制到 /lib/firmware/intel/sof-tplg/ 文件夹。请参阅以下步骤:
cd ~/Downloads
wget https://github.com/thesofproject/sof-bin/releases/download/v1.9.3/sof-bin-v1.9.3.tar.gz
tar xvzf sof-bin-v1.9.3.tar.gz
sudo mv /lib/firmware/intel/sof* ~/backup/ # save a backup in your home folder
sudo rsync -a sof-v1.9.3/ /lib/firmware/intel/sof/
sudo rsync -a sof-tplg-v1.9.3/ /lib/firmware/intel/sof-tplg/
重启
我很好奇这些步骤是否只针对他的设备,或者是需要更改的一般软件拓扑更改,以使 everest 系列的 intel hda 声卡正常工作。他正在使用 max98090,但笔记本电脑上没有声音。但我在命令中没有看到该型号。因此尝试这些操作是否安全?我通过随机尝试一些东西,搞砸了太多 Ubuntu 安装。
最大的问题是为什么 Linux 没有正确更新内核来处理来自英特尔的这些廉价声卡。我的意思是,他们说这个问题在很久以前就会得到解决,而且似乎已经将文件放入了内核中。这似乎是由于实施不当,就像内核补丁跳过了一步。鉴于这些廉价声卡安装在大量非常流行的廉价笔记本电脑中,为什么这个问题还没有解决呢?
答案1
我刚刚按照以下步骤解决了 Ubuntu 22.04 中的问题。
sudo apt-get install --install-recommends linux-oem-22.04a
git clone https://github.com/yangxiaohua2009/custom-kernel
cd custom-kernel/ucm/ucm2_latest
sudo cp ./tplg/* /lib/firmware/intel/sof-tplg/
sudo cp sof-jsl.ri /lib/firmware/intel/sof/
sudo cp -r sof-essx8336 /usr/share/alsa/ucm2
内核 5.17 不知何故无法正确加载文件,因此您可能需要将文件名从“sof-jsl-es8336-ssp1.tplg”重命名为“sof-jsl-es8336.tplg”。
cd /lib/firmware/intel/sof-tplg
sudo cp sof-jsl-es8336-ssp1.tplg sof-jsl-es8336.tplg
最后,/etc/modprobe.d/alsa-base.conf
通过此命令编辑配置文件:
sudo gedit /etc/modprobe.d/alsa-base.conf
将下面这一行添加到配置文件的末尾并保存。
options snd_soc_sof_8336 quirk=0x01
重启,然后别忘了通过终端进行设置alsamixer
,按下键盘上的F6
来选择sof-essx8336
和校准声音。您可以播放任何音乐或视频并alsamixer
同时进行设置。
在我的设置中alsamixer
,我按下键盘上的m
取消静音Left Headphone Mixer Left DAC
和,并增加、的Right Headphone Mixer Right DAC
音量。DAC
Headphone
Headphone Mixer