| OLD | NEW |
| 1 /* | 1 /* |
| 2 * fsi-da7210.c | 2 * fsi-da7210.c |
| 3 * | 3 * |
| 4 * Copyright (C) 2009 Renesas Solutions Corp. | 4 * Copyright (C) 2009 Renesas Solutions Corp. |
| 5 * Kuninori Morimoto <morimoto.kuninori@renesas.com> | 5 * Kuninori Morimoto <morimoto.kuninori@renesas.com> |
| 6 * | 6 * |
| 7 * This program is free software; you can redistribute it and/or modify it | 7 * This program is free software; you can redistribute it and/or modify it |
| 8 * under the terms of the GNU General Public License as published by the | 8 * under the terms of the GNU General Public License as published by the |
| 9 * Free Software Foundation; either version 2 of the License, or (at your | 9 * Free Software Foundation; either version 2 of the License, or (at your |
| 10 * option) any later version. | 10 * option) any later version. |
| 11 */ | 11 */ |
| 12 | 12 |
| 13 #include <linux/platform_device.h> | 13 #include <linux/platform_device.h> |
| 14 #include <sound/sh_fsi.h> | 14 #include <sound/sh_fsi.h> |
| 15 | 15 |
| 16 static int fsi_da7210_init(struct snd_soc_pcm_runtime *rtd) | 16 static int fsi_da7210_init(struct snd_soc_pcm_runtime *rtd) |
| 17 { | 17 { |
| 18 » struct snd_soc_dai *dai = rtd->codec_dai; | 18 » struct snd_soc_dai *codec = rtd->codec_dai; |
| 19 » struct snd_soc_dai *cpu = rtd->cpu_dai; |
| 20 » int ret; |
| 19 | 21 |
| 20 » return snd_soc_dai_set_fmt(dai, | 22 » ret = snd_soc_dai_set_fmt(codec, |
| 21 » » » » SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | | 23 » » » » SND_SOC_DAIFMT_I2S | |
| 22 SND_SOC_DAIFMT_CBM_CFM); | 24 SND_SOC_DAIFMT_CBM_CFM); |
| 25 if (ret < 0) |
| 26 return ret; |
| 27 |
| 28 ret = snd_soc_dai_set_fmt(cpu, SND_SOC_DAIFMT_I2S | |
| 29 SND_SOC_DAIFMT_CBS_CFS); |
| 30 |
| 31 return ret; |
| 23 } | 32 } |
| 24 | 33 |
| 25 static struct snd_soc_dai_link fsi_da7210_dai = { | 34 static struct snd_soc_dai_link fsi_da7210_dai = { |
| 26 .name = "DA7210", | 35 .name = "DA7210", |
| 27 .stream_name = "DA7210", | 36 .stream_name = "DA7210", |
| 28 .cpu_dai_name = "fsib-dai", /* FSI B */ | 37 .cpu_dai_name = "fsib-dai", /* FSI B */ |
| 29 .codec_dai_name = "da7210-hifi", | 38 .codec_dai_name = "da7210-hifi", |
| 30 .platform_name = "sh_fsi.0", | 39 .platform_name = "sh_fsi.0", |
| 31 .codec_name = "da7210-codec.0-001a", | 40 .codec_name = "da7210-codec.0-001a", |
| 32 .init = fsi_da7210_init, | 41 .init = fsi_da7210_init, |
| (...skipping 28 matching lines...) Expand all Loading... |
| 61 platform_device_unregister(fsi_da7210_snd_device); | 70 platform_device_unregister(fsi_da7210_snd_device); |
| 62 } | 71 } |
| 63 | 72 |
| 64 module_init(fsi_da7210_sound_init); | 73 module_init(fsi_da7210_sound_init); |
| 65 module_exit(fsi_da7210_sound_exit); | 74 module_exit(fsi_da7210_sound_exit); |
| 66 | 75 |
| 67 /* Module information */ | 76 /* Module information */ |
| 68 MODULE_DESCRIPTION("ALSA SoC FSI DA2710"); | 77 MODULE_DESCRIPTION("ALSA SoC FSI DA2710"); |
| 69 MODULE_AUTHOR("Kuninori Morimoto <morimoto.kuninori@renesas.com>"); | 78 MODULE_AUTHOR("Kuninori Morimoto <morimoto.kuninori@renesas.com>"); |
| 70 MODULE_LICENSE("GPL"); | 79 MODULE_LICENSE("GPL"); |
| OLD | NEW |