我使用 Firefox 运行我的 Web 应用程序(播放视频)。我使用的是 Debian 8 和 Firefox 48.0.1。我的一些视频有声音,一些没有。每个视频都通过 HDMI 端口显示。我希望最终的电视播放声音(仍然通过 HDMI)。
播放有声音的视频时,有时有声音,有时没有声音。我使用部分本文。
以下是我用来查找问题的 2 个命令行。
pacmd list-sinks
pacmd list-sink-inputs
这正是我的问题:
pacmd list-sinks
2 sink(s) available.
* index: 0
name: <alsa_output.pci-0000_00_03.0.hdmi-stereo-extra1>
driver: <module-alsa-card.c>
flags: HARDWARE DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY
state: RUNNING
suspend cause:
priority: 9950
volume: front-left: 75368 / 115% / 3,64 dB, front-right: 75368 / 115% / 3,64 dB
balance 0,00
base volume: 65536 / 100% / 0,00 dB
volume steps: 65537
muted: no
current latency: 7,85 ms
max request: 1 KiB
max rewind: 64 KiB
monitor source: 0
sample spec: s16le 2ch 44100Hz
channel map: front-left,front-right
Stéréo
used by: 1
linked by: 3
configured latency: 10,00 ms; range is 0,50 .. 371,52 ms
card: 0 <alsa_card.pci-0000_00_03.0>
module: 6
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "HDMI 1"
alsa.id = "HDMI 1"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "7"
alsa.card = "0"
alsa.card_name = "HDA Intel HDMI"
alsa.long_card_name = "HDA Intel HDMI at 0xf7214000 irq 66"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:00:03.0"
sysfs.path = "/devices/pci0000:00/0000:00:03.0/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "160c"
device.product.name = "Broadwell-U Audio Controller"
device.form_factor = "internal"
device.string = "hdmi:0,1"
device.buffering.buffer_size = "65536"
device.buffering.fragment_size = "32768"
device.access_mode = "mmap+timer"
device.profile.name = "hdmi-stereo-extra1"
device.profile.description = "Digital Stereo (HDMI)"
device.description = "Audio interne Digital Stereo (HDMI)"
alsa.mixer_name = "Intel Broadwell HDMI"
alsa.components = "HDA:80862808,80860101,00100000"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
ports:
hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: yes)
properties:
device.icon_name = "video-display"
device.product.name = "SyncMaster"
active port: <hdmi-output-1>
index: 1
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 FLAT_VOLUME DYNAMIC_LATENCY
state: IDLE
suspend cause:
priority: 9959
volume: front-left: 31457 / 48% / -19,13 dB, front-right: 31457 / 48% / -19,13 dB
balance 0,00
base volume: 65536 / 100% / 0,00 dB
volume steps: 65537
muted: no
current latency: 19,73 ms
max request: 3 KiB
max rewind: 64 KiB
monitor source: 1
sample spec: s16le 2ch 44100Hz
channel map: front-left,front-right
Stéréo
used by: 0
linked by: 1
configured latency: 20,00 ms; range is 0,50 .. 371,52 ms
card: 1 <alsa_card.pci-0000_00_1b.0>
module: 7
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "ALC283 Analog"
alsa.id = "ALC283 Analog"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "1"
alsa.card_name = "HDA Intel PCH"
alsa.long_card_name = "HDA Intel PCH at 0xf7210000 irq 62"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:00:1b.0"
sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card1"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "9ca0"
device.product.name = "Wildcat Point-LP High Definition Audio Controller"
device.form_factor = "internal"
device.string = "front:1"
device.buffering.buffer_size = "65536"
device.buffering.fragment_size = "32768"
device.access_mode = "mmap+timer"
device.profile.name = "analog-stereo"
device.profile.description = "Stéréo analogique"
device.description = "Audio interne Stéréo analogique"
alsa.mixer_name = "Realtek ALC283"
alsa.components = "HDA:10ec0283,1462b096,00100003"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
ports:
analog-output-headphones: Casques analogiques (priority 9000, latency offset 0 usec, available: no)
properties:
device.icon_name = "audio-headphones"
active port: <analog-output-headphones>
重要部分(简历):
pacmd list-sinks |grep index
* index: 0
index: 1
pacmd list-sink-inputs
1 sink input(s) available.
index: 178
driver: <protocol-native.c>
flags: START_CORKED
state: RUNNING
sink: 0 <alsa_output.pci-0000_00_03.0.hdmi-stereo-extra1>
volume: front-left: 69844 / 107% / 1,66 dB, front-right: 69844 / 107% / 1,66 dB
balance 0,00
muted: no
current latency: 26,94 ms
requested latency: 10,00 ms
sample spec: float32le 2ch 44100Hz
channel map: front-left,front-right
Stéréo
resample method: copy
module: 12
client: 7 <CubebUtils>
properties:
media.name = "AudioCallbackDriver"
application.name = "CubebUtils"
native-protocol.peer = "UNIX socket client"
native-protocol.version = "29"
application.process.id = "1040"
application.process.user = "myuser"
application.process.host = "myuser-92"
application.process.binary = "plugin-container"
application.language = "fr_FR.UTF-8"
window.x11.display = ":0"
application.process.machine_id = "00d7bea9e5d14ced80bac1569196db8a"
application.process.session_id = "1"
module-stream-restore.id = "sink-input-by-application-name:CubebUtils"
最重要的部分(简历):
pacmd list-sink-inputs |grep index
index: 178
每次我的浏览器读取视频(有声或无声)时,第二个索引都会增加。然后,Firefox 就完全失灵了,根本不播放声音(有时)。
有两种不同的行为。Firefox -> 始终只有一个索引,每次都不同,数量不断增加 Chrome -> 创建自己的输入。(参见以下代码)
pacmd list-sink-inputs
2 sink input(s) available.
index: 194
driver: <protocol-native.c>
flags: START_CORKED
state: RUNNING
sink: 0 <alsa_output.pci-0000_00_03.0.hdmi-stereo-extra1>
volume: front-left: 69844 / 107% / 1,66 dB, front-right: 69844 / 107% / 1,66 dB
balance 0,00
muted: no
current latency: 27,07 ms
requested latency: 10,00 ms
sample spec: float32le 2ch 44100Hz
channel map: front-left,front-right
Stéréo
resample method: copy
module: 12
client: 7 <CubebUtils>
properties:
media.name = "AudioCallbackDriver"
application.name = "CubebUtils"
native-protocol.peer = "UNIX socket client"
native-protocol.version = "29"
application.process.id = "1040"
application.process.user = "myuser"
application.process.host = "myuser-92"
application.process.binary = "plugin-container"
application.language = "fr_FR.UTF-8"
window.x11.display = ":0"
application.process.machine_id = "00d7bea9e5d14ced80bac1569196db8a"
application.process.session_id = "1"
module-stream-restore.id = "sink-input-by-application-name:CubebUtils"
index: 195
driver: <protocol-native.c>
flags: START_CORKED
state: RUNNING
sink: 0 <alsa_output.pci-0000_00_03.0.hdmi-stereo-extra1>
volume: front-left: 75368 / 115% / 3,64 dB, front-right: 75368 / 115% / 3,64 dB
balance 0,00
muted: no
current latency: 16,19 ms
requested latency: 11,61 ms
sample spec: s16le 2ch 44100Hz
channel map: front-left,front-right
Stéréo
resample method: (null)
module: 12
client: 1118 <Chromium>
properties:
media.name = "Playback"
application.name = "Chromium"
native-protocol.peer = "UNIX socket client"
native-protocol.version = "29"
application.process.id = "21853"
application.process.user = "myuser"
application.process.host = "myuser-92"
application.process.binary = "chrome"
window.x11.display = ":0.0"
application.language = "fr_FR.UTF-8"
application.process.machine_id = "00d7bea9e5d14ced80bac1569196db8a"
application.process.session_id = "1"
module-stream-restore.id = "sink-input-by-application-name:Chromium"
我想(永久)修复这两个浏览器的接收器输入索引值。我不明白为什么索引每次都在变化。有什么原因吗?
有人有想法吗?
先感谢您。
主編輯:以下是一些新的测试
Firefox
我以为通过更新到版本可以解决问题51.0.1
。输入接收器现在保持不变。我不再遇到这个问题。但还有其他问题与版本有关51.0.1
。在播放了 70 到 75 个有声视频后,图像变形了。我对版本的索引有同样的问题,50.1.0
但在连续播放 200 个视频后,显示没有错误。
编辑2:当创建一个包含 2 个带声音的视频的单个 HTML 页面时,它会创建 2 个接收器输入……这正式是一个错误。