ASoC: codec: Update codec driver to component driver

Some alsa API are removed in kernel-4.19 which would cause
codec driver compile failure. Update codec driver to fix it.

Change-Id: Ie358ec1863082166958059c179300b453d2a03ad
Signed-off-by: Meng Wang <mengw@codeaurora.org>
This commit is contained in:
Meng Wang
2018-09-06 10:49:18 +08:00
committed by Gerrit - the friendly Code Review server
parent ee084a068e
commit 15c825d077
59 changed files with 8532 additions and 6916 deletions

View File

@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
/* Copyright (c) 2011-2014, 2017 The Linux Foundation. All rights reserved.
/* Copyright (c) 2011-2014, 2017-2018 The Linux Foundation. All rights reserved.
*/
#include <linux/platform_device.h>
@@ -10,6 +10,8 @@
#include <sound/pcm.h>
#include <sound/soc.h>
#define DRV_NAME "msm-stub-codec"
/* A dummy driver useful only to advertise hardware parameters */
static struct snd_soc_dai_driver msm_stub_dais[] = {
{
@@ -35,19 +37,21 @@ static struct snd_soc_dai_driver msm_stub_dais[] = {
},
};
static struct snd_soc_codec_driver soc_msm_stub = {};
static const struct snd_soc_component_driver soc_msm_stub = {
.name = DRV_NAME,
};
static int msm_stub_dev_probe(struct platform_device *pdev)
{
dev_dbg(&pdev->dev, "dev name %s\n", dev_name(&pdev->dev));
return snd_soc_register_codec(&pdev->dev,
return snd_soc_register_component(&pdev->dev,
&soc_msm_stub, msm_stub_dais, ARRAY_SIZE(msm_stub_dais));
}
static int msm_stub_dev_remove(struct platform_device *pdev)
{
snd_soc_unregister_codec(&pdev->dev);
snd_soc_unregister_component(&pdev->dev);
return 0;
}
static const struct of_device_id msm_stub_codec_dt_match[] = {