From: Liam Girdwood <lrg@slimlogic.co.uk>
To: "Matti J. Aaltonen" <matti.j.aaltonen@nokia.com>
Cc: alsa-devel@alsa-project.org, broonie@opensource.wolfsonmicro.com,
peter.ujfalusi@nokia.com
Subject: Re: [PATCH v7 1/1] ASoC: TI WL1273 FM Radio Codec.
Date: Thu, 19 Aug 2010 15:32:32 +0100 [thread overview]
Message-ID: <1282228352.3074.471.camel@odin> (raw)
In-Reply-To: <1282226421-23202-2-git-send-email-matti.j.aaltonen@nokia.com>
On Thu, 2010-08-19 at 17:00 +0300, Matti J. Aaltonen wrote:
> This is an ALSA codec for the Texas Instruments WL1273 FM Radio.
>
> Signed-off-by: Matti J. Aaltonen <matti.j.aaltonen@nokia.com>
> ---
> sound/soc/codecs/wl1273.c | 533 +++++++++++++++++++++++++++++++++++++++++++++
> sound/soc/codecs/wl1273.h | 101 +++++++++
> 2 files changed, 634 insertions(+), 0 deletions(-)
> create mode 100644 sound/soc/codecs/wl1273.c
> create mode 100644 sound/soc/codecs/wl1273.h
>
> diff --git a/sound/soc/codecs/wl1273.c b/sound/soc/codecs/wl1273.c
> new file mode 100644
> index 0000000..a179303
> --- /dev/null
> +++ b/sound/soc/codecs/wl1273.c
> @@ -0,0 +1,533 @@
snip
> +
> +static int wl1273_probe(struct snd_soc_codec *codec)
> +{
> + struct wl1273_core **core = codec->dev->platform_data;
Just curious, why is your platform data here not just a pointer to a
struct wl1273 ?
> + struct wl1273_priv *wl1273;
> + int r;
> +
> + dev_dbg(codec->dev, "%s.\n", __func__);
> +
> + if (!core) {
> + dev_err(codec->dev, "Platform data is missing.\n");
> + return -EINVAL;
> + }
> +
> + wl1273 = kzalloc(sizeof(struct wl1273_priv), GFP_KERNEL);
> + if (wl1273 == NULL) {
> + dev_err(codec->dev, "Cannot allocate memory.\n");
> + return -ENOMEM;
> + }
> +
> + wl1273->mode = WL1273_MODE_BT;
> + wl1273->core = *core;
> +
> + snd_soc_codec_set_drvdata(codec, wl1273);
> +
> + mutex_init(&codec->mutex);
> + INIT_LIST_HEAD(&codec->dapm_widgets);
> + INIT_LIST_HEAD(&codec->dapm_paths);
> +
> + codec->name = "wl1273";
> + codec->num_dai = 1;
> + codec->bias_level = SND_SOC_BIAS_OFF;
Above 6 lines now done by core, so not needed now (I mentioned that for
V5, but maybe not explicitly)
Thanks
Liam
--
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk
prev parent reply other threads:[~2010-08-19 14:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-19 14:00 [PATCH v7 0/1] A codec driver for the TI WL1273 FM Radio Matti J. Aaltonen
2010-08-19 14:00 ` [PATCH v7 1/1] ASoC: TI WL1273 FM Radio Codec Matti J. Aaltonen
2010-08-19 14:20 ` Mark Brown
2010-08-19 14:32 ` Liam Girdwood [this message]
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=1282228352.3074.471.camel@odin \
--to=lrg@slimlogic.co.uk \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=matti.j.aaltonen@nokia.com \
--cc=peter.ujfalusi@nokia.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