我有一个名为 sdr 的用户,他不是管理员。
sdr@mia-recorder:~$ whoami
sdr
sdr@mia-recorder:~$ groups
sdr audio users
sdr@mia-recorder:~$
当我查看权限时,组音频可以访问所有内容。
root@mia-recorder:~# getfacl /dev/snd/*
getfacl: Removing leading '/' from absolute path names
# file: dev/snd/by-id
# owner: root
# group: root
user::rwx
group::r-x
other::r-x
# file: dev/snd/by-path
# owner: root
# group: root
user::rwx
group::r-x
other::r-x
# file: dev/snd/controlC0
# owner: root
# group: audio
user::rw-
user:lightdm:rw-
group::rw-
mask::rw-
other::---
# file: dev/snd/controlC1
# owner: root
# group: audio
user::rw-
user:lightdm:rw-
group::rw-
mask::rw-
other::---
# file: dev/snd/hwC0D0
# owner: root
# group: audio
user::rw-
user:lightdm:rw-
group::rw-
mask::rw-
other::---
# file: dev/snd/hwC0D2
# owner: root
# group: audio
user::rw-
user:lightdm:rw-
group::rw-
mask::rw-
other::---
# file: dev/snd/pcmC0D0c
# owner: root
# group: audio
user::rw-
user:lightdm:rw-
group::rw-
mask::rw-
other::---
# file: dev/snd/pcmC0D0p
# owner: root
# group: audio
user::rw-
user:lightdm:rw-
group::rw-
mask::rw-
other::---
# file: dev/snd/pcmC0D3p
# owner: root
# group: audio
user::rw-
user:lightdm:rw-
group::rw-
mask::rw-
other::---
# file: dev/snd/pcmC0D7p
# owner: root
# group: audio
user::rw-
user:lightdm:rw-
group::rw-
mask::rw-
other::---
# file: dev/snd/pcmC0D8p
# owner: root
# group: audio
user::rw-
user:lightdm:rw-
group::rw-
mask::rw-
other::---
# file: dev/snd/pcmC1D0c
# owner: root
# group: audio
user::rw-
user:lightdm:rw-
group::rw-
mask::rw-
other::---
# file: dev/snd/pcmC1D0p
# owner: root
# group: audio
user::rw-
user:lightdm:rw-
group::rw-
mask::rw-
other::---
# file: dev/snd/seq
# owner: root
# group: audio
user::rw-
user:lightdm:rw-
group::rw-
mask::rw-
other::---
# file: dev/snd/timer
# owner: root
# group: audio
user::rw-
user:lightdm:rw-
group::rw-
mask::rw-
other::---
root@mia-recorder:~#
当我这样做时arecord -l
,我看到两个音频卡
sdr@mia-recorder:~$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC3246 Analog [ALC3246 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Device [USB Audio Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
sdr@mia-recorder:~$
[/CODE]
In /etc/asound.conf I have
[CODE]
pcm.ONBOARD {
type dsnoop
ipc_key 22412334
slave {
pcm "hw:0,0"
channels 2
}
}
pcm.USB1 {
type dsnoop
ipc_key 22412554
slave {
pcm "hw:1,0"
channels 1
}
}
我有一个列出所有音频选项的 Python 脚本。它列出了“ONBOARD”作为一个选项,但没有列出 USB1。现在,如果我尝试使用 onboard 运行脚本,则没有问题,但是我无法使用 USB1。当我更改为 root 或特权用户时,没有问题。问题可能是什么?
短暂性脑缺血。
多维德