aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2013-01-10 19:49:11 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-01-13 16:55:43 -0500
commita4a2992c531f6ca0aa00ce0deb31e51c1b7ae69b (patch)
treeb8cab15b26088c8cd771ad9c4c82fc5611d34d27 /arch/arm/mach-shmobile
parent2eebcef31a133b27a09c457f3a7ad509bf237822 (diff)
ASoC: simple-card: add asoc_simple_dai for initializing
Current simple-card driver calls asoc_simple_card_dai_init() if platform had a asoc_simple_card_dai_init pointer. And, this initialization function works only when platform has an applicable initial value for each dai settings. And basically, almost all sound card requires certain initialization. This means that almost all platform has initialization settings, and driver do nothing if it doesn't have settings. And additionally, current simple-card supports sysclk settings but it was only for codec. In order to abolish deviation between cpu and codec, and in order to simplify processing, this patch adds asoc_simple_dai, and removed pointless struct asoc_simple_dai_init_info which was trigger of calling asoc_simple_card_dai_init(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'arch/arm/mach-shmobile')
-rw-r--r--arch/arm/mach-shmobile/board-ap4evb.c35
-rw-r--r--arch/arm/mach-shmobile/board-armadillo800eva.c34
-rw-r--r--arch/arm/mach-shmobile/board-kzm9g.c20
-rw-r--r--arch/arm/mach-shmobile/board-mackerel.c35
4 files changed, 61 insertions, 63 deletions
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
index 4c979039d97e..08294fa9e0d4 100644
--- a/arch/arm/mach-shmobile/board-ap4evb.c
+++ b/arch/arm/mach-shmobile/board-ap4evb.c
@@ -686,21 +686,21 @@ static struct platform_device fsi_device = {
686 }, 686 },
687}; 687};
688 688
689static struct asoc_simple_dai_init_info fsi2_ak4643_init_info = {
690 .fmt = SND_SOC_DAIFMT_LEFT_J,
691 .codec_daifmt = SND_SOC_DAIFMT_CBM_CFM,
692 .cpu_daifmt = SND_SOC_DAIFMT_CBS_CFS,
693 .sysclk = 11289600,
694};
695
696static struct asoc_simple_card_info fsi2_ak4643_info = { 689static struct asoc_simple_card_info fsi2_ak4643_info = {
697 .name = "AK4643", 690 .name = "AK4643",
698 .card = "FSI2A-AK4643", 691 .card = "FSI2A-AK4643",
699 .cpu_dai = "fsia-dai",
700 .codec = "ak4642-codec.0-0013", 692 .codec = "ak4642-codec.0-0013",
701 .platform = "sh_fsi2", 693 .platform = "sh_fsi2",
702 .codec_dai = "ak4642-hifi", 694 .daifmt = SND_SOC_DAIFMT_LEFT_J,
703 .init = &fsi2_ak4643_init_info, 695 .cpu_dai = {
696 .name = "fsia-dai",
697 .fmt = SND_SOC_DAIFMT_CBS_CFS,
698 },
699 .codec_dai = {
700 .name = "ak4642-hifi",
701 .fmt = SND_SOC_DAIFMT_CBM_CFM,
702 .sysclk = 11289600,
703 },
704}; 704};
705 705
706static struct platform_device fsi_ak4643_device = { 706static struct platform_device fsi_ak4643_device = {
@@ -809,19 +809,18 @@ static struct platform_device lcdc1_device = {
809 }, 809 },
810}; 810};
811 811
812static struct asoc_simple_dai_init_info fsi2_hdmi_init_info = {
813 .cpu_daifmt = SND_SOC_DAIFMT_CBM_CFM |
814 SND_SOC_DAIFMT_IB_NF,
815};
816
817static struct asoc_simple_card_info fsi2_hdmi_info = { 812static struct asoc_simple_card_info fsi2_hdmi_info = {
818 .name = "HDMI", 813 .name = "HDMI",
819 .card = "FSI2B-HDMI", 814 .card = "FSI2B-HDMI",
820 .cpu_dai = "fsib-dai",
821 .codec = "sh-mobile-hdmi", 815 .codec = "sh-mobile-hdmi",
822 .platform = "sh_fsi2", 816 .platform = "sh_fsi2",
823 .codec_dai = "sh_mobile_hdmi-hifi", 817 .cpu_dai = {
824 .init = &fsi2_hdmi_init_info, 818 .name = "fsib-dai",
819 .fmt = SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_IB_NF,
820 },
821 .codec_dai = {
822 .name = "sh_mobile_hdmi-hifi",
823 },
825}; 824};
826 825
827static struct platform_device fsi_hdmi_device = { 826static struct platform_device fsi_hdmi_device = {
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
index 5353adf6b828..0679ca6bf1f6 100644
--- a/arch/arm/mach-shmobile/board-armadillo800eva.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
@@ -806,21 +806,21 @@ static struct platform_device fsi_device = {
806}; 806};
807 807
808/* FSI-WM8978 */ 808/* FSI-WM8978 */
809static struct asoc_simple_dai_init_info fsi_wm8978_init_info = {
810 .fmt = SND_SOC_DAIFMT_I2S,
811 .codec_daifmt = SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_NB_NF,
812 .cpu_daifmt = SND_SOC_DAIFMT_CBS_CFS,
813 .sysclk = 12288000,
814};
815
816static struct asoc_simple_card_info fsi_wm8978_info = { 809static struct asoc_simple_card_info fsi_wm8978_info = {
817 .name = "wm8978", 810 .name = "wm8978",
818 .card = "FSI2A-WM8978", 811 .card = "FSI2A-WM8978",
819 .cpu_dai = "fsia-dai",
820 .codec = "wm8978.0-001a", 812 .codec = "wm8978.0-001a",
821 .platform = "sh_fsi2", 813 .platform = "sh_fsi2",
822 .codec_dai = "wm8978-hifi", 814 .daifmt = SND_SOC_DAIFMT_I2S,
823 .init = &fsi_wm8978_init_info, 815 .cpu_dai = {
816 .name = "fsia-dai",
817 .fmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_IB_NF,
818 },
819 .codec_dai = {
820 .name = "wm8978-hifi",
821 .fmt = SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_NB_NF,
822 .sysclk = 12288000,
823 },
824}; 824};
825 825
826static struct platform_device fsi_wm8978_device = { 826static struct platform_device fsi_wm8978_device = {
@@ -832,18 +832,18 @@ static struct platform_device fsi_wm8978_device = {
832}; 832};
833 833
834/* FSI-HDMI */ 834/* FSI-HDMI */
835static struct asoc_simple_dai_init_info fsi2_hdmi_init_info = {
836 .cpu_daifmt = SND_SOC_DAIFMT_CBM_CFM,
837};
838
839static struct asoc_simple_card_info fsi2_hdmi_info = { 835static struct asoc_simple_card_info fsi2_hdmi_info = {
840 .name = "HDMI", 836 .name = "HDMI",
841 .card = "FSI2B-HDMI", 837 .card = "FSI2B-HDMI",
842 .cpu_dai = "fsib-dai",
843 .codec = "sh-mobile-hdmi", 838 .codec = "sh-mobile-hdmi",
844 .platform = "sh_fsi2", 839 .platform = "sh_fsi2",
845 .codec_dai = "sh_mobile_hdmi-hifi", 840 .cpu_dai = {
846 .init = &fsi2_hdmi_init_info, 841 .name = "fsib-dai",
842 .fmt = SND_SOC_DAIFMT_CBM_CFM,
843 },
844 .codec_dai = {
845 .name = "sh_mobile_hdmi-hifi",
846 },
847}; 847};
848 848
849static struct platform_device fsi_hdmi_device = { 849static struct platform_device fsi_hdmi_device = {
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
index c02448d6847f..f41b71e8df3e 100644
--- a/arch/arm/mach-shmobile/board-kzm9g.c
+++ b/arch/arm/mach-shmobile/board-kzm9g.c
@@ -525,21 +525,21 @@ static struct platform_device fsi_device = {
525 }, 525 },
526}; 526};
527 527
528static struct asoc_simple_dai_init_info fsi2_ak4648_init_info = {
529 .fmt = SND_SOC_DAIFMT_LEFT_J,
530 .codec_daifmt = SND_SOC_DAIFMT_CBM_CFM,
531 .cpu_daifmt = SND_SOC_DAIFMT_CBS_CFS,
532 .sysclk = 11289600,
533};
534
535static struct asoc_simple_card_info fsi2_ak4648_info = { 528static struct asoc_simple_card_info fsi2_ak4648_info = {
536 .name = "AK4648", 529 .name = "AK4648",
537 .card = "FSI2A-AK4648", 530 .card = "FSI2A-AK4648",
538 .cpu_dai = "fsia-dai",
539 .codec = "ak4642-codec.0-0012", 531 .codec = "ak4642-codec.0-0012",
540 .platform = "sh_fsi2", 532 .platform = "sh_fsi2",
541 .codec_dai = "ak4642-hifi", 533 .daifmt = SND_SOC_DAIFMT_LEFT_J,
542 .init = &fsi2_ak4648_init_info, 534 .cpu_dai = {
535 .name = "fsia-dai",
536 .fmt = SND_SOC_DAIFMT_CBS_CFS,
537 },
538 .codec_dai = {
539 .name = "ak4642-hifi",
540 .fmt = SND_SOC_DAIFMT_CBM_CFM,
541 .sysclk = 11289600,
542 },
543}; 543};
544 544
545static struct platform_device fsi_ak4648_device = { 545static struct platform_device fsi_ak4648_device = {
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index b5d210b4264c..3fd716dae405 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -502,19 +502,18 @@ static struct platform_device hdmi_lcdc_device = {
502 }, 502 },
503}; 503};
504 504
505static struct asoc_simple_dai_init_info fsi2_hdmi_init_info = {
506 .cpu_daifmt = SND_SOC_DAIFMT_CBM_CFM |
507 SND_SOC_DAIFMT_IB_NF,
508};
509
510static struct asoc_simple_card_info fsi2_hdmi_info = { 505static struct asoc_simple_card_info fsi2_hdmi_info = {
511 .name = "HDMI", 506 .name = "HDMI",
512 .card = "FSI2B-HDMI", 507 .card = "FSI2B-HDMI",
513 .cpu_dai = "fsib-dai",
514 .codec = "sh-mobile-hdmi", 508 .codec = "sh-mobile-hdmi",
515 .platform = "sh_fsi2", 509 .platform = "sh_fsi2",
516 .codec_dai = "sh_mobile_hdmi-hifi", 510 .cpu_dai = {
517 .init = &fsi2_hdmi_init_info, 511 .name = "fsib-dai",
512 .fmt = SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_IB_NF,
513 },
514 .codec_dai = {
515 .name = "sh_mobile_hdmi-hifi",
516 },
518}; 517};
519 518
520static struct platform_device fsi_hdmi_device = { 519static struct platform_device fsi_hdmi_device = {
@@ -893,21 +892,21 @@ static struct platform_device fsi_device = {
893 }, 892 },
894}; 893};
895 894
896static struct asoc_simple_dai_init_info fsi2_ak4643_init_info = {
897 .fmt = SND_SOC_DAIFMT_LEFT_J,
898 .codec_daifmt = SND_SOC_DAIFMT_CBM_CFM,
899 .cpu_daifmt = SND_SOC_DAIFMT_CBS_CFS,
900 .sysclk = 11289600,
901};
902
903static struct asoc_simple_card_info fsi2_ak4643_info = { 895static struct asoc_simple_card_info fsi2_ak4643_info = {
904 .name = "AK4643", 896 .name = "AK4643",
905 .card = "FSI2A-AK4643", 897 .card = "FSI2A-AK4643",
906 .cpu_dai = "fsia-dai",
907 .codec = "ak4642-codec.0-0013", 898 .codec = "ak4642-codec.0-0013",
908 .platform = "sh_fsi2", 899 .platform = "sh_fsi2",
909 .codec_dai = "ak4642-hifi", 900 .daifmt = SND_SOC_DAIFMT_LEFT_J,
910 .init = &fsi2_ak4643_init_info, 901 .cpu_dai = {
902 .name = "fsia-dai",
903 .fmt = SND_SOC_DAIFMT_CBS_CFS,
904 },
905 .codec_dai = {
906 .name = "ak4642-hifi",
907 .fmt = SND_SOC_DAIFMT_CBM_CFM,
908 .sysclk = 11289600,
909 },
911}; 910};
912 911
913static struct platform_device fsi_ak4643_device = { 912static struct platform_device fsi_ak4643_device = {