Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org,
	Christian Pellegrin <chripell@gmail.com>,
	Christian Pellegrin <chripell@fsfe.org>
Subject: Re: [PATCH 2/4] ASoC: s3c24xx 8 bit sound fix
Date: Wed, 12 Nov 2008 13:33:34 +0100	[thread overview]
Message-ID: <s5hzlk5jf8h.wl%tiwai@suse.de> (raw)
In-Reply-To: <1226490949-22360-2-git-send-email-broonie@opensource.wolfsonmicro.com>

At Wed, 12 Nov 2008 11:55:47 +0000,
Mark Brown wrote:
> 
> From: Christian Pellegrin <chripell@gmail.com>
> 
> fixes playing/recording of 8 bit audio files.
> 
> Generated on  20081108  against v2.6.27
> 
> Signed-off-by: Christian Pellegrin <chripell@fsfe.org>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
>  sound/soc/s3c24xx/s3c24xx-i2s.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/sound/soc/s3c24xx/s3c24xx-i2s.c b/sound/soc/s3c24xx/s3c24xx-i2s.c
> index ba4476b..c18977b 100644
> --- a/sound/soc/s3c24xx/s3c24xx-i2s.c
> +++ b/sound/soc/s3c24xx/s3c24xx-i2s.c
> @@ -261,10 +261,17 @@ static int s3c24xx_i2s_hw_params(struct snd_pcm_substream *substream,
>  
>  	switch (params_format(params)) {
>  	case SNDRV_PCM_FORMAT_S8:
> +		iismod &= ~S3C2410_IISMOD_16BIT;
> +		((struct s3c24xx_pcm_dma_params *)
> +		  rtd->dai->cpu_dai->dma_data)->dma_size = 1;
>  		break;
>  	case SNDRV_PCM_FORMAT_S16_LE:
>  		iismod |= S3C2410_IISMOD_16BIT;
> +		((struct s3c24xx_pcm_dma_params *)
> +		  rtd->dai->cpu_dai->dma_data)->dma_size = 2;
>  		break;

I still feel a bit uncomfortable with this as it changes the global
variables.  Maybe better to assign the corresponding fields in the
local struct.


Takashi

  parent reply	other threads:[~2008-11-12 12:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-12 11:55 [PATCH 0/4] ASoC updates Mark Brown
2008-11-12 11:55 ` [PATCH 1/4] ASoC: TLV320AIC23B Support more sample rates Mark Brown
2008-11-12 11:55   ` [PATCH 2/4] ASoC: s3c24xx 8 bit sound fix Mark Brown
2008-11-12 11:55     ` [PATCH 3/4] ASoC: Add Right-Justified mode and Codec clock master to davinci-i2s Mark Brown
2008-11-12 11:55       ` [PATCH 4/4] ASoC: DaVinci: Audio: Fix swapping of channels at start of stereo playback Mark Brown
2008-11-12 12:33     ` Takashi Iwai [this message]
2008-11-12 15:10       ` [PATCH 2/4] ASoC: s3c24xx 8 bit sound fix Mark Brown
2008-11-12 15:16         ` Takashi Iwai
2008-11-12 15:25           ` Mark Brown
2008-11-12 14:19     ` Ben Dooks
2008-11-12 14:21       ` Takashi Iwai
2008-11-12 14:59       ` Mark Brown
2008-11-12 17:29       ` christian pellegrin
2008-11-12 12:31 ` [PATCH 0/4] ASoC updates Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hzlk5jf8h.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=chripell@fsfe.org \
    --cc=chripell@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox