RE: [PATCH] ASoC: rt5659: add S32_LE format
From: Oder Chiou
Date: Wed Jan 29 2020 - 23:32:19 EST
Acked-by: Oder Chiou <oder_chiou@xxxxxxxxxxx>
> -----Original Message-----
> From: Sameer Pujar [mailto:spujar@xxxxxxxxxx]
> Sent: Wednesday, January 22, 2020 6:27 PM
> To: Oder Chiou; tiwai@xxxxxxxx; perex@xxxxxxxx
> Cc: alsa-devel@xxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH] ASoC: rt5659: add S32_LE format
>
> Hi Reviewers,
>
> Kindly review. Thanks.
>
> On 1/20/2020 11:54 AM, Sameer Pujar wrote:
> > Removing Bard(bardliao@xxxxxxxxxxx) from "to" list since I am getting
> > undelivered message.
> >
> > Oder,
> > Please add right folks as you feel necessary. Thanks.
> >
> > On 1/20/2020 11:47 AM, Sameer Pujar wrote:
> >> ALC5659 supports maximum data length of 24-bit. Currently driver
> >> supports
> >> S24_LE which is a 32-bit container with valid data in [23:0] and 0s
> >> in MSB.
> >> S24_3LE is not commonly used and is hard to find audio streams with this
> >> format. Also many SoC HW do not support S24_LE and S32_LE is used in
> >> general. The 24-bit data can be represented in S32_LE [31:8] and 0s are
> >> padded in LSB.
> >>
> >> This patch adds S32_LE to ALC5659 driver and data length for this is set
> >> to 24 as per codec's maximum data length support. This helps to play
> >> 24-bit audio, packed in S32_LE, on HW which do not support S24_LE.
> >>
> >> Signed-off-by: Sameer Pujar <spujar@xxxxxxxxxx>
> >> ---
> >> Â sound/soc/codecs/rt5659.c | 4 +++-
> >> Â 1 file changed, 3 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/sound/soc/codecs/rt5659.c b/sound/soc/codecs/rt5659.c
> >> index fc74dd63..f910ddf 100644
> >> --- a/sound/soc/codecs/rt5659.c
> >> +++ b/sound/soc/codecs/rt5659.c
> >> @@ -3339,6 +3339,7 @@ static int rt5659_hw_params(struct
> >> snd_pcm_substream *substream,
> >> ÂÂÂÂÂÂÂÂÂ val_len |= RT5659_I2S_DL_20;
> >> ÂÂÂÂÂÂÂÂÂ break;
> >> ÂÂÂÂÂ case 24:
> >> +ÂÂÂ case 32:
> >> ÂÂÂÂÂÂÂÂÂ val_len |= RT5659_I2S_DL_24;
> >> ÂÂÂÂÂÂÂÂÂ break;
> >> ÂÂÂÂÂ case 8:
> >> @@ -3733,7 +3734,8 @@ static int rt5659_resume(struct
> >> snd_soc_component *component)
> >> Â Â #define RT5659_STEREO_RATES SNDRV_PCM_RATE_8000_192000
> >> Â #define RT5659_FORMATS (SNDRV_PCM_FMTBIT_S16_LE |
> >> SNDRV_PCM_FMTBIT_S20_3LE | \
> >> -ÂÂÂÂÂÂÂ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8)
> >> +ÂÂÂÂÂÂÂ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE | \
> >> +ÂÂÂÂÂÂÂ SNDRV_PCM_FMTBIT_S8)
> >> Â Â static const struct snd_soc_dai_ops rt5659_aif_dai_ops = {
> >> ÂÂÂÂÂ .hw_params = rt5659_hw_params,
>
>
> ------Please consider the environment before printing this e-mail.