Linux Software thread! Questions, recommendations, and help… mostly so I don’t feel like the only linux user. I’ll post stuff I find as I go through. Try to remain distro agnostic if you can please.
I will say, the more user friendly a distro is… the harder it is to add non-distro blessed software. Simplicity and convenience is an argument with the amount of time spent poking at linux.
Should probably mention I took the
Ubuntu → Mint → Manjaro → Fedora → Fedora XFCE round trip.
I’m an Arch Linux ARM dev and do some work with Arch Strike. That aside, pulling up some notes for pulse audio to use an external dac.
I settled on OpenSUSE after a while on Mint and Fedora. It’s still my secondary OS though, mainly because of package issues, it uses RPM like Fedora but it’s technically different so some packages don’t behave properly. It’s like the Monoprice of the Linux world.
So… if you’re using Pulse Audio on your linux box of choice (this works on Raspberry Pi’s also) and lets say you want to connect to another DAC. Here at the steps. The following example is me using digital audio (TOSLINK and SPID/F activated at the same time) right now on my big box. Please note, sudo or root is not required to do any of the following.
Assuming USB for the DAC, first check that the DAC exists with
lsusb. Warning, if connected to a hub one might not see see the device.
Next, verify what adapters are connected and recognized by Pulse Audio with:
$ pacmd list-sinks | grep -e 'index:' -e 'card:' index: 0 card: 0 <alsa_card.pci-0000_03_00.1> index: 1 card: 1 <alsa_card.usb-Schiit_Audio_Schiit_Bifrost_2_Unison_USB-00> index: 2 card: 2 <alsa_card.usb-Schiit_Audio_I_m_Fulla_Schiit-00> * index: 3 card: 3 <alsa_card.pci-0000_00_1b.0>
To set a different out to a different DAC, set by the index. In this example I’ll switch from
index: 3 to
index: 1 for my Bifrost 2. To make the change across the entire system use:
pacmd set-default-sink 1 .
The updated result is shown here.
$ pacmd list-sinks | grep -e 'index:' -e 'card:' index: 0 card: 0 <alsa_card.pci-0000_03_00.1> * index: 1 card: 1 <alsa_card.usb-Schiit_Audio_Schiit_Bifrost_2_Unison_USB-00> index: 2 card: 2 <alsa_card.usb-Schiit_Audio_I_m_Fulla_Schiit-00> index: 3 card: 3 <alsa_card.pci-0000_00_1b.0>
And… if you want the GUI way checkout https://www.addictivetips.com/ubuntu-linux-tips/manage-audio-devices-on-linux-pavucontrol/ . The package should be called
pauvcontrol in nearly every distro available.
Oh… and once the default sink is set then running
alasmixer can be set through the command line with an ncurses based interface that DOES work via ssh to set the volume.
[email protected]:~$ uname -a Linux symphony 5.4.0-3-amd64 #1 SMP Debian 5.4.13-1 (2020-01-19) x86_64 GNU/Linux
Debian testing. It’s been my main computer for years. I was waiting for “debian CUT” (constanty usable testing) but it never happened. So I’m using debian testing as a “rolling-release”.
[email protected]:~$ sudo tune2fs -l /dev/mapper/sdb1_crypt | grep 'Filesystem created:' Filesystem created: Sat Mar 26 22:36:58 2016
Random penguin/tux plush on computer.
_,met$$$$$gg. [email protected] ,g$$$$$$$$$$$$$$$P. ------------------- ,g$$P" """Y$$.". OS: Debian GNU/Linux bullseye/sid x86_64 ,$$P' `$$$. Host: SX2380 ',$$P ,ggs. `$$b: Kernel: 5.4.0-3-amd64 `d$$' ,$P"' . $$$ Uptime: 8 days, 22 hours, 24 mins $$P d$' , $$P Packages: 3905 (dpkg) $$: $$. - ,d$$' Shell: bash 5.0.16 $$; Y$b._ _,d$P' Resolution: 1920x1080 Y$$. `.`"Y$$$$P"' DE: MATE `$$b "-.__ WM: Metacity (Marco) `Y$$ WM Theme: Menta `Y$$. Theme: TraditionalOk [GTK2/3] `$$b. Icons: gnome [GTK2/3] `Y$$b. Terminal: mate-terminal `"Y$b._ Terminal Font: Monospace 13 `""" CPU: AMD A8-5500 APU (4) @ 3.200GHz GPU: AMD ATI Radeon HD 7560D Memory: 6520MiB / 9409MiB
Yes, that’s a shitty all-in-one Gateway computer I got for sale.
(The joys of linux: It’s still “overkill” for all I do with it.)
Also no GPU, just integrated graphics – but I will receive a RX550-4G soon.
If I need it… I’ll make a write up and automation for something like this with automation scripts:
But, Pulse Audio had the ability to list systems a “source” and a “sink”. Network was baked into it. So if anyone is curious, the computer part of a Sonos, Amazon Echo, Google home, etc… with the room control implements PulseAudio. If you want to play music in one place or separate channels of audio via network, THIS is what I would use. And yes, with Pulse Audio for windows it can stream to Pi’s (or anything like it). I recommend a DAC for each sink source however.
hello, what music players do you guys use? I’ve been using cmus for a while but I’m not really feeling it anymore.
I’ve also heard it doesn’t have bit-perfect audio playback, but it’s not like I noticed. apparently setting output_plugin to alsa can solve that.
I use citrus mostly, but I’ve played around with a few others.
“Deadbeef” is a music player with a weird name but fully customizable + plugins + easy bitperfect playback.
Also allows you to see the waveform like foobar2000, as in Zeos’s videos’s.
I’m fairly clueless when it comes to audio, and paulseaudio, but I seem to recall fiddling with
/etc/pulse/daemon.conf and setting
default-sample-rate = 192000 to get my DX7s to go above 48kHz. Probably a better way to do it.
Personally I use moc; I used to use gooey players years ago, but I was always reluctant to waste screen real estate on them.
So… want to update for how to update your pulse daemon.conf and leave a little pearl of wisdom myself.
FYI, on Pulse Audio, if you don’t know what sample rate or bit you’re running it’s 16 bit at 44.1k. Want to fix that? I got you. First, if you’ve heard any sound on linux then cd into a folder for your user
~/.config/pulse. Once there copy in a file like this:
cp /etc/pulse/daemon.config .
Look inside that daemon.config uncomment and change anything you want. If you need a guide then look in
man 5 pulse-daemon.conf for everything you might want/need for that file. Once you get the settings you want you simply reload just the service, but feel free to reload the socket too like this:
systemctl --user restart pulseaudio.service systemctl --user restart pulseaudio.socket
Now if you want my
~/.config/pulse/daemon.conf file, here it is:
default-sample-format = s24le default-sample-rate = 192000 alternate-sample-rate = 44100 default-sample-channels = 2
I really like Deadbeef player for this.
In the settings you just choose Plugin: ALSA, Output: (your output here) “direct hardware device without any software conversions”.
Then in the plug-ins, search ALSA -> config: Disable resampling.
That’s it, that’s all, bitperfect playback! It will send 44.1khz when playing 44.1, 192khz when playing 192khz, etc.
P.S.: Be aware you chose “without any software conversions”. If your DAC can only do 192khz and you send it 384khz files, it will just play the file at half speed (yes – I mean, your DAC can’t do it).
And I did not even show what it looked like. D’oh. Voilà: