Skip to contentSkip to conversation

How to find sampling rate supported

DISCUSSION reetesh chandran 2 participants 2 messages Mar 22, 2009 – Mar 23, 2009

lore
Share & tools
lore
#0 lore raw

Hi all,

I am new to the group and to Alsa.

For our project, we have to find the max sampling rate and other pcm hardware parameters that the connected USB headset supports. I looked at the alsa library, but could not find an API which returned this information.

I found snd_pcm_hw_params_test_* function to test a specific value is supported, but I was wondering if there was a way to query the device to get the values.

Thanks in advance,
Reetesh

#1 lore raw

At Sun, 22 Mar 2009 09:00:00 -0700 (PDT),

Quoted 8 lines · reetesh chandran

Hi all,

I am new to the group and to Alsa.

For our project, we have to find the max sampling rate and other pcm hardware parameters that the connected USB headset supports. I looked at the alsa library, but could not find an API which returned this information.

I found snd_pcm_hw_params_test_* function to test a specific value is supported, but I was wondering if there was a way to query the device to get the values.

The min / max can be obtained via *_get_rate_min() and *_get_rate_max(), at least. The other detailed information can't be get except for testing the explicit value via *_test_rate(), so far.

HTH,

Takashi