alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: Support 8 bit samples in soc-util
@ 2011-01-31 20:30 Mark Brown
  2011-01-31 22:27 ` Jaroslav Kysela
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2011-01-31 20:30 UTC (permalink / raw)
  To: Liam Girdwood; +Cc: alsa-devel, patches, Mark Brown

Signed-off-by: Mark Brown <broonie@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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: Support 8 bit samples in soc-util
  2011-01-31 20:30 [PATCH] ASoC: Support 8 bit samples in soc-util Mark Brown
@ 2011-01-31 22:27 ` Jaroslav Kysela
  2011-02-01 11:00   ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Jaroslav Kysela @ 2011-01-31 22:27 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, patches, Liam Girdwood

On Mon, 31 Jan 2011, Mark Brown wrote:

> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

Is any reason to avoid using the snd_pcm_format_width() function here?

 						Jaroslav

> ---
> 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;

-----
Jaroslav Kysela <perex@perex.cz>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: Support 8 bit samples in soc-util
  2011-01-31 22:27 ` Jaroslav Kysela
@ 2011-02-01 11:00   ` Mark Brown
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2011-02-01 11:00 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: alsa-devel, patches, Liam Girdwood

On Mon, Jan 31, 2011 at 11:27:41PM +0100, Jaroslav Kysela wrote:
> On Mon, 31 Jan 2011, Mark Brown wrote:

> >Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

> Is any reason to avoid using the snd_pcm_format_width() function here?

Poor documentation.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-02-01 11:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-31 20:30 [PATCH] ASoC: Support 8 bit samples in soc-util Mark Brown
2011-01-31 22:27 ` Jaroslav Kysela
2011-02-01 11:00   ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).