Commit 3c2ef841c0e27f37923ed15dc5d744cd6ba704ae

Authored by Kuninori Morimoto
Committed by Mark Brown
1 parent d947837410

ASoC: fsi: Add specified ID for soc-audio

Specified ID is necessary, when some codecs are used with FSI.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

Showing 3 changed files with 7 additions and 4 deletions Side-by-side Diff

include/sound/sh_fsi.h
... ... @@ -12,6 +12,9 @@
12 12 * published by the Free Software Foundation.
13 13 */
14 14  
  15 +#define FSI_PORT_A 0
  16 +#define FSI_PORT_B 1
  17 +
15 18 /* flags format
16 19  
17 20 * 0xABCDEEFF
sound/soc/sh/fsi-ak4642.c
... ... @@ -29,7 +29,7 @@
29 29 static struct snd_soc_dai_link fsi_dai_link = {
30 30 .name = "AK4642",
31 31 .stream_name = "AK4642",
32   - .cpu_dai = &fsi_soc_dai[0], /* fsi */
  32 + .cpu_dai = &fsi_soc_dai[FSI_PORT_A],
33 33 .codec_dai = &ak4642_dai,
34 34 .init = fsi_ak4642_dai_init,
35 35 .ops = NULL,
... ... @@ -53,7 +53,7 @@
53 53 {
54 54 int ret = -ENOMEM;
55 55  
56   - fsi_snd_device = platform_device_alloc("soc-audio", -1);
  56 + fsi_snd_device = platform_device_alloc("soc-audio", FSI_PORT_A);
57 57 if (!fsi_snd_device)
58 58 goto out;
59 59  
sound/soc/sh/fsi-da7210.c
... ... @@ -24,7 +24,7 @@
24 24 static struct snd_soc_dai_link fsi_da7210_dai = {
25 25 .name = "DA7210",
26 26 .stream_name = "DA7210",
27   - .cpu_dai = &fsi_soc_dai[1], /* FSI B */
  27 + .cpu_dai = &fsi_soc_dai[FSI_PORT_B],
28 28 .codec_dai = &da7210_dai,
29 29 .init = fsi_da7210_init,
30 30 };
... ... @@ -47,7 +47,7 @@
47 47 {
48 48 int ret;
49 49  
50   - fsi_da7210_snd_device = platform_device_alloc("soc-audio", -1);
  50 + fsi_da7210_snd_device = platform_device_alloc("soc-audio", FSI_PORT_B);
51 51 if (!fsi_da7210_snd_device)
52 52 return -ENOMEM;
53 53