[alsa-devel] [PATCH] ASoC: simple-card: cleanup asoc_simple_card_parse_of() code

Li.Xiubo at freescale.com Li.Xiubo at freescale.com
Tue Dec 31 02:41:02 CET 2013


Hi Mark,


> -----
> 	......
> 
>         /* get CPU/CODEC common format via simple-audio-card,format */
>         info->daifmt = snd_soc_of_parse_daifmt(node, "simple-audio-card,") &
>                 (SND_SOC_DAIFMT_FORMAT_MASK | SND_SOC_DAIFMT_INV_MASK);
> 
> 	......
> 
> 		ret = asoc_simple_card_sub_parse_of(cpu, ...);
> 
> 		...
> 
> 		ret = asoc_simple_card_sub_parse_of(codec, ...);
> 
> 	......
> -----
> The SND_SOC_DAIFMT_INV_MASK bits mask should be for "bitclock-master" and

Sorry the "bitclock-master" should be "bitclock-inversion" just for written
Mistake.



> "frame-inversion" in subnodes' daifmt parsing if need, or why shouldn't
> SND_SOC_DAIFMT_CLOCK_MASK be here like SND_SOC_DAIFMT_INV_MASK ?
> 
> IMO, the SND_SOC_DAIFMT_INV_MASK bits mask here maybe a little confused.
> 
> Certainly, these two and other subnode properties can also be common
> properties
> like "[prefix]format" for other drivers.
> 
> It's the limitation of snd_soc_of_parse_daifmt() that the simple-card driver
> must
> do the mask(except SND_SOC_DAIFMT_MASTER_MASK, because it default value is not
> zero)
> operation.
> 
> Or should we change "bitclock-master" and "frame-master" as one string
> property
> like "[prefix]master = XXX", and set the default value as zero like others.
> And then
> we can remove all the bits mask operations in simple-card and other drivers.
> If need, I will send this patch of this.
> 

 Thanks,
 
 --
 Best Regards,
 Xiubo



More information about the Alsa-devel mailing list