我们的 Java 应用程序定期播放简短的通知声音(响应用户操作)。在某些硬件上,我们的应用程序将在第三次或第四次短声后锁定。我们必须pkill java
恢复。
我们在大约 40 台计算机上安装了该应用程序。全部都运行Linux。一半安装了 Kubuntu 12.04,一半安装了 Linux Mint 11。所有 Linux Mint 11 机器都工作正常,并且 Java 应用程序播放声音而不会锁定。
最初(从 12.04 版本开始)所有 Kubuntu 机器都运行良好。
在更新后的某个时刻,Kubuntu 机器在播放声音时开始锁定。如果我们关闭应用程序中的声音通知选项,这是一个解决方法。该应用程序不会锁定。但用户想要的是声音。
当我们发现问题时,我们停止在 Kubuntu 机器上运行更新,所有没有更新的机器(几个月前)继续从我们的应用程序播放声音,而应用程序不会冻结。
即使在更新的 Kubuntu 机器上,所有硬件上也不会出现锁定问题。例如,在 Thinkpad X220 平板电脑上,我们应用程序中的声音可以正常工作。但在 ThinkPad E430 上,在应用程序中启用声音会导致应用程序冻结。
我们无法发现其中的模式。是什么导致了最新的 Linux 和某些硬件上的锁定,而较旧的 Linux 在我们使用的所有硬件上都很好?
这是我们在其中的一些硬件的信息确实有问题:
uname -a
Linux mynetbook-AO532h 3.2.0-41-generic #66-Ubuntu SMP Thu Apr 25 03:27:11 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
################################################################################
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.2 LTS
Release: 12.04
Codename: precise
################################################################################
aplay --list-devices
Home directory /home/myuser not ours.
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC272X Analog [ALC272X Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Pro [Sound Blaster X-Fi Go! Pro], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
################################################################################
aplay --version
aplay: version 1.0.25 by Jaroslav Kysela <[email protected]>
################################################################################
cat /proc/asound/cards
0 [Intel ]: HDA-Intel - HDA Intel
HDA Intel at 0x58200000 irq 44
1 [Pro ]: USB-Audio - Sound Blaster X-Fi Go! Pro
Creative Technology Ltd Sound Blaster X-Fi Go! Pro at usb-0000:00:1d.1-1, full
################################################################################
hwinfo --sound
process 2393: arguments to dbus_move_error() were incorrect, assertion "(dest) == NULL || !dbus_error_is_set ((dest))" failed in file ../../dbus/dbus-errors.c line 282.
This is normally a bug in some application using the D-Bus library.
libhal.c 3483 : Error unsubscribing to signals, error=The name org.freedesktop.Hal was not provided by any .service files
11: PCI 1b.0: 0403 Audio device
[Created at pci.318]
Unique ID: u1Nb.ZCVQnTUjxO7
SysFS ID: /devices/pci0000:00/0000:00:1b.0
SysFS BusID: 0000:00:1b.0
Hardware Class: sound
Model: "Intel 82801G (ICH7 Family) High Definition Audio Controller"
Vendor: pci 0x8086 "Intel Corporation"
Device: pci 0x27d8 "82801G (ICH7 Family) High Definition Audio Controller"
SubVendor: pci 0x1025 "Acer Incorporated [ALI]"
SubDevice: pci 0x0349
Revision: 0x02
Driver: "snd_hda_intel"
Driver Modules: "snd_hda_intel"
Memory Range: 0x58200000-0x58203fff (rw,non-prefetchable)
IRQ: 44 (262 events)
Module Alias: "pci:v00008086d000027D8sv00001025sd00000349bc04sc03i00"
Driver Info #0:
Driver Status: snd_hda_intel is active
Driver Activation Cmd: "modprobe snd_hda_intel"
Config Status: cfg=new, avail=yes, need=no, active=unknown
################################################################################
lsmod
Module Size Used by
joydev 17693 0
rfcomm 47604 0
bnep 18281 2
bluetooth 180153 10 rfcomm,bnep
parport_pc 32866 0
ppdev 17113 0
acer_wmi 28418 0
sparse_keymap 13890 1 acer_wmi
snd_hda_codec_realtek 224173 1
snd_hda_intel 33719 3
snd_hda_codec 127706 2 snd_hda_codec_realtek,snd_hda_intel
snd_usb_audio 122982 2
snd_pcm 97275 3 snd_hda_intel,snd_hda_codec,snd_usb_audio
snd_hwdep 17764 2 snd_hda_codec,snd_usb_audio
snd_usbmidi_lib 29476 1 snd_usb_audio
arc4 12529 2
snd_seq_midi 13324 0
snd_rawmidi 30748 2 snd_usbmidi_lib,snd_seq_midi
snd_seq_midi_event 14899 1 snd_seq_midi
cp210x 21898 0
usbserial 47077 1 cp210x
ath9k 132428 0
uvcvideo 72627 0
psmouse 97485 0
snd_seq 61929 2 snd_seq_midi,snd_seq_midi_event
videodev 98259 1 uvcvideo
mac80211 506862 1 ath9k
serio_raw 13211 0
v4l2_compat_ioctl32 17128 1 videodev
ath9k_common 14053 1 ath9k
ath9k_hw 411239 2 ath9k,ath9k_common
snd_timer 29990 2 snd_pcm,snd_seq
ath 24067 3 ath9k,ath9k_common,ath9k_hw
snd_seq_device 14540 3 snd_seq_midi,snd_rawmidi,snd_seq
cfg80211 205774 3 ath9k,mac80211,ath
snd 79041 21 snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_usb_audio,snd_pcm,snd_hwdep,snd_usbmidi_lib,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
soundcore 15091 1 snd
snd_page_alloc 18529 2 snd_hda_intel,snd_pcm
mac_hid 13253 0
lp 17799 0
parport 46562 3 parport_pc,ppdev,lp
usbhid 47238 0
hid 99636 1 usbhid
i915 477763 3
drm_kms_helper 46978 1 i915
drm 241971 4 i915,drm_kms_helper
atl1c 41718 0
i2c_algo_bit 13423 1 i915
wmi 19256 1 acer_wmi
video 19651 1 i915
################################################################################
cat /etc/modprobe.d/blacklist.conf
# This file lists those modules which we don't want to be loaded by
# alias expansion, usually so some other driver will be loaded for the
# device instead.
# evbug is a debug tool that should be loaded explicitly
blacklist evbug
# these drivers are very simple, the HID drivers are usually preferred
blacklist usbmouse
blacklist usbkbd
# replaced by e100
blacklist eepro100
# replaced by tulip
blacklist de4x5
# causes no end of confusion by creating unexpected network interfaces
blacklist eth1394
# snd_intel8x0m can interfere with snd_intel8x0, doesn't seem to support much
# hardware on its own (Ubuntu bug #2011, #6810)
blacklist snd_intel8x0m
# Conflicts with dvb driver (which is better for handling this device)
blacklist snd_aw2
# causes failure to suspend on HP compaq nc6000 (Ubuntu: #10306)
blacklist i2c_i801
# replaced by p54pci
blacklist prism54
# replaced by b43 and ssb.
blacklist bcm43xx
# most apps now use garmin usb driver directly (Ubuntu: #114565)
blacklist garmin_gps
# replaced by asus-laptop (Ubuntu: #184721)
blacklist asus_acpi
# low-quality, just noise when being used for sound playback, causes
# hangs at desktop session start (Ubuntu: #246969)
blacklist snd_pcsp
# ugly and loud noise, getting on everyone's nerves; this should be done by a
# nice pulseaudio bing (Ubuntu: #77010)
blacklist pcspkr
# EDAC driver for amd76x clashes with the agp driver preventing the aperture
# from being initialised (Ubuntu: #297750). Blacklist so that the driver
# continues to build and is installable for the few cases where its
# really needed.
blacklist amd76x_edac
################################################################################
cat /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
################################################################################
lspci -vvx
[snip]
00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 02)
Subsystem: Acer Incorporated [ALI] Device 0349
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 44
Region 0: Memory at 58200000 (64-bit, non-prefetchable) [size=16K]
Capabilities: [50] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
Address: 00000000fee0300c Data: 4179
Capabilities: [70] Express (v1) Root Complex Integrated Endpoint, MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
ExtTag- RBE- FLReset-
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+
MaxPayload 128 bytes, MaxReadReq 128 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
LnkCap: Port #0, Speed unknown, Width x0, ASPM unknown, Latency L0 <64ns, L1 <1us
ClockPM- Surprise- LLActRep- BwNot-
LnkCtl: ASPM Disabled; Disabled- Retrain- CommClk-
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed unknown, Width x0, TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt-
Capabilities: [100 v1] Virtual Channel
Caps: LPEVC=0 RefClk=100ns PATEntryBits=1
Arb: Fixed- WRR32- WRR64- WRR128-
Ctrl: ArbSelect=Fixed
Status: InProgress-
VC0: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
Arb: Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
Ctrl: Enable+ ID=0 ArbSelect=Fixed TC/VC=01
Status: NegoPending- InProgress-
VC1: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
Arb: Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
Ctrl: Enable+ ID=1 ArbSelect=Fixed TC/VC=80
Status: NegoPending- InProgress-
Capabilities: [130 v1] Root Complex Link
Desc: PortNumber=0f ComponentID=02 EltType=Config
Link0: Desc: TargetPort=00 TargetComponent=02 AssocRCRB- LinkType=MemMapped LinkValid+
Addr: 00000000fed1c000
Kernel driver in use: snd_hda_intel
Kernel modules: snd-hda-intel
00: 86 80 d8 27 06 04 10 00 02 00 03 04 10 00 00 00
10: 04 00 20 58 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 25 10 49 03
30: 00 00 00 00 50 00 00 00 00 00 00 00 0b 01 00 00
[snip]
这是机器的类似报告才不是展示问题:
uname -a
Linux netbook-Gate 3.2.0-41-generic-pae #66-Ubuntu SMP Thu Apr 25 03:50:20 UTC 2013 i686 i686 i386 GNU/Linux
################################################################################
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.2 LTS
Release: 12.04
Codename: precise
################################################################################
aplay --list-devices
Home directory /home/me not ours.
**** List of PLAYBACK Hardware Devices ****
card 0: ICH6 [Intel ICH6], device 0: Intel ICH [Intel ICH6]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: ICH6 [Intel ICH6], device 4: Intel ICH - IEC958 [Intel ICH6 - IEC958]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Pro [Sound Blaster X-Fi Go! Pro], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
################################################################################
aplay --version
aplay: version 1.0.25 by Jaroslav Kysela <[email protected]>
################################################################################
cat /proc/asound/cards
0 [ICH6 ]: ICH4 - Intel ICH6
Intel ICH6 with Cx20468-31 at irq 21
1 [Pro ]: USB-Audio - Sound Blaster X-Fi Go! Pro
Creative Technology Ltd Sound Blaster X-Fi Go! Pro at usb-0000:00:1d.0-1, full
################################################################################
hwinfo --sound
process 2510: arguments to dbus_move_error() were incorrect, assertion "(dest) == NULL || !dbus_error_is_set ((dest))" failed in file ../../dbus/dbus-errors.c line 282.
This is normally a bug in some application using the D-Bus library.
libhal.c 3483 : Error unsubscribing to signals, error=The name org.freedesktop.Hal was not provided by any .service files
18: PCI 1e.2: 0401 Multimedia audio controller
[Created at pci.318]
Unique ID: r0Vg.2VcHkXp8YSA
SysFS ID: /devices/pci0000:00/0000:00:1e.2
SysFS BusID: 0000:00:1e.2
Hardware Class: sound
Model: "Intel 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller"
Vendor: pci 0x8086 "Intel Corporation"
Device: pci 0x266e "82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller"
SubVendor: pci 0x107b "Gateway 2000"
SubDevice: pci 0x0365
Revision: 0x04
Driver: "snd_intel8x0"
Driver Modules: "snd_intel8x0"
I/O Ports: 0x1c00-0x1cff (rw)
I/O Ports: 0x18c0-0x18ff (rw)
Memory Range: 0xb0040800-0xb00409ff (rw,non-prefetchable)
Memory Range: 0xb0040400-0xb00404ff (rw,non-prefetchable)
IRQ: 21 (58 events)
Module Alias: "pci:v00008086d0000266Esv0000107Bsd00000365bc04sc01i00"
Driver Info #0:
Driver Status: snd_intel8x0 is active
Driver Activation Cmd: "modprobe snd_intel8x0"
Config Status: cfg=new, avail=yes, need=no, active=unknown
################################################################################
lsmod
Module Size Used by
michael_mic 12540 4
arc4 12473 2
lib80211_crypt_tkip 17275 1
lib80211_crypt_ccmp 12789 1
rfcomm 38139 0
bnep 17830 2
bluetooth 158479 10 rfcomm,bnep
parport_pc 32114 0
ppdev 12849 0
snd_usb_audio 101566 2
snd_hwdep 13276 1 snd_usb_audio
snd_usbmidi_lib 24588 1 snd_usb_audio
joydev 17393 0
snd_intel8x0 33455 2
snd_ac97_codec 110213 1 snd_intel8x0
ac97_bus 12642 1 snd_ac97_codec
snd_pcm 80916 3 snd_usb_audio,snd_intel8x0,snd_ac97_codec
snd_seq_midi 13132 0
snd_rawmidi 25424 2 snd_usbmidi_lib,snd_seq_midi
snd_seq_midi_event 14475 1 snd_seq_midi
pcmcia 39826 0
snd_seq 51592 2 snd_seq_midi,snd_seq_midi_event
snd_timer 28931 2 snd_pcm,snd_seq
snd_seq_device 14172 3 snd_seq_midi,snd_rawmidi,snd_seq
cp210x 21610 0
psmouse 86520 0
ipw2200 146241 0
libipw 46732 1 ipw2200
tifm_7xx1 12937 0
cfg80211 178877 2 ipw2200,libipw
usbserial 37173 1 cp210x
tifm_core 15040 1 tifm_7xx1
snd 62218 18 snd_usb_audio,snd_hwdep,snd_usbmidi_lib,snd_intel8x0,snd_ac97_codec,snd_pcm,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
yenta_socket 27465 0
serio_raw 13027 0
pcmcia_rsrc 18367 1 yenta_socket
soundcore 14635 1 snd
pcmcia_core 21511 3 pcmcia,yenta_socket,pcmcia_rsrc
lib80211 14040 4 lib80211_crypt_tkip,lib80211_crypt_ccmp,ipw2200,libipw
snd_page_alloc 14108 2 snd_intel8x0,snd_pcm
mac_hid 13077 0
lp 17455 0
parport 40930 3 parport_pc,ppdev,lp
usbhid 41937 0
hid 77428 1 usbhid
i915 423564 2
firewire_ohci 40172 0
sdhci_pci 18324 0
firewire_core 56940 1 firewire_ohci
crc_itu_t 12627 1 firewire_core
sdhci 28241 1 sdhci_pci
drm_kms_helper 45466 1 i915
drm 197641 3 i915,drm_kms_helper
i2c_algo_bit 13199 1 i915
video 19115 1 i915
sky2 53628 0
################################################################################
cat /etc/modprobe.d/blacklist.conf
# This file lists those modules which we don't want to be loaded by
# alias expansion, usually so some other driver will be loaded for the
# device instead.
# evbug is a debug tool that should be loaded explicitly
blacklist evbug
# these drivers are very simple, the HID drivers are usually preferred
blacklist usbmouse
blacklist usbkbd
# replaced by e100
blacklist eepro100
# replaced by tulip
blacklist de4x5
# causes no end of confusion by creating unexpected network interfaces
blacklist eth1394
# snd_intel8x0m can interfere with snd_intel8x0, doesn't seem to support much
# hardware on its own (Ubuntu bug #2011, #6810)
blacklist snd_intel8x0m
# Conflicts with dvb driver (which is better for handling this device)
blacklist snd_aw2
# causes failure to suspend on HP compaq nc6000 (Ubuntu: #10306)
blacklist i2c_i801
# replaced by p54pci
blacklist prism54
# replaced by b43 and ssb.
blacklist bcm43xx
# most apps now use garmin usb driver directly (Ubuntu: #114565)
blacklist garmin_gps
# replaced by asus-laptop (Ubuntu: #184721)
blacklist asus_acpi
# low-quality, just noise when being used for sound playback, causes
# hangs at desktop session start (Ubuntu: #246969)
blacklist snd_pcsp
# ugly and loud noise, getting on everyone's nerves; this should be done by a
# nice pulseaudio bing (Ubuntu: #77010)
blacklist pcspkr
# EDAC driver for amd76x clashes with the agp driver preventing the aperture
# from being initialised (Ubuntu: #297750). Blacklist so that the driver
# continues to build and is installable for the few cases where its
# really needed.
blacklist amd76x_edac
################################################################################
cat /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
################################################################################
lspci -vvx
00:1e.2 Multimedia audio controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller (rev 04)
Subsystem: Gateway 2000 Device 0365
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 21
Region 0: I/O ports at 1c00 [size=256]
Region 1: I/O ports at 18c0 [size=64]
Region 2: Memory at b0040800 (32-bit, non-prefetchable) [size=512]
Region 3: Memory at b0040400 (32-bit, non-prefetchable) [size=256]
Capabilities: [50] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Kernel driver in use: snd_intel8x0
Kernel modules: snd-intel8x0
00: 86 80 6e 26 07 00 90 02 04 00 01 04 00 00 00 00
10: 01 1c 00 00 c1 18 00 00 00 08 04 b0 00 04 04 b0
20: 00 00 00 00 00 00 00 00 00 00 00 00 7b 10 65 03
30: 00 00 00 00 50 00 00 00 00 00 00 00 0b 01 00 00
答案1
我之前使用 sun.audio.AudioStream 和 sun.audio.AudioPlayer 在 Linux 上的 Java 中播放声音获得了最佳结果。这些是“内部”课程,不推荐,但它们对我来说比其他课程效果更好(多年来)。直到出现了这个问题。
我的新解决方案就是这样:Runtime.getRuntime().exec(mediaPlayerCommand + fileName);
对于媒体播放器,我可以play
在 OpenSuse 或mplayer
Ubuntu 上使用。我只需将该命令放置在目标操作系统上的配置文件中,它就可以很好地工作。