From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: alsa-devel@alsa-project.org, kyungmin.park@samsung.com
Subject: Re: [PATCH] ASoC: MAX9877: add MAX9877 amp driver
Date: Tue, 14 Jul 2009 10:54:26 +0100 [thread overview]
Message-ID: <20090714095426.GA16295@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <4A5C2829.50402@samsung.com>
On Tue, Jul 14, 2009 at 03:39:37PM +0900, Joonyoung Shim wrote:
Overall this looks great, thanks. Clearly it's not an ideal approach
but it gets the job done and it can be adapted to use core features as
they're added.
A couple of relatively nitpicky issues below:
> +++ b/sound/soc/codecs/Kconfig
> @@ -188,3 +188,7 @@ config SND_SOC_WM9712
>
> config SND_SOC_WM9713
> tristate
> +
> +# Amp
> +config SND_SOC_MAX9877
> + tristate
I'd add it to SND_SOC_ALL_CODECS too - while it's not strictly a CODEC
the point of the Kconfig option is to get build coverage and this driver
will benefit from that as much as others.
> +static const char *max9877_osc_mode[] = {
> + "1176KHz",
> + "1100KHz",
> + "700KHz",
> +};
Would this be better as platform data for the device?
> +static const struct snd_kcontrol_new max9877_controls[] = {
> + SOC_SINGLE_EXT_TLV("MAX9877 Amp HP Left Playback Volume",
> + MAX9877_HPL_VOLUME, 0, 31, 0,
> + max9877_get_reg, max9877_set_reg, max9877_output_tlv),
> + SOC_SINGLE_EXT_TLV("MAX9877 Amp HP Right Playback Volume",
> + MAX9877_HPR_VOLUME, 0, 31, 0,
> + max9877_get_reg, max9877_set_reg, max9877_output_tlv),
Ideally these would be a SOC_DOUBLE_EXT_TLV() but we don't have that yet
- would you mind sending a patch for that?
> +/* This function is called from ASoC machine driver */
> +int max9877_add_controls(struct snd_soc_codec *codec)
> +{
> + return snd_soc_add_controls(codec, max9877_controls,
> + ARRAY_SIZE(max9877_controls));
> +}
> +
This should have an EXPORT_SYMBOL_GPL() to allow it to be used from
machine drivers which are built modular.
next prev parent reply other threads:[~2009-07-14 9:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-14 6:39 [PATCH] ASoC: MAX9877: add MAX9877 amp driver Joonyoung Shim
2009-07-14 9:54 ` Mark Brown [this message]
2009-07-15 1:22 ` Joonyoung Shim
2009-07-15 10:01 ` 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=20090714095426.GA16295@rakim.wolfsonmicro.main \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=jy0922.shim@samsung.com \
--cc=kyungmin.park@samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.