Skip to contentSkip to conversation

ASoC: davinci-mcasp: Fix S24_LE and U24_LE support

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

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

PATCH 1/1 ASoC: davinci-mcasp: Fix S24_LE and U24_LE support

In case of S24_LE/U24_LE modes we expect 24bits on the bus while the samples are stored and transferred in memory on 32bits (lower 3 bytes of the 4 bytes).

---
 sound/soc/davinci/davinci-mcasp.c | 4 ++++
 1 file changed, 4 insertions(+)
sound/soc/davinci/davinci-mcasp.c +4 -0
index 9afb14629a17..6d5de26eae2f 100644
@@ -720,6 +720,10 @@ static int davinci_mcasp_hw_params(struct snd_pcm_substream *substream,
 
 	case SNDRV_PCM_FORMAT_U24_LE:
 	case SNDRV_PCM_FORMAT_S24_LE:
+		dma_params->data_type = 4;
+		word_length = 24;
+		break;
+
 	case SNDRV_PCM_FORMAT_U32_LE:
 	case SNDRV_PCM_FORMAT_S32_LE:
 		dma_params->data_type = 4;
Signature · 1 line
2.0.0
Tested-by on v1 1/1
#1 lore raw
Quoted 5 lines · Peter Ujfalusi

In case of S24_LE/U24_LE modes we expect 24bits on the bus while the samples are stored and transferred in memory on 32bits (lower 3 bytes of the 4 bytes).

Thanks!
Daniel

Quoted 20 lines
---
 sound/soc/davinci/davinci-mcasp.c | 4 ++++
 1 file changed, 4 insertions(+)
sound/soc/davinci/davinci-mcasp.c +4 -0
index 9afb14629a17..6d5de26eae2f 100644
@@ -720,6 +720,10 @@ static int davinci_mcasp_hw_params(struct snd_pcm_substream *substream,
 
 	case SNDRV_PCM_FORMAT_U24_LE:
 	case SNDRV_PCM_FORMAT_S24_LE:
+		dma_params->data_type = 4;
+		word_length = 24;
+		break;
+
 	case SNDRV_PCM_FORMAT_U32_LE:
 	case SNDRV_PCM_FORMAT_S32_LE:
 		dma_params->data_type = 4;
maintainer Applied
#2 lore raw
In reply to Peter Ujfalusi
Quoted 3 lines · Peter Ujfalusi

In case of S24_LE/U24_LE modes we expect 24bits on the bus while the samples are stored and transferred in memory on 32bits (lower 3 bytes of the 4 bytes).

Applied, thanks.