[alsa-devel] [PATCH 0/2][RFC] ASoC: fsi/rcar: fixup SND_SOC_DAIFMT_CBx_CFx flags
Hi Mark, Simon
These patches fixup Renesas fsi/rcar driver's SND_SOC_DAIFMT_CBx_CFx flag settings.
I had misunderstand these settings... But this is still [RFC], since it modifies DT side code too.
Mark
#1 patch depends on Jyri's "Fix simple-card *-master DT parameter handling" if it was accepted
Simon
Can you check #1 patch which modifys SH-ARM platform ?
Kuninori Morimoto (2): 1) ASoC: fsi: fixup SND_SOC_DAIFMT_CBx_CFx flags 2) ASoC: rcar: fixup SND_SOC_DAIFMT_CBx_CFx flags
.../boot/dts/r8a7740-armadillo800eva-reference.dts | 3 ++- arch/arm/boot/dts/sh73a0-kzm9g-reference.dts | 2 ++ arch/arm/mach-shmobile/board-armadillo800eva.c | 4 +--- arch/arm/mach-shmobile/board-kzm9g.c | 4 +--- arch/arm/mach-shmobile/board-mackerel.c | 6 ++---- arch/sh/boards/mach-ecovec24/setup.c | 4 +--- arch/sh/boards/mach-se/7724/setup.c | 4 +--- sound/soc/sh/fsi.c | 2 +- sound/soc/sh/rcar/core.c | 4 ++-- 9 files changed, 13 insertions(+), 20 deletions(-)
Best regards --- Kuninori Morimoto
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
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.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- .../boot/dts/r8a7740-armadillo800eva-reference.dts | 3 ++- arch/arm/boot/dts/sh73a0-kzm9g-reference.dts | 2 ++ arch/arm/mach-shmobile/board-armadillo800eva.c | 4 +--- arch/arm/mach-shmobile/board-kzm9g.c | 4 +--- arch/arm/mach-shmobile/board-mackerel.c | 6 ++---- arch/sh/boards/mach-ecovec24/setup.c | 4 +--- arch/sh/boards/mach-se/7724/setup.c | 4 +--- sound/soc/sh/fsi.c | 2 +- 8 files changed, 11 insertions(+), 18 deletions(-)
diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts index 95a849b..acffbab 100644 --- a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts +++ b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts @@ -135,7 +135,8 @@
simple-audio-card,cpu { sound-dai = <&sh_fsi2 0>; - bitclock-inversion; + bitclock-master; + frame-master; };
simple-audio-card,codec { diff --git a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts index eb8886b..68da428 100644 --- a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts +++ b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts @@ -158,6 +158,8 @@ simple-audio-card,format = "left_j"; simple-audio-card,cpu { sound-dai = <&sh_fsi2 0>; + bitclock-master; + frame-master; }; simple-audio-card,codec { sound-dai = <&ak4648>; diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c index 93533e2..9323854 100644 --- a/arch/arm/mach-shmobile/board-armadillo800eva.c +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c @@ -988,14 +988,12 @@ static struct asoc_simple_card_info fsi_wm8978_info = { .card = "FSI2A-WM8978", .codec = "wm8978.0-001a", .platform = "sh_fsi2", - .daifmt = SND_SOC_DAIFMT_I2S, + .daifmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBM_CFM, .cpu_dai = { .name = "fsia-dai", - .fmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_IB_NF, }, .codec_dai = { .name = "wm8978-hifi", - .fmt = SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_NB_NF, .sysclk = 12288000, }, }; diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c index bc40b85..03dc3ac 100644 --- a/arch/arm/mach-shmobile/board-kzm9g.c +++ b/arch/arm/mach-shmobile/board-kzm9g.c @@ -589,14 +589,12 @@ static struct asoc_simple_card_info fsi2_ak4648_info = { .card = "FSI2A-AK4648", .codec = "ak4642-codec.0-0012", .platform = "sh_fsi2", - .daifmt = SND_SOC_DAIFMT_LEFT_J, + .daifmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBM_CFM, .cpu_dai = { .name = "fsia-dai", - .fmt = SND_SOC_DAIFMT_CBS_CFS, }, .codec_dai = { .name = "ak4642-hifi", - .fmt = SND_SOC_DAIFMT_CBM_CFM, .sysclk = 11289600, }, }; diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index 3aba037..8c43321 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c @@ -509,9 +509,9 @@ static struct asoc_simple_card_info fsi2_hdmi_info = { .card = "FSI2B-HDMI", .codec = "sh-mobile-hdmi", .platform = "sh_fsi2", + .fmt = SND_SOC_DAIFMT_CBS_CFS, .cpu_dai = { .name = "fsib-dai", - .fmt = SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_IB_NF, }, .codec_dai = { .name = "sh_mobile_hdmi-hifi", @@ -905,14 +905,12 @@ static struct asoc_simple_card_info fsi2_ak4643_info = { .card = "FSI2A-AK4643", .codec = "ak4642-codec.0-0013", .platform = "sh_fsi2", - .daifmt = SND_SOC_DAIFMT_LEFT_J, + .daifmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBM_CFM, .cpu_dai = { .name = "fsia-dai", - .fmt = SND_SOC_DAIFMT_CBS_CFS, }, .codec_dai = { .name = "ak4642-hifi", - .fmt = SND_SOC_DAIFMT_CBM_CFM, .sysclk = 11289600, }, }; diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index 5bc3a15..85d5255 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c @@ -861,14 +861,12 @@ static struct asoc_simple_card_info fsi_da7210_info = { .card = "FSIB-DA7210", .codec = "da7210.0-001a", .platform = "sh_fsi.0", - .daifmt = SND_SOC_DAIFMT_I2S, + .daifmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBM_CFM, .cpu_dai = { .name = "fsib-dai", - .fmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_IB_NF, }, .codec_dai = { .name = "da7210-hifi", - .fmt = SND_SOC_DAIFMT_CBM_CFM, }, };
diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c index 21e4230..1162bc6 100644 --- a/arch/sh/boards/mach-se/7724/setup.c +++ b/arch/sh/boards/mach-se/7724/setup.c @@ -304,14 +304,12 @@ static struct asoc_simple_card_info fsi_ak4642_info = { .card = "FSIA-AK4642", .codec = "ak4642-codec.0-0012", .platform = "sh_fsi.0", - .daifmt = SND_SOC_DAIFMT_LEFT_J, + .daifmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBM_CFM, .cpu_dai = { .name = "fsia-dai", - .fmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_IB_NF, }, .codec_dai = { .name = "ak4642-hifi", - .fmt = SND_SOC_DAIFMT_CBM_CFM, .sysclk = 11289600, }, }; diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index 1967f44..710a079 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -1711,9 +1711,9 @@ static int fsi_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) /* set master/slave audio interface */ switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { case SND_SOC_DAIFMT_CBM_CFM: - fsi->clk_master = 1; break; case SND_SOC_DAIFMT_CBS_CFS: + fsi->clk_master = 1; /* codec is slave, cpu is master */ break; default: return -EINVAL;
On Tue, Mar 11, 2014 at 11:48:21PM -0700, Kuninori Morimoto wrote:
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
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.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
arch/arm/mach-shmobile bits:
Acked-by: Simon Horman horms+renesas@verge.net.au
N.B: arch/sh/ is now orphaned.
.../boot/dts/r8a7740-armadillo800eva-reference.dts | 3 ++- arch/arm/boot/dts/sh73a0-kzm9g-reference.dts | 2 ++ arch/arm/mach-shmobile/board-armadillo800eva.c | 4 +--- arch/arm/mach-shmobile/board-kzm9g.c | 4 +--- arch/arm/mach-shmobile/board-mackerel.c | 6 ++---- arch/sh/boards/mach-ecovec24/setup.c | 4 +--- arch/sh/boards/mach-se/7724/setup.c | 4 +--- sound/soc/sh/fsi.c | 2 +- 8 files changed, 11 insertions(+), 18 deletions(-)
diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts index 95a849b..acffbab 100644 --- a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts +++ b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts @@ -135,7 +135,8 @@
simple-audio-card,cpu { sound-dai = <&sh_fsi2 0>;
bitclock-inversion;
bitclock-master;
frame-master;
};
simple-audio-card,codec {
diff --git a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts index eb8886b..68da428 100644 --- a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts +++ b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts @@ -158,6 +158,8 @@ simple-audio-card,format = "left_j"; simple-audio-card,cpu { sound-dai = <&sh_fsi2 0>;
bitclock-master;
}; simple-audio-card,codec { sound-dai = <&ak4648>;frame-master;
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c index 93533e2..9323854 100644 --- a/arch/arm/mach-shmobile/board-armadillo800eva.c +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c @@ -988,14 +988,12 @@ static struct asoc_simple_card_info fsi_wm8978_info = { .card = "FSI2A-WM8978", .codec = "wm8978.0-001a", .platform = "sh_fsi2",
- .daifmt = SND_SOC_DAIFMT_I2S,
- .daifmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBM_CFM, .cpu_dai = { .name = "fsia-dai",
}, .codec_dai = { .name = "wm8978-hifi",.fmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_IB_NF,
.sysclk = 12288000, },.fmt = SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_NB_NF,
}; diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c index bc40b85..03dc3ac 100644 --- a/arch/arm/mach-shmobile/board-kzm9g.c +++ b/arch/arm/mach-shmobile/board-kzm9g.c @@ -589,14 +589,12 @@ static struct asoc_simple_card_info fsi2_ak4648_info = { .card = "FSI2A-AK4648", .codec = "ak4642-codec.0-0012", .platform = "sh_fsi2",
- .daifmt = SND_SOC_DAIFMT_LEFT_J,
- .daifmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBM_CFM, .cpu_dai = { .name = "fsia-dai",
}, .codec_dai = { .name = "ak4642-hifi",.fmt = SND_SOC_DAIFMT_CBS_CFS,
.sysclk = 11289600, },.fmt = SND_SOC_DAIFMT_CBM_CFM,
}; diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index 3aba037..8c43321 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c @@ -509,9 +509,9 @@ static struct asoc_simple_card_info fsi2_hdmi_info = { .card = "FSI2B-HDMI", .codec = "sh-mobile-hdmi", .platform = "sh_fsi2",
- .fmt = SND_SOC_DAIFMT_CBS_CFS, .cpu_dai = { .name = "fsib-dai",
}, .codec_dai = { .name = "sh_mobile_hdmi-hifi",.fmt = SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_IB_NF,
@@ -905,14 +905,12 @@ static struct asoc_simple_card_info fsi2_ak4643_info = { .card = "FSI2A-AK4643", .codec = "ak4642-codec.0-0013", .platform = "sh_fsi2",
- .daifmt = SND_SOC_DAIFMT_LEFT_J,
- .daifmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBM_CFM, .cpu_dai = { .name = "fsia-dai",
}, .codec_dai = { .name = "ak4642-hifi",.fmt = SND_SOC_DAIFMT_CBS_CFS,
.sysclk = 11289600, },.fmt = SND_SOC_DAIFMT_CBM_CFM,
}; diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index 5bc3a15..85d5255 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c @@ -861,14 +861,12 @@ static struct asoc_simple_card_info fsi_da7210_info = { .card = "FSIB-DA7210", .codec = "da7210.0-001a", .platform = "sh_fsi.0",
- .daifmt = SND_SOC_DAIFMT_I2S,
- .daifmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBM_CFM, .cpu_dai = { .name = "fsib-dai",
}, .codec_dai = { .name = "da7210-hifi",.fmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_IB_NF,
},.fmt = SND_SOC_DAIFMT_CBM_CFM,
};
diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c index 21e4230..1162bc6 100644 --- a/arch/sh/boards/mach-se/7724/setup.c +++ b/arch/sh/boards/mach-se/7724/setup.c @@ -304,14 +304,12 @@ static struct asoc_simple_card_info fsi_ak4642_info = { .card = "FSIA-AK4642", .codec = "ak4642-codec.0-0012", .platform = "sh_fsi.0",
- .daifmt = SND_SOC_DAIFMT_LEFT_J,
- .daifmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBM_CFM, .cpu_dai = { .name = "fsia-dai",
}, .codec_dai = { .name = "ak4642-hifi",.fmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_IB_NF,
.sysclk = 11289600, },.fmt = SND_SOC_DAIFMT_CBM_CFM,
}; diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index 1967f44..710a079 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -1711,9 +1711,9 @@ static int fsi_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) /* set master/slave audio interface */ switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { case SND_SOC_DAIFMT_CBM_CFM:
break; case SND_SOC_DAIFMT_CBS_CFS:fsi->clk_master = 1;
break; default: return -EINVAL;fsi->clk_master = 1; /* codec is slave, cpu is master */
-- 1.7.9.5
-- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
SND_SOC_DAIFMT_CBx_CFx means "codec" side master/slave mode. Then, rcar will be master mode if it was SND_SOC_DAIFMT_CBS_CFS.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/sh/rcar/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 6a1b45df..d836e8a 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -510,10 +510,10 @@ static int rsnd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) /* set master/slave audio interface */ switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { case SND_SOC_DAIFMT_CBM_CFM: - rdai->clk_master = 1; + rdai->clk_master = 0; break; case SND_SOC_DAIFMT_CBS_CFS: - rdai->clk_master = 0; + rdai->clk_master = 1; /* codec is slave, cpu is master */ break; default: return -EINVAL;
On Tue, Mar 11, 2014 at 11:47:36PM -0700, Kuninori Morimoto wrote:
Hi Mark, Simon
These patches fixup Renesas fsi/rcar driver's SND_SOC_DAIFMT_CBx_CFx flag settings.
I had misunderstand these settings... But this is still [RFC], since it modifies DT side code too.
Mark
#1 patch depends on Jyri's "Fix simple-card *-master DT parameter handling" if it was accepted
Simon
Can you check #1 patch which modifys SH-ARM platform ?
So, we need to do something quickly here since this affects DT bindings but it would be *much* better to avoid having to set the master flags on both ends of the link since that's going to make the binding confusing if we're stuck with it as an ABI.
Simon, are you OK with the arch side of cleanups for this going via my tree?
Hi Mark
Simon
Can you check #1 patch which modifys SH-ARM platform ?
So, we need to do something quickly here since this affects DT bindings but it would be *much* better to avoid having to set the master flags on both ends of the link since that's going to make the binding confusing if we're stuck with it as an ABI.
Simon, are you OK with the arch side of cleanups for this going via my tree?
Thank you. But, sorry. I noticed [1/2] patch has bug. I will send v2 patch soon.
On Thu, Mar 13, 2014 at 10:48:36AM +0000, Mark Brown wrote:
On Tue, Mar 11, 2014 at 11:47:36PM -0700, Kuninori Morimoto wrote:
Hi Mark, Simon
These patches fixup Renesas fsi/rcar driver's SND_SOC_DAIFMT_CBx_CFx flag settings.
I had misunderstand these settings... But this is still [RFC], since it modifies DT side code too.
Mark
#1 patch depends on Jyri's "Fix simple-card *-master DT parameter handling" if it was accepted
Simon
Can you check #1 patch which modifys SH-ARM platform ?
So, we need to do something quickly here since this affects DT bindings but it would be *much* better to avoid having to set the master flags on both ends of the link since that's going to make the binding confusing if we're stuck with it as an ABI.
Simon, are you OK with the arch side of cleanups for this going via my tree?
Yes, I'll provide an Ack for them accordingly.
Do you anticipate that they will end up in v3.15-rcX? If not, could I get a branch with stable commit ids that I can use as a basis for futher shmobile changes: I'd like avoid conflicts bubbling up.
On Fri, Mar 14, 2014 at 08:55:51AM +0900, Simon Horman wrote:
Do you anticipate that they will end up in v3.15-rcX? If not, could I get a branch with stable commit ids that I can use as a basis for futher shmobile changes: I'd like avoid conflicts bubbling up.
Yes, the idea is to get this to Linus as fast as possible.
On Fri, Mar 14, 2014 at 10:26:14AM +0000, Mark Brown wrote:
On Fri, Mar 14, 2014 at 08:55:51AM +0900, Simon Horman wrote:
Do you anticipate that they will end up in v3.15-rcX? If not, could I get a branch with stable commit ids that I can use as a basis for futher shmobile changes: I'd like avoid conflicts bubbling up.
Yes, the idea is to get this to Linus as fast as possible.
Great, that is ideal from my POV.
Hi Mark, Simon
These are v2 of Renesas fsi/rcar driver's SND_SOC_DAIFMT_CBx_CFx flag fixup patches.
Kuninori Morimoto (2): ASoC: fsi: fixup SND_SOC_DAIFMT_CBx_CFx flags ASoC: rcar: fixup SND_SOC_DAIFMT_CBx_CFx flags
arch/arm/mach-shmobile/board-armadillo800eva.c | 4 +--- arch/arm/mach-shmobile/board-kzm9g.c | 4 +--- arch/arm/mach-shmobile/board-mackerel.c | 6 ++---- arch/sh/boards/mach-ecovec24/setup.c | 4 +--- arch/sh/boards/mach-se/7724/setup.c | 4 +--- sound/soc/sh/fsi.c | 2 +- sound/soc/sh/rcar/core.c | 4 ++-- 7 files changed, 9 insertions(+), 19 deletions(-)
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
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: Simon Horman horms+renesas@verge.net.au Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- v1 -> v2
- removed dtsi settings. I confused on v1, dtsi settings doesn't need exchange - Added Simon's Acked-by
arch/arm/mach-shmobile/board-armadillo800eva.c | 4 +--- arch/arm/mach-shmobile/board-kzm9g.c | 4 +--- arch/arm/mach-shmobile/board-mackerel.c | 6 ++---- arch/sh/boards/mach-ecovec24/setup.c | 4 +--- arch/sh/boards/mach-se/7724/setup.c | 4 +--- sound/soc/sh/fsi.c | 2 +- 6 files changed, 7 insertions(+), 17 deletions(-)
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c index 93533e2..9323854 100644 --- a/arch/arm/mach-shmobile/board-armadillo800eva.c +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c @@ -988,14 +988,12 @@ static struct asoc_simple_card_info fsi_wm8978_info = { .card = "FSI2A-WM8978", .codec = "wm8978.0-001a", .platform = "sh_fsi2", - .daifmt = SND_SOC_DAIFMT_I2S, + .daifmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBM_CFM, .cpu_dai = { .name = "fsia-dai", - .fmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_IB_NF, }, .codec_dai = { .name = "wm8978-hifi", - .fmt = SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_NB_NF, .sysclk = 12288000, }, }; diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c index bc40b85..03dc3ac 100644 --- a/arch/arm/mach-shmobile/board-kzm9g.c +++ b/arch/arm/mach-shmobile/board-kzm9g.c @@ -589,14 +589,12 @@ static struct asoc_simple_card_info fsi2_ak4648_info = { .card = "FSI2A-AK4648", .codec = "ak4642-codec.0-0012", .platform = "sh_fsi2", - .daifmt = SND_SOC_DAIFMT_LEFT_J, + .daifmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBM_CFM, .cpu_dai = { .name = "fsia-dai", - .fmt = SND_SOC_DAIFMT_CBS_CFS, }, .codec_dai = { .name = "ak4642-hifi", - .fmt = SND_SOC_DAIFMT_CBM_CFM, .sysclk = 11289600, }, }; diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index 3aba037..8c43321 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c @@ -509,9 +509,9 @@ static struct asoc_simple_card_info fsi2_hdmi_info = { .card = "FSI2B-HDMI", .codec = "sh-mobile-hdmi", .platform = "sh_fsi2", + .fmt = SND_SOC_DAIFMT_CBS_CFS, .cpu_dai = { .name = "fsib-dai", - .fmt = SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_IB_NF, }, .codec_dai = { .name = "sh_mobile_hdmi-hifi", @@ -905,14 +905,12 @@ static struct asoc_simple_card_info fsi2_ak4643_info = { .card = "FSI2A-AK4643", .codec = "ak4642-codec.0-0013", .platform = "sh_fsi2", - .daifmt = SND_SOC_DAIFMT_LEFT_J, + .daifmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBM_CFM, .cpu_dai = { .name = "fsia-dai", - .fmt = SND_SOC_DAIFMT_CBS_CFS, }, .codec_dai = { .name = "ak4642-hifi", - .fmt = SND_SOC_DAIFMT_CBM_CFM, .sysclk = 11289600, }, }; diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index 5bc3a15..85d5255 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c @@ -861,14 +861,12 @@ static struct asoc_simple_card_info fsi_da7210_info = { .card = "FSIB-DA7210", .codec = "da7210.0-001a", .platform = "sh_fsi.0", - .daifmt = SND_SOC_DAIFMT_I2S, + .daifmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBM_CFM, .cpu_dai = { .name = "fsib-dai", - .fmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_IB_NF, }, .codec_dai = { .name = "da7210-hifi", - .fmt = SND_SOC_DAIFMT_CBM_CFM, }, };
diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c index 21e4230..1162bc6 100644 --- a/arch/sh/boards/mach-se/7724/setup.c +++ b/arch/sh/boards/mach-se/7724/setup.c @@ -304,14 +304,12 @@ static struct asoc_simple_card_info fsi_ak4642_info = { .card = "FSIA-AK4642", .codec = "ak4642-codec.0-0012", .platform = "sh_fsi.0", - .daifmt = SND_SOC_DAIFMT_LEFT_J, + .daifmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBM_CFM, .cpu_dai = { .name = "fsia-dai", - .fmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_IB_NF, }, .codec_dai = { .name = "ak4642-hifi", - .fmt = SND_SOC_DAIFMT_CBM_CFM, .sysclk = 11289600, }, }; diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index 1967f44..710a079 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -1711,9 +1711,9 @@ static int fsi_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) /* set master/slave audio interface */ switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { case SND_SOC_DAIFMT_CBM_CFM: - fsi->clk_master = 1; break; case SND_SOC_DAIFMT_CBS_CFS: + fsi->clk_master = 1; /* codec is slave, cpu is master */ break; default: return -EINVAL;
On Thu, Mar 13, 2014 at 05:56:25PM -0700, Kuninori Morimoto wrote:
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
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.
Applied, thanks.
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
SND_SOC_DAIFMT_CBx_CFx means "codec" side master/slave mode. Then, rcar will be master mode if it was SND_SOC_DAIFMT_CBS_CFS.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- v1 -> v2
- no change
sound/soc/sh/rcar/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 743de5e..3a4fe9d 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -486,10 +486,10 @@ static int rsnd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) /* set master/slave audio interface */ switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { case SND_SOC_DAIFMT_CBM_CFM: - rdai->clk_master = 1; + rdai->clk_master = 0; break; case SND_SOC_DAIFMT_CBS_CFS: - rdai->clk_master = 0; + rdai->clk_master = 1; /* codec is slave, cpu is master */ break; default: return -EINVAL;
On Thu, Mar 13, 2014 at 05:56:43PM -0700, Kuninori Morimoto wrote:
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
SND_SOC_DAIFMT_CBx_CFx means "codec" side master/slave mode. Then, rcar will be master mode if it was SND_SOC_DAIFMT_CBS_CFS.
Applied, thanks.
participants (3)
-
Kuninori Morimoto
-
Mark Brown
-
Simon Horman