JACK을 통한 사운드가 완전히 왜곡되고 Jack이 없는 PulseAudio가 작동합니다.

JACK을 통한 사운드가 완전히 왜곡되고 Jack이 없는 PulseAudio가 작동합니다.

우선, 내 시스템(Ubuntu Studio 21.10)에 대한 정보는 다음과 같습니다. 사전에: Jack이 활성화되자마자(JackDBus를 통하든 JackD를 통하든 상관없이) 사운드 출력이 완전히 왜곡됩니다. 그러나 여전히 문제 없이 작동하고 있었습니다. 며칠 전까지:

silvermoon@ubuntupc:~$ lsb_release -d
Description:    Ubuntu 21.10
silvermoon@ubuntupc:~$ uname -r
5.13.0-20-lowlatency
silvermoon@ubuntupc:~$ cat /proc/asound/cards
 0 [sofhdadsp      ]: sof-hda-dsp - sof-hda-dsp
                      LENOVO-20QF0027GE-ThinkPadX1Yoga4th
 1 [AUDIO          ]: USB-Audio - CONEXANT USB AUDIO
                      Conexant CONEXANT USB AUDIO at usb-0000:0a:00.0-2.1.1.2, full speed
silvermoon@ubuntupc:~$ aplay -l
**** Liste der Hardware-Geräte (PLAYBACK) ****
Karte 0: sofhdadsp [sof-hda-dsp], Gerät 0: HDA Analog (*) []
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 0: sofhdadsp [sof-hda-dsp], Gerät 1: HDA Digital (*) []
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 0: sofhdadsp [sof-hda-dsp], Gerät 3: HDMI1 (*) []
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 0: sofhdadsp [sof-hda-dsp], Gerät 4: HDMI2 (*) []
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 0: sofhdadsp [sof-hda-dsp], Gerät 5: HDMI3 (*) []
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 1: AUDIO [CONEXANT USB AUDIO], Gerät 0: USB Audio [USB Audio]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
silvermoon@ubuntupc:~$ aplay /usr/share/sounds/alsa/Noise.wav
Wiedergabe: WAVE '/usr/share/sounds/alsa/Noise.wav' : Signed 16 bit Little Endian, Rate: 48000 Hz, mono
silvermoon@ubuntupc:~$ lspci -nnk | grep -iA2 audio
00:1f.3 Audio device [0403]: Intel Corporation Cannon Point-LP High Definition Audio Controller [8086:9dc8] (rev 11)
        Subsystem: Lenovo Cannon Point-LP High Definition Audio Controller [17aa:2292]
        Kernel driver in use: sof-audio-pci-intel-cnl
        Kernel modules: snd_hda_intel, snd_sof_pci_intel_cnl
00:1f.4 SMBus [0c05]: Intel Corporation Cannon Point-LP SMBus Controller [8086:9da3] (rev 11)
silvermoon@ubuntupc:~$ ps -C esd
    PID TTY          TIME CMD
silvermoon@ubuntupc:~$ ps -C arts
    PID TTY          TIME CMD
silvermoon@ubuntupc:~$ ps -C pulseaudio
    PID TTY          TIME CMD
   3654 ?        00:00:08 pulseaudio
