From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Mike Frysinger <vapier@gentoo.org>
Cc: uclinux-dist-devel@blackfin.uclinux.org,
alsa-devel@alsa-project.org, Cliff Cai <cliff.cai@analog.com>
Subject: Re: [PATCH] ASoC: add SSM2604 codec driver
Date: Sat, 7 Aug 2010 13:44:16 +0100 [thread overview]
Message-ID: <20100807124416.GB11817@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1281160447-10393-1-git-send-email-vapier@gentoo.org>
On Sat, Aug 07, 2010 at 01:54:07AM -0400, Mike Frysinger wrote:
> From: Cliff Cai <cliff.cai@analog.com>
>
> Signed-off-by: Cliff Cai <cliff.cai@analog.com>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This needs to be updated to the multi-component branch. There's a few
other issues as well.
> +#define SSM2604_VERSION "0.1"
Drop this, just track the version through git and kernel releases.
> +static const struct soc_enum ssm2604_enum[] = {
> + SOC_ENUM_SINGLE(SSM2604_APDIGI, 1, 4, ssm2604_deemph),
> +};
Use individual variables for enums rather than stuffing them all in an
array. The arrays are just hard to read and error prone...
> +SOC_ENUM("Capture Source", ssm2604_enum[0]),
> +
> +SOC_ENUM("Playback De-emphasis", ssm2604_enum[1]),
...are you sure this code runs correctly? I see only one element in the
array. It's worth checking this in your other drivers as well.
> + /* The DAI has shared clocks so if we already have a playback or
> + * capture going then constrain this substream to match it.
> + * TODO: the ssm2604 allows pairs of non-matching PB/REC rates
> + */
> + if (ssm2604->master_substream) {
Set the symmetric_rates flag on the DAI rather than open coding this.
> + /* deactivate */
> + if (!codec->active)
> + snd_soc_write(codec, SSM2604_ACTIVE, 0);
This probably wants to be managed by DAPM (possibly a supply widget for
the DAC and ADC).
> +#define SSM2604_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_32000 |\
> + SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 |\
> + SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000)
SNDRV_PCM_RATE_8000_96000
> + snd_soc_write(codec, SSM2604_APANA, APANA_SELECT_DAC);
This could use a little explanation?
> +struct ssm2604_setup_data {
> + int i2c_bus;
> + unsigned short i2c_address;
> +};
This is definitely not needed, even with the current code.
next prev parent reply other threads:[~2010-08-07 12:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-07 5:54 [PATCH] ASoC: add SSM2604 codec driver Mike Frysinger
2010-08-07 12:44 ` Mark Brown [this message]
[not found] ` <20100807124416.GB11817-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2010-08-07 15:21 ` Mike Frysinger
2011-03-26 9:07 ` [PATCH v2] " Mike Frysinger
2011-03-26 12:12 ` Mark Brown
2011-03-27 4:11 ` [Device-drivers-devel] " Mike Frysinger
2011-03-27 10:41 ` 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=20100807124416.GB11817@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=cliff.cai@analog.com \
--cc=uclinux-dist-devel@blackfin.uclinux.org \
--cc=vapier@gentoo.org \
/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;
as well as URLs for NNTP newsgroup(s).