24 Mar
2014
24 Mar
'14
1:05 a.m.
Hi Jyri
The properties like format, bitclock-master, frame-master, bitclock-inversion, and frame-inversion should be common to the dais connected with a dai-link. For bitclock-master and frame-master properties to be unambiguous they need to indicate the mastering dai node with a phandle.
Signed-off-by: Jyri Sarha jsarha@ti.com
(snip)
/*
* bitclock-inversion, frame-inversion
* bitclock-master, frame-master
* and specific "format" if it has
*/
- dai->fmt = snd_soc_of_parse_daifmt(np, NULL);
- dai->fmt |= daifmt;
- /*
- dai->sysclk come from
- "clocks = <&xxx>" (if system has common clock)
- or "system-clock-frequency = <xxx>"
[1/2] patch exchanged snd_soc_of_parse_daifmt() parameter, but, user code exchanged in [2/2]. It breaks git-bisect.
- dai_props->cpu_dai.fmt = daifmt;
- switch (((np == bitclkmaster)<<4)|(np == framemaster)) {
- case 0x11:
dai_props->cpu_dai.fmt |= SND_SOC_DAIFMT_CBS_CFS;
break;
- case 0x10:
dai_props->cpu_dai.fmt |= SND_SOC_DAIFMT_CBS_CFM;
break;
- case 0x01:
dai_props->cpu_dai.fmt |= SND_SOC_DAIFMT_CBM_CFS;
break;
- default:
dai_props->cpu_dai.fmt |= SND_SOC_DAIFMT_CBM_CFM;
break;
- }
The user of snd_soc_of_parse_daifmt() is only simple-card (?) I think SND_SOC_DAIFMT_CBxx_CFx cared by snd_soc_of_parse_daifmt() somehow is very reasonable.
Best regards --- Kuninori Morimoto