Debian 12。如果我尝试通过蓝牙耳机播放视频,视频在启动时会冻结。尝试了 mpv 和 vlc。如果我使用 pavucontrol 并选择主板声卡,视频播放没有任何问题,音频也很好。如果我在两者之间来回切换,视频将停止并开始。
我尝试重新启动蓝牙和 pulseaudio,但没有成功。
我的耳机多年来一直运行良好,这是第一次发生这种情况。
如何在不重启的情况下修复此问题?
Debian 12。如果我尝试通过蓝牙耳机播放视频,视频在启动时会冻结。尝试了 mpv 和 vlc。如果我使用 pavucontrol 并选择主板声卡,视频播放没有任何问题,音频也很好。如果我在两者之间来回切换,视频将停止并开始。
我尝试重新启动蓝牙和 pulseaudio,但没有成功。
我的耳机多年来一直运行良好,这是第一次发生这种情况。
如何在不重启的情况下修复此问题?
我想用麦克风录制超声波,分频并听转置的声音。我从普通麦克风开始进行测试。
到目前为止,我已经尝试过 sox 和 rec 以及 play 了。它可以工作,但延迟为 2 秒。
rec -r 48000 -c 1 -t wav - pitch -1000 | play -t wav -
我该如何改进这条线路并减少延迟?
我的音频设置是
# API: ALSA v: k6.1.27-gentoo status: kernel-api
# Server-1: PulseAudio v: 16.1 status: active
我看到使用音频服务器(在我的例子中是 pipewire)你可以改变“延迟”。(请原谅我,我对这些东西不是很了解。)
PIPEWIRE_LATENCY="128/48000"
Arch Linux wiki 将此描述为“请求[ing]自定义缓冲区大小”。
我想知道,将延迟设置得非常低是否有“缺点”。仅仅是响应更快的音频意味着更高的资源成本吗?
目前,我认为我用于 PipeWire 的 PulseAudio 垫片无法正常工作。当我运行时pactl info
,我收到“连接被拒绝”错误,
$ pactl info
Connection failure: Connection refused
pa_context_connect() failed: Connection refused
当我尝试运行 pavumixer 时,我得到
建立与 PulseAudio 的连接。请稍等...
我该如何解决这个问题?
所以我的系统的扬声器和耳机插孔不起作用,所以我跑去sudo pulseaudio -v
看问题是什么,我发现错误太多(因此这个问题的命名很奇怪)这是该命令的日志
因为我注意到pulseaudio
不应该使用 root perms 运行,所以我决定运行pulseaudio -v
,我得到了这个:
I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
I: [pulseaudio] main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
I: [pulseaudio] core-util.c: Successfully gained nice level -11.
I: [pulseaudio] main.c: This is PulseAudio 15.99.1
I: [pulseaudio] main.c: Page size is 4096 bytes
I: [pulseaudio] main.c: Machine ID is 664d5eb40be146aaa89e6646ade8f191.
I: [pulseaudio] main.c: Using runtime directory /run/user/1000/pulse.
I: [pulseaudio] main.c: Using state directory /home/misery/.config/pulse.
I: [pulseaudio] main.c: Using modules directory /usr/lib/pulse-15.99.1+dfsg1/modules.
I: [pulseaudio] main.c: Running in system mode: no
E: [pulseaudio] pid.c: Daemon already running.
E: [pulseaudio] main.c: pa_pid_file_create() failed.
在尝试修复 PulseAudio 时,我发现了两个经常看到的错误:
pa_pid_file_create() failed.
org.bluez.ProfileManager1.RegisterProfile() failed: org.bluez.Error.NotPermitted: UUID already registered
我该如何解决这个问题?
我正在开发基于 Linux Linaro (Debian) OS 9.3 的嵌入式板 (Tinkerboard)。
该板基本上是一个(网页)信息亭,其中浏览器由 sh 脚本运行,包括启动时的自动脚本。kiosk 需要播放几个由 js 事件触发的 mp3 文件。
大多数情况下,音频不会被复制:如果我手动运行浏览器,音频总是可以的。
到目前为止,我发现 chromium 进程在 pulseaudio 进程之前运行(基于 PID 值),所以我认为浏览器不会“连接”音频进程导致丢失。
我修改了脚本,例如:
# Script.sh
pulseaudio
sleep 4s
chromium -kiosk ....
这样音频还可以,但我不喜欢它..首先因为我不确定问题的原因。
有没有办法以正确的顺序排列流程?
关于音频问题的任何其他原因?
有两个输出设备:在我的电脑headphone
中 line out
。我可以选择其中一个作为输出设备PulseAudio Volume Control
。amixer
可以做同样的工作pulseaudio
吗?
我想选择speaker
播放card 1
音频。
amixer -c 1 set "speaker" On
amixer: Unable to find simple control 'speaker',0
amixer -c 1 set "speaker" 10db
amixer: Unable to find simple control 'speaker',0
他们两个都不能工作。
@MC68020,无效命令:
debian@debian:~$ amixer -c 1 scontrols
Simple mixer control 'Master',0
Simple mixer control 'Headphone',0
Simple mixer control 'Headphone+LO',0
Simple mixer control 'PCM',0
Simple mixer control 'Front',0
Simple mixer control 'Front Mic',0
Simple mixer control 'Front Mic Boost',0
Simple mixer control 'Surround',0
Simple mixer control 'Center',0
Simple mixer control 'LFE',0
Simple mixer control 'Line',0
Simple mixer control 'Line Boost',0
Simple mixer control 'IEC958',0
Simple mixer control 'IEC958 Default PCM',0
Simple mixer control 'Capture',0
Simple mixer control 'Capture',1
Simple mixer control 'Auto-Mute Mode',0
Simple mixer control 'Channel Mode',0
Simple mixer control 'Input Source',0
Simple mixer control 'Input Source',1
Simple mixer control 'Loopback Mixing',0
Simple mixer control 'Rear Mic',0
Simple mixer control 'Rear Mic Boost',0
debian@debian:~$ amixer -c 1 sset Headphone 80%
amixer: Invalid command!
debian@debian:~$ amixer -c 1 set Headphone 80%
amixer: Invalid command!
debian@debian:~$ amixer -c 1 set "Headphone" 80%
amixer: Invalid command!
debian@debian:~$ amixer -c 1 sset "Headphone" 80%
amixer: Invalid command!
关于我的混合器的更多信息:
debian@debian:~$ amixer -v
amixer version 1.2.4
debian@debian:~$ amixer -c 1 sget Headphone
Simple mixer control 'Headphone',0
Capabilities: pswitch
Playback channels: Front Left - Front Right
Mono:
Front Left: Playback [on]
Front Right: Playback [on]
操作系统信息:
uname -a
Linux debian 5.10.0-11-amd64 #1 SMP Debian 5.10.92-2 (2022-02-28) x86_64 GNU/Linux
安装它:
sudo apt install pulseaudio
pulseaudio
E: [pulseaudio] pid.c: Daemon already running.
E: [pulseaudio] main.c: pa_pid_file_create() failed.
检查pid:
ps aux |grep puls[e]
debian 2003 1.4 0.5 1355060 32676 ? S<sl 14:45 0:13 /usr/bin/pulseaudio --daemonize=no --log-target=journal
杀死进程:
killall pulseaudio
重新开始:
pulseaudio
E: [pulseaudio] pid.c: Daemon already running.
E: [pulseaudio] main.c: pa_pid_file_create() failed.
再检查一遍:
ps aux |grep puls[e]
debian 4408 1.5 0.5 565988 30580 ? S<sl 15:02 0:00 /usr/bin/pulseaudio --daemonize=no --log-target=journal
显示更多信息:
pulseaudio -vv
I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
D: [pulseaudio] core-rtclock.c: Timer slack is set to 50 us.
D: [pulseaudio] core-util.c: RealtimeKit worked.
I: [pulseaudio] core-util.c: Successfully gained nice level -11.
I: [pulseaudio] main.c: This is PulseAudio 14.2
D: [pulseaudio] main.c: Compilation CFLAGS: -g -O2 -ffile-prefix-map=/build/pulseaudio-eJtUKc/pulseaudio-14.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -W -Wextra -pipe -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -fno-common -fdiagnostics-show-option -fdiagnostics-color=auto
D: [pulseaudio] main.c: Running on host: Linux x86_64 5.10.0-11-amd64 #1 SMP Debian 5.10.92-2 (2022-02-28)
D: [pulseaudio] main.c: Found 4 CPUs.
I: [pulseaudio] main.c: Page size is 4096 bytes
D: [pulseaudio] main.c: Compiled with Valgrind support: no
D: [pulseaudio] main.c: Running in valgrind mode: no
D: [pulseaudio] main.c: Running in VM: no
D: [pulseaudio] main.c: Running from build tree: no
D: [pulseaudio] main.c: Optimized build: yes
D: [pulseaudio] main.c: FASTPATH defined, only fast path asserts disabled.
I: [pulseaudio] main.c: Machine ID is 1d6cdb224b624ef0b5f3a69d0f9c448c.
I: [pulseaudio] main.c: Session ID is 3.
I: [pulseaudio] main.c: Using runtime directory /run/user/1000/pulse.
I: [pulseaudio] main.c: Using state directory /home/debian/.config/pulse.
I: [pulseaudio] main.c: Using modules directory /usr/lib/pulse-14.2/modules.
I: [pulseaudio] main.c: Running in system mode: no
E: [pulseaudio] pid.c: Daemon already running.
E: [pulseaudio] main.c: pa_pid_file_create() failed.
如何开始呢pulseaudio
?
我有一个 M-track 8 音频设备(8 个 I/O)。它适用于播放。但是,麦克风(48 伏 XLR 麦克风)几乎没有发出任何声音。录制时,它们在任何应用程序中的音量上限为 15%。
所以问题出在 ALSA 或驱动程序的某个地方。这是一个普通的 USB 音频类设备,因此驱动程序不太可能出现问题(在 Gentoo、Ubuntu 20.04 和 Ubuntu 18.04 live-usb 中重现)。
alsamixer
显示所有输入为 100%pavucontrol
以 100% 显示所有输入.asoundrc
配置来强制 96kHz,但它什么也没做混音器-c2:
Simple mixer control 'Mic',0
Capabilities: cvolume cswitch
Capture channels: Front Left - Front Right - Rear Left - Rear Right - Front Center - Woofer - Side Left - Side Right
Limits: Capture 0 - 127
Front Left: Capture 127 [100%] [0.00dB] [on]
Front Right: Capture 127 [100%] [0.00dB] [on]
Rear Left: Capture 127 [100%] [0.00dB] [on]
Rear Right: Capture 127 [100%] [0.00dB] [on]
Front Center: Capture 127 [100%] [0.00dB] [on]
Woofer: Capture 127 [100%] [0.00dB] [on]
Side Left: Capture 127 [100%] [0.00dB] [on]
Side Right: Capture 127 [100%] [0.00dB] [on]
Simple mixer control 'Mic',1
Capabilities: cvolume cvolume-joined cswitch cswitch-joined
Capture channels: Mono
Limits: Capture 0 - 127
Mono: Capture 127 [100%] [0.00dB] [on]
Simple mixer control 'M-Audio M-Track Eight',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right - Rear Left - Rear Right - Front Center - Woofer - Side Left - Side Right
Limits: Playback 0 - 127
Mono:
Front Left: Playback 121 [95%] [-6.00dB] [on]
Front Right: Playback 121 [95%] [-6.00dB] [on]
Rear Left: Playback 127 [100%] [0.00dB] [on]
Rear Right: Playback 127 [100%] [0.00dB] [on]
Front Center: Playback 127 [100%] [0.00dB] [on]
Woofer: Playback 127 [100%] [0.00dB] [on]
Side Left: Playback 127 [100%] [0.00dB] [on]
Side Right: Playback 127 [100%] [0.00dB] [on]
Simple mixer control 'M-Audio M-Track Eight',1
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 127
Mono: Playback 127 [100%] [0.00dB] [on]
lsusb -vv -d 0763:4003
Bus 001 Device 049: ID 0763:4003 M-Audio
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x0763 M-Audio
idProduct 0x4003
bcdDevice 1.05
iManufacturer 1
iProduct 3
iSerial 0
bNumConfigurations 2
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0148
bNumInterfaces 4
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 3
bFunctionClass 1 Audio
bFunctionSubClass 0
bFunctionProtocol 32
iFunction 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 1 Control Device
bInterfaceProtocol 32
iInterface 3
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdADC 2.00
bCategory 8
wTotalLength 0x00a7
bmControls 0x00
AudioControl Interface Descriptor:
bLength 8
bDescriptorType 36
bDescriptorSubtype 10 (CLOCK_SOURCE)
bClockID 41
bmAttributes 3 Internal programmable clock
bmControls 0x07
Clock Frequency Control (read/write)
Clock Validity Control (read-only)
bAssocTerminal 0
iClockSource 9
AudioControl Interface Descriptor:
bLength 8
bDescriptorType 36
bDescriptorSubtype 11 (CLOCK_SELECTOR)
bClockID 40
bNrInPins 1
baCSourceID(0) 41
bmControls 0x03
Clock Selector Control (read/write)
iClockSelector 8
AudioControl Interface Descriptor:
bLength 17
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 2
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bCSourceID 40
bNrChannels 8
bmChannelConfig 0x00000000
iChannelNames 19
bmControls 0x0000
iTerminal 6
AudioControl Interface Descriptor:
bLength 42
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 10
bSourceID 2
bmaControls(0) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(1) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(2) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(3) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(4) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(5) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(6) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(7) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(8) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
iFeature 0
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 20
wTerminalType 0x0301 Speaker
bAssocTerminal 0
bSourceID 10
bCSourceID 40
bmControls 0x0000
iTerminal 0
AudioControl Interface Descriptor:
bLength 17
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 1
wTerminalType 0x0201 Microphone
bAssocTerminal 0
bCSourceID 40
bNrChannels 8
bmChannelConfig 0x00000000
iChannelNames 19
bmControls 0x0000
iTerminal 0
AudioControl Interface Descriptor:
bLength 42
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 11
bSourceID 1
bmaControls(0) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(1) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(2) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(3) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(4) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(5) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(6) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(7) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(8) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
iFeature 0
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 22
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bSourceID 11
bCSourceID 40
bmControls 0x0000
iTerminal 7
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 4
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 2
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 4
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 2
bmControls 0x00
bFormatType 1
bmFormats 0x00000001
PCM
bNrChannels 8
bmChannelConfig 0x00000000
iChannelNames 11
AudioStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bSubslotSize 4
bBitResolution 24
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 1
AudioStreaming Endpoint Descriptor:
bLength 8
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x00
bmControls 0x00
bLockDelayUnits 2 Decoded PCM samples
wLockDelay 0x0008
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 17
Transfer Type Isochronous
Synch Type None
Usage Type Feedback
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 4
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 5
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 5
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 22
bmControls 0x00
bFormatType 1
bmFormats 0x00000001
PCM
bNrChannels 8
bmChannelConfig 0x00000000
iChannelNames 19
AudioStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bSubslotSize 4
bBitResolution 24
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 1
AudioStreaming Endpoint Descriptor:
bLength 8
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x00
bmControls 0x00
bLockDelayUnits 2 Decoded PCM samples
wLockDelay 0x0008
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 3
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 254 Application Specific Interface
bInterfaceSubClass 1 Device Firmware Update
bInterfaceProtocol 1
iInterface 10
Device Firmware Upgrade Interface Descriptor:
bLength 9
bDescriptorType 33
bmAttributes 7
Will Not Detach
Manifestation Tolerant
Upload Supported
Download Supported
wDetachTimeout 250 milliseconds
wTransferSize 64 bytes
bcdDFUVersion 1.10
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0148
bNumInterfaces 4
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 3
bFunctionClass 1 Audio
bFunctionSubClass 0
bFunctionProtocol 32
iFunction 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 1 Control Device
bInterfaceProtocol 32
iInterface 3
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdADC 2.00
bCategory 8
wTotalLength 0x00a7
bmControls 0x00
AudioControl Interface Descriptor:
bLength 8
bDescriptorType 36
bDescriptorSubtype 10 (CLOCK_SOURCE)
bClockID 41
bmAttributes 3 Internal programmable clock
bmControls 0x07
Clock Frequency Control (read/write)
Clock Validity Control (read-only)
bAssocTerminal 0
iClockSource 9
AudioControl Interface Descriptor:
bLength 8
bDescriptorType 36
bDescriptorSubtype 11 (CLOCK_SELECTOR)
bClockID 40
bNrInPins 1
baCSourceID(0) 41
bmControls 0x03
Clock Selector Control (read/write)
iClockSelector 8
AudioControl Interface Descriptor:
bLength 17
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 2
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bCSourceID 40
bNrChannels 8
bmChannelConfig 0x00000000
iChannelNames 19
bmControls 0x0000
iTerminal 6
AudioControl Interface Descriptor:
bLength 42
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 10
bSourceID 2
bmaControls(0) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(1) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(2) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(3) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(4) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(5) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(6) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(7) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(8) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
iFeature 0
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 20
wTerminalType 0x0301 Speaker
bAssocTerminal 0
bSourceID 10
bCSourceID 40
bmControls 0x0000
iTerminal 0
AudioControl Interface Descriptor:
bLength 17
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 1
wTerminalType 0x0201 Microphone
bAssocTerminal 0
bCSourceID 40
bNrChannels 8
bmChannelConfig 0x00000000
iChannelNames 19
bmControls 0x0000
iTerminal 0
AudioControl Interface Descriptor:
bLength 42
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 11
bSourceID 1
bmaControls(0) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(1) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(2) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(3) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(4) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(5) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(6) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(7) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls(8) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
iFeature 0
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 22
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bSourceID 11
bCSourceID 40
bmControls 0x0000
iTerminal 7
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 4
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 2
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 4
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 2
bmControls 0x00
bFormatType 1
bmFormats 0x00000001
PCM
bNrChannels 8
bmChannelConfig 0x00000000
iChannelNames 11
AudioStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bSubslotSize 4
bBitResolution 24
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 1
AudioStreaming Endpoint Descriptor:
bLength 8
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x00
bmControls 0x00
bLockDelayUnits 2 Decoded PCM samples
wLockDelay 0x0008
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 17
Transfer Type Isochronous
Synch Type None
Usage Type Feedback
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 4
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 5
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 5
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 22
bmControls 0x00
bFormatType 1
bmFormats 0x00000001
PCM
bNrChannels 8
bmChannelConfig 0x00000000
iChannelNames 19
AudioStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bSubslotSize 4
bBitResolution 24
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 1
AudioStreaming Endpoint Descriptor:
bLength 8
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x00
bmControls 0x00
bLockDelayUnits 2 Decoded PCM samples
wLockDelay 0x0008
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 3
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 254 Application Specific Interface
bInterfaceSubClass 1 Device Firmware Update
bInterfaceProtocol 1
iInterface 10
Device Firmware Upgrade Interface Descriptor:
bLength 9
bDescriptorType 33
bmAttributes 7
Will Not Detach
Manifestation Tolerant
Upload Supported
Download Supported
wDetachTimeout 250 milliseconds
wTransferSize 64 bytes
bcdDFUVersion 1.10
pacmd list-sources inputs
:
index: 16
name: <alsa_output.usb-M-Audio_M-Track_Eight-00.analog-surround-71.monitor>
driver: <module-alsa-card.c>
flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: RUNNING
suspend cause: (none)
priority: 1040
volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB, rear-left: 65536 / 100% / 0.00 dB, rear-right: 65536 / 100% / 0.00 dB, front-center: 65536 / 100% / 0.00 dB, lfe: 65536 / 100% / 0.00 dB, side-left: 65536 / 100% / 0.00 dB, side-right: 65536 / 100% / 0.00 dB
balance 0.00
base volume: 65536 / 100% / 0.00 dB
volume steps: 65537
muted: no
current latency: 0.00 ms
max rewind: 11 KiB
sample spec: s32le 8ch 44100Hz
channel map: front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
Surround 7.1
used by: 5
linked by: 5
configured latency: 40.00 ms; range is 8.00 .. 743.04 ms
monitor_of: 7
card: 5 <alsa_card.usb-M-Audio_M-Track_Eight-00>
module: 27
properties:
device.description = "Monitor of M-Track Eight Analog Surround 7.1"
device.class = "monitor"
alsa.card = "2"
alsa.card_name = "M-Track Eight"
alsa.long_card_name = "M-Audio M-Track Eight at usb-0000:00:14.0-5.4, high speed"
alsa.driver_name = "snd_usb_audio"
device.bus_path = "pci-0000:00:14.0-usb-0:5.4:1.0"
sysfs.path = "/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5.4/1-5.4:1.0/sound/card2"
udev.id = "usb-M-Audio_M-Track_Eight-00"
device.bus = "usb"
device.vendor.id = "0763"
device.vendor.name = "M-Audio"
device.product.id = "4003"
device.product.name = "M-Track Eight"
device.serial = "M-Audio_M-Track_Eight"
device.string = "2"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-usb"
这是一段录音:
parecord -r --format=s24le --file-format=wav ./foo.wav
file ./foo.wav
./foo.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 24 bit, stereo 44100 Hz
声音来自麦克风并被夹在设备上(显示了 vu-meter 红色条)。
我有一台笔记本电脑,它有自己的扬声器。然后我有一台显示器(DP 通过 USB-C,立体声 2.0),它有更好的扬声器,我更喜欢在连接时使用。我还有一个便携式扬声器(蓝牙、3.5 插孔和微型 USB 连接、立体声),我在烹饪时观看/收听视频时使用。我有时也会通过 HDMI 将笔记本电脑连接到家庭影院到 AVR (5.1)。所有这些都是动态变化的,可能会同时连接三个或四个。
我想像这样设置设备的优先级:
这样当我更改配置时它们会神奇地自动选择(每天可能发生几次)
现在,PulseAudio 试图挑选最好的,有时会成功,有时不会。
如果我的谷歌搜索是正确的,我无法通过配置文件或某些 GUI 设置默认值,我需要编写一个脚本。我对此感到有些惊讶——我认为这一定是一个常见的用例。所以我在尝试编写这样的脚本之前询问我的研究是否有误(或者如果有人有这样的脚本,请随时分享,我发现的唯一内容是:https ://askubuntu.com/ questions/263248/set-hdmi-sound-output-automatically-on-connect-disconnect - 这不像我的设置那么复杂)
令我困惑的另一件事是,在 Gnome、KDE 或 pactl 中的所有工具中,“DELL U4320Q”、“JieLi AC46”等设备的实际名称都被隐藏了(在 pactl 下的 card>properties>device.product .name) 并且不会在 UI 中公开。这是为什么?它们肯定会更具人类可读性。对于显示器,我通常会得到类似“dmi-output-0:HDMI / DisplayPort”的信息 - 我应该如何知道我将显示器连接到哪个端口(哪个端口是 0,哪个是 1)?有什么理由会这样吗?每次我更新我的安装时,我都很好奇是否有任何改变,但它基本上保持不变。Pipewire 会对此有所帮助吗?我认为 PulseAudio 应该使这种用法变得简单:-)。