From: Jeffy Chen <jeffy.chen@rock-chips.com>
To: linux-kernel@vger.kernel.org, dgreid@chromium.org, heiko@sntech.de
Cc: briannorris@chromium.org, mka@chromium.org,
dianders@chromium.org, Jeffy Chen <jeffy.chen@rock-chips.com>,
Jaroslav Kysela <perex@perex.cz>,
alsa-devel@alsa-project.org, Mark Brown <broonie@kernel.org>,
Oder Chiou <oder_chiou@realtek.com>,
Takashi Iwai <tiwai@suse.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Bard Liao <bardliao@realtek.com>
Subject: [PATCH v3 1/9] ASoC: rt5514: Switch to snd_soc_register_codec
Date: Thu, 17 Aug 2017 12:44:09 +0800 [thread overview]
Message-ID: <20170817044417.22069-2-jeffy.chen@rock-chips.com> (raw)
In-Reply-To: <20170817044417.22069-1-jeffy.chen@rock-chips.com>
Currently we are using devm_snd_soc_register_component, which would
use legacy dai name.
Switch to snd_soc_register_codec to use dai driver name.
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---
Changes in v3: None
Changes in v2: None
sound/soc/codecs/rt5514-spi.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/sound/soc/codecs/rt5514-spi.c b/sound/soc/codecs/rt5514-spi.c
index 640193d845be..ad6bc51dd82a 100644
--- a/sound/soc/codecs/rt5514-spi.c
+++ b/sound/soc/codecs/rt5514-spi.c
@@ -277,8 +277,10 @@ static struct snd_soc_platform_driver rt5514_spi_platform = {
.ops = &rt5514_spi_pcm_ops,
};
-static const struct snd_soc_component_driver rt5514_spi_dai_component = {
- .name = "rt5514-spi-dai",
+static const struct snd_soc_codec_driver rt5514_spi_dai_codec = {
+ .component_driver = {
+ .name = "rt5514-spi-dai",
+ },
};
/**
@@ -426,9 +428,8 @@ static int rt5514_spi_probe(struct spi_device *spi)
return ret;
}
- ret = devm_snd_soc_register_component(&spi->dev,
- &rt5514_spi_dai_component,
- &rt5514_spi_dai, 1);
+ ret = snd_soc_register_codec(&spi->dev, &rt5514_spi_dai_codec,
+ &rt5514_spi_dai, 1);
if (ret < 0) {
dev_err(&spi->dev, "Failed to register component.\n");
return ret;
@@ -437,6 +438,13 @@ static int rt5514_spi_probe(struct spi_device *spi)
return 0;
}
+static int rt5514_spi_remove(struct spi_device *spi)
+{
+ snd_soc_unregister_codec(&spi->dev);
+
+ return 0;
+}
+
static const struct of_device_id rt5514_of_match[] = {
{ .compatible = "realtek,rt5514", },
{},
@@ -449,6 +457,7 @@ static struct spi_driver rt5514_spi_driver = {
.of_match_table = of_match_ptr(rt5514_of_match),
},
.probe = rt5514_spi_probe,
+ .remove = rt5514_spi_remove,
};
module_spi_driver(rt5514_spi_driver);
--
2.11.0
next prev parent reply other threads:[~2017-08-17 4:44 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-17 4:44 [PATCH v3 0/9] ASoC: rockchip: Parse dai links from dts Jeffy Chen
2017-08-17 4:44 ` Jeffy Chen [this message]
2017-08-17 17:11 ` [PATCH v3 1/9] ASoC: rt5514: Switch to snd_soc_register_codec Mark Brown
2017-08-18 2:48 ` jeffy
2017-08-17 4:44 ` [PATCH v3 2/9] ASoC: rockchip: Remove obsolete dmic-delay Jeffy Chen
2017-08-17 17:11 ` Mark Brown
2017-08-18 1:41 ` jeffy
2017-08-18 11:52 ` Mark Brown
2017-08-18 14:41 ` jeffy
2017-08-17 4:44 ` [PATCH v3 3/9] ASoC: rockchip: Use codec of_node and dai_name for rt5514 dsp Jeffy Chen
2017-08-17 4:44 ` [PATCH v3 4/9] arm64: dts: rockchip: Add rt5514 dsp for Gru Jeffy Chen
2017-08-17 4:44 ` [PATCH v3 5/9] arm64: dts: rockchip: Update rt5514 devices' compatible " Jeffy Chen
2017-08-17 4:44 ` [PATCH v3 6/9] ASoC: rockchip: Parse dai links from dts Jeffy Chen
2017-08-17 4:44 ` [PATCH v3 7/9] ASoC: rockchip: Add support for DP codec Jeffy Chen
2017-08-29 19:26 ` Applied "ASoC: rockchip: Add support for DP codec" to the asoc tree Mark Brown
2017-08-17 4:44 ` [PATCH v3 8/9] ASoC: rockchip: Add support for DMIC codec Jeffy Chen
2017-08-17 4:44 ` [PATCH v3 9/9] dt-bindings: ASoC: rockchip: Update description of rockchip,codec Jeffy Chen
2017-08-17 22:20 ` Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170817044417.22069-2-jeffy.chen@rock-chips.com \
--to=jeffy.chen@rock-chips.com \
--cc=alsa-devel@alsa-project.org \
--cc=bardliao@realtek.com \
--cc=briannorris@chromium.org \
--cc=broonie@kernel.org \
--cc=dgreid@chromium.org \
--cc=dianders@chromium.org \
--cc=heiko@sntech.de \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mka@chromium.org \
--cc=oder_chiou@realtek.com \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome