[Meego-kernel] [PATCH] sst: MRST can only do mono recording

Wu Fengguang wfg at linux.intel.com
Sun Mar 20 23:23:32 PDT 2011


Hi Arjan,

Would you take this patch and the newly submitted
"[PATCH] sst: MRST can only do 16bit recording"?

Thanks,
Fengguang

On Tue, Mar 15, 2011 at 01:50:07PM -0700, Wu Fengguang wrote:
> MRST firmware returns error on 2-channel capture requests,
> leading to "arecord -Dplughw -c2 test.wav" failure.
> 
> Fix it by lowering channels_max from 2 to 1.
> 
> Signed-off-by: Wu Fengguang <fengguang.wu at intel.com>
> ---
>  drivers/staging/intel_sst/intelmid.c |    7 +++++++
>  1 file changed, 7 insertions(+)
> 
> --- linux-2.6-mrst.orig/drivers/staging/intel_sst/intelmid.c	2011-03-16 01:59:25.000000000 +0800
> +++ linux-2.6-mrst/drivers/staging/intel_sst/intelmid.c	2011-03-16 02:08:03.000000000 +0800
> @@ -322,20 +322,27 @@ static int snd_intelmad_open(struct snd_
>  	struct mad_stream_pvt *stream;
>  
>  	WARN_ON(!substream);
>  
>  	pr_debug("sst: snd_intelmad_open called\n");
>  
>  	intelmaddata = snd_pcm_substream_chip(substream);
>  	runtime = substream->runtime;
>  	/* set the runtime hw parameter with local snd_pcm_hardware struct */
>  	runtime->hw = snd_intelmad_stream;
> +	if (intelmaddata->cpu_id == CPU_CHIP_LINCROFT) {
> +		/*
> +		 * MRST firmware currently denies stereo recording requests.
> +		 */
> +		if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
> +			runtime->hw.channels_max = 1;
> +	}
>  	if (intelmaddata->cpu_id == CPU_CHIP_PENWELL) {
>  		runtime->hw = snd_intelmad_stream;
>  		runtime->hw.rates = SNDRV_PCM_RATE_48000;
>  		runtime->hw.rate_min = MAX_RATE;
>  		runtime->hw.formats = (SNDRV_PCM_FMTBIT_S24 |
>  						SNDRV_PCM_FMTBIT_U24);
>  		if (intelmaddata->sstdrv_ops->scard_ops->input_dev_id == AMIC)
>  			runtime->hw.channels_max = MAX_CHANNEL_AMIC;
>  		else
>  			runtime->hw.channels_max = MAX_CHANNEL_DMIC;


More information about the MeeGo-kernel mailing list