Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: fsl_spdif: Add support for 22.05 kHz sample rate

Add support for 22.05 kHz sample rate for TX.

Signed-off-by: Matus Gajdos <matuszpd@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20230719163154.19492-1-matuszpd@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Matus Gajdos and committed by
Mark Brown
65bc25b8 82e7c8b9

+10 -4
+6 -2
sound/soc/fsl/fsl_spdif.c
··· 514 514 int ret; 515 515 516 516 switch (sample_rate) { 517 + case 22050: 518 + rate = SPDIF_TXRATE_22050; 519 + csfs = IEC958_AES3_CON_FS_22050; 520 + break; 517 521 case 32000: 518 522 rate = SPDIF_TXRATE_32000; 519 523 csfs = IEC958_AES3_CON_FS_32000; ··· 1426 1422 struct clk *clk, u64 savesub, 1427 1423 enum spdif_txrate index, bool round) 1428 1424 { 1429 - static const u32 rate[] = { 32000, 44100, 48000, 88200, 96000, 176400, 1425 + static const u32 rate[] = { 22050, 32000, 44100, 48000, 88200, 96000, 176400, 1430 1426 192000, }; 1431 1427 bool is_sysclk = clk_is_match(clk, spdif_priv->sysclk); 1432 1428 u64 rate_ideal, rate_actual, sub; ··· 1487 1483 static int fsl_spdif_probe_txclk(struct fsl_spdif_priv *spdif_priv, 1488 1484 enum spdif_txrate index) 1489 1485 { 1490 - static const u32 rate[] = { 32000, 44100, 48000, 88200, 96000, 176400, 1486 + static const u32 rate[] = { 22050, 32000, 44100, 48000, 88200, 96000, 176400, 1491 1487 192000, }; 1492 1488 struct platform_device *pdev = spdif_priv->pdev; 1493 1489 struct device *dev = &pdev->dev;
+4 -2
sound/soc/fsl/fsl_spdif.h
··· 175 175 176 176 /* SPDIF tx rate */ 177 177 enum spdif_txrate { 178 - SPDIF_TXRATE_32000 = 0, 178 + SPDIF_TXRATE_22050 = 0, 179 + SPDIF_TXRATE_32000, 179 180 SPDIF_TXRATE_44100, 180 181 SPDIF_TXRATE_48000, 181 182 SPDIF_TXRATE_88200, ··· 192 191 #define SPDIF_QSUB_SIZE (SPDIF_UBITS_SIZE / 8) 193 192 194 193 195 - #define FSL_SPDIF_RATES_PLAYBACK (SNDRV_PCM_RATE_32000 | \ 194 + #define FSL_SPDIF_RATES_PLAYBACK (SNDRV_PCM_RATE_22050 | \ 195 + SNDRV_PCM_RATE_32000 | \ 196 196 SNDRV_PCM_RATE_44100 | \ 197 197 SNDRV_PCM_RATE_48000 | \ 198 198 SNDRV_PCM_RATE_88200 | \