Linux 컴퓨터에서 pulseaudio를 사용하여 외부 사운드 카드(fostex usb audio hp-A4 Stereo numerique(IEC958))의 샘플 속도를 구성하는 데 문제가 있습니다.
> uname -a
Linux music 6.5.0-kali2-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.5.3-1kali2 (2023-10-03) x86_64 GNU/Linux
> pulseaudio --version
fostex usb audio hp-A4 stereo numerique (IEC958)
~/.config/pulse/daemon.conf 파일이 192000(Hz)의 높은 샘플 속도를 갖도록 수정되었습니다.
> cat ~/.config/pulse/daemon.conf
...
default-sample-format = float32le ; s16le
default-sample-rate = 192000
alternate-sample-rate = 192000
...
업데이트 전에는 모든 것이 잘 작동했지만 이제 외부 사운드 카드의 LED가 10초 동안 192000을 표시한 후 48000으로 변경되는 것을 볼 수 있습니다.
몇 가지 세부 정보를 얻을 수 있습니다(VLC를 사용하여 일부 음악을 재생하는 동안 이러한 명령의 결과).
> pacmd list-sinks
Aucun démon PulseAudio en cours d’exécution, ou ne s’exécutant pas dans une session de type démon.
> pulseaudio -D
> pacmd list-sinks
1 sink(s) available.
* index: 0
name: <auto_null>
driver: <module-null-sink.c>
flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: IDLE
suspend cause: (none)
priority: 1000
volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
balance 0.00
base volume: 65536 / 100% / 0.00 dB
volume steps: 65537
muted: no
current latency: 1773.77 ms
max request: 3000 KiB
max rewind: 3000 KiB
monitor source: 1
sample spec: float32le 2ch 192000Hz
channel map: front-left,front-right
Stéréo
used by: 0
linked by: 0
configured latency: 2000.00 ms; range is 0.50 .. 2000.00 ms
module: 14
properties:
device.description = "Sortie factice"
device.class = "abstract"
device.icon_name = "audio-card"
다시 자세히 설명하자면:
> pactl list sinks
Destination #52
État : RUNNING
Nom : alsa_output.usb-FOSTEX_FOSTEX_USB_AUDIO_HP-A4_00001-00.iec958-stereo
Description : FOSTEX USB AUDIO HP-A4 Stéréo numérique (IEC958)
Pilote : PipeWire
Spécification de l’échantillon : s32le 2ch 48000Hz
Plan des canaux : front-left,front-right
Module du propriétaire : 4294967295
Sourdine : non
Volume : front-left: 65536 / 100% / 0,00 dB, front-right: 65536 / 100% / 0,00 dB
balance 0,00
Volume de base : 65536 / 100% / 0,00 dB
Source du moniteur : alsa_output.usb-FOSTEX_FOSTEX_USB_AUDIO_HP-A4_00001-00.iec958-stereo.monitor
Latence : 0 usec, configuré 0 usec
Marqueurs : HARDWARE DECIBEL_VOLUME LATENCY SET_FORMATS
Propriétés :
alsa.card = "2"
alsa.card_name = "FOSTEX USB AUDIO HP-A4"
alsa.class = "generic"
alsa.device = "0"
alsa.driver_name = "snd_usb_audio"
alsa.id = "USB Audio"
alsa.long_card_name = "FOSTEX FOSTEX USB AUDIO HP-A4 at usb-0000:00:10.0-1, high speed"
alsa.name = "USB Audio"
alsa.resolution_bits = "32"
alsa.subclass = "generic-mix"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
api.alsa.card.longname = "FOSTEX FOSTEX USB AUDIO HP-A4 at usb-0000:00:10.0-1, high speed"
api.alsa.card.name = "FOSTEX USB AUDIO HP-A4"
api.alsa.path = "iec958:2"
api.alsa.pcm.card = "2"
api.alsa.pcm.stream = "playback"
audio.channels = "2"
audio.position = "FL,FR"
card.profile.device = "2"
device.api = "alsa"
device.class = "sound"
device.id = "45"
device.profile.description = "Stéréo numérique (IEC958)"
device.profile.name = "iec958-stereo"
device.routes = "1"
factory.name = "api.alsa.pcm.sink"
media.class = "Audio/Sink"
device.description = "FOSTEX USB AUDIO HP-A4"
node.name = "alsa_output.usb-FOSTEX_FOSTEX_USB_AUDIO_HP-A4_00001-00.iec958-stereo"
node.nick = "FOSTEX USB AUDIO HP-A4"
node.pause-on-idle = "false"
object.path = "alsa:pcm:2:iec958:2:playback"
priority.driver = "1008"
priority.session = "1008"
factory.id = "18"
clock.quantum-limit = "8192"
client.id = "35"
node.driver = "true"
factory.mode = "merge"
audio.adapt.follower = ""
library.name = "audioconvert/libspa-audioconvert"
object.id = "52"
object.serial = "52"
node.max-latency = "16384/48000"
api.alsa.period-size = "512"
api.alsa.period-num = "64"
api.alsa.headroom = "512"
api.acp.auto-port = "false"
api.acp.auto-profile = "false"
api.alsa.card = "2"
api.alsa.use-acp = "true"
api.dbus.ReserveDevice1 = "Audio2"
device.bus = "usb"
device.bus-id = "usb-FOSTEX_FOSTEX_USB_AUDIO_HP-A4_00001-00"
device.bus_path = "pci-0000:00:10.0-usb-0:1:1.0"
device.enum.api = "udev"
device.icon_name = "audio-card-analog-usb"
device.name = "alsa_card.usb-FOSTEX_FOSTEX_USB_AUDIO_HP-A4_00001-00"
device.nick = "FOSTEX USB AUDIO HP-A4"
device.plugged.usec = "31679646"
device.product.id = "0x0011"
device.product.name = "FOSTEX USB AUDIO HP-A4"
device.serial = "FOSTEX_FOSTEX_USB_AUDIO_HP-A4_00001"
device.subsystem = "sound"
sysfs.path = "/devices/pci0000:00/0000:00:10.0/usb2/2-1/2-1:1.0/sound/card2"
device.vendor.id = "0x1019"
device.vendor.name = "Elitegroup Computer Systems (ECS)"
device.string = "2"
Ports :
iec958-stereo-output: Sortie numérique (S/PDIF) (type: SPDIF, priority: 0, availability unknown)
Port actif : iec958-stereo-output
Formats :
pcm
mpeg-iec61937, format.rate = "{ \"min\": 44100, \"max\": 352800 }"
답변1
작동하도록 하려면 파이프라인와이어 구성 파일에서 샘플링 속도를 변경해야 했습니다.
먼저 파이프라인 오디오(협회)
> sudo apt-get install pipewire-audio
그런 다음 새 디렉터리를 만들고 파이프라인와이어의 구성 파일(협회):
> mkdir ~/.config/pipewire
> cp /usr/share/pipewire/pipewire.conf ~/.config/pipewire/pipewire.conf
그런 다음 새 파이프라인.conf를 편집합니다(협회):
> nano ~/.config/pipewire/pipewire.conf
...
context.properties = {
...
default.clock.rate = 192000
...
마지막으로, 운영 체제가 시작될 때가 아니라 특정 사운드가 재생될 때 구성 파일을 읽습니다.