From: Fabio Baltieri <fabio.baltieri@linaro.org>
To: Mark Brown <broonie@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
Linus Walleij <linus.walleij@linaro.org>,
Lee Jones <lee.jones@linaro.org>,
Ola Lilja <ola.o.lilja@stericsson.com>,
Fabio Baltieri <fabio.baltieri@linaro.org>
Subject: [PATCH 3/3] ASoC: ux500: register controls to card instead of codec
Date: Tue, 30 Apr 2013 16:09:54 +0200 [thread overview]
Message-ID: <1367330994-7259-4-git-send-email-fabio.baltieri@linaro.org> (raw)
In-Reply-To: <1367330994-7259-1-git-send-email-fabio.baltieri@linaro.org>
Update mop500_ab8500_machine_init to register mop500_ab8500_ctrls as
card control instead of codec control, as it only contains
SOC_DAPM_PIN_SWITCH definitions.
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
---
sound/soc/ux500/mop500_ab8500.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/sound/soc/ux500/mop500_ab8500.c b/sound/soc/ux500/mop500_ab8500.c
index 1a5c6b9..4606194 100644
--- a/sound/soc/ux500/mop500_ab8500.c
+++ b/sound/soc/ux500/mop500_ab8500.c
@@ -127,9 +127,9 @@ static int mop500_ab8500_set_mclk(struct device *dev,
static int mclk_input_control_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
+ struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
struct mop500_ab8500_drvdata *drvdata =
- snd_soc_card_get_drvdata(codec->card);
+ snd_soc_card_get_drvdata(card);
ucontrol->value.enumerated.item[0] = drvdata->mclk_sel;
@@ -139,9 +139,9 @@ static int mclk_input_control_get(struct snd_kcontrol *kcontrol,
static int mclk_input_control_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
+ struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
struct mop500_ab8500_drvdata *drvdata =
- snd_soc_card_get_drvdata(codec->card);
+ snd_soc_card_get_drvdata(card);
unsigned int val = ucontrol->value.enumerated.item[0];
if (val > (unsigned int)MCLK_ULPCLK)
@@ -377,7 +377,7 @@ int mop500_ab8500_machine_init(struct snd_soc_pcm_runtime *rtd)
drvdata->mclk_sel = MCLK_ULPCLK;
/* Add controls */
- ret = snd_soc_add_codec_controls(codec, mop500_ab8500_ctrls,
+ ret = snd_soc_add_card_controls(codec->card, mop500_ab8500_ctrls,
ARRAY_SIZE(mop500_ab8500_ctrls));
if (ret < 0) {
pr_err("%s: Failed to add machine-controls (%d)!\n",
--
1.8.2
next prev parent reply other threads:[~2013-04-30 14:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-30 14:09 [PATCH -next 0/3] mop500_ab8500 fixes Fabio Baltieri
2013-04-30 14:09 ` [PATCH 1/3] ASoC: dapm: use clk_prepare_enable and clk_disable_unprepare Fabio Baltieri
2013-04-30 18:31 ` Mark Brown
2013-04-30 14:09 ` [PATCH 2/3] ASoC: ux500: move clock controls to ab8500-codec Fabio Baltieri
2013-04-30 14:23 ` Lars-Peter Clausen
2013-04-30 18:30 ` Mark Brown
2013-05-02 7:54 ` Fabio Baltieri
2013-05-02 9:48 ` Fabio Baltieri
2013-05-02 9:52 ` [PATCH v2 2/3] ASoC: ux500: drop clock gating widgets from machine driver Fabio Baltieri
2013-05-03 9:42 ` Mark Brown
2013-04-30 14:09 ` Fabio Baltieri [this message]
2013-04-30 18:33 ` [PATCH 3/3] ASoC: ux500: register controls to card instead of codec Mark Brown
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=1367330994-7259-4-git-send-email-fabio.baltieri@linaro.org \
--to=fabio.baltieri@linaro.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ola.o.lilja@stericsson.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
all inboxes | Powered by JetHome®