What happens when 44.1 plays at 192khz?

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
I have a USB to S/PDIF converter (musical fidelity) that I play my digital audio through. I use Clementine connected to jack (interface qjackctl). The trouble is clementine doesn't seem to signal jack to switch sample rates - so I put the settings for SR at 192kHz for the output device in qjackctl. The 192kHz light illuminates on the vlink192 but I'm not sure what is happening when my normal 44.1kHz files are playing. Does clementine insert 3 more samples at the same level for each 44.1k sample?

Similarly - if I hook up to a 96kHz dac (musicstreamer - when on the road) does clementine do the down sampling from 192kHz to 96? Or does jack just take every other sample?

Thanks for your help.

Jerry
 
AFAIK jack operates at fixed samplerate, specified at jackd startup. Any application has to resample to this common samplerate.

But the first question is why do you need jack? Going straight to alsa would give you automatic switching the soundcard samplerate according to parameters of the currently played track.
 
Alsa is the driver + basic userspace libs layer for linux sound support. Sound servers, such as jack or pulseaudio, use alsa to access audio devices. They do not replace alsa, they build on top of it. Applications can output to alsa directly, or to these upper layers.

Jack is a framework for low-latency chaining audio applications in audio production and processing. It brings no benefit to simple audio playback.
 
Attempting to use TINY LINUX, ALSA, and DeaDBeeF and it will not play .wav.

Plays FLAC without protest.

Some think this is because of ALSA but I am not sure.

Please let me know your experience.

Thanks,

I very much doubt it will be ALSA. To confirm, open a terminal and use aplay to play a .wav file directly to the hardware. Something like:

Code:
aplay -f cd -Dhw:0,1 somefile.wav

Assuming 16 bit 44.1kHz wav file and your hardware is hw:0,1. You can use
Code:
aplay -l
to list hardware devices.

If the file plays using aplay, then you may have a deadbeef plugin issue or a libsndfile issue.
 
Attempting to use TINY LINUX, ALSA, and DeaDBeeF and it will not play .wav.

What does it say (screenshot, copy of log,...)?

Some think this is because of ALSA but I am not sure.

In linux there is no need to just "think", it is not a black box like closed-source OSes. In linux there are countless ways to troubleshoot the problem, find real cause, eventually fix it.

To get back to your problem, it is definitely not caused by alsa which sits below the audio format conversion layer. If you give enough information, I am sure your problem will be resolved quickly. My 2cents is the extended wav format incorrectly recognized by your player.
 
Well - reporting back - ALSA will not allow me to play high sample rate files. I open alsamixer and select my external USB connected dac as the sound card and when I try to play a high sample rate file, nothing comes out. (Using FLAC format files by the way.)
 
Last edited:
OK I will modify my last observation. I configure clementine to use the ALSA output sink (configure alsamixer in a terminal window to select the USB device as sound card for playback) or Pulse Audio and then when I select 96K files my music library they play at 48K, some don't play at all (?) and 44.1 files show up as 44.1 and all play. 192k files play back at 48k.

I guess I will need to do some high sample rate recordings of sine waves and play back on my oscilloscope to verify that the system even plays back the high sample rate files correctly using the jack sink.
 
No controls were obvious to me on the alsamixer menu to select sample rates for the Music Streamer.


**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: AD198x Analog [AD198x Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: AD198x Digital [AD198x Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: II [Music Streamer II], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0
 
Last edited:
Good. Now we know you have two soundcards, called Intel and II for alsa setup purposes.

Alsamixer does neither select your playback card, nor setup your playback samplerate. Both does your playback application - clementine, or the gstreamer multimedia library used by clementine, to be precise.

Now we check playback capability of your USB soundcard. Put here contents of the file /proc/asound/II/stream0 . It lists alternative settings (i.e. capabilities) of your USB sound device - available sample rates and bit formats.

While you are at it, you can get some 192kHz wav file, e.g. converting with sox
Code:
sudo aptitude install sox libsox-fmt-all
from any wav/flac you have:

Code:
sox your-file.flac -r 192000 -c2 -b24 192-24-stereo.wav

Put here output of command playing your output file to your USB DAC with verbose output turned on:

Code:
aplay -v -Dplughw:II 192-24-stereo.wav
 
on my implementation of linux I had to type

sudo apt-get install sox libsox-fmt-all

Then because I lack the experience with sox - I used audacity to load my 96k flac file and save as a 96k wav file. To begin with in 16 bit format.

(The Music Streamer II only handles sample rates up to 96K - this is my office system, not my main listening system)

and in fact issuing the command (btw if you could teach me how to do that "Code:" window thing - must be something like /code sfdsdfsdf code/ ?)

aplay -v -Dhw:1 day.wav

plays on the music streamer at 96khz just fine! (96k SR light lights up correctly)

So this means that the player (clementine) is not communicating with alsa correctly, right?
 
on my implementation of linux I had to type

Just install the aptitude package. Aptitude offers some advantages to plain apt-get.

I enclose the code examples into CODE tags with square brackets - the button with with hash mark icon.

If you gave here the stream0 file you would have known all the samplerate/bitdepth combinations your soundcard supports.

Unless you know exactly these combinations, do not use hw:X directly in aplay - it will refuse to play if there is no exact match. That is why I put plughw:X with the -v parameter - it tells you what conversions the plug plugin must do to satisfy your card. The same conversions will have to be done in your audio player.

Using the card number in alsa device specification is a deprecated way which may fail if you add e.g. another soundcard. The recommended way is using the card name - i.e. II

Most likely your player/gstreamer uses the default alsa device which goes through dmix and sample rate conversion. What are your player config options? This is another moment where text files configs (so unpopular among GUI-only users) show their advantage, compared to screenshots of GUI settings.
 
I use synaptic or apt-get. Works fine.

What ever the deprecation - it worked!

Maybe you missed my last post - about the settings in the player that work. At any rate if you specify the output device, the sample rate conversion works. qjackctl appears unnecessary, and I think is using alsa on the way out anyhow.

I will next look in to MPD and see if that whole interface is better than Clementine or not (the clients that is).

Check out this page:
http://www.computeraudiophile.com/f11-software/linux-audio-bit-perfect-under-jack-lie-5911/
 
Last edited:
What ever the deprecation - it worked!

Well, until you plug in another USB soundcard and starting solving why your setup has stopped working :)

Maybe you missed my last post - about the settings in the player that work. At any rate if you specify the output device, the sample rate conversion works. qjackctl appears unnecessary, and I think is using alsa on the way out anyhow.

Why qjackctl? Are you using jackd to hook your clementine to alsa?

This is what I am talking about - troubleshooting your setup step by step.

I will next look in to MPD and see if that whole interface is better than Clementine or not (the clients that is).

IMO that is like changing distro if someone hits a problem, instead of fixing the problem in the currently installed distro. I am afraid you will end up in a similar situation - not knowing exactly what is going on in your setup.



?? Using jack for audio playback makes absolutely no sense. The jack framework is running at fixed samplerate, it uses float32 as its internal format - of course it does not have to be bitperfect. It was never designed for such goal.
 
Well - if you got to ap-linux it appears that jack is their religion. So I assumed it should be what I use. But it appears to be adding some confusion on the transduction!

I am assuming that mpd would still be using alsa. No? Why is this "changing a distro"? In fact I would be trying a new interface.

Thanks again for your help.
 
Well - if you got to ap-linux it appears that jack is their religion.

Nothing new in the audiophile community where hype spreads like bird flue. The guy behind ap-linux said right away that he had no deeper knowledge/interest in linux audio and created this distro for a friend of his. But the magic word "audiophile" guarantees nirvana to some...

But it appears to be adding some confusion on the transduction!.

A quick glance at JACK | connecting a world of audio reveals there is nothing for audiophiles in jack. It is a crucial solution for those working with chained audio applications - just like the first paragraph explains. Jackd provides zero-latency data bus and control (start, pause, ff, rewind) interface for creating chains of audio processing applications. It is an extremely useful tool, but adds absolutely nothing to someone wanting to just play a track, with no interaction requiring minimum delay of the sound. I know, the "low latency" capability of jack is like red rag for "audiophiles". Suddenly audiophiles do not mind inherent features of jack - resampling of tracks with samplerate different from the one jack is running at, changing samples to jack internal float32 and back to the native integer format of all soundcards, bit imperfection due to the above. What a nonsense... all because of religion instead of knowledge what is actually going on in your setup.

I am assuming that mpd would still be using alsa.

Every audio application in linux is in the end using alsa. Either directly (yes, that is what you want), or through some additional technology, such as jack or pulseaudio.

Why is this "changing a distro"? In fact I would be trying a new interface.

My 2 cents - unless you learn the principles of linux audio (and not only audio), you will keep trying different players, always misconfigured, and end up with bitterness towards linux. This website is full of such cases - see the posts at http://www.diyaudio.com/forums/pc-based/232019-linux-audio-way-go-no-its-not.html . Very sad reading....
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.