首先讓我澄清一下,我的立體聲插孔音訊輸出被檢測/列為IEC958
/S/PDIF
設備,但它不是光纖輸出,而是標準立體聲插孔。這可能已經是問題的原因。
在 Windows 上,插入/拔出檢測工作正常,並且它之前在 Linux 上工作過(使用 Mint 4.10.0-35-generic),但在其他 WM 上,當前使用i3
,但我認為它與WM 無關,並且其他內容可能已更改同時。我不記得安裝過任何音訊驅動程序,它已經可以工作了。
問題
我無法觸發音訊插孔插件/拔出事件。
有什麼作用
手動切換pavucontrol
到數位立體聲 (IEC958) 輸出 ( iec985-stereo-output
) 將使我的揚聲器靜音 ( analog-output-speaker
),並在插孔上提供音訊和音量控制。好的。
清單中沒有其他選項可以為我的插孔提供專有音訊(因此揚聲器靜音)。 (除了我首先處理的另一個問題,直到我發現我必須切換到輸出IEC958
:aux 上的音訊音量從 0 到 100(基本上只有開/關)&https://forums.linuxmint.com/viewtopic.php?f=48&t=256467&p=1391958#p1391958但這是一個完全不同的兔子洞)但無論如何。
測試音訊插孔事件
我想我已經用盡了測試事件的方法
測試:
Available devices:
/dev/input/event0: Lid Switch
/dev/input/event1: Sleep Button
/dev/input/event2: Power Button
/dev/input/event3: Power Button
/dev/input/event4: AT Translated Set 2 keyboard
/dev/input/event5: Video Bus
/dev/input/event6: Video Bus
/dev/input/event7: Logitech MX Master 2S
/dev/input/event8: ETPS/2 Elantech Touchpad
/dev/input/event9: Metadot - Das Keyboard Das Keyboard
/dev/input/event10: Metadot - Das Keyboard Das Keyboard
/dev/input/event11: MSI WMI hotkeys
/dev/input/event12: NEC HD WebCam
/dev/input/event13: HDA Intel PCH Mic
/dev/input/event14: HDA Intel PCH HDMI/DP,pcm=3
/dev/input/event15: HDA Intel PCH HDMI/DP,pcm=7
/dev/input/event16: HDA Intel PCH HDMI/DP,pcm=8
14、15、16 根本沒有偵測到任何東西。當我將其插入麥克風時,13 確實會觸發,所以至少有一個可以工作。
acpi_監聽
❱ acpi_listen
沒什麼...但是對於麥克風:
jack/microphone MICROPHONE plug
jack/microphone MICROPHONE unplug
差異事件
據我了解,我們可以用以下方式模擬這些事件:
sudo cat /proc/asound/card0/codec\#0 > unplugged
sudo cat /proc/asound/card0/codec\#0 > plugged
diff unplugged plugged
但 diff 沒有輸出任何內容。
硬體
帕命令
❱ pacmd list-sinks | grep -e 'name' -e 'index'
* index: 68
name: <alsa_output.pci-0000_00_1f.3.iec958-stereo>
alsa.name = "ALC898 Digital"
alsa.subdevice_name = "subdevice #0"
alsa.card_name = "HDA Intel PCH"
alsa.long_card_name = "HDA Intel PCH at 0xdf120000 irq 133"
alsa.driver_name = "snd_hda_intel"
device.vendor.name = "Intel Corporation"
device.profile.name = "iec958-stereo"
alsa.mixer_name = "Realtek ALC898"
device.icon_name = "audio-card-pci"
更長的清單
❱ pacmd list-sinks
1 sink(s) available.
* index: 68
name: <alsa_output.pci-0000_00_1f.3.iec958-stereo>
driver: <module-alsa-card.c>
flags: HARDWARE HW_MUTE_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: RUNNING
suspend cause:
priority: 9958
volume: front-left: 44895 / 69% / -9.86 dB, front-right: 44895 / 69% / -9.86 dB
balance 0.00
base volume: 65536 / 100% / 0.00 dB
volume steps: 65537
muted: no
current latency: 19.98 ms
max request: 4 KiB
max rewind: 64 KiB
monitor source: 82
sample spec: s16le 2ch 44100Hz
channel map: front-left,front-right
Stereo
used by: 1
linked by: 5
configured latency: 23.22 ms; range is 0.50 .. 371.52 ms
card: 0 <alsa_card.pci-0000_00_1f.3>
module: 6
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "ALC898 Digital"
alsa.id = "ALC898 Digital"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "1"
alsa.card = "0"
alsa.card_name = "HDA Intel PCH"
alsa.long_card_name = "HDA Intel PCH at 0xdf120000 irq 133"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:00:1f.3"
sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "a171"
device.form_factor = "internal"
device.string = "iec958:0"
device.buffering.buffer_size = "65536"
device.buffering.fragment_size = "32768"
device.access_mode = "mmap+timer"
device.profile.name = "iec958-stereo"
device.profile.description = "Digital Stereo (IEC958)"
device.description = "Built-in Audio Digital Stereo (IEC958)"
alsa.mixer_name = "Realtek ALC898"
alsa.components = "HDA:10ec0899,146211ac,00100003 HDA:8086280b,80860101,00100000"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
ports:
iec958-stereo-output: Digital Output (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
properties:
active port: <iec958-stereo-output>
阿普拉
❱ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC898 Analog [ALC898 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC898 Digital [ALC898 Digital]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
lsmod
❱ lsmod | grep '^snd' | column -t
snd_hda_codec_hdmi 49152 1
snd_hda_codec_realtek 90112 1
snd_hda_codec_generic 73728 1 snd_hda_codec_realtek
snd_hda_intel 36864 7
snd_hda_codec 126976 4 snd_hda_intel,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek
snd_hda_core 81920 5 snd_hda_intel,snd_hda_codec,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek
snd_hwdep 16384 1 snd_hda_codec
snd_pcm 102400 6 snd_hda_intel,snd_hda_codec,snd_hda_core,snd_hda_codec_hdmi
snd_seq_midi 16384 0
snd_seq_midi_event 16384 1 snd_seq_midi
snd_rawmidi 32768 1 snd_seq_midi
snd_seq 65536 2 snd_seq_midi_event,snd_seq_midi
snd_seq_device 16384 3 snd_seq,snd_rawmidi,snd_seq_midi
snd_timer 32768 2 snd_seq,snd_pcm
snd 77824 23 snd_hda_intel,snd_hwdep,snd_seq,snd_hda_codec,snd_timer,snd_rawmidi,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_seq_device,snd_hda_codec_realtek,snd_pcm
不確定它是否相關,但無論如何我都會分享它:
Alsa 混音器顯示 S/PDIF 為 0:
pavucontrol 顯示音訊插孔的正確音量
我的 alsamixer 中只有 1 個設備:
哦,當我選擇“模擬立體聲雙工/輸出”時,我無法在Output Devices
“揚聲器”下選擇任何不同的端口,我懷疑它應該將音頻插孔列為端口,但事實並非如此。
此外,當打開 cinnamon 音訊設定時,它僅顯示這 2 個作為單獨的音訊來源:
更新
輸出:
hdajacksense測試
❱ sudo hdajacksensetest
Pin 0x18 (Black Mic, Rear side): present = Yes
hdajack重任務
嘗試覆蓋hdajackretask
但還是沒有偵測到...
混合器
❱ amixer
Simple mixer control 'Master',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 87
Mono: Playback 0 [0%] [-65.25dB] [off]
Simple mixer control 'PCM',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 255
Mono:
Front Left: Playback 255 [100%] [0.00dB]
Front Right: Playback 255 [100%] [0.00dB]
Simple mixer control 'Front',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 87
Mono:
Front Left: Playback 87 [100%] [0.00dB] [on]
Front Right: Playback 87 [100%] [0.00dB] [on]
Simple mixer control 'Surround',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 87
Mono:
Front Left: Playback 87 [100%] [0.00dB] [on]
Front Right: Playback 87 [100%] [0.00dB] [on]
Simple mixer control 'Center',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 87
Mono: Playback 87 [100%] [0.00dB] [on]
Simple mixer control 'LFE',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 87
Mono: Playback 87 [100%] [0.00dB] [on]
Simple mixer control 'Side',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 87
Mono:
Front Left: Playback 87 [100%] [0.00dB] [on]
Front Right: Playback 87 [100%] [0.00dB] [on]
Simple mixer control 'Mic',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono:
Front Left: Playback 0 [0%] [-34.50dB] [off]
Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Mic Boost',0
Capabilities: volume
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: 0 - 3
Front Left: 0 [0%] [0.00dB]
Front Right: 0 [0%] [0.00dB]
Simple mixer control 'IEC958',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'IEC958 Default PCM',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'IEC958',1
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'IEC958',2
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'IEC958',16
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'Beep',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono:
Front Left: Playback 0 [0%] [-34.50dB] [off]
Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Capture',0
Capabilities: cvolume cswitch
Capture channels: Front Left - Front Right
Limits: Capture 0 - 63
Front Left: Capture 50 [79%] [20.25dB] [on]
Front Right: Capture 50 [79%] [20.25dB] [on]
Simple mixer control 'Loopback Mixing',0
Capabilities: enum
Items: 'Disabled' 'Enabled'
Item0: 'Disabled'
答案1
猜測:BIOS 在插孔的分配上撒了謊,並且您在驅動程式中缺少一個“怪癖”來解決這個問題,或者當您更新時,您遇到了一個不適合您的情況的怪癖。
在 Windows 中,這並不重要,因為預先安裝的驅動程式會忽略 BIOS 資訊並使用正確的(已知)分配。
查看hdajackretask
和hdajacksensetest
(Debian 等上的軟體包alsa-tools-gui
),看看是否可以修復該作業。有關分配的編解碼器內容的資訊可以透過 找到cat /proc/asound/card*/codec\#*
。您也可以在此處查看插孔是否已配置為發出「未經請求的事件」(也稱為插頭事件)。