Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Unverified Commit 5a0cf024 authored by Andrea Bondavalli's avatar Andrea Bondavalli Committed by Mark Brown
Browse files

ASoC: sun4i-codec: enable 12Khz and 24Khz audio sample rates



H3 ASoC supports 12Khz and 24Khz audio sample rates but the current
drivers doesn't advertise these rates properly and they cannot be used.

For example attempt to capture at 12Khz uses 11Khz (same applies to
audio playback):

Recording raw data '/tmp/testS16_LE.raw' : Signed 16 bit Little Endian, Rate 12000 Hz, Stereo
Warning: rate is not accurate (requested = 12000Hz, got = 11025Hz)

This patch fixes the audio sample rates declared and supported by the
driver according to the H3 data sheet.  Specifically for audio playback:

8000, 11050, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 96000, 192000

and for audio capture:

8000, 11050, 12000, 16000, 22050, 24000, 32000, 44100, 48000

Signed-off-by: default avatarAndrea Bondavalli <andrea.bondavalli74@gmail.com>
Acked-by: default avatarChen-Yu Tsai <wens@csie.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 21faaea1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment