Skip to contentSkip to conversation

Wrong sample rate user space -> kernel space?

DISCUSSION Daniel Mack 2 participants 3 messages Jul 7, 2009

lore
Share & tools
lore
#0 lore raw

On a PXA embedded board, the sample rate propagation from user space to kernel space seems to be wrong.

When I start aplay (v1.0.19) from userspace like this ...

    # aplay -f dat /dev/urandom 
    Playing raw data '/dev/urandom' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo

... params_rate(params) in my snd_soc_ops .hw_params callback returns 88200, not 48000.

Can anyone reproduce this? I guess this is unrelated to PXA and ASoC.

Thanks,
Daniel

#1 lore raw
Quoted 10 lines · Daniel Mack

On a PXA embedded board, the sample rate propagation from user space to kernel space seems to be wrong.

When I start aplay (v1.0.19) from userspace like this ...

    # aplay -f dat /dev/urandom 
    Playing raw data '/dev/urandom' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo

... params_rate(params) in my snd_soc_ops .hw_params callback returns 88200, not 48000.

It might be possible that userspace converts the sample rate because it thinks that the driver doesn't support 48 kHz.

Is there a converter plugin in the output of "aplay -f dat -v /dev/urandom"?

Best regards,
Clemens

#2 lore raw
Quoted 9 lines · Clemens Ladisch
Quoted 8 lines · Daniel Mack

On a PXA embedded board, the sample rate propagation from user space to kernel space seems to be wrong.

When I start aplay (v1.0.19) from userspace like this ...

    # aplay -f dat /dev/urandom 
    Playing raw data '/dev/urandom' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
Quoted 7 lines
Quoted 2 lines

... params_rate(params) in my snd_soc_ops .hw_params callback returns 88200, not 48000.

It might be possible that userspace converts the sample rate because it thinks that the driver doesn't support 48 kHz.

Is there a converter plugin in the output of "aplay -f dat -v /dev/urandom"?

Argh. Of course, you're right. Sorry for the noise. Literally ;)

Daniel