如果需要,我会很乐意/很舒服地应用一些补丁或更改一些内核代码。我所需要的只是方向,因为我对内核中的Linux声音体系结构(pulse-audio
和alsamixer
实现)一无所知。
我很确定必须有一些补丁,这个问题似乎非常普遍。
注意:这是说明:(可以花很长时间,但我想以任何方式完成它)。
我最初在笔记本电脑中安装了Ubuntu 13.04。大约2个月不使用后,当我再次开始使用它时,我意识到我从任何地方都没有声音(扬声器,耳机等,甚至没有系统声音)。我升级到Ubuntu 13.10,但问题仍然相同。[上次笔记本电脑处于挂起模式,我不知道这是否与此有关]。我也怀疑这里有些硬件故障。
这时候,我有一个双引导系统(Ubuntu + Windows),我删除了两个系统,并重新安装了Elementary OS-Luna(基于Ubuntu 12.04 LTS),但是我又遇到了同样的问题。然后,我进行了以下配置,扬声器开始工作(请参见alsa-base.conf
下面的片段),但耳机没有工作。当我插入耳机时,它并没有改变-声音不断通过扬声器传播。
当前,我仅在系统中拥有Elementary OS-Freya beta(基于Ubuntu 14.04),并且存在相同的问题。扬声器在工作,但耳机没有。插入耳机不会使扬声器静音,耳机也没有声音。
# Adding these lines at the end of `alsa-base.conf`, speakers started
# working fine.
options snd-hda-intel model=laptop
options snd-hda-intel position_fix=1 enable=yes
我尝试了其他帖子中指定的很多选项,但似乎没有任何效果。例如:像尝试gnome-alsamixer
使用headphone-jack-sense选项,但是没有提到`headphones。
我无法提及我尝试过的所有内容,否则该帖子可能会花费很长时间且未被注意,但是如果需要,我将添加任何命令的输出。
我已经附上了一些基本内容的屏幕截图和配置,以开始了解系统中可能发生的情况。注意:连接或不连接耳机都不会改变这些屏幕快照中的任何行为。
请为我提供正确的方向,因为这对我来说很重要,我不想因为这个愚蠢的错误而切换到Windows,这似乎是所有基于Debian的系统中的常见问题,所以我没有选择该错误仍然很普遍。
配置:(/etc/modprobe.d/alsa-base.conf
)
# autoloader aliases
install sound-slot-0 /sbin/modprobe snd-card-0
install sound-slot-1 /sbin/modprobe snd-card-1
install sound-slot-2 /sbin/modprobe snd-card-2
install sound-slot-3 /sbin/modprobe snd-card-3
install sound-slot-4 /sbin/modprobe snd-card-4
install sound-slot-5 /sbin/modprobe snd-card-5
install sound-slot-6 /sbin/modprobe snd-card-6
install sound-slot-7 /sbin/modprobe snd-card-7
# Cause optional modules to be loaded above generic modules
install snd /sbin/modprobe --ignore-install snd $CMDLINE_OPTS && { /sbin/modprobe
--quiet --use-blacklist snd-ioctl32 ; /sbin/modprobe --quiet --use-blacklist
snd-seq ; }
#
# Workaround at bug #499695 (reverted in Ubuntu see LP #319505)
install snd-pcm /sbin/modprobe --ignore-install snd-pcm $CMDLINE_OPTS && {
/sbin/modprobe --quiet --use-blacklist snd-pcm-oss ; : ; }
install snd-mixer /sbin/modprobe --ignore-install snd-mixer $CMDLINE_OPTS && {
/sbin/modprobe --quiet --use-blacklist snd-mixer-oss ; : ; }
install snd-seq /sbin/modprobe --ignore-install snd-seq $CMDLINE_OPTS && {
/sbin/modprobe --quiet --use-blacklist snd-seq-midi ; /sbin/modprobe --quiet --use-
blacklist snd-seq-oss ; : ; }
#
install snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi $CMDLINE_OPTS && {
/sbin/modprobe --quiet --use-blacklist snd-seq-midi ; : ; }
# Cause optional modules to be loaded above sound card driver modules
install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 $CMDLINE_OPTS && {
/sbin/modprobe --quiet --use-blacklist snd-emu10k1-synth ; }
install snd-via82xx /sbin/modprobe --ignore-install snd-via82xx $CMDLINE_OPTS && {
/sbin/modprobe --quiet --use-blacklist snd-seq ; }
# Load saa7134-alsa instead of saa7134 (which gets dragged in by it anyway)
install saa7134 /sbin/modprobe --ignore-install saa7134 $CMDLINE_OPTS && {
/sbin/modprobe --quiet --use-blacklist saa7134-alsa ; : ; }
# Prevent abnormal drivers from grabbing index 0
options bt87x index=-2
options cx88_alsa index=-2
options saa7134-alsa index=-2
options snd-atiixp-modem index=-2
options snd-intel8x0m index=-2
options snd-via82xx-modem index=-2
options snd-usb-audio index=-2
options snd-usb-caiaq index=-2
options snd-usb-ua101 index=-2
options snd-usb-us122l index=-2
options snd-usb-usx2y index=-2
# Ubuntu #62691, enable MPU for snd-cmipci
options snd-cmipci mpu_port=0x330 fm_port=0x388
# Keep snd-pcsp from being loaded as first soundcard
options snd-pcsp index=-2
# Keep snd-usb-audio from beeing loaded as first soundcard
options snd-usb-audio index=-2
#options snd-hda-intel model=laptop probe_mask=1 position_fix=1
#alias snd-card-0 snd-hda-intel
options snd-hda-intel model=laptop
options snd-hda-intel position_fix=1 enable=yes
屏幕截图:
**编辑:**
pactl列表简短| 更多
0 module-device-restore
1 module-stream-restore
2 module-card-restore
3 module-augment-properties
4 module-switch-on-port-available
5 module-alsa-card device_id="0" name="pci-0000_00_1b.0"
card_name="alsa_card.pci-0000_00_1b.0" namereg_fail=false tsched=yes
fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes
card_properties="module-udev-detect.discovered=1"
6 module-udev-detect
7 module-bluetooth-policy
8 module-bluetooth-discover
9 module-native-protocol-unix
10 module-gconf
11 module-default-device-restore
12 module-rescue-streams
13 module-always-sink
14 module-intended-roles
15 module-suspend-on-idle
16 module-systemd-login
17 module-position-event-sounds
18 module-filter-heuristics
19 module-filter-apply
20 module-x11-publish display=:0
21 module-x11-bell display=:0 sample=bell.ogg
22 module-x11-cork-request display=:0
23 module-x11-xsmp display=:0 session_manager=local/ItsNotMac:@/tmp/.ICE-
unix/1413,unix/ItsNotMac:/tmp/.ICE-unix/1413
0 alsa_output.pci-0000_00_1b.0.analog-stereo module-alsa-card.c s16le 2ch
44100Hz RUNNING
0 alsa_output.pci-0000_00_1b.0.analog-stereo.monitor module-alsa-card.c
s16le 2ch 44100Hz IDLE
1 alsa_input.pci-0000_00_1b.0.analog-stereo module-alsa-card.c s16le 2ch
44100Hz SUSPENDED
235 0 360 protocol-native.c s16le 2ch 44100Hz
0 module-systemd-login.c (null)
1 protocol-native.c gnome-settings-daemon
6 module-x11-xsmp.c (null)
7 protocol-native.c gala
8 protocol-native.c indicator-sound-service
9 protocol-native.c chrome
94 protocol-native.c gnome-settings-daemon
360 protocol-native.c chrome
365 protocol-native.c pactl
0 bell-window-system s16le 2ch 44100Hz 0.139
1 audio-volume-change s16le 2ch 44100Hz 0.067
0 alsa_card.pci-0000_00_1b.0 module-alsa-card.c
pacmd列表接收器
Welcome to PulseAudio! Use "help" for usage information.
>>> 1 sink(s) available.
* index: 0
name: <alsa_output.pci-0000_00_1b.0.analog-stereo>
driver: <module-alsa-card.c>
flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
DYNAMIC_LATENCY
state: RUNNING
suspend cause:
priority: 9959
volume: 0: 100% 1: 100%
0: 0.00 dB 1: 0.00 dB
balance 0.00
base volume: 100%
0.00 dB
volume steps: 65537
muted: no
current latency: 23.16 ms
max request: 4 KiB
max rewind: 64 KiB
monitor source: 0
sample spec: s16le 2ch 44100Hz
channel map: front-left,front-right
Stereo
used by: 1
linked by: 1
configured latency: 23.22 ms; range is 0.50 .. 371.52 ms
card: 0 <alsa_card.pci-0000_00_1b.0>
module: 5
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "CONEXANT Analog"
alsa.id = "CONEXANT Analog"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "0"
alsa.card_name = "HDA Intel PCH"
alsa.long_card_name = "HDA Intel PCH at 0xe0610000 irq 44"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:00:1b.0"
sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "1e20"
device.product.name = "7 Series/C210 Series Chipset Family High Definition
Audio Controller"
device.form_factor = "internal"
device.string = "front:0"
device.buffering.buffer_size = "65536"
device.buffering.fragment_size = "32768"
device.access_mode = "mmap+timer"
device.profile.name = "analog-stereo"
device.profile.description = "Analog Stereo"
device.description = "Built-in Audio Analog Stereo"
alsa.mixer_name = "Intel PantherPoint HDMI"
alsa.components = "HDA:14f1506e,17aac023,00100003
HDA:80862806,80860101,00100000"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
ports:
analog-output-headphones: Headphones (priority 8900, latency offset 0
usec, available: unknown)
properties:
device.icon_name = "audio-headphones"
active port: <analog-output-headphones>
** pactl列出短接收器:**
0 alsa_output.pci-0000_00_1b.0.analog-stereo module-alsa-card.c s16le
2ch 44100Hz IDL
pactl list short
找到耳机,然后放下耳机pactl set-default-sink the-second-field-of-the-previous-command
,现在用找到设备的编号,并用pacmd list-sinks
取消静音pacmd set-sink-mute number-you-got-from-previous-command false
。