[alsa-devel] [PATCH 1/5] ASoC: sh: fsi: add fsi-codec card	support
    Kuninori Morimoto 
    kuninori.morimoto.gx at renesas.com
       
    Tue Apr  3 04:01:00 CEST 2012
    
    
  
Hi Mark
> > > +	if (pinfo->codec_fmt) {
> > 
> > > +	if (pinfo->cpu_fmt) {
> > 
> > I'd expect that these should always be the same, it's probably as well
> > to just have one format and then require anyone who wants anything
> > unusual to handle it.
Now I'm creating v2 patch.
This codec_fmt/cpu_fmt is not only audio formats.
It selects clock master / signal inversions...
These are depend on platform.
And, FSI can use SPDIF format (it doesn't have SND_SOC_DAIFMT_xxx format).
So, it will be...
  pinfo->fmt           : audio formats
  pinfo->cpu_daifmt    : extra settings for cpu
  pinfo->codec_daifmt  : extra settings for codec
unsigned int cpu_fmt   = pinfo->fmt | pinfo->cpu_daifmt;
unsigned int codec_fmt = pinfo->fmt | pinfo->codec_fmt;
if (codec_fmt)
	...
if (cpu_fmt)
	...
This is a little bit complex...
but is it OK ?
Best regards
---
Kuninori Morimoto
    
    
More information about the Alsa-devel
mailing list