#StackBounty: #linux #audio #pulseaudio #alsa #jack Audio distorted on pulse/alsa, works fine on JACK. How to analyze why JACK works co…

Bounty: 100

To test and resolve this problem I am using a fresh install of Fedora 33, audio settings or configuration files left untouched.

By default the audio is heavily distorted (it is possible to make out what is being played, but overall it is not usable).

However when I install and start jackd and leave it running with the following settings:

jackd -r -dalsa -dhw:0 -r48000 -p256 -n2

and then try an audio file with mpv (which is able to use JACK), the sound is crisp and clear, working as intended:

mpv --ao=jack test.flac
 (+) Video --vid=1 [P] (mjpeg 1780x1780)
 (+) Audio --aid=1 (flac 2ch 96000Hz)
File tags:
 Artist: Daft Punk ft. Pharrell Williams & Nile Rodgers
 Album: Random Access Memories (1/2" 15 IPS Master Reel)
 Album_Artist: Daft Punk
 Date: 2013
 Genre: Electronic
 Title: Get Lucky
 Track: 8
Displaying attached picture. Use --no-audio-display to prevent this.
AO: [jack] 48000Hz stereo 2ch floatp
VO: [gpu] 1780x1780 yuv420p
AV: 00:03:21 / 00:06:09 (54%)


Exiting... (Quit)

Note: jackd with -r44100 works too.

This is of course not a satisfying general approach because not every software is able to use JACK by itself, so it doesn’t work with Firefox, for example.

Because JACK is able to handle things properly, I guess that either the pulse or alsa (automatic) settings are causing the problem? Or could it be something else?

In short: How can I replicate what JACK does using an ALSA configuration (or pulseaudio for that matter). A solution through ALSA would be preferred to make this answer work without pulse as well. It is of course also possible that pulseuadio is the part is causing the problem, I do not know.


Additional information:

  • Output of aplay -l:
**** List of PLAYBACK Hardware Devices ****
card 0: Studio [Audiofuse Studio], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 0: ALC1220 Analog [ALC1220 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 1: ALC1220 Digital [ALC1220 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
  • Output of jackd -r -dalsa -dhw:0 -r48000 -p256 -n2:
jackdmp 1.9.14
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2019 Filipe Coelho.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
no message buffer overruns
no message buffer overruns
no message buffer overruns
JACK server starting in non-realtime mode
self-connect-mode is "Don't restrict self connect requests"
audio_reservation_init
Acquire audio card Audio0
creating alsa driver ... hw:0|hw:0|256|2|48000|0|0|nomon|swmeter|-|32bit
configuring for 48000Hz, period = 256 frames (5.3 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 32bit integer little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 32bit integer little-endian
ALSA: use 2 periods for playback


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.