LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-04-2018, 06:15 AM   #1
przemo
Member
 
Registered: Feb 2016
Location: cork.ie
Distribution: Slackware-current
Posts: 118

Rep: Reputation: Disabled
Bitperfect Audio


Code:
  
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC3202 Analog [ALC3202 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: C2 [Cambridge Audio DAC100 USB 2], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0


cat /proc/asound/card1/pcm0p/sub0/hw_params 
access: MMAP_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 48000 (48000/1)
period_size: 44100
buffer_size: 88200
how to set it up to bitperfect playback on the fly at the moment somewhere on the way between deadbeef/mpd > pulse > alsa > dac files got downsampled to 44 or 48

.asoundrc
Code:
pcm.C2 {
type hw
card "C2"
}

# Bind a default ctl to the underlying hw driver
# for the "AB12".
#
ctl.!default {
type hw
card "C2"
}

# Create a default pcm, use the "plug" wrapper
# to wrap the named PCM we created above.
#
# Plug will adjust sample format as needed; we can
# force it to never change the sample rate! Nice.
#
pcm.!default {
type plug
slave {
#pcm "hw:1,0"
pcm "C2"
#format S24_3LE
rate "unchanged"
}
}

Last edited by przemo; 11-04-2018 at 06:30 AM.
 
Old 11-04-2018, 06:34 AM   #2
przemo
Member
 
Registered: Feb 2016
Location: cork.ie
Distribution: Slackware-current
Posts: 118

Original Poster
Rep: Reputation: Disabled
it works with deadbeef
 
Old 11-06-2018, 01:24 PM   #3
ArcBrut
LQ Newbie
 
Registered: Jul 2018
Distribution: Slackware -current
Posts: 15

Rep: Reputation: Disabled
Do you have ALSA resampling unchecked in DeaDBeeF preferences > plugins > ALSA output plugins ?

Kick out pulse audio. Set DeaDBeeF output directly to ALSA!

Last edited by ArcBrut; 11-06-2018 at 01:32 PM.
 
Old 11-06-2018, 02:15 PM   #4
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,055

Rep: Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078
Apologies, I have to ask an ignorant question here:
What is "bit-perfect audio"? I'm a believer in good digital audio but, with the many layers of mixing, "equilisation" and the like i'm not sure what it means.
 
Old 11-06-2018, 02:52 PM   #5
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-14.2
Posts: 1,537

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
I would also add this to /etc/pulse/daemon.conf to avoid pulseaudio resampeling your audio.

Code:
avoid-resampling = true
 
Old 11-07-2018, 02:15 PM   #6
ArcBrut
LQ Newbie
 
Registered: Jul 2018
Distribution: Slackware -current
Posts: 15

Rep: Reputation: Disabled
Bit perfect signifies that the digital signal travels unaltered from the source to the DAC's input, meaning no equalization or other DSP, no upsampling, no mixing with other digital signals etc. Simply, from music player directly to DAC.
 
1 members found this post helpful.
Old 11-07-2018, 02:30 PM   #7
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,055

Rep: Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078
Quote:
Originally Posted by ArcBrut View Post
Bit perfect signifies that the digital signal travels unaltered from the source to the DAC's input, meaning no equalization or other DSP, no upsampling, no mixing with other digital signals etc. Simply, from music player directly to DAC.
Thank you, that is what I understand it to mean. I am interested, also, to have this under Linux but I fear my "need" for things like PulseAudio may make it unfeasible.
 
Old 11-07-2018, 03:16 PM   #8
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-14.2
Posts: 1,537

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by 273 View Post
Thank you, that is what I understand it to mean. I am interested, also, to have this under Linux but I fear my "need" for things like PulseAudio may make it unfeasible.
Pulseaudio since version 11.0 now lets you disable resampeling your audio streams. See my above post.
 
1 members found this post helpful.
Old 11-07-2018, 03:18 PM   #9
ArcBrut
LQ Newbie
 
Registered: Jul 2018
Distribution: Slackware -current
Posts: 15

Rep: Reputation: Disabled
Linux is excelent for bitperfect audio. I have "bitperfect" for music. Pulseaudio on all others(notifications, video, communication, games, accessibility etc.) You can route music player output directly to ALSA without any conversion and mixing(ALSA dmix). Here is a six point recommendation to setting music player for bitperfect:

- select ALSA output plugin and whatever is to the effect of "Direct hardware device without any conversions" for output device
- Under preferences > plugins tab > ALSA output plugin > configure button > uncheck "use ALSA resampling" and check "release device while stopped"
- deselect "always convert 16 to 24 bit"
- disable/deselect replaygain
- ditch the EQ as well
- be sure the player's volume is set at 100%

But be careful. When player send audio stream direct to ALSA output, takes output device for itself. Which is not a problem for us, audiophiles. When listening to music, I do not want to be disturbed. :-)
 
1 members found this post helpful.
Old 11-07-2018, 03:30 PM   #10
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,055

Rep: Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078
Thanks, I'll give it a go.
 
Old 11-07-2018, 04:40 PM   #11
przemo
Member
 
Registered: Feb 2016
Location: cork.ie
Distribution: Slackware-current
Posts: 118

Original Poster
Rep: Reputation: Disabled
just to mention, you need hi-res audio files and good set of speakers and amp to feel the difference
 
Old 11-08-2018, 09:00 AM   #12
birdboy
LQ Newbie
 
Registered: Aug 2018
Distribution: Slackware
Posts: 27

Rep: Reputation: Disabled
AFAIK, this is the only way to be sure:

Code:
% cat ~/.asoundrc 
ctl.!default {
        card 0
        type hw
}

pcm.!default {
        card 0
        type hw
}
Just replace the card number with yours. Goes straight to DAC without any funny bussiness.

Of course, remove pulseaudio first and convert your Slackware system to pure-alsa, if you're running -current.
 
Old 11-08-2018, 02:50 PM   #13
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-14.2
Posts: 1,537

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
A good way to test your audio streams to make sure they are not being resampled is to download a high res music file from here. Preferably one that is 24BIT/192kHz
http://www.2l.no/hires/index.html

run this in a terminal to view the audio stream
Code:
watch -n1 cat /proc/asound/card0/pcm0p/sub0/hw_params
if your output looks something like this, then you are not being resampled
Code:
access: MMAP_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 192000 (192000/1)
period_size: 88200
buffer_size: 88200
I see from your original post you knew this, but I thought I would atleast give the link for some good hi res music to test with it.

Last edited by Daedra; 11-08-2018 at 03:28 PM.
 
Old 11-08-2018, 06:00 PM   #14
przemo
Member
 
Registered: Feb 2016
Location: cork.ie
Distribution: Slackware-current
Posts: 118

Original Poster
Rep: Reputation: Disabled
i have small problem with alsa

Code:
 alsamixer 
cannot open mixer: No such device
user is in the audio group
it works in root
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How To Enable Beats Audio Subwoofer Audio On a HP Laptop In Ubuntu/Linux LXer Syndicated Linux News 0 12-05-2015 09:33 AM
can no longer change audio settings, missing gstreamer plugin or no audio device dsollen Linux - General 3 11-16-2009 09:40 AM
[SOLVED] Onboard Audio (hda_intel) for Mic Input and Soundcard (ca0106) for Audio Output? snowdonkey Linux - General 1 07-11-2009 04:17 PM
smplayer: video+audio stutters with pulseaudio, audio files play fine GamerX Linux - Desktop 1 02-06-2009 09:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration