From a4a2992c531f6ca0aa00ce0deb31e51c1b7ae69b Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Thu, 10 Jan 2013 16:49:11 -0800 Subject: 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 Signed-off-by: Mark Brown --- arch/arm/mach-shmobile/board-armadillo800eva.c | 34 +++++++++++++------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'arch/arm/mach-shmobile/board-armadillo800eva.c') diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c index 5353adf6b82..0679ca6bf1f 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 = { }; /* FSI-WM8978 */ -static struct asoc_simple_dai_init_info fsi_wm8978_init_info = { - .fmt = SND_SOC_DAIFMT_I2S, - .codec_daifmt = SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_NB_NF, - .cpu_daifmt = SND_SOC_DAIFMT_CBS_CFS, - .sysclk = 12288000, -}; - static struct asoc_simple_card_info fsi_wm8978_info = { .name = "wm8978", .card = "FSI2A-WM8978", - .cpu_dai = "fsia-dai", .codec = "wm8978.0-001a", .platform = "sh_fsi2", - .codec_dai = "wm8978-hifi", - .init = &fsi_wm8978_init_info, + .daifmt = SND_SOC_DAIFMT_I2S, + .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, + }, }; static struct platform_device fsi_wm8978_device = { @@ -832,18 +832,18 @@ static struct platform_device fsi_wm8978_device = { }; /* FSI-HDMI */ -static struct asoc_simple_dai_init_info fsi2_hdmi_init_info = { - .cpu_daifmt = SND_SOC_DAIFMT_CBM_CFM, -}; - static struct asoc_simple_card_info fsi2_hdmi_info = { .name = "HDMI", .card = "FSI2B-HDMI", - .cpu_dai = "fsib-dai", .codec = "sh-mobile-hdmi", .platform = "sh_fsi2", - .codec_dai = "sh_mobile_hdmi-hifi", - .init = &fsi2_hdmi_init_info, + .cpu_dai = { + .name = "fsib-dai", + .fmt = SND_SOC_DAIFMT_CBM_CFM, + }, + .codec_dai = { + .name = "sh_mobile_hdmi-hifi", + }, }; static struct platform_device fsi_hdmi_device = { -- cgit v1.2.3-70-g09d2