aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/board-mackerel.c
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/board-mackerel.c
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/board-mackerel.c')
-rw-r--r--arch/arm/mach-shmobile/board-mackerel.c35
1 files changed, 17 insertions, 18 deletions
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 = {