summaryrefslogtreecommitdiffstats
path: root/sound/soc/ux500/ux500_msp_dai.c
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2012-11-23 13:05:41 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-11-23 23:06:02 +0900
commit1428c20f7c38e9fbf59923d1b9615ebdaf2862b7 (patch)
tree9b946dc80e618243e5895f5b3fcdda8e746a6146 /sound/soc/ux500/ux500_msp_dai.c
parentf61ab093828df646b5df35f244577859efe4329c (diff)
downloadblackbird-op-linux-1428c20f7c38e9fbf59923d1b9615ebdaf2862b7.tar.gz
blackbird-op-linux-1428c20f7c38e9fbf59923d1b9615ebdaf2862b7.zip
ASoC: Ux500: Initialise PCM from MSP probe rather than as a device
The PCM is a pseudo-device. It doesn't have any of it's own registers or hardware. It rather acts as a layer of abstraction for DMA transfers. Hence, instead of classifying it as a device in its own right, we call the initialisation from the MSP driver. Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Ola LILJA2 <ola.o.lilja@stericsson.com> Cc: alsa-devel@alsa-project.org Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/ux500/ux500_msp_dai.c')
-rw-r--r--sound/soc/ux500/ux500_msp_dai.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sound/soc/ux500/ux500_msp_dai.c b/sound/soc/ux500/ux500_msp_dai.c
index 74bb3c0e81f5..478b4b60e0cc 100644
--- a/sound/soc/ux500/ux500_msp_dai.c
+++ b/sound/soc/ux500/ux500_msp_dai.c
@@ -28,6 +28,7 @@
#include "ux500_msp_i2s.h"
#include "ux500_msp_dai.h"
+#include "ux500_pcm.h"
static int setup_pcm_multichan(struct snd_soc_dai *dai,
struct ux500_msp_config *msp_config)
@@ -832,8 +833,18 @@ static int __devinit ux500_msp_drv_probe(struct platform_device *pdev)
goto err_init_msp;
}
+ ret = ux500_pcm_register_platform(pdev);
+ if (ret < 0) {
+ dev_err(&pdev->dev,
+ "Error: %s: Failed to register PCM platform device!\n",
+ __func__);
+ goto err_reg_plat;
+ }
+
return 0;
+err_reg_plat:
+ snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(ux500_msp_dai_drv));
err_init_msp:
clk_put(drvdata->clk);
err_clk:
@@ -848,6 +859,8 @@ static int __devexit ux500_msp_drv_remove(struct platform_device *pdev)
{
struct ux500_msp_i2s_drvdata *drvdata = dev_get_drvdata(&pdev->dev);
+ ux500_pcm_unregister_platform(pdev);
+
snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(ux500_msp_dai_drv));
devm_regulator_put(drvdata->reg_vape);
OpenPOWER on IntegriCloud