{ "pdm", SND_SOC_DAIFMT_PDM},
{ "msb", SND_SOC_DAIFMT_MSB },
{ "lsb", SND_SOC_DAIFMT_LSB },
- }, of_clock_table[] = {
- { "continuous", SND_SOC_DAIFMT_CONT },
- { "gated", SND_SOC_DAIFMT_GATED },
};
if (!prefix)
}
/*
- * check "[prefix]clock-gating = xxx"
+ * check "[prefix]continuous-clock"
* SND_SOC_DAIFMT_CLOCK_MASK area
*/
- snprintf(prop, sizeof(prop), "%sclock-gating", prefix);
- ret = of_property_read_string(np, prop, &str);
- if (ret == 0) {
- for (i = 0; i < ARRAY_SIZE(of_clock_table); i++) {
- if (strcmp(str, of_clock_table[i].name) == 0) {
- format |= of_clock_table[i].val;
- break;
- }
- }
- }
+ snprintf(prop, sizeof(prop), "%scontinuous-clock", prefix);
+ if (of_get_property(np, prop, NULL))
+ format |= SND_SOC_DAIFMT_CONT;
+ else
+ format |= SND_SOC_DAIFMT_GATED;
/*
* check "[prefix]bitclock-inversion"