ASoC: Support 8 bit samples in soc-util
PATCH 1/1 ASoC: Support 8 bit samples in soc-util
Signed-off-by Mark Brown <[email protected]>
--- sound/soc/soc-utils.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
sound/soc/soc-utils.c +4 -0
@@ -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 ;
Signature · 1 line
1.7.2.3
Jaroslav Kysela
maintainerQuoted 1 line · Mark Brown
Signed-off-by Mark Brown <[email protected]>
Is any reason to avoid using the snd_pcm_format_width() function here?
Jaroslav
Quoted 9 lines
---
sound/soc/soc-utils.c| 4 ++++1 files changed, 4 insertions(+), 0 deletions(-)sound/soc/soc-utils.c +0
-0
sound/soc/soc-utils.c int snd_soc_params_to_frame_size(struct snd_pcm_hw_params *params) · line 38
Quoted 10 lines
sound/soc/soc-utils.c +4
-0@@ -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 ;
-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.
Quoted 5 lines · Jaroslav Kysela
Quoted 1 line · Mark Brown
Signed-off-by Mark Brown <[email protected]>Is any reason to avoid using the
snd_pcm_format_width()function here?
Poor documentation.