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

From: Li.Xiubo@xxxxxxxxxxxxx
Date: Mon Dec 30 2013 - 20:41:12 EST


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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/