[alsa-devel] [PATCH v3 16/17] ASoC: fsl_ssi: Move DT related code to a separate probe()

Nicolin Chen nicoleotsuka at gmail.com
Mon Jan 15 22:32:21 CET 2018


On Mon, Jan 15, 2018 at 10:16:39PM +0100, Maciej S. Szmigiero wrote:

> >  	/* Check if being used in AC97 mode */
> >  	sprop = of_get_property(np, "fsl,mode", NULL);
> > -	if (sprop) {
> > -		if (!strcmp(sprop, "ac97-slave"))
> > -			ssi->dai_fmt = FSLSSI_AC97_DAIFMT;
> > +	if (sprop && !strcmp(sprop, "ac97-slave")) {
> > +		ssi->dai_fmt = FSLSSI_AC97_DAIFMT;
> > +
> > +		ret = of_property_read_u32(np, "cell-index", &ssi->card_idx);
> > +		if (ret) {
> > +			dev_err(dev, "failed to get SSI index property\n");
> > +			return -EINVAL;
> > +		}
> > +		strcpy(ssi->card_name, "ac97-codec");
> >  	}
> >  
> >  	/* Select DMA or FIQ */
> >  	ssi->use_dma = !of_property_read_bool(np, "fsl,fiq-stream-filter");
> >  
> > +	/* In synchronous mode, STCK and STFS ports are used by RX as well */
> > +	if (!of_find_property(np, "fsl,ssi-asynchronous", NULL))
> > +		ssi->synchronous = true;
> 
> You are setting ssi->synchronous in the AC'97 mode here, the old code
> didn't do that (see the next patch hunk below).

Will modify this part. Thanks


More information about the Alsa-devel mailing list