summaryrefslogtreecommitdiff
path: root/sound/soc/sunxi
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2020-10-14 01:19:38 -0500
committerMark Brown <broonie@kernel.org>2020-10-26 14:57:03 +0000
commit342cacb92d627a7cc8df1b5fe3e404530164ea17 (patch)
tree074c854c02adeaa9aba63c74b9c8b2c518ab601a /sound/soc/sunxi
parent2464dccab7fef040bd6e85cd78ac33e2731925da (diff)
ASoC: sun8i-codec: Enable all supported PCM formats
Now that the DAI clock setup is correct for all hardware-supported PCM formats, we can enable them in the driver. With the appropriate support in the CPU DAI driver, this allows userspace to access the additional formats. Since this codec is connected to the CPU via a DAI, not directly, we do not care if the CPU DAI is using 3-byte or 4-byte formats, so we can support them both. Acked-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Samuel Holland <samuel@sholland.org> Link: https://lore.kernel.org/r/20201014061941.4306-15-samuel@sholland.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sunxi')
-rw-r--r--sound/soc/sunxi/sun8i-codec.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index a530e58018b7..e3abf8363d9b 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -96,6 +96,13 @@
#define SUN8I_CODEC_PASSTHROUGH_SAMPLE_RATE 48000
+#define SUN8I_CODEC_PCM_FORMATS (SNDRV_PCM_FMTBIT_S8 |\
+ SNDRV_PCM_FMTBIT_S16_LE |\
+ SNDRV_PCM_FMTBIT_S20_LE |\
+ SNDRV_PCM_FMTBIT_S24_LE |\
+ SNDRV_PCM_FMTBIT_S20_3LE|\
+ SNDRV_PCM_FMTBIT_S24_3LE)
+
#define SUN8I_CODEC_PCM_RATES (SNDRV_PCM_RATE_8000_48000|\
SNDRV_PCM_RATE_88200 |\
SNDRV_PCM_RATE_96000 |\
@@ -540,7 +547,7 @@ static struct snd_soc_dai_driver sun8i_codec_dais[] = {
.channels_min = 1,
.channels_max = 2,
.rates = SUN8I_CODEC_PCM_RATES,
- .formats = SNDRV_PCM_FMTBIT_S16_LE,
+ .formats = SUN8I_CODEC_PCM_FORMATS,
.sig_bits = 24,
},
/* playback capabilities */
@@ -549,7 +556,7 @@ static struct snd_soc_dai_driver sun8i_codec_dais[] = {
.channels_min = 1,
.channels_max = 2,
.rates = SUN8I_CODEC_PCM_RATES,
- .formats = SNDRV_PCM_FMTBIT_S16_LE,
+ .formats = SUN8I_CODEC_PCM_FORMATS,
},
.symmetric_rates = true,
.symmetric_channels = true,