Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1547599

[PATCH 2/2] ASoC: dwc: Enable 24 bit sample size in PIO mode

From Jose Abreu <Jose.Abreu@synopsys.com>
Newsgroups linux.kernel
Subject [PATCH 2/2] ASoC: dwc: Enable 24 bit sample size in PIO mode
Date 2016-12-27 15:10 +0100
Message-ID <sT0BY-33i-13@gated-at.bofh.it> (permalink)
References <sT0BX-33i-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Sample size of 24 bits use in reality 32 bits for storage. We
can safelly enable this sample size and treat the data as
32 bits.

Tested in a x86_64 platform and in ARC AXS101 SDP platform.

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Cc: Carlos Palminha <palminha@synopsys.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: alsa-devel@alsa-project.org
Cc: linux-kernel@vger.kernel.org
---
 sound/soc/dwc/designware_pcm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/soc/dwc/designware_pcm.c b/sound/soc/dwc/designware_pcm.c
index b063c86..459ec86 100644
--- a/sound/soc/dwc/designware_pcm.c
+++ b/sound/soc/dwc/designware_pcm.c
@@ -80,6 +80,7 @@
 	.rate_min = 32000,
 	.rate_max = 48000,
 	.formats = SNDRV_PCM_FMTBIT_S16_LE |
+		SNDRV_PCM_FMTBIT_S24_LE |
 		SNDRV_PCM_FMTBIT_S32_LE,
 	.channels_min = 2,
 	.channels_max = 2,
@@ -175,6 +176,7 @@ static int dw_pcm_hw_params(struct snd_pcm_substream *substream,
 		dev->tx_fn = dw_pcm_tx_16;
 		dev->rx_fn = dw_pcm_rx_16;
 		break;
+	case SNDRV_PCM_FORMAT_S24_LE:
 	case SNDRV_PCM_FORMAT_S32_LE:
 		dev->tx_fn = dw_pcm_tx_32;
 		dev->rx_fn = dw_pcm_rx_32;
-- 
1.9.1

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] ASoC: dwc: Add record capability in PIO mode Jose Abreu <Jose.Abreu@synopsys.com> - 2016-12-27 15:10 +0100
  [PATCH 2/2] ASoC: dwc: Enable 24 bit sample size in PIO mode Jose Abreu <Jose.Abreu@synopsys.com> - 2016-12-27 15:10 +0100

csiph-web