[alsa-devel] [PATCH 02/19] ASoC: sst_platform: add cpu dai driver for moorestown platform

Koul, Vinod vinod.koul at intel.com
Thu May 5 05:23:01 CEST 2011


On Wed, 2011-05-04 at 19:15 +0530, Lu, Guanqun wrote:
> Signed-off-by: Lu Guanqun <guanqun.lu at intel.com>
> ---
>  sound/soc/mid-x86/sst_platform.c |   14 ++++++++++++++
>  1 files changed, 14 insertions(+), 0 deletions(-)
> 
> diff --git a/sound/soc/mid-x86/sst_platform.c b/sound/soc/mid-x86/sst_platform.c
> index 139db15..ce0ac3c 100644
> --- a/sound/soc/mid-x86/sst_platform.c
> +++ b/sound/soc/mid-x86/sst_platform.c
> @@ -110,6 +110,20 @@ struct snd_soc_dai_driver sst_platform_dai[] = {
>  		.formats = SNDRV_PCM_FMTBIT_S24_LE,
>  	},
>  },
> +{
> +	.name = "mrst-cpu-pcm2",
> +	.id = 4,
> +	.playback = {
> +		.channels_min = 1,
> +		.channels_max = 2,
> +		.rates = (SNDRV_PCM_RATE_48000 |
> +			  SNDRV_PCM_RATE_44100 |
> +			  SNDRV_PCM_RATE_8000),
> +		.formats = (SNDRV_PCM_FMTBIT_S16 | SNDRV_PCM_FMTBIT_U16 |
> +			    SNDRV_PCM_FMTBIT_S24 | SNDRV_PCM_FMTBIT_U24 |
> +			    SNDRV_PCM_FMTBIT_S32 | SNDRV_PCM_FMTBIT_U32),
> +	},
> +},
Nope, We cant keep on adding these DAIs for every new platform :(
Even the current way is not best as it just creates 4 instance of DAI
where we could have done with two (as they have same properties)
I would use the current headset DAI and change the ops there, or create
a new one for each type so that it can be reused.

-- 
~Vinod



More information about the Alsa-devel mailing list