Skip to content

juanpc2018/-SOLVED-PulseAudio-audio-problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 

Repository files navigation

-SOLVED-PulseAudio-problem

There are several problems in Linux with USB sound interfaces like Focusrite 18i20 mk2, those
require a propietary control software for Windows or OSX to change HW configuration.

The software works in Wine, but the USB interface is Not detected.
because Wine does Not have USB Passthrough like VirtualMachine Softwares, VMware, Parallels, VirtualBox, Qemu, Kvm, etc...

The USB device has playback, Recording, Control software, MIDI. *see list at the bottom.

has been solved by creating a control software for Linux
https://github.com/geoffreybennett/alsa-scarlett-gui/blob/master/docs/INSTALL.md

2nd problem:
PulseAudio sets Linux Default Sample Rate to 44.1Khz at Boot, fixed, forced, Not Auto & does Not allow to change.
if the USB Focusrite interface was set to External s/pdif clock & 48Khz,
will Not work.

$ alsamixer
does Not allow to change SampleRate,
Only clock Source for that particular USB sound interface, and others.

3rd problem:
when USB interface is set to Internal Clock,
works but only at 44.1Khz,
when you try to play a 48Khz file/stream/source,
PulseAudio Sample Rate Converter goes Crazy.
because PulseAudio does Not allow to Change Sample Rate to 48Khz,
activates a Software Sample Rate Converter,
but Default SRC, does Not work well going Down from a Higher SR file / source like 48Khz, 88.2Khz, 96Khz to 44.1Khz Hw output.

the proper way in theory is to change the USB interface Sample Rate internal clock to use the same Sample Rate required for the audio file, or a Higher Sample Rate *Oversampling.

if the file is 44.1Khz but the Sound interface is 48Khz, 88.2Khz 96Khz, SRC works Ok.
Pulse Audio Default Sample Rate works ok going Up,
from a lower sample rate file to higher SR output.
but Not Downwards.

Workarround was using JackAudio,

The permanent sollution is simply comment out "delete" the ; and change 44100 to 48000 or 96000 Default Sample Rate.
maybe auto or 0 could work, havent tested, yet.
and reset Pulseaudio,
Problem Solved, works Ok.

Internal or External Audio Clock, Works Ok.

cat /etc/pulse/daemon.conf

line 82 remove ; change sample rate
default-sample-rate = 48000

save.

$ pulseaudio - -kill

[SOLVED].

$ pulseaudio --help
$ pulseaudio --dump-resample-methods

if want better quality, also add:
resample-method = ffmpeg
or speex-float-10
or speex-fixed-10
or soxr-vhq
&
default-sample-format = s24le
or S32LE
or S24_32LE
or FLOAT32LE

optional:
alternate-sample-rate = 96000
to force Pulse Audio to Always Only 96kHz.

$ pulseaudio --dump-resample-methods
trivial
speex-float-0
speex-float-1
speex-float-2
speex-float-3
speex-float-4
speex-float-5
speex-float-6
speex-float-7
speex-float-8
speex-float-9
speex-float-10
speex-fixed-0
speex-fixed-1
speex-fixed-2
speex-fixed-3
speex-fixed-4
speex-fixed-5
speex-fixed-6
speex-fixed-7
speex-fixed-8
speex-fixed-9
speex-fixed-10
ffmpeg
auto
copy
peaks
soxr-mq
soxr-hq
soxr-vhq

tested so many things, Nothing worked, exept QjackCtl,
i thought it was a bug, the answer was so simple.

nice wiki/tutorial:
https://wiki.archlinux.org/title/PulseAudio
https://freedesktop.org/software/pulseaudio/doxygen/sample.html

-----

DeJaVu

-----

if that does Not work,
also needs to create/edit other config files,
but probably Not needed.

----

/usr/share/alsa/alsa.conf

----

/etc/asound.conf

defaults.pcm.card 2
defaults.!rate 48000
defaults.ctl.card 2

----

/home/user/.asoundrc
pcm.usb-audio {
type hw
card 2
rate 48000
}

   ctl.usb-audio { </br>
      type hw </br>
      card 2 </br>
   } </br>

-----

Just for fun:

$ alsamixer
F6
F2

/proc/asound/version
/proc/asound/cards
/proc/asound/devices
/proc/asound/oss/devices
/proc/asound//timers
/proc/asound/pcm

$ cat /proc/asound/devices
1: : sequencer
2: [ 0- 3]: digital audio playback
3: [ 0- 7]: digital audio playback
4: [ 0- 8]: digital audio playback
5: [ 0- 9]: digital audio playback
6: [ 0-10]: digital audio playback
7: [ 0- 0]: hardware dependent
8: [ 0] : control
9: [ 2- 0]: digital audio playback
10: [ 2- 0]: digital audio capture
11: [ 2- 1]: digital audio playback
12: [ 2- 0]: hardware dependent
13: [ 2] : control
14: [ 1- 0]: digital audio playback
15: [ 1- 0]: digital audio capture
16: [ 1] : control
17: [ 1- 0]: raw midi
33: : timer

$ aplay -L | grep CARD
hw:CARD=HDMI,DEV=3
hw:CARD=HDMI,DEV=7
hw:CARD=HDMI,DEV=8
hw:CARD=HDMI,DEV=9
hw:CARD=HDMI,DEV=10
plughw:CARD=HDMI,DEV=3
plughw:CARD=HDMI,DEV=7
plughw:CARD=HDMI,DEV=8
plughw:CARD=HDMI,DEV=9
plughw:CARD=HDMI,DEV=10
hdmi:CARD=HDMI,DEV=0
hdmi:CARD=HDMI,DEV=1
hdmi:CARD=HDMI,DEV=2
hdmi:CARD=HDMI,DEV=3
hdmi:CARD=HDMI,DEV=4
dmix:CARD=HDMI,DEV=3
dmix:CARD=HDMI,DEV=7
dmix:CARD=HDMI,DEV=8
dmix:CARD=HDMI,DEV=9
dmix:CARD=HDMI,DEV=10
usbstream:CARD=HDMI
hw:CARD=PCH,DEV=0
hw:CARD=PCH,DEV=1
plughw:CARD=PCH,DEV=0
plughw:CARD=PCH,DEV=1
sysdefault:CARD=PCH
front:CARD=PCH,DEV=0
surround21:CARD=PCH,DEV=0
surround40:CARD=PCH,DEV=0
surround41:CARD=PCH,DEV=0
surround50:CARD=PCH,DEV=0
surround51:CARD=PCH,DEV=0
surround71:CARD=PCH,DEV=0
iec958:CARD=PCH,DEV=0
dmix:CARD=PCH,DEV=0
dmix:CARD=PCH,DEV=1
usbstream:CARD=PCH
hw:CARD=USB,DEV=0
plughw:CARD=USB,DEV=0
sysdefault:CARD=USB
front:CARD=USB,DEV=0
surround21:CARD=USB,DEV=0
surround40:CARD=USB,DEV=0
surround41:CARD=USB,DEV=0
surround50:CARD=USB,DEV=0
surround51:CARD=USB,DEV=0
surround71:CARD=USB,DEV=0
iec958:CARD=USB,DEV=0
dmix:CARD=USB,DEV=0
usbstream:CARD=USB

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 9: HDMI 3 [HDMI 3]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 10: HDMI 4 [HDMI 4]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: CS4208 Analog [CS4208 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 1: CS4208 Digital [CS4208 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: USB [Scarlett 18i20 USB], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0

$ ls -l /proc/asound
total 0
dr-xr-xr-x 18 root root 0 Jul 14 16:57 card0
dr-xr-xr-x 7 root root 0 Jul 14 16:57 card1
dr-xr-xr-x 10 root root 0 Jul 14 18:16 card2
-r--r--r-- 1 root root 0 Jul 14 18:19 cards
-r--r--r-- 1 root root 0 Jul 14 18:19 devices
lrwxrwxrwx 1 root root 5 Jul 14 18:25 HDMI -> card0
-r--r--r-- 1 root root 0 Jul 14 18:25 hwdep
-r--r--r-- 1 root root 0 Jul 14 18:25 modules
dr-xr-xr-x 4 root root 0 Jul 14 18:19 oss
lrwxrwxrwx 1 root root 5 Jul 14 18:25 PCH -> card1
-r--r--r-- 1 root root 0 Jul 14 18:19 pcm
dr-xr-xr-x 6 root root 0 Jul 14 18:25 seq
-r--r--r-- 1 root root 0 Jul 14 18:19 timers
lrwxrwxrwx 1 root root 5 Jul 14 18:25 USB -> card2
-r--r--r-- 1 root root 0 Jul 14 18:19 version

$ cat /proc/asound/cards
0 [HDMI ]: HDA-Intel - HDA Intel HDMI
HDA Intel HDMI at 0xa0910000 irq 73
1 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xa0914000 irq 74
2 [USB ]: USB-Audio - Scarlett 18i20 USB
Focusrite Scarlett 18i20 USB at usb-0000:00:14.0-1.4, high speed
more here:
https://forum.videolan.org/viewtopic.php?f=13&t=160171&p=529506#p528767

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published