测试音频插孔事件

测试音频插孔事件

首先让我澄清一下,我的立体声插孔音频输出被检测/列为IEC958/S/PDIF设备,但它不是光纤输出,而是标准立体声插孔。这可能已经是问题的原因。

在 Windows 上,插入/拔出检测工作正常,并且它之前在 Linux 上工作过(使用 Mint 4.10.0-35-generic),但在其他 WM 上,当前使用i3,但我认为它与 WM 无关,并且其他内容可能已更改同时。我不记得安装过任何音频驱动程序,它已经可以工作了。

问题

我无法触发音频插孔插件/拔出事件。

有什么作用

手动切换pavucontrol到数字立体声 (IEC958) 输出 ( iec985-stereo-output) 将使我的扬声器静音 ( analog-output-speaker),并在插孔上提供音频和音量控制。好的。

列表中没有其他选项可以为我的插孔提供专有音频(因此扬声器静音)。 (除了我首先处理的另一个问题,直到我发现我必须切换到输出IEC958aux 上的音频音量从 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:

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 信息并使用正确的(已知)分配。

查看hdajackretaskhdajacksensetest(Debian 等上的软件包alsa-tools-gui),看看是否可以修复该作业。有关分配的编解码器内容的信息可以通过 找到cat /proc/asound/card*/codec\#*。您还可以在此处查看插孔是否配置为发出“未经请求的事件”(也称为插头事件)。

相关内容