[Sound-open-firmware] [PATCH 4/8] ssp: switch dai format form PCM B mode to normal I2S mode

Jie, Yang yang.jie at intel.com
Tue Dec 20 15:56:46 CET 2016


> -----Original Message-----
> From: Pierre-Louis Bossart [mailto:pierre-louis.bossart at linux.intel.com]
> Sent: Tuesday, December 20, 2016 10:31 PM
> To: Keyon Jie <yang.jie at linux.intel.com>; sound-open-firmware at alsa-
> project.org; liam.r.girdwood at linux.intel.com
> Cc: Zhang, Keqiao <keqiao.zhang at intel.com>; Jie, Yang <yang.jie at intel.com>;
> Ingalsuo, Seppo <seppo.ingalsuo at intel.com>; Lin, Mengdong
> <mengdong.lin at intel.com>
> Subject: Re: [Sound-open-firmware] [PATCH 4/8] ssp: switch dai format form
> PCM B mode to normal I2S mode
> 
> On 12/20/16 1:46 AM, Keyon Jie wrote:
> > it is configured from host/codec side that using I2S mode, so switch
> > it.
> > ---
> >  src/ipc/intel-ipc.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/ipc/intel-ipc.c b/src/ipc/intel-ipc.c index
> > 16a906b..b159980 100644
> > --- a/src/ipc/intel-ipc.c
> > +++ b/src/ipc/intel-ipc.c
> > @@ -562,7 +562,7 @@ static uint32_t ipc_device_set_formats(uint32_t
> > header)
> >
> >  	/* setup the DAI HW config - TODO hard coded due to IPC limitations */
> >  	dai_dev->dai_config.mclk = config_req.clock_frequency;
> > -	dai_dev->dai_config.format = DAI_FMT_DSP_B | DAI_FMT_CONT |
> > +	dai_dev->dai_config.format = DAI_FMT_I2S | DAI_FMT_CONT |
> >  		DAI_FMT_NB_NF | DAI_FMT_CBS_CFS;
> >  	dai_dev->dai_config.frame_size = 32;	/* TODO 16bit stereo hard
> coded */
> >  	dai_dev->dai_config.bclk_fs = 32;	/* 32 BCLKs per frame - */
> >
> 
> Why are we doing this? If we want to be compatible with existing machine
> drivers you will want to support DSP_B with 4 slots, so this needs to be
> programmable.

Hi Pierre,
You can see that the latest bytcr_rt5640.c is using I2S mode:
...
	.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
						| SND_SOC_DAIFMT_CBS_CFS,
...
https://git.kernel.org/cgit/linux/kernel/git/broonie/sound.git/tree/sound/soc/intel/boards/bytcr_rt5640.c?h=for-next

we will add IPC to support this programmable next step.

Thanks,
~Keyon



More information about the Sound-open-firmware mailing list