Commit c7a507ee authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: fsi: fixup SND_SOC_DAIFMT_CBx_CFx flags

SND_SOC_DAIFMT_CBx_CFx means "codec" side master/slave mode.
Then, FSI will be master mode if it was SND_SOC_DAIFMT_CBS_CFS.

This patch fixup platform settings too.
Then, it tidyups SND_SOC_DAIFMT_INV settings.
Acked-by: default avatarSimon Horman <horms+renesas@verge.net.au>
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 38dbfb59
...@@ -988,14 +988,12 @@ static struct asoc_simple_card_info fsi_wm8978_info = { ...@@ -988,14 +988,12 @@ static struct asoc_simple_card_info fsi_wm8978_info = {
.card = "FSI2A-WM8978", .card = "FSI2A-WM8978",
.codec = "wm8978.0-001a", .codec = "wm8978.0-001a",
.platform = "sh_fsi2", .platform = "sh_fsi2",
.daifmt = SND_SOC_DAIFMT_I2S, .daifmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBM_CFM,
.cpu_dai = { .cpu_dai = {
.name = "fsia-dai", .name = "fsia-dai",
.fmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_IB_NF,
}, },
.codec_dai = { .codec_dai = {
.name = "wm8978-hifi", .name = "wm8978-hifi",
.fmt = SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_NB_NF,
.sysclk = 12288000, .sysclk = 12288000,
}, },
}; };
......
...@@ -589,14 +589,12 @@ static struct asoc_simple_card_info fsi2_ak4648_info = { ...@@ -589,14 +589,12 @@ static struct asoc_simple_card_info fsi2_ak4648_info = {
.card = "FSI2A-AK4648", .card = "FSI2A-AK4648",
.codec = "ak4642-codec.0-0012", .codec = "ak4642-codec.0-0012",
.platform = "sh_fsi2", .platform = "sh_fsi2",
.daifmt = SND_SOC_DAIFMT_LEFT_J, .daifmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBM_CFM,
.cpu_dai = { .cpu_dai = {
.name = "fsia-dai", .name = "fsia-dai",
.fmt = SND_SOC_DAIFMT_CBS_CFS,
}, },
.codec_dai = { .codec_dai = {
.name = "ak4642-hifi", .name = "ak4642-hifi",
.fmt = SND_SOC_DAIFMT_CBM_CFM,
.sysclk = 11289600, .sysclk = 11289600,
}, },
}; };
......
...@@ -509,9 +509,9 @@ static struct asoc_simple_card_info fsi2_hdmi_info = { ...@@ -509,9 +509,9 @@ static struct asoc_simple_card_info fsi2_hdmi_info = {
.card = "FSI2B-HDMI", .card = "FSI2B-HDMI",
.codec = "sh-mobile-hdmi", .codec = "sh-mobile-hdmi",
.platform = "sh_fsi2", .platform = "sh_fsi2",
.fmt = SND_SOC_DAIFMT_CBS_CFS,
.cpu_dai = { .cpu_dai = {
.name = "fsib-dai", .name = "fsib-dai",
.fmt = SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_IB_NF,
}, },
.codec_dai = { .codec_dai = {
.name = "sh_mobile_hdmi-hifi", .name = "sh_mobile_hdmi-hifi",
...@@ -905,14 +905,12 @@ static struct asoc_simple_card_info fsi2_ak4643_info = { ...@@ -905,14 +905,12 @@ static struct asoc_simple_card_info fsi2_ak4643_info = {
.card = "FSI2A-AK4643", .card = "FSI2A-AK4643",
.codec = "ak4642-codec.0-0013", .codec = "ak4642-codec.0-0013",
.platform = "sh_fsi2", .platform = "sh_fsi2",
.daifmt = SND_SOC_DAIFMT_LEFT_J, .daifmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBM_CFM,
.cpu_dai = { .cpu_dai = {
.name = "fsia-dai", .name = "fsia-dai",
.fmt = SND_SOC_DAIFMT_CBS_CFS,
}, },
.codec_dai = { .codec_dai = {
.name = "ak4642-hifi", .name = "ak4642-hifi",
.fmt = SND_SOC_DAIFMT_CBM_CFM,
.sysclk = 11289600, .sysclk = 11289600,
}, },
}; };
......
...@@ -861,14 +861,12 @@ static struct asoc_simple_card_info fsi_da7210_info = { ...@@ -861,14 +861,12 @@ static struct asoc_simple_card_info fsi_da7210_info = {
.card = "FSIB-DA7210", .card = "FSIB-DA7210",
.codec = "da7210.0-001a", .codec = "da7210.0-001a",
.platform = "sh_fsi.0", .platform = "sh_fsi.0",
.daifmt = SND_SOC_DAIFMT_I2S, .daifmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBM_CFM,
.cpu_dai = { .cpu_dai = {
.name = "fsib-dai", .name = "fsib-dai",
.fmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_IB_NF,
}, },
.codec_dai = { .codec_dai = {
.name = "da7210-hifi", .name = "da7210-hifi",
.fmt = SND_SOC_DAIFMT_CBM_CFM,
}, },
}; };
......
...@@ -304,14 +304,12 @@ static struct asoc_simple_card_info fsi_ak4642_info = { ...@@ -304,14 +304,12 @@ static struct asoc_simple_card_info fsi_ak4642_info = {
.card = "FSIA-AK4642", .card = "FSIA-AK4642",
.codec = "ak4642-codec.0-0012", .codec = "ak4642-codec.0-0012",
.platform = "sh_fsi.0", .platform = "sh_fsi.0",
.daifmt = SND_SOC_DAIFMT_LEFT_J, .daifmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBM_CFM,
.cpu_dai = { .cpu_dai = {
.name = "fsia-dai", .name = "fsia-dai",
.fmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_IB_NF,
}, },
.codec_dai = { .codec_dai = {
.name = "ak4642-hifi", .name = "ak4642-hifi",
.fmt = SND_SOC_DAIFMT_CBM_CFM,
.sysclk = 11289600, .sysclk = 11289600,
}, },
}; };
......
...@@ -1711,9 +1711,9 @@ static int fsi_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) ...@@ -1711,9 +1711,9 @@ static int fsi_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
/* set master/slave audio interface */ /* set master/slave audio interface */
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
case SND_SOC_DAIFMT_CBM_CFM: case SND_SOC_DAIFMT_CBM_CFM:
fsi->clk_master = 1;
break; break;
case SND_SOC_DAIFMT_CBS_CFS: case SND_SOC_DAIFMT_CBS_CFS:
fsi->clk_master = 1; /* codec is slave, cpu is master */
break; break;
default: default:
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment