2017 iMac Pro 上的虚拟输出和无输入设备

2017 iMac Pro 上的虚拟输出和无输入设备

我是 Linux 新手,正在尝试在配备 Intel Xeon W 芯片的 2017 iMac Pro 上使用 Linux。我能够成功安装 Ubuntu 22.04.4 并进行双启动,但是,我的声卡似乎无法被识别。对于输出,我只看到虚拟输出,没有输入选项。我试过插入耳机,但耳机也无法被识别。我在谷歌上搜索了很多建议,但都没有成功。如果有帮助,我运行了这个命令,下面是输出:

sudo lspci -vv | grep -i audio

ubuntu@who-iMacPro:~$ sudo lspci -vv | grep -i audio
02:00.3 Multimedia audio controller: Apple Inc. Apple Audio Device (rev 01)
Subsystem: Apple Inc. Apple Audio Device
f3:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Vega 10 HDMI Audio [Radeon Vega 56/64]
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Vega 10 HDMI Audio [Radeon Vega 56/64]

Alsamixer 目前也仅看到 Vega 10 HDMI 音频。

编辑:感谢 guiverc 的回复,我一定会在将来添加更多详细信息。我使用的是桌面版,以下是您请求的输出:

ubuntu@who-iMacPro:~$ sudo lshw -C sound

*-multimedia UNCLAIMED    
   description: Multimedia audio controller
   product: Apple Audio Device
   vendor: Apple Inc.
   physical id: 0.3
   bus info: pci@0000:02:00.3
   version: 01
   width: 64 bits
   clock: 33MHz
   capabilities: pm msi pciexpress bus_master cap_list
   configuration: latency=0
   resources: memory:7f800000-7fbfffff memory:7fd80000-7fdfffff memory:7fe30000-7fe3ffff
*-multimedia
   description: Audio device
   product: Vega 10 HDMI Audio [Radeon Vega 56/64]
   vendor: Advanced Micro Devices, Inc. [AMD/ATI]
   physical id: 0.1
   bus info: pci@0000:f3:00.1
   logical name: card0
   logical name: /dev/snd/controlC0
   logical name: /dev/snd/hwC0D0
   logical name: /dev/snd/pcmC0D10p
   logical name: /dev/snd/pcmC0D11p
   logical name: /dev/snd/pcmC0D3p
   logical name: /dev/snd/pcmC0D7p
   logical name: /dev/snd/pcmC0D8p
   logical name: /dev/snd/pcmC0D9p
   version: 00
   width: 32 bits
   clock: 33MHz
   capabilities: pm pciexpress msi bus_master cap_list
   configuration: driver=snd_hda_intel latency=0
   resources: irq:98 memory:f02a0000-f02a3fff

EDIT2:添加 Archisman Panigrahi 推荐的命令的输出。

 ubuntu@who-iMacPro:~$ cd snd_hda_macbookpro && sudo ./install.cirrus.driver.sh

 linux-source-6.5.0/sound/pci/hda/
 linux-source-6.5.0/sound/pci/hda/hda_jack.h
 linux-source-6.5.0/sound/pci/hda/hda_beep.c
 linux-source-6.5.0/sound/pci/hda/hda_local.h
 linux-source-6.5.0/sound/pci/hda/hda_generic.c
 linux-source-6.5.0/sound/pci/hda/ca0132_regs.h
 linux-source-6.5.0/sound/pci/hda/hp_x360_helper.c
 linux-source-6.5.0/sound/pci/hda/hda_beep.h
 linux-source-6.5.0/sound/pci/hda/patch_analog.c
 linux-source-6.5.0/sound/pci/hda/cs35l41_hda.c
 linux-source-6.5.0/sound/pci/hda/patch_si3054.c
 linux-source-6.5.0/sound/pci/hda/hda_tegra.c
 linux-source-6.5.0/sound/pci/hda/patch_ca0110.c
 linux-source-6.5.0/sound/pci/hda/patch_cs8409-tables.c
 linux-source-6.5.0/sound/pci/hda/hda_controller.c
 linux-source-6.5.0/sound/pci/hda/patch_conexant.c
 linux-source-6.5.0/sound/pci/hda/patch_cs8409.h
 linux-source-6.5.0/sound/pci/hda/hda_eld.c
 linux-source-6.5.0/sound/pci/hda/cs35l41_hda_i2c.c
 linux-source-6.5.0/sound/pci/hda/patch_ca0132.c
 linux-source-6.5.0/sound/pci/hda/hda_controller.h
 linux-source-6.5.0/sound/pci/hda/hda_cs_dsp_ctl.c
 linux-source-6.5.0/sound/pci/hda/hda_codec.c
 linux-source-6.5.0/sound/pci/hda/thinkpad_helper.c
 linux-source-6.5.0/sound/pci/hda/hda_generic.h
 linux-source-6.5.0/sound/pci/hda/patch_sigmatel.c
 linux-source-6.5.0/sound/pci/hda/cs35l41_hda_property.c
 linux-source-6.5.0/sound/pci/hda/hda_intel.c
 linux-source-6.5.0/sound/pci/hda/hda_auto_parser.c
 linux-source-6.5.0/sound/pci/hda/hda_sysfs.c
 linux-source-6.5.0/sound/pci/hda/Kconfig
 linux-source-6.5.0/sound/pci/hda/hda_intel_trace.h
 linux-source-6.5.0/sound/pci/hda/cs35l41_hda_spi.c
 linux-source-6.5.0/sound/pci/hda/hda_intel.h
 linux-source-6.5.0/sound/pci/hda/patch_cirrus.c
 linux-source-6.5.0/sound/pci/hda/hda_hwdep.c
 linux-source-6.5.0/sound/pci/hda/hda_bind.c
 linux-source-6.5.0/sound/pci/hda/hda_jack.c
 linux-source-6.5.0/sound/pci/hda/ideapad_s740_helper.c
 linux-source-6.5.0/sound/pci/hda/patch_hdmi.c
 linux-source-6.5.0/sound/pci/hda/hda_component.h
 linux-source-6.5.0/sound/pci/hda/hda_proc.c
 linux-source-6.5.0/sound/pci/hda/patch_cmedia.c
 linux-source-6.5.0/sound/pci/hda/cs35l41_hda.h
 linux-source-6.5.0/sound/pci/hda/Makefile
 linux-source-6.5.0/sound/pci/hda/patch_via.c
 linux-source-6.5.0/sound/pci/hda/patch_realtek.c
 linux-source-6.5.0/sound/pci/hda/hda_controller_trace.h
 linux-source-6.5.0/sound/pci/hda/hda_auto_parser.h
 linux-source-6.5.0/sound/pci/hda/cs35l41_hda_property.h
 linux-source-6.5.0/sound/pci/hda/hda_cs_dsp_ctl.h
 linux-source-6.5.0/sound/pci/hda/patch_cs8409.c
Kernel version later than implemented version - there may be build problems
patching file patch_cs8409.c
Hunk #1 succeeded at 1445 (offset 175 lines).
Hunk #2 succeeded at 1454 (offset 175 lines).
Hunk #3 succeeded at 1483 (offset 175 lines).
patching file patch_cs8409.h
Hunk #2 succeeded at 304 (offset 2 lines).
Hunk #3 succeeded at 331 (offset 2 lines).
Hunk #4 succeeded at 367 (offset 2 lines).
patching file patch_cirrus_apple.h
make -C /lib/modules/6.5.0-27-generic/build CFLAGS_MODULE="-DAPPLE_PINSENSE_FIXUP -DAPPLE_CODECS -DCONFIG_SND_HDA_RECONFIG=1 -Wno-unused-variable -Wno-unused-function" M=/home/cd/snd_hda_macbookpro/build/hda modules
make[1]: Entering directory '/usr/src/linux-headers-6.5.0-27-generic'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
You are using:           
CC [M]  /home/cd/snd_hda_macbookpro/build/hda/patch_cs8409.o
/bin/sh: 1: gcc-12: not found
make[3]: *** [scripts/Makefile.build:251: /home/cd snd_hda_macbookpro/build/hda/patch_cs8409.o] Error 127
make[2]: *** [/usr/src/linux-headers-6.5.0-27-generic/Makefile:2039: /home/cd/snd_hda_macbookpro/build/hda] Error 2
make[1]: *** [Makefile:234: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.5.0-27-generic'
make: *** [Makefile:16: all] Error 2

编辑 3:命令的输出

ubuntu@who-iMacPro:~/snd-hda-codec-cs8409$ make
make -C /lib/modules/6.5.0-27-generic/build CFLAGS_MODULE="- DAPPLE_PINSENSE_FIXUP -DAPPLE_CODECS -DCONFIG_SND_HDA_RECONFIG=1 -Wno-  unused-variable -Wno-unused-function" M=/home/cd/snd-hda-codec-cs8409 modules
make[1]: Entering directory '/usr/src/linux-headers-6.5.0-27-generic'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu   12.3.0-1ubuntu1~22.04) 12.3.0
You are using:           
CC [M]  /home/cd/snd-hda-codec-cs8409/patch_cs8409.o
/bin/sh: 1: gcc-12: not found
make[3]: *** [scripts/Makefile.build:251: /home/cd/snd-hda-codec-    cs8409/patch_cs8409.o] Error 127
make[2]: *** [/usr/src/linux-headers-6.5.0-27-generic/Makefile:2039: /home/cd/snd-hda-codec-cs8409] Error 2
make[1]: *** [Makefile:234: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.5.0-27-generic'
make: *** [Makefile:16: all] Error 2
ubuntu@who-iMacPro:~/snd-hda-codec-cs8409$ sudo make install
mkdir -p /lib/modules/6.5.0-27-generic/updates/
cp snd-hda-codec-cs8409.ko /lib/modules/6.5.0-27-generic/updates/
cp: cannot stat 'snd-hda-codec-cs8409.ko': No such file or    directory
make: *** [Makefile:22: install] Error 1

编辑 4:运行 sudo apt install gcc-12 后的输出

ubuntu@who-iMacPro:~$ sudo apt install gcc-12
[sudo] password for cd: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  cpp-12 libasan8 libgcc-12-dev libtsan2
Suggested packages:
  gcc-12-locales cpp-12-doc gcc-12-multilib gcc-12-doc
The following NEW packages will be installed:
  cpp-12 gcc-12 libasan8 libgcc-12-dev libtsan2
0 upgraded, 5 newly installed, 0 to remove and 8 not upgraded.
Need to get 40.1 MB of archives.
After this operation, 138 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 cpp-12 amd64 12.3.0-1ubuntu1~22.04 [10.8 MB]
Get:2 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libasan8 amd64 12.3.0-1ubuntu1~22.04 [2,442 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libtsan2 amd64 12.3.0-1ubuntu1~22.04 [2,477 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libgcc-12-dev amd64 12.3.0-1ubuntu1~22.04 [2,618 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 gcc-12 amd64 12.3.0-1ubuntu1~22.04 [21.7 MB]
Fetched 40.1 MB in 3s (14.8 MB/s)  
Selecting previously unselected package cpp-12.
(Reading database ... 241511 files and directories currently installed.)
Preparing to unpack .../cpp-12_12.3.0-1ubuntu1~22.04_amd64.deb ...
Unpacking cpp-12 (12.3.0-1ubuntu1~22.04) ...
Selecting previously unselected package libasan8:amd64.
Preparing to unpack .../libasan8_12.3.0-1ubuntu1~22.04_amd64.deb ...
Unpacking libasan8:amd64 (12.3.0-1ubuntu1~22.04) ...
Selecting previously unselected package libtsan2:amd64.
Preparing to unpack .../libtsan2_12.3.0-1ubuntu1~22.04_amd64.deb ...
Unpacking libtsan2:amd64 (12.3.0-1ubuntu1~22.04) ...
Selecting previously unselected package libgcc-12-dev:amd64.
Preparing to unpack .../libgcc-12-dev_12.3.0-1ubuntu1~22.04_amd64.deb ...
Unpacking libgcc-12-dev:amd64 (12.3.0-1ubuntu1~22.04) ...
Selecting previously unselected package gcc-12.
Preparing to unpack .../gcc-12_12.3.0-1ubuntu1~22.04_amd64.deb ...
Unpacking gcc-12 (12.3.0-1ubuntu1~22.04) ...
Setting up cpp-12 (12.3.0-1ubuntu1~22.04) ...
Setting up libasan8:amd64 (12.3.0-1ubuntu1~22.04) ...
Setting up libtsan2:amd64 (12.3.0-1ubuntu1~22.04) ...
Setting up libgcc-12-dev:amd64 (12.3.0-1ubuntu1~22.04) ...
Setting up gcc-12 (12.3.0-1ubuntu1~22.04) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.6) ...
ubuntu@who-iMacPro:~$ cd snd-hda-codec-cs8409
ubuntu@who-iMacPro:~/snd-hda-codec-cs8409$ make
make -C /lib/modules/6.5.0-27-generic/build CFLAGS_MODULE="-DAPPLE_PINSENSE_FIXUP -DAPPLE_CODECS -DCONFIG_SND_HDA_RECONFIG=1 -Wno-unused-variable -Wno-unused-function" M=/home/cd/snd-hda-codec-cs8409 modules
make[1]: Entering directory '/usr/src/linux-headers-6.5.0-27-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
  You are using:           gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
  CC [M]  /home/cd/snd-hda-codec-cs8409/patch_cs8409.o
In file included from /home/cd/snd-hda-codec-cs8409/patch_cs8409.c:1488:
/home/cd/snd-hda-codec-cs8409/patch_cirrus_apple.h: In function ‘cs_8409_apple_boot_init’:
/home/cd/snd-hda-codec-cs8409/patch_cirrus_apple.h:1191:15: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 1191 |         hinfo = spec->gen.stream_analog_playback;
      |               ^
  CC [M]  /home/cd/snd-hda-codec-cs8409/patch_cs8409-tables.o
  LD [M]  /home/cd/snd-hda-codec-cs8409/snd-hda-codec-cs8409.o
  MODPOST /home/cd/snd-hda-codec-cs8409/Module.symvers
  CC [M]  /home/cd/snd-hda-codec-cs8409/snd-hda-codec-cs8409.mod.o
  LD [M]  /home/cd/snd-hda-codec-cs8409/snd-hda-codec-cs8409.ko
  BTF [M] /home/cd/snd-hda-codec-cs8409/snd-hda-codec-cs8409.ko
Skipping BTF generation for /home/cd/snd-hda-codec-cs8409/snd-hda-codec-cs8409.ko due to unavailability of vmlinux
make[1]: Leaving directory '/usr/src/linux-headers-6.5.0-27-generic'
ubuntu@who-iMacPro:~/snd-hda-codec-cs8409$ sudo make install
mkdir -p /lib/modules/6.5.0-27-generic/updates/
cp snd-hda-codec-cs8409.ko /lib/modules/6.5.0-27-generic/updates/
depmod -a
ubuntu@who-iMacPro:~/snd-hda-codec-cs8409$

答案1

该答案基于在 Debian 中有效的类似解决方案。

首先安装内核头文件和编译工具。

sudo apt install linux-headers-generic
sudo apt install build-essential git gcc-12

下载司机

git clone https://github.com/egorenar/snd-hda-codec-cs8409

最后编译并安装驱动

cd snd-hda-codec-cs8409
make
sudo make install

重新启动计算机,声音就可以正常工作了。

相关内容