Clementine will be able to play the files but I’ve had poor results with 
recent experiments. You can get some test files from Linn Records 
<http://www.linnrecords.com/recording-test-files.aspx> if you want to do 
some testing.

If you have sound being sent to your DAC through ALSA as the default device 
this might work OK. I’m certainly not an expert on ALSA so probably 
wouldn’t be much help setting that up.

I’m using Ubuntu 14.04 and Pulseaudio is the default rather than ALSA. 
Pulseaudio works on the assumption that it will be *mixing* different audio 
sources (music, system alerts, skype, etc.) so it has to settle on one 
format to mix all those sources into for output. So, you *can* set it up to 
upsample everything to the maximum rate that your DAC can handle, but I’ve 
had poor results—annoying distortions—and a high sample rate may not play 
well with games. This may come down to some obscure settings (
default-fragments & default-fragment-size-msec) but I haven’t had the time 
to test this.

In fact, it turned out to be easier to use ALSA instead, although I could 
not get this to work in Clementine. It seems you could directly specify and 
output in the past, but not any more. I’ve successfully configured this in 
QuodLibet and Deadbeef though. The upside/downside of this method is that 
*only* the player can output sound, so you won’t hear any other sounds 
while music is player (and possibly until you close the player). The sound 
output is also in the format of the file you’re playing.

Pulseaudio
If you want to investigate the Pulseaudio route you can start with by 
editing /etc/pulse/daemon.conf. The lines of interest are

   - enable-remixing — probably worth setting to no. 
   - default-sample-format — no harm leaving this at s16le while testing, 
   but you might want to try s24le or s32le for those 24-bit recordings. 
   These can produce deafening noise if you get them wrong!
   - default-sample-rate — set this to either the highest sample rate you 
   expect (& your DAC can handle) or one somewhere in the middle (so up- & 
   downsampling happens). I tried 192000 with not very edifying results.
   - alternate-sample-rate — exactly what this does at the moment isn’t 
   very clear. Supposedly, if a file has exactly this sample rate Pulseaudio 
   will switch rather than resample, but it didn’t do that for me when I had 
   the default at 48000 and this at 192000. I’ve also seen advice to set 
   this to 44100 as a fallback when the default is at 48000.
   - resample-method — the default is speex-float-1 and the speex-float- 
   methods seem to be the recommended ones (speex-float-10 uses most CPU?). 
   There are others, but none that were any good to me.
   
After changing any of these you’ll need to run pulseaudio -k to kill it. 
Twice for luck. Playing a file will relaunch it if it hasn’t done so 
already.

You can check the reported capabilities of your device and check on what 
mode it’s using. Look in /proc/asound (i.e. ll /proc/asound) and find the 
directory for the device. I’m sending audio to a receiver over HDMI so for 
me there’s a link named NVidia pointing to the card2 directory. If you have 
a look in *that* directory you should find some useful files—for me: codec#0 
(rather long-winded) and eld#0.1 (easier to read).

So cat /proc/asound/NVidia/eld#0.1 gives me this:
monitor_present        1
eld_valid        1
monitor_name        SyncMaster
  
connection_type        HDMI
eld_version        [0x2] CEA-861D or below
edid_version        [0x3] CEA-861-B, C or D
manufacture_id        0x2f41
product_id        0x0
port_id            0x200
support_hdcp        0
support_ai        0
audio_sync_delay    0
speakers        [0x4f] FL/FR LFE FC RL/RR RLC/RRC
sad_count        8
sad0_coding_type    [0x1] LPCM
sad0_channels        2
sad0_rates        [0x1ee0] 32000 44100 48000 88200 96000 176400 192000
sad0_bits        [0xe0000] 16 20 24
sad1_coding_type    [0x1] LPCM
sad1_channels        8
sad1_rates        [0x1ee0] 32000 44100 48000 88200 96000 176400 192000
sad1_bits        [0xe0000] 16 20 24
sad2_coding_type    [0x2] AC-3
sad2_channels        6
sad2_rates        [0xe0] 32000 44100 48000
sad2_max_bitrate    640000
sad3_coding_type    [0x7] DTS
sad3_channels        7
sad3_rates        [0xc0] 44100 48000
sad3_max_bitrate    1536000
sad4_coding_type    [0x9] DSD (One Bit Audio)
sad4_channels        6
sad4_rates        [0x40] 44100
sad5_coding_type    [0xa] E-AC-3/DD+ (Dolby Digital Plus)
sad5_channels        8
sad5_rates        [0xc0] 44100 48000
sad6_coding_type    [0xb] DTS-HD
sad6_channels        8
sad6_rates        [0x1ee0] 32000 44100 48000 88200 96000 176400 192000
sad7_coding_type    [0xc] MLP (Dolby TrueHD)
sad7_channels        8
sad7_rates        [0x1ee0] 32000 44100 48000 88200 96000 176400 192000

Remembering you’ll have to substitute the appropriate directory.

Also in that directory are some sub-directories beginning with pcm. I think 
I *did* figure out how to tell which is the one, but I don’t remember now. 
You can just try each one while playing some music with the equivalent of 
this: cat /proc/asound/NVidia/pcm7p/sub0/hw_params. (I also have pcm3p, 
pcm8p & pcm9p). If there’s nothing playing (or you’re checking the wrong pcm) 
the output will just be closed. Otherwise it will give you something like 
this:

access: MMAP_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 192000 (192000/1)
period_size: 2048
buffer_size: 8192

ALSA
Assuming ALSA is working OK, you can tell players like QuodLibet or 
Deadbeef to output sound directly to an ALSA device. This is a little 
easier with Deadbeef as you can just choose from a list after selecting 
“ALSA output plugin” in Preferences. For QuodLibet you need to supply a 
string like alsasink device=plughw:2,7 for the “Output pipeline”.

I (eventually) figured out the correct values for that using aplay -L. I 
already had a hint from /proc/asound that my video card’s HDMI was card2 
and aplay -l (small L)  lists card 2: NVidia [HDA NVidia], device 7: HDMI 1 
[HDMI 1] — aplay -L gives 
plughw:CARD=NVidia,DEV=7
    HDA NVidia, HDMI 1
    Hardware device with all software conversions
…so the device is plughw:2,7.

Academic at the moment for Clementine, but maybe this feature will come 
back some day. I’d be interested if anyone knows how to make it work.

After quite a lot of fiddling about, I have to admit I’m not convinced 
there is a point to any of this. 44.1kHz sampling does cover human hearing 
quite well. *Perhaps* 48kHz could be justified, but 192kHz is really quite 
mad.

-- 
You received this message because you are subscribed to the Google Groups 
"Clementine Music Player" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to