Skip to content

Commit

Permalink
ASoC: fsi: Add specified ID for soc-audio
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kuninori Morimoto authored and Mark Brown committed Jul 17, 2010
1 parent d947837 commit 3c2ef84
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions include/sound/sh_fsi.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
* published by the Free Software Foundation.
*/

#define FSI_PORT_A 0
#define FSI_PORT_B 1

/* flags format
* 0xABCDEEFF
Expand Down
4 changes: 2 additions & 2 deletions sound/soc/sh/fsi-ak4642.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ static int fsi_ak4642_dai_init(struct snd_soc_codec *codec)
static struct snd_soc_dai_link fsi_dai_link = {
.name = "AK4642",
.stream_name = "AK4642",
.cpu_dai = &fsi_soc_dai[0], /* fsi */
.cpu_dai = &fsi_soc_dai[FSI_PORT_A],
.codec_dai = &ak4642_dai,
.init = fsi_ak4642_dai_init,
.ops = NULL,
Expand All @@ -53,7 +53,7 @@ static int __init fsi_ak4642_init(void)
{
int ret = -ENOMEM;

fsi_snd_device = platform_device_alloc("soc-audio", -1);
fsi_snd_device = platform_device_alloc("soc-audio", FSI_PORT_A);
if (!fsi_snd_device)
goto out;

Expand Down
4 changes: 2 additions & 2 deletions sound/soc/sh/fsi-da7210.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ static int fsi_da7210_init(struct snd_soc_codec *codec)
static struct snd_soc_dai_link fsi_da7210_dai = {
.name = "DA7210",
.stream_name = "DA7210",
.cpu_dai = &fsi_soc_dai[1], /* FSI B */
.cpu_dai = &fsi_soc_dai[FSI_PORT_B],
.codec_dai = &da7210_dai,
.init = fsi_da7210_init,
};
Expand All @@ -47,7 +47,7 @@ static int __init fsi_da7210_sound_init(void)
{
int ret;

fsi_da7210_snd_device = platform_device_alloc("soc-audio", -1);
fsi_da7210_snd_device = platform_device_alloc("soc-audio", FSI_PORT_B);
if (!fsi_da7210_snd_device)
return -ENOMEM;

Expand Down

0 comments on commit 3c2ef84

Please sign in to comment.