mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
ASoC: mpc8610: tell the CS4270 codec that it's the master
Commit ac601555 ("ASoC: Return early with -EINVAL if invalid dai format is
detected") requires the machine driver to tell the CS4270 codec driver
whether the CS4270 should be configured for master or slave operation.
Signed-off-by: Timur Tabi <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
This commit is contained in:
parent
d66b8537b3
commit
380c883038
1 changed files with 16 additions and 8 deletions
|
|
@ -392,7 +392,8 @@ static int mpc8610_hpcd_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
if (strcasecmp(sprop, "i2s-slave") == 0) {
|
||||
machine_data->dai_format = SND_SOC_DAIFMT_I2S;
|
||||
machine_data->dai_format =
|
||||
SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBM_CFM;
|
||||
machine_data->codec_clk_direction = SND_SOC_CLOCK_OUT;
|
||||
machine_data->cpu_clk_direction = SND_SOC_CLOCK_IN;
|
||||
|
||||
|
|
@ -409,31 +410,38 @@ static int mpc8610_hpcd_probe(struct platform_device *pdev)
|
|||
}
|
||||
machine_data->clk_frequency = be32_to_cpup(iprop);
|
||||
} else if (strcasecmp(sprop, "i2s-master") == 0) {
|
||||
machine_data->dai_format = SND_SOC_DAIFMT_I2S;
|
||||
machine_data->dai_format =
|
||||
SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS;
|
||||
machine_data->codec_clk_direction = SND_SOC_CLOCK_IN;
|
||||
machine_data->cpu_clk_direction = SND_SOC_CLOCK_OUT;
|
||||
} else if (strcasecmp(sprop, "lj-slave") == 0) {
|
||||
machine_data->dai_format = SND_SOC_DAIFMT_LEFT_J;
|
||||
machine_data->dai_format =
|
||||
SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBM_CFM;
|
||||
machine_data->codec_clk_direction = SND_SOC_CLOCK_OUT;
|
||||
machine_data->cpu_clk_direction = SND_SOC_CLOCK_IN;
|
||||
} else if (strcasecmp(sprop, "lj-master") == 0) {
|
||||
machine_data->dai_format = SND_SOC_DAIFMT_LEFT_J;
|
||||
machine_data->dai_format =
|
||||
SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBS_CFS;
|
||||
machine_data->codec_clk_direction = SND_SOC_CLOCK_IN;
|
||||
machine_data->cpu_clk_direction = SND_SOC_CLOCK_OUT;
|
||||
} else if (strcasecmp(sprop, "rj-slave") == 0) {
|
||||
machine_data->dai_format = SND_SOC_DAIFMT_RIGHT_J;
|
||||
machine_data->dai_format =
|
||||
SND_SOC_DAIFMT_RIGHT_J | SND_SOC_DAIFMT_CBM_CFM;
|
||||
machine_data->codec_clk_direction = SND_SOC_CLOCK_OUT;
|
||||
machine_data->cpu_clk_direction = SND_SOC_CLOCK_IN;
|
||||
} else if (strcasecmp(sprop, "rj-master") == 0) {
|
||||
machine_data->dai_format = SND_SOC_DAIFMT_RIGHT_J;
|
||||
machine_data->dai_format =
|
||||
SND_SOC_DAIFMT_RIGHT_J | SND_SOC_DAIFMT_CBS_CFS;
|
||||
machine_data->codec_clk_direction = SND_SOC_CLOCK_IN;
|
||||
machine_data->cpu_clk_direction = SND_SOC_CLOCK_OUT;
|
||||
} else if (strcasecmp(sprop, "ac97-slave") == 0) {
|
||||
machine_data->dai_format = SND_SOC_DAIFMT_AC97;
|
||||
machine_data->dai_format =
|
||||
SND_SOC_DAIFMT_AC97 | SND_SOC_DAIFMT_CBM_CFM;
|
||||
machine_data->codec_clk_direction = SND_SOC_CLOCK_OUT;
|
||||
machine_data->cpu_clk_direction = SND_SOC_CLOCK_IN;
|
||||
} else if (strcasecmp(sprop, "ac97-master") == 0) {
|
||||
machine_data->dai_format = SND_SOC_DAIFMT_AC97;
|
||||
machine_data->dai_format =
|
||||
SND_SOC_DAIFMT_AC97 | SND_SOC_DAIFMT_CBS_CFS;
|
||||
machine_data->codec_clk_direction = SND_SOC_CLOCK_IN;
|
||||
machine_data->cpu_clk_direction = SND_SOC_CLOCK_OUT;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue