[alsa-devel] [PATCH] ASoC: Support 8 bit samples in soc-util

Mark Brown broonie at opensource.wolfsonmicro.com
Mon Jan 31 21:30:48 CET 2011


Signed-off-by: Mark Brown <broonie at opensource.wolfsonmicro.com>
---
 sound/soc/soc-utils.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/sound/soc/soc-utils.c b/sound/soc/soc-utils.c
index 1d07b93..e31d843 100644
--- a/sound/soc/soc-utils.c
+++ b/sound/soc/soc-utils.c
@@ -29,6 +29,10 @@ int snd_soc_params_to_frame_size(struct snd_pcm_hw_params *params)
 	int sample_size;
 
 	switch (params_format(params)) {
+	case SNDRV_PCM_FORMAT_S8:
+	case SNDRV_PCM_FORMAT_U8:
+		sample_size = 8;
+		break;
 	case SNDRV_PCM_FORMAT_S16_LE:
 	case SNDRV_PCM_FORMAT_S16_BE:
 		sample_size = 16;
-- 
1.7.2.3



More information about the Alsa-devel mailing list