Page 1 of 2
Petrov's resampler for ALSA
Posted: Wed Jan 14, 2015 3:54 pm
by ossuserr
Alas! I spoiled my hearing today. Played via aplay -r 192000 -c 2 -f S32_LE song.flac and sound level was highest on card which of course gave me terrible noise since aplay can play only waves that is RAW. I switched off the speakers within 20 seconds or so but still have feeling of noise in ears.
So i installed Petrov's solution for alsa and could employ my hw4 device of audigy 2 zs. An interesting fact about it is that the master volume slider does not effect it at all. It's a separate chip which is supposed to play much cleaner than hw0 with DSP. But I am kind of deaf today to compare sounding. Also i uninstalled speex and libsamplerate. While uninstaling libsamplerate i got a notice that it's used by alsa_in and alsa_out and i must reemerge/recompile packages without its support. WHich means libsamplerate is heavily integrated into alsa drivers. Thanks to gento I have a choice to get rid of them. Now i have enough pure and clear sound with aplay -r 192000 -c 2 -f S32_LE so i can't compare to OSS + EAC or OSS + DB since i can use only the inferior hw0 there with 48\16.
Re: Petrov's resampler for ALSA
Posted: Wed Jan 14, 2015 4:20 pm
by igorzwx
ossuserr wrote:Now i have enough pure and clear sound with aplay -r 192000 -c 2 -f S32_LE
You may post the output on terminal.
Re: Petrov's resampler for ALSA
Posted: Wed Jan 14, 2015 5:24 pm
by ossuserr
Code: Select all
$ aplay -c 2 -f S32_LE -r 192000 /mnt/song.wav
Warning: format is changed to S24_3LE
Playing WAVE '/mnt/song.wav' : Signed 24 bit Little Endian in 3bytes, Rate 48000 Hz, Stereo
Converter: fftrate (build: Jan 31 2013, 18:43:10, linux-x86_64)
Input: 48000 Hz, 8 ch, 's24_3le' (0x20): dummy = 0, period = 511
Output: 192000 Hz, 8 ch, 's32_le' (0xa): dummy = 0, period = 2046
Rates: 32704 --> 130944 (J: 0.10%, T: DCT, W: Vorbis)
Ok.
Re: Petrov's resampler for ALSA
Posted: Wed Jan 14, 2015 5:28 pm
by ossuserr
By the way I had to place libasound_module_rate_fftrate.so to another folder that is /usr/lib/alsa-lib/ to make Petrov's alsa solution work. But that is for gento not for ubunto.
Again my question is why Petrov uses inferoir DCT in alsa solution. Can you ask him to make FFT also?
Re: Petrov's resampler for ALSA
Posted: Wed Jan 14, 2015 5:35 pm
by ossuserr
And this is output for DB [ALSA]. Subjectively the quality sound is the same as with
aplay commadn above.
Code: Select all
selected output plugin: ALSA output plugin
INFO: loading playlist Default
INFO: from file /home/user/.config/deadbeef/playlists/0.dbpl
convgui: gtkui plugin not found
plugin Converter GTK3 UI failed to connect to dependencies, deactivated.
plugin Playlist browser GTK3 failed to connect to dependencies, deactivated.
gtkui plugin compiled for gtk version: 2.24.24
connecting button tray signals
** (deadbeef:14012): WARNING **: Widget not found: Skip to_menu
Converter: fftrate (build: Jan 31 2013, 18:43:10, linux-x86_64)
Input: 48000 Hz, 8 ch, 's24_3le' (0x20): dummy = 0, period = 511
Output: 192000 Hz, 8 ch, 's32_le' (0xa): dummy = 0, period = 2046
Rates: 32704 --> 130944 (J: 0.10%, T: DCT, W: Vorbis)
Ok.
Re: Petrov's resampler for ALSA
Posted: Wed Jan 14, 2015 5:42 pm
by ossuserr
You know in DB's settings there is an option Always convert 8 bit to 16 bit. I had it switched on. While playing a song i switched it off and the playback stopped for a second. However nothing new appeared in the terminal output. I just think that probably we need to switch off those boxes "always convert" to make sure that no other resamplers are used besides Petrov's.
Re: Petrov's resampler for ALSA
Posted: Wed Jan 14, 2015 6:31 pm
by ossuserr
I am enjoyin music now. Even mp3s 128kbit. Glory to Petrov! Augigy 2 zs p16v hw4 + Petrov's alsa package + DB = pleasure. NO clicks, NO hearable dstortions. Metal shade of libsamplerate and speex has gone away. So far i begin to doubt if it's worse to move to OSS with my setup. If OSS supported p16v the move would be reasoned.
Re: Petrov's resampler for ALSA
Posted: Wed Jan 14, 2015 7:25 pm
by igorzwx
ossuserr wrote:I am enjoyin music now. Even mp3s 128kbit. Glory to Petrov! Augigy 2 zs p16v hw4 + Petrov's alsa package + DB = pleasure. NO clicks, NO hearable dstortions. Metal shade of libsamplerate and speex has gone away. So far i begin to doubt if it's worse to move to OSS with my setup. If OSS supported p16v the move would be reasoned.
You may better try LynxTWO and HW mixing _http://manuals.opensound.com/usersguide/lynxtwo.html
Re: Petrov's resampler for ALSA
Posted: Wed Jan 14, 2015 9:53 pm
by ossuserr
I must become rich first.
Re: Petrov's resampler for ALSA
Posted: Thu Jan 15, 2015 6:44 pm
by igorzwx
ossuserr wrote:Again my question is why Petrov uses inferoir DCT in alsa solution. Can you ask him to make FFT also?
Petrov told that his ALSA plugin has FFT resampler inside.
It can be easily enabled in /etc/fftrate.conf
fftrate.conf is in the deb-package:
Code: Select all
libasound2-plugin-fftrate_1.6.2_amd64/etc/fftrate.confIt should be installed into /etc
To enable FFT, you should simply edit /etc/fftrate.conf
It should look like this:
Code: Select all
# Transform type
# Available: dct, fft (default: dct)
transform = fft
# Window type
# Available: vorbis, hanning, rect (default: vorbis)
#window = vorbis
# Set zummer for self detection
# Available: on, off (default: off)
#zummer = offThen you can play your "song.wav" with aplay
Code: Select all
$ aplay -c 2 -f S32_LE -r 192000 /mnt/song.wavand see whether it is enabled or not.
You may not need to reload ALSA.
Re: Petrov's resampler for ALSA
Posted: Thu Jan 15, 2015 7:48 pm
by ossuserr
Glory to Petrov! I enabled fft, reloaded alsa and voila it works! It gives that more spacious sound like in old exact audio player.
Nice sound. No ear pain anymore. Plastic shade is much lessened. I would recommend Petrov to abandon DCT for the sake of FFT everywhere. So alsa is not crap if used with the right resampler. Now it's time for Petrov to patch jackd sourcs who require libsamplerate for installation.
Re: Petrov's resampler for ALSA
Posted: Thu Jan 15, 2015 8:15 pm
by igorzwx
ossuserr wrote:Glory to Petrov! I enabled fft, reloaded alsa and voila it works! It gives that more spacious sound like in old exact audio player.
Nice sound. No ear pain anymore. Plastic shade is much lessened. I would recommend Petrov to abandon DCT for the sake of FFT everywhere. So alsa is not crap if used with the right resampler. Now it's time for Petrov to patch jackd sourcs who require libsamplerate for installation.
It is not very probable that Petrov will patch anything. He is currently very busy.
Re: Petrov's resampler for ALSA
Posted: Thu Jan 15, 2015 8:35 pm
by ossuserr
That's a pity because all linuxoids would be happy. As for alsa official support trolls they told me they are not going to fix alsa or jackd for us...
Re: Petrov's resampler for ALSA
Posted: Sun Jun 28, 2015 1:31 pm
by ossuserr
Can you give the link to Petrov's script which creates asound.conf for the resampler?
Re: Petrov's resampler for ALSA
Posted: Sun Jun 28, 2015 3:51 pm
by igorzwx
ossuserr wrote:Can you give the link to Petrov's script which creates asound.conf for the resampler?
ALSA config-files for Petrov's ALSA-plugin/resampler can be created with "arateconf" ( /usr/bin/arateconf )
It is inside the package:
Выложил: _https://yadi.sk/d/FXbgCo7hdu5QN
Там две сборки (для x86 и x86_64) и два пакета:
собственно плагин и конфигуратор для генерации asound.conf.
_http://www.opensound.com/forum/viewtopic.php?f=3&t=3543&start=105#p20976
It is still available for download, and a copy of it is attached below (fftrate.zip)
Instructions are here: _http://www.opensound.com/forum/viewtopic.php?f=3&t=3543&start=105#p20976
and here: _http://www.opensound.com/forum/viewtopic.php?f=3&t=5788#p21058
I do not know any other Petrov's tools for creating ALSA config-files.