[alsa-devel] Increasing maximum sampling frequency?
Lee Revell
rlrevell at joe-job.com
Thu May 28 04:34:39 CEST 2009
On Wed, May 27, 2009 at 9:47 PM, Cameron Stone
<camerons.lists at cse.unsw.edu.au> wrote:
> I've got a USB microphone application that I want to sample at 256000 8
> bit samples per second so I can listen to bats. I know that my device
> can get close to that rate, but alsa seems to restrict sampling rates to
> 192kHz.
>
> Is it possible to push the maximum sampling frequency higher? If so,
> where should I start looking?
>
For starters, try adding a 256K sample rate to include/sound/pcm.h:
118 #define SNDRV_PCM_RATE_176400 (1<<11) /* 176400Hz */
119 #define SNDRV_PCM_RATE_192000 (1<<12) /* 192000Hz */
120
and sound/core/pcm_native.c:
1762
1763 static unsigned int rates[] = { 5512, 8000, 11025, 16000, 22050,
32000, 44100,
1764 48000, 64000, 88200, 96000,
176400, 192000 };
1765
Line numbers may vary, mine are from 2.6.27 kernel source.
Lee
More information about the Alsa-devel
mailing list