silvermoon@ubuntupc:~$ grep "^audio" /etc/group | grep "$USER" | wc -l
1
silvermoon@ubuntupc:~$ dpkg -l | tr -s " " | grep " alsa-"
ii alsa-base 1.0.25+dfsg-0ubuntu7 all ALSA driver configuration files
ii alsa-tools 1.2.2-1 amd64 Console based ALSA utilities for specific hardware
ii alsa-tools-gui 1.2.2-1 amd64 GUI based ALSA utilities for specific hardware
ii alsa-topology-conf 1.2.5.1-2 all ALSA topology configuration files
ii alsa-ucm-conf 1.2.4-2ubuntu4 all ALSA Use Case Manager configuration files
ii alsa-utils 1.2.4-1ubuntu4 amd64 Utilities for configuring and using ALSA
silvermoon@ubuntupc:~$ lsmod | grep "snd"
snd_seq_dummy          16384  0
snd_usb_audio         299008  0
snd_usbmidi_lib        36864  1 snd_usb_audio
mc                     57344  5 videodev,snd_usb_audio,videobuf2_v4l2,uvcvideo,videobuf2_common
snd_ctl_led            24576  0
snd_soc_skl_hda_dsp    24576  5
snd_soc_intel_hda_dsp_common    20480  1 snd_soc_skl_hda_dsp
snd_soc_hdac_hdmi      36864  1 snd_soc_skl_hda_dsp
snd_hda_codec_hdmi     61440  1
snd_hda_codec_realtek   147456  1
snd_hda_codec_generic    81920  1 snd_hda_codec_realtek
snd_soc_dmic           16384  1
snd_sof_pci_intel_cnl    16384  0
snd_sof_intel_hda_common    98304  1 snd_sof_pci_intel_cnl
soundwire_intel        40960  1 snd_sof_intel_hda_common
snd_sof_intel_hda      20480  1 snd_sof_intel_hda_common
snd_sof_pci            20480  2 snd_sof_intel_hda_common,snd_sof_pci_intel_cnl
snd_sof_xtensa_dsp     16384  1 snd_sof_intel_hda_common
snd_sof               135168  2 snd_sof_pci,snd_sof_intel_hda_common
snd_soc_hdac_hda       24576  1 snd_sof_intel_hda_common
snd_hda_ext_core       32768  4 snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_soc_hdac_hda,snd_sof_intel_hda
snd_soc_acpi_intel_match    49152  2 snd_sof_intel_hda_common,snd_sof_pci_intel_cnl
snd_soc_acpi           16384  2 snd_soc_acpi_intel_match,snd_sof_intel_hda_common
snd_soc_core          294912  7 soundwire_intel,snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_soc_hdac_hda,snd_soc_dmic,snd_soc_skl_hda_dsp
snd_compress           28672  1 snd_soc_core
ac97_bus               16384  1 snd_soc_core
snd_pcm_dmaengine      16384  1 snd_soc_core
snd_hda_intel          53248  0
snd_intel_dspcfg       28672  2 snd_hda_intel,snd_sof_intel_hda_common
snd_intel_sdw_acpi     20480  2 snd_sof_intel_hda_common,snd_intel_dspcfg
snd_hda_codec         147456  7 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek,snd_soc_intel_hda_dsp_common,snd_soc_hdac_hda,snd_soc_skl_hda_dsp
snd_hda_core           94208  11 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_hda_codec_realtek,snd_soc_intel_hda_dsp_common,snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_soc_hdac_hda,snd_sof_intel_hda
snd_hwdep              16384  2 snd_usb_audio,snd_hda_codec
snd_pcm               122880  12 snd_hda_codec_hdmi,snd_hda_intel,snd_usb_audio,snd_hda_codec,soundwire_intel,snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_compress,snd_soc_core,snd_hda_core,snd_pcm_dmaengine
snd_seq_midi           20480  0
snd_seq_midi_event     16384  1 snd_seq_midi
ledtrig_audio          16384  4 snd_ctl_led,snd_hda_codec_generic,snd_sof,thinkpad_acpi
snd_rawmidi            36864  2 snd_seq_midi,snd_usbmidi_lib
snd_seq                73728  7 snd_seq_midi,snd_seq_midi_event,snd_seq_dummy
snd_seq_device         16384  3 snd_seq,snd_seq_midi,snd_rawmidi
snd_timer              40960  2 snd_seq,snd_pcm
snd                    94208  31 snd_ctl_led,snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_usb_audio,snd_usbmidi_lib,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_soc_hdac_hdmi,snd_compress,thinkpad_acpi,snd_soc_core,snd_pcm,snd_soc_skl_hda_dsp,snd_rawmidi
soundcore              16384  2 snd_ctl_led,snd
silvermoon@ubuntupc:~$ head -n 3 /proc/asound/card0/codec#0
Codec: Realtek ALC285
Address: 0
AFG Function Id: 0x1 (unsol 1)
silvermoon@ubuntupc:~$ head -n 3 /proc/asound/card0/codec97#0/ac97#0-0
head: '/proc/asound/card0/codec97#0/ac97#0-0' kann nicht zum Lesen geöffnet werden: Datei oder Verzeichnis nicht gefunden
silvermoon@ubuntupc:~$ head -n 3 /proc/asound/card0/codec97#0/ac97#0-0+regs
head: '/proc/asound/card0/codec97#0/ac97#0-0+regs' kann nicht zum Lesen geöffnet werden: Datei oder Verzeichnis nicht gefunden
silvermoon@ubuntupc:~$ cat ~/.asoundrc
cat: /home/silvermoon/.asoundrc: Datei oder Verzeichnis nicht gefunden
silvermoon@ubuntupc:~$ cat ~/.asoundrc.asoundconf
cat: /home/silvermoon/.asoundrc.asoundconf: Datei oder Verzeichnis nicht gefunden
silvermoon@ubuntupc:~$ cat /etc/asound.conf 
cat: /etc/asound.conf: Datei oder Verzeichnis nicht gefunden
silvermoon@ubuntupc:~$ cat .config/jack/conf.xml 
<?xml version="1.0"?>
<!--
JACK settings, as persisted by D-Bus object.
You probably don't want to edit this because
it will be overwritten next time jackdbus saves.
-->
<!-- Tue Oct 26 11:43:30 2021 -->
<jack>
 <engine>
  <option name="driver">alsa</option>
  <option name="realtime">true</option>
  <option name="verbose">true</option>
  <option name="sync">false</option>
  <option name="self-connect-mode">a</option>
 </engine>
 <drivers>
  <driver name="loopback">
  </driver>
  <driver name="netone">
  </driver>
  <driver name="alsa">
   <option name="device">hw:0</option>
   <option name="capture">hw:0</option>
   <option name="playback">hw:0</option>
   <option name="rate">48000</option>
   <option name="period">1008</option>
   <option name="nperiods">2</option>
   <option name="duplex">true</option>
   <option name="dither">n</option>
   <option name="midi-driver">raw</option>
  </driver>
  <driver name="dummy">
  </driver>
  <driver name="firewire">
  </driver>
  <driver name="net">
  </driver>
  <driver name="alsarawmidi">
  </driver>
  <driver name="proxy">
  </driver>
 </drivers>
 <internals>
  <internal name="netmanager">
  </internal>
  <internal name="audioadapter">
  </internal>
  <internal name="profiler">
  </internal>
  <internal name="netadapter">
  </internal>
 </internals>
