Skip to content

Commit

Permalink
ASoC: fsl_ssi: instantiate AC'97 CODEC
Browse files Browse the repository at this point in the history
Instantiate AC'97 CODEC in fsl_ssi driver AC'97 mode.

Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Maciej S. Szmigiero authored and Mark Brown committed Aug 14, 2015
1 parent 04143d6 commit 8ed0c84
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions sound/soc/fsl/fsl_ssi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1460,6 +1460,27 @@ static int fsl_ssi_probe(struct platform_device *pdev)
_fsl_ssi_set_dai_fmt(&pdev->dev, ssi_private,
ssi_private->dai_fmt);

if (fsl_ssi_is_ac97(ssi_private)) {
u32 ssi_idx;

ret = of_property_read_u32(np, "cell-index", &ssi_idx);
if (ret) {
dev_err(&pdev->dev, "cannot get SSI index property\n");
goto error_sound_card;
}

ssi_private->pdev =
platform_device_register_data(NULL,
"ac97-codec", ssi_idx, NULL, 0);
if (IS_ERR(ssi_private->pdev)) {
ret = PTR_ERR(ssi_private->pdev);
dev_err(&pdev->dev,
"failed to register AC97 codec platform: %d\n",
ret);
goto error_sound_card;
}
}

return 0;

error_sound_card:
Expand Down

0 comments on commit 8ed0c84

Please sign in to comment.