ASoC: rt5659: add S32_LE format
Subsystems (3)
PATCH 1/1 ASoC: rt5659: add S32_LE format
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.
--- sound/soc/codecs/rt5659.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
sound/soc/codecs/rt5659.c +3 -1
@@ -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,
Signature · 1 line
2.7.4
Removing Bard([email protected]) from "to" list since I am getting undelivered message.
Oder,
Please add right folks as you feel necessary. Thanks.
Quoted 38 lines · Sameer Pujar
ALC5659 supports maximum data length of 24-bit. Currently driver supports
S24_LEwhich is a 32-bit container with valid data in [23:0] and 0s in MSB.S24_3LEis not commonly used and is hard to find audio streams with this format. Also many SoC HW do not supportS24_LEandS32_LEis used in general. The 24-bit data can be represented inS32_LE[31:8] and 0s are padded in LSB.This patch adds
S32_LEto 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 inS32_LE, on HW which do not supportS24_LE.Signed-off-by Sameer Pujar <[email protected]>--- sound/soc/codecs/rt5659.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)sound/soc/codecs/rt5659.c +3
-1@@ -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,
Hi Reviewers,
Kindly review. Thanks.
Quoted 44 lines · Sameer Pujar
Removing Bard([email protected]) from "to" list since I am getting undelivered message.
Oder,
Please add right folks as you feel necessary. Thanks.Quoted 38 lines · Sameer Pujar
ALC5659 supports maximum data length of 24-bit. Currently driver supports
S24_LEwhich is a 32-bit container with valid data in [23:0] and 0s in MSB.S24_3LEis not commonly used and is hard to find audio streams with this format. Also many SoC HW do not supportS24_LEandS32_LEis used in general. The 24-bit data can be represented inS32_LE[31:8] and 0s are padded in LSB.This patch adds
S32_LEto 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 inS32_LE, on HW which do not supportS24_LE.Signed-off-by Sameer Pujar <[email protected]>---
sound/soc/codecs/rt5659.c| 4 +++-1 file changed, 3 insertions(+), 1 deletion(-)sound/soc/codecs/rt5659.c +0
-0@@ -3339,6 +3339,7 @@ static int rt5659_hw_params(structsnd_pcm_substream *substream, val_len |= RT5659_I2S_DL_20; break;case 24:
+ case 32:
val_len|=RT5659_I2S_DL_24;
break;
case 8:sound/soc/codecs/rt5659.c +2
-1@@ -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,
Quoted 63 lines
-----Original Message-----
From: Sameer Pujar [mailto:[email protected]]
Sent: Wednesday, January 22, 2020 6:27 PM
To: Oder Chiou; [email protected]; [email protected]
Cc: [email protected]; [email protected]
Subject: Re: [PATCH] ASoC: rt5659: addS32_LEformatHi Reviewers,
Kindly review. Thanks.
Quoted 40 lines · Sameer Pujar
Removing Bard([email protected]) from "to" list since I am getting undelivered message.
Oder,
Please add right folks as you feel necessary. Thanks.Quoted 33 lines · Sameer Pujar
ALC5659 supports maximum data length of 24-bit. Currently driver supports
S24_LEwhich is a 32-bit container with valid data in [23:0] and 0s in MSB.S24_3LEis not commonly used and is hard to find audio streams with this format. Also many SoC HW do not supportS24_LEandS32_LEis used in general. The 24-bit data can be represented inS32_LE[31:8] and 0s are padded in LSB.This patch adds
S32_LEto 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 inS32_LE, on HW which do not supportS24_LE.Signed-off-by Sameer Pujar <[email protected]>---
sound/soc/codecs/rt5659.c| 4 +++-1 file changed, 3 insertions(+), 1 deletion(-)sound/soc/codecs/rt5659.c +0
-0@@ -3339,6 +3339,7 @@ static int rt5659_hw_params(structsnd_pcm_substream *substream, val_len |= RT5659_I2S_DL_20; break;case 24:
+ case 32:
val_len|=RT5659_I2S_DL_24;
break;
case 8:sound/soc/codecs/rt5659.c +0
-0@@ -3733,7 +3734,8 @@ static int rt5659_resume(struct snd_soc_component *component)Quoted 8 lines
sound/soc/codecs/rt5659.c static int rt5659_resume(struct snd_soc_component *component) · line 3741
Quoted 8 lines
sound/soc/codecs/rt5659.c +2
-1#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.
Quoted 4 lines · Oder Chiou
External email: Use caution opening links or attachments
Acked-by Oder Chiou <[email protected]>
Request maintainers to consider this patch for approval. Thanks in advance.
. . .
Quoted 43 lines
Quoted 43 lines
Quoted 33 lines
Quoted 33 lines
ALC5659 supports maximum data length of 24-bit. Currently driver supports
S24_LEwhich is a 32-bit container with valid data in [23:0] and 0s in MSB.S24_3LEis not commonly used and is hard to find audio streams with this format. Also many SoC HW do not supportS24_LEandS32_LEis used in general. The 24-bit data can be represented inS32_LE[31:8] and 0s are padded in LSB.This patch adds
S32_LEto 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 inS32_LE, on HW which do not supportS24_LE.Signed-off-by Sameer Pujar <[email protected]>--- sound/soc/codecs/rt5659.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)sound/soc/codecs/rt5659.c +1
-0@@ -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:sound/soc/codecs/rt5659.c +0
-0@@ -3733,7 +3734,8 @@ static int rt5659_resume(struct snd_soc_component *component)Quoted 8 lines
sound/soc/codecs/rt5659.c static int rt5659_resume(struct snd_soc_component *component) · line 3741
Quoted 8 lines
sound/soc/codecs/rt5659.c +2
-1#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.