aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2011-01-23 20:43:19 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-01-26 06:25:47 -0500
commitf17c13ca52d5c5a6a164536244a6debb8cd17983 (patch)
treea3a9a1fd3a0ed7cf1bb49f6c8c8591826fa58940 /arch/arm
parentd7c5762bc72ea4184c413166c063899dffae7385 (diff)
ASoC: sh: fsi: modify selection method of I2S/PCM/SPDIF format
Current format selection of FSI-codecs depended on platform information for FSI, and chip default settings for codecs. It is not understandable/formal method. This patch modify FSI and FSI-codecs to use snd_soc_dai_set_fmt. But FSI can use I2S/PCM and SPDIF format today. It can be selected to I2S/PCM by snd_soc_dai_set_fmt, but can not select SPDIF. So, this patch change FSI platform information to have DAI/SPDIF mode. If platform selects DAI mode (default), FSI-codecs can select I2S/PCM by snd_soc_dai_set_fmt, and if it is SPDIF mode, FSI become SPDIF format. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Paul Mundt <lethal@linux-sh.org> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-shmobile/board-ag5evm.c8
-rw-r--r--arch/arm/mach-shmobile/board-ap4evb.c6
-rw-r--r--arch/arm/mach-shmobile/board-mackerel.c6
3 files changed, 4 insertions, 16 deletions
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c
index 9ee55e0fbeb1..343362d02075 100644
--- a/arch/arm/mach-shmobile/board-ag5evm.c
+++ b/arch/arm/mach-shmobile/board-ag5evm.c
@@ -118,11 +118,6 @@ static struct platform_device keysc_device = {
118}; 118};
119 119
120/* FSI A */ 120/* FSI A */
121static struct sh_fsi_platform_info fsi_info = {
122 .porta_flags = SH_FSI_OFMT(I2S) |
123 SH_FSI_IFMT(I2S),
124};
125
126static struct resource fsi_resources[] = { 121static struct resource fsi_resources[] = {
127 [0] = { 122 [0] = {
128 .name = "FSI", 123 .name = "FSI",
@@ -141,9 +136,6 @@ static struct platform_device fsi_device = {
141 .id = -1, 136 .id = -1,
142 .num_resources = ARRAY_SIZE(fsi_resources), 137 .num_resources = ARRAY_SIZE(fsi_resources),
143 .resource = fsi_resources, 138 .resource = fsi_resources,
144 .dev = {
145 .platform_data = &fsi_info,
146 },
147}; 139};
148 140
149static struct resource sh_mmcif_resources[] = { 141static struct resource sh_mmcif_resources[] = {
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
index 920ed81f1c61..17f528a76a1c 100644
--- a/arch/arm/mach-shmobile/board-ap4evb.c
+++ b/arch/arm/mach-shmobile/board-ap4evb.c
@@ -673,14 +673,12 @@ static int fsi_set_rate(struct device *dev, int is_porta, int rate, int enable)
673} 673}
674 674
675static struct sh_fsi_platform_info fsi_info = { 675static struct sh_fsi_platform_info fsi_info = {
676 .porta_flags = SH_FSI_BRS_INV | 676 .porta_flags = SH_FSI_BRS_INV,
677 SH_FSI_OFMT(PCM) |
678 SH_FSI_IFMT(PCM),
679 677
680 .portb_flags = SH_FSI_BRS_INV | 678 .portb_flags = SH_FSI_BRS_INV |
681 SH_FSI_BRM_INV | 679 SH_FSI_BRM_INV |
682 SH_FSI_LRS_INV | 680 SH_FSI_LRS_INV |
683 SH_FSI_OFMT(SPDIF), 681 SH_FSI_FMT_SPDIF,
684 .set_rate = fsi_set_rate, 682 .set_rate = fsi_set_rate,
685}; 683};
686 684
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index aa4bcc347044..73b8c90b5072 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -614,14 +614,12 @@ fsi_set_rate_end:
614} 614}
615 615
616static struct sh_fsi_platform_info fsi_info = { 616static struct sh_fsi_platform_info fsi_info = {
617 .porta_flags = SH_FSI_BRS_INV | 617 .porta_flags = SH_FSI_BRS_INV,
618 SH_FSI_OFMT(PCM) |
619 SH_FSI_IFMT(PCM),
620 618
621 .portb_flags = SH_FSI_BRS_INV | 619 .portb_flags = SH_FSI_BRS_INV |
622 SH_FSI_BRM_INV | 620 SH_FSI_BRM_INV |
623 SH_FSI_LRS_INV | 621 SH_FSI_LRS_INV |
624 SH_FSI_OFMT(SPDIF), 622 SH_FSI_FMT_SPDIF,
625 623
626 .set_rate = fsi_set_rate, 624 .set_rate = fsi_set_rate,
627}; 625};