mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
ASoC: renesas: rz-ssi: Add support for 32 bits sample width
Add support for 32 bits sample format width for RZ/G2L SoCs. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://patch.msgid.link/20251114075856.4751-6-biju.das.jz@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
9e10709f83
commit
124f6155f3
|
|
@ -75,7 +75,8 @@
|
|||
#define PREALLOC_BUFFER_MAX (SZ_32K)
|
||||
|
||||
#define SSI_RATES SNDRV_PCM_RATE_8000_48000 /* 8k-48kHz */
|
||||
#define SSI_FMTS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE)
|
||||
#define SSI_FMTS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE | \
|
||||
SNDRV_PCM_FMTBIT_S32_LE)
|
||||
#define SSI_CHAN_MIN 2
|
||||
#define SSI_CHAN_MAX 2
|
||||
#define SSI_FIFO_DEPTH 32
|
||||
|
|
@ -295,7 +296,7 @@ static int rz_ssi_clk_setup(struct rz_ssi_priv *ssi, unsigned int rate,
|
|||
}
|
||||
|
||||
/*
|
||||
* DWL: Data Word Length = {16, 24} bits
|
||||
* DWL: Data Word Length = {16, 24, 32} bits
|
||||
* SWL: System Word Length = 32 bits
|
||||
*/
|
||||
ssicr |= SSICR_CKDV(clk_ckdv);
|
||||
|
|
@ -306,6 +307,9 @@ static int rz_ssi_clk_setup(struct rz_ssi_priv *ssi, unsigned int rate,
|
|||
case 24:
|
||||
ssicr |= SSICR_DWL(5) | SSICR_PDTA;
|
||||
break;
|
||||
case 32:
|
||||
ssicr |= SSICR_DWL(6);
|
||||
break;
|
||||
default:
|
||||
dev_err(ssi->dev, "Not support %u data width",
|
||||
ssi->hw_params_cache.sample_width);
|
||||
|
|
@ -1016,7 +1020,7 @@ static int rz_ssi_dai_hw_params(struct snd_pcm_substream *substream,
|
|||
unsigned int rate = params_rate(params);
|
||||
int ret;
|
||||
|
||||
if (!(sample_bits == 16 || sample_bits == 24)) {
|
||||
if (!(sample_bits == 16 || sample_bits == 24 || sample_bits == 32)) {
|
||||
dev_err(ssi->dev, "Unsupported sample width: %d\n",
|
||||
sample_bits);
|
||||
return -EINVAL;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user