</jack>
silvermoon@ubuntupc:~$

참고: 문제와 관련하여 Jack의 프레임/기간이 1008, 128, 512, 1024 또는 ... 여기에서 이미 많은 것을 시도했습니다.

잭 없이 설정: 잭은 활동이 없습니다.큰 소리레벨(LL) 100%, Front_Center.wav 재생, 왜곡이나 클리핑 없이 펄스 오디오를 통해 정상 출력,

아래 설정은 활성 잭을 사용한 것입니다.

  • 설정 1: LL=100%, PulseAudioJackSink(PAJS)=100%, PulseAudioJackSink->system-playback을 통해 재생, 출력이 완전히 왜곡됨
  • 설정 2: LL=100%, PAJS=20%(왜곡 직전), 재생 출력은 좋지 않지만 이해할 수 있습니다 ;-)
  • 설정 3: LL=20%, Jack->system-playback을 통해 MuseScore 출력, MuseScore의 볼륨 조절이 -79.5db(정상은 약 -25db)로 설정됨: 이미 왜곡됨
  • 설정 4: #3과 동일한 설정이지만 LL=60%: 출력이 완전히 왜곡됩니다. MuseScore의 볼륨 조절이 대략적인 것 이상으로 설정되어 있으면 동일한 효과가 있습니다. -78db. PAJS 및 MuseScore의 출력뿐만 아니라 모든 것이 왜곡됩니다. 특히 잭을 사용하는 음원이 자체적으로 레벨을 낮출 수 없는 경우 더욱 그렇습니다.

내가 무엇을 변경했는지, 어디에서 변경이 가능한지 알지 못한 채: 얼마 전(어쨌든 21.04의 경우, 그러나 21.10 미만의 경우도 있음) 모든 것이 문제 없이 작동했습니다. 적절한 설정을 변경할 수 있는 아이디어가 있습니까? 나는 이미 다음을 수행했습니다.

  • ALSA 모듈 재설치
  • alsa를 완전히 재설정하고 다양한 수준의 alsamixer 설정을 시도합니다. 여기서 이상한 점은 다음과 같습니다. PCM 컨트롤러가 없습니다.
  • JackDBus 대신 JackD를 사용해 보았습니다.
  • 펄스 오디오 구성 재설정

미리 감사드립니다

답변1

그동안 해결책을 찾았고 다른 사람이 같은 문제를 겪을 경우를 대비해 내 해결책은 다음과 같습니다.

JackDBus를 사용할 때 qjackctl의 설정(특히 내 하드웨어에 필요할 수 있는 16비트 적용)이 대부분 무시되기 때문에 모든 것이 필요합니다. 동시에 - 명시적으로 주의를 기울이지 않으면 JackDBus 또는 autojack이 백그라운드에서 실행되고 있으므로 설정이 포함된 모든 테스트가 파괴됩니다. 그래서 오랫동안 해결책을 찾지 못했습니다.

관련 정보