diff options
author | Mark Brown <broonie@kernel.org> | 2020-10-08 21:16:54 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-10-08 21:16:54 +0100 |
commit | 34257a72697c5bb79458fe80a51937dc06b02e73 (patch) | |
tree | 2fe2668882e93c02efbf0c77be2cd79033ef264c /sound | |
parent | def69f21f547c8730ac01356deb88c5e7653ed77 (diff) | |
parent | 41bceb1272164ee2a6fd1ac3bed97043c94b6636 (diff) | |
download | lwn-34257a72697c5bb79458fe80a51937dc06b02e73.tar.gz lwn-34257a72697c5bb79458fe80a51937dc06b02e73.zip |
Merge series "ASoC: stm32: dfsdm: change rate limits" from Olivier Moysan <olivier.moysan@st.com>:
Widening of the supported rate range in the STM32 DFSDM driver.
The rates were previously limited to 8kHz, 16kHz and 32kHz.
Allow rate capture in the whole range 8kHz-48kHz as there is no hardware
limitation to support it.
Actual sample resolution is dependent on audio rate and DFSDM configuration.
Add a trace to allow simple check of sample resolution.
Olivier Moysan (2):
ASoC: stm32: dfsdm: change rate limits
ASoC: stm32: dfsdm: add actual resolution trace
drivers/iio/adc/stm32-dfsdm-adc.c | 4 ++++
drivers/iio/adc/stm32-dfsdm.h | 2 ++
sound/soc/stm/stm32_adfsdm.c | 8 +++-----
3 files changed, 9 insertions(+), 5 deletions(-)
--
2.17.1
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/stm/stm32_adfsdm.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sound/soc/stm/stm32_adfsdm.c b/sound/soc/stm/stm32_adfsdm.c index ec27c13af04f..c4031988f981 100644 --- a/sound/soc/stm/stm32_adfsdm.c +++ b/sound/soc/stm/stm32_adfsdm.c @@ -47,9 +47,6 @@ static const struct snd_pcm_hardware stm32_adfsdm_pcm_hw = { SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_PAUSE, .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE, - .rate_min = 8000, - .rate_max = 32000, - .channels_min = 1, .channels_max = 1, @@ -143,8 +140,9 @@ static const struct snd_soc_dai_driver stm32_adfsdm_dai = { .channels_max = 1, .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE, - .rates = (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 | - SNDRV_PCM_RATE_32000), + .rates = SNDRV_PCM_RATE_CONTINUOUS, + .rate_min = 8000, + .rate_max = 48000, }, .ops = &stm32_adfsdm_dai_ops, }; |