Skip to contentSkip to conversation

ASoC: tlv320aic3x: Correct S24_3LE support

PATCH Applied Peter Ujfalusi 2 participants 3 messages Jun 26, 2014 – Jun 30, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ASoC: tlv320aic3x: Correct S24_3LE support

Correct the hw_params callback to configure the codec correctly in case of S24_3LE format since in case of S24_3LE the codec has been configured to 16bit format mode.
S24_LE is not defined as supported format for the codec.

---
 sound/soc/codecs/tlv320aic3x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/tlv320aic3x.c +1 -1
index e12fafbb1e09..5360772bc1ad 100644
@@ -879,7 +879,7 @@ static int aic3x_hw_params(struct snd_pcm_substream *substream,
 	case SNDRV_PCM_FORMAT_S20_3LE:
 		data |= (0x01 << 4);
 		break;
-	case SNDRV_PCM_FORMAT_S24_LE:
+	case SNDRV_PCM_FORMAT_S24_3LE:
 		data |= (0x02 << 4);
 		break;
 	case SNDRV_PCM_FORMAT_S32_LE:
Signature · 1 line
2.0.0
#1 lore raw

PATCH 2/2 ASoC: tlv320aic3x: Add support for S24_LE format

The codec need to be configured to 24bit mode in case of S24_LE format.

---
 sound/soc/codecs/tlv320aic3x.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
sound/soc/codecs/tlv320aic3x.c +3 -1
index 5360772bc1ad..d275890a6827 100644
@@ -880,6 +880,7 @@ static int aic3x_hw_params(struct snd_pcm_substream *substream,
 		data |= (0x01 << 4);
 		break;
 	case SNDRV_PCM_FORMAT_S24_3LE:
+	case SNDRV_PCM_FORMAT_S24_LE:
 		data |= (0x02 << 4);
 		break;
 	case SNDRV_PCM_FORMAT_S32_LE:
@@ -1194,7 +1195,8 @@ static int aic3x_set_bias_level(struct snd_soc_codec *codec,
 
 #define AIC3X_RATES	SNDRV_PCM_RATE_8000_96000
 #define AIC3X_FORMATS	(SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \
-			 SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S32_LE)
+			 SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S24_LE | \
+			 SNDRV_PCM_FMTBIT_S32_LE)
 
 static const struct snd_soc_dai_ops aic3x_dai_ops = {
 	.hw_params	= aic3x_hw_params,
Signature · 1 line
2.0.0
maintainer Applied
#2 lore raw
In reply to Peter Ujfalusi
Quoted 4 lines · Peter Ujfalusi

Correct the hw_params callback to configure the codec correctly in case of S24_3LE format since in case of S24_3LE the codec has been configured to 16bit format mode.
S24_LE is not defined as supported format for the codec.

Applied both, thanks.