Head-Fi.org › Forums › Equipment Forums › Computer Audio › Bit Perfect Audio from Linux
New Posts  All Forums:Forum Nav:

Bit Perfect Audio from Linux - Page 18

post #256 of 293

^ I'm trying it out now. Looks like it can't play 96/24?

post #257 of 293
Quote:
Originally Posted by eimis View Post
 

^ I'm trying it out now. Looks like it can't play 96/24?

cat /proc/asound/card*/stream*

?

post #258 of 293
Quote:
Originally Posted by eimis View Post
 

^ I'm trying it out now. Looks like it can't play 96/24?

 

Strange, 24/96 works here..

 

 cat /proc/asound/card0/pcm0p/sub0/hw_params

access: MMAP_INTERLEAVED
format: S32_LE
subformat: STD
channels: 10
rate: 96000 (96000/1)
period_size: 481
buffer_size: 6553
post #259 of 293

Hi,

 

Lengthy topic and it seems like most of the chat here is trying to get Bit Perfect via USB

 

If I'm trying to set up my Benchmark DAC1 to receive digital out via S/PDIF would it be simply using deadbeef to use output plugin as ALSA and output device as HDA Intel PCH, ALC892 Digital for SPDIF out? Would that be bit perfect?

 

Haven't tinkered with this in a while. Thanks!

post #260 of 293
Hey Mofonyx, depending on your alsa settings it sure would! Just make sure your alsa file doesn't have a sample rate or bitdepth default defined for the output device you plan on using (unless you have files outside your dac's reach bit or rate wise).

For more information just post back or look at the alsa wiki!
post #261 of 293
Quote:
Originally Posted by mofonyx View Post
 

If I'm trying to set up my Benchmark DAC1 to receive digital out via S/PDIF would it be simply using deadbeef to use output plugin as ALSA and output device as HDA Intel PCH, ALC892 Digital for SPDIF out? Would that be bit perfect?

 

 

as long as your spdif output can handle the sampling frequencies and bit depths your music is stored in - yes.

post #262 of 293
Quote:
Originally Posted by yay101 View Post

Hey Mofonyx, depending on your alsa settings it sure would! Just make sure your alsa file doesn't have a sample rate or bitdepth default defined for the output device you plan on using (unless you have files outside your dac's reach bit or rate wise).

For more information just post back or look at the alsa wiki!

Thanks

 


I haven't tinkered with the alsa config file (/usr/share/alsa/alsa.conf) but can't find anything within it that would suggest this. All the defaults just appear as a list without any further strings below it. I assume that this means that bitdepth default hasn't been defined - therefore I should be OK.

 

How do I check that this is accurate during music playback?

post #263 of 293
While playing a 48kHz file through a Benchmark DAC 1 USB here, executing

$ cat /proc/asound/card1/stream0

produces:

Texas Instruments Benchmark 1.0 at usb-0000:0e:00.0-2.1, full speed : USB Audio

Playback:
Status: Running
Interface = 1
Altset = 1
Packet Size = 365
Momentary freq = 48000 Hz (0x30.0000)
Interface 1
Altset 1
Format: S24_3LE
Channels: 2
Endpoint: 1 OUT (ADAPTIVE)
Rates: 44100, 48000, 88200, 96000

Note the "Momentary freq = 48000 Hz" line.

Depending on your device, you may need to replace card1 with cardN for some other N.
post #264 of 293

My top 3 audio players for bit perfect audio in Linux are:

 

- Clementune

- Audacious

- Guayadeque

 

And also VLC (considered as a music player as well) 

post #265 of 293

@mofonyx sorry i should have clarified, by alsa config people (around here) generally mean one of the audio configuration files.

 

Here is an extract from my guide to audio linux found here. I put it in a spoiler so it doesn't ruin the look of the thread.

 

 

Warning: Spoiler! (Click to show)

Setting up Alsa:

Firstly make sure alsa and alsa-utils are both installed and up to date.

for debian/ ubuntu:

 

Quote:
 

Detecting your proper sound card:

For the uses of this guide i will assume you are using a USB DAC.

Running the below in a terminal will list your devices detected by alsa as valid output devices:

 
Quote:
 aplay -l

 

The output on my machine is:

 
Quote:

**** List of PLAYBACK Hardware Devices ****

card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]

 Subdevices: 1/1

 Subdevice #0: subdevice #0

card 0: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]

 Subdevices: 1/1

 Subdevice #0: subdevice #0

card 1: DAC [UAC1 DAC], device 0: USB Audio [USB Audio]

 Subdevices: 0/1

 Subdevice #0: subdevice #0

 

Here you can easily see that card 1, device 0 is my usb sound card. If i was to use HDMI output i would set it to card 0 device 3 or card 0 device 7.

 

Quote:

Note: Sometimes if you get two HDMI outputs one is actually your DVI output, its a cheap trick hardware OEMs use to add ports. You will have to try both to find out which one is actually your HDMI device.

 

Testing a device is as simple as using:

 

aplay -D hw:0,0 test.wav

 

Where hw:0,0 refers to your hardware detected above with aplay -l.

 

For Alsa playback applications we provide hardware addresses in the form:

 

Quote:
 hw:card#,device#
 

So in my case it is:

 

Quote:
 hw:1,0

 

Setting defaults is the final step. Run the following in a terminal:

 

Quote:
sudo nano /etc/asound.conf

 

I suggest cleaning out this entire file so it is blank then putting the below contents in.

 

 

Quote:

pcm.!default {
    type hw
    card 0

device 0
}

ctl.!default {
    type hw           
    card 0

device 0
}

 

 

Simply replace the card and device numbers with the ones you found above.

 

For instance my config reads:

 

 

Quote:

pcm.!default {
    type hw
    card 1

device 0
}

ctl.!default {
    type hw           
    card 1

device 0
}

 

 

You are done with alsa!

 

post #266 of 293

I love Clementine! It is my favourite "Foobar for linux". For dedicated listening i started using daphile and haven't looked back!

post #267 of 293
Quote:
Originally Posted by yay101 View Post
 

@mofonyx sorry i should have clarified, by alsa config people (around here) generally mean one of the audio configuration files.

 

Here is an extract from my guide to audio linux found here. I put it in a spoiler so it doesn't ruin the look of the thread.

 

Thanks

All done and ALSA configured accordingly playing through my DAC.

 

However, I am still able to control the volume of my playback on Deadbeef by tinkering with the volume bar. I don't think that is supposed to happen if I am streaming bit perfect via SPDIF

post #268 of 293

Quote:

aplay -l

 

Gives me

 

Quote:
 

**** 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 1: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

 

and my asound.conf reads

Quote:
 

pcm.!default {
    type hw
    card 1
device 1
}

 

ctl.!default {
    type hw
    card 1
device 1
}

 

 

Still able to alter volume on deadbeef and clementine. :(


Edited by mofonyx - 5/3/14 at 8:59am
post #269 of 293
Quote:
Originally Posted by komhst View Post
 

My top 3 audio players for bit perfect audio in Linux are:

 

- Clementune

- Audacious

- Guayadeque

 

And also VLC (considered as a music player as well)

 

I had been using Audacious...till now. The SQ in Guayadeque is really amazing. I was running both in ALSA and still in disbelief after switching back forth for hours :P

This thread has been a giant help to a neophyte, big thanks to all the contributors


Edited by Zoo Animal - 5/3/14 at 3:34pm
post #270 of 293
Quote:
Originally Posted by Zoo Animal View Post

I had been using Audacious...till now. The SQ in Guayadeque is really amazing. I was running both in ALSA and still in disbelief after switching back forth for hours :P


This thread has been a giant help to a neophyte, big thanks to all the contributors

This idea that one audio player sounds much different from another is not correct. On a GNU/Linux OS any and all audio players will use the same sound systems and so will sound the same. If they don't sound the same then either you configured them badly or they are essentially broken. Unless there is something seriously broken with an audio player then you can configure it (and/or the sound system such as alsa or pulse) to simply use the available hardware without bit depth changes or sample rate conversions, hence it will be bit perfect. If it can't do gapless with native gapless formats such as ogg vorbis, flac, wav (or any lossless format in fact), opus etc. then that player is broken and you ought to use something else.

If you have a sane setup of alsa/pulse/jack/whatever_it_is_you_use then mplayer, mplayer2, totem, gmusicbrowser, mpd, audacious, moc etc will all sound absolutely identical. If they don't then you did something wrong, or the people who set the default config of your OS did.

Bit perfect audio is really easy in Linux so long as your hardware supports it (i.e. it doesn't silently resample everything - see ancient Creative cards and current budget USB audio cards). If you really want bit perfect audio then you just set alsa to pass the audio stream to the hardware device. It isn't difficult or complicated. If your hardware device is not capable then there is no work around. If you insist on software mixing or resampling for convenience then there are no guarantees. But if you want bit perfect audio out then it's hard to imagine a simpler (or more verifiable) method than just dumping the audio>suitable hardware audio device>amplification>speakers/headphones. Any decent audio tool for GNU/Linux lets you choose the output device, and that device can be defined by you. So long as the hardware does what you think it does then you can have bit perfect audio.

If you have just one audio device and use alsa (not pulse) then it's as simple as defining ~/.asoundrc like so:
Code:
pcm.!default {
        type plug
        slave.pcm "hw:0,0";
}

That is it. There is no more to it. You just make sure any audio app outputs to the default device without filters or conversions and you are there. So if you can copy and paste four lines of text and don't run some OS where they broke everything in the name of user friendliness then you can have bit perfect audio as easily as that. But you might not like it. If you want any of software sound mixing, software volume control, sample rate conversion, a pulseaudio style sound server or abstraction layer then you have to think again about bit perfect.
Edited by julian67 - 5/3/14 at 4:29pm
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Computer Audio
Head-Fi.org › Forums › Equipment Forums › Computer Audio › Bit Perfect Audio from Linux