You are not logged in.

#1 2021-01-18 17:19:36

cristovaozr
Member
Registered: 2020-10-08
Posts: 4

Higher playback sampling rate for ALSA

Hello!

First of all, some context: I need to generate sound in ultrasound frequency (around 30kHz) for a project. I already have the WAV files sampled at 176,4kHz  and a wave of 28kHz. Whenever I play the audio with aplay (or any other method) it always gets resampled at 48kHz which, depending on the resampling algorithm used, either filters out the sound (so, no output) or the output is aliased (for example: a 28kHz wave is output as 20kHz wave). I have an oscilloscope to check this!

I started looking around ALSA for some configuration to allow this 48kHz resampling to be as high as 192kHz which my sound card is capable of  (Realtek ALC3246) but I have not found a configuration that changes this yet.

Thanks in advance!

Offline

#2 2021-01-18 17:32:27

progandy
Member
Registered: 2012-05-17
Posts: 5,190

Re: Higher playback sampling rate for ALSA

Does it work with

aplay -f S32_LE -r 192000 ...

As for pulseaudio you might be able to set default-sample-rate:
https://wiki.archlinux.org/index.php/Pu … card_(2/5)

If you have set up alsa with dmix, then you have to tell dmix the sample rate: https://stackoverrun.com/de/q/338265#1717249

Then, some soundcards support recording with 192kHz, but playback only with 48kHz.

Another problem may be that even if higher sampling rates are supported, the DAC might just not be able to generate tones higher than about 20 - 25 kHz.

https://forum.audacityteam.org/viewtopic.php?t=93615

Last edited by progandy (2021-01-18 18:01:59)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Online

Board footer

Powered by FluxBB