From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Prchal Ji?? <jiri.prchal@aksignal.cz>
Cc: alsa-devel@vger.kernel.org, alsa-devel@alsa-project.org,
vbarinov@embeddedalley.com, linux-kernel@vger.kernel.org
Subject: Re: [alsa-devel] [PATCH 1/2] ALSA: ASoc: TLV320AIC3X: ad SPI and clock on GPIO2 or BCLK
Date: Sat, 2 Apr 2011 09:26:04 +0100 [thread overview]
Message-ID: <20110402082604.GE21737@sirena.org.uk> (raw)
In-Reply-To: <4D8B1AFD.5060508@aksignal.cz>
On Thu, Mar 24, 2011 at 11:20:45AM +0100, Prchal Ji?? wrote:
> Hi,
> this patch ads SPI communication for codecs TLV320AIC3X and clock input on GPIO2 or BCLK.
> Tested on TLV320AIC3106 and AT91SAM9260.
> TODO: Set the model in SPI probe the right way. I don't know how.
Register two SPI drivers with different names.
> This codec communicates on SPI in 1st byte: 7 MSB is register address, 1 LSB is read/write, 2nd byte data. For this
> reason there is new functions in soc-cache.c snd_soc_7_8_*.
This looks mostly good but there's some cleanups needed, mostly from
extra stuff which snuck in there, and you need to rebase against current
code.
As covered in SubmittingPatches you should always CC maintainers on
patches.
> config SND_SOC_AD73311
> tristate
> -
> +
Random whitespace change, should be removed.
> * Author: Vladimir Barinov, <vbarinov@embeddedalley.com>
> + * Jiri Prchal, <jiri.prchal@aksignal.cz
If you're going to do this you probably want a > in there.
> {
> struct snd_soc_codec *codec = codec_dai->codec;
> struct aic3x_priv *aic3x = snd_soc_codec_get_drvdata(codec);
> + u8 data;
> +
> + /* set external clock on GPIO2 or BCLK */
> + data = snd_soc_read(codec, AIC3X_CLKGEN_CTRL_REG);
> + data &= 0x0f;
> + data |= ((clk_id << PLLCLK_IN_SHIFT) | (clk_id << CLKDIV_IN_SHIFT));
> + snd_soc_write(codec, AIC3X_CLKGEN_CTRL_REG, data);
This looks like an unrelated change which is specific to your board.
You should add an interface for configuring this functionality .
> if (ret != 0) {
> - dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
> + dev_err(codec->dev, "failed to set cache I/O: %d\n", ret);
Why are you decapitalising th estart of the sentance here?
> +static struct spi_driver aic3x_spi_driver = {
> + .driver = {
> + .name = "tlv320aic3x-codec",
> + .owner = THIS_MODULE,
Remove the -codec from the driver name.
> +/* special functions for codecs with 7 bit register address and LSB read/write (like TLV320AIC3X) */
> +static unsigned int snd_soc_7_8_read(struct snd_soc_codec *codec,
> + unsigned int reg)
> +{
> + int ret;
> + unsigned int val;
This won't apply against the current kernel and should be a separate
patch, it's a generic thing rather than part of the CODEC driver.
next prev parent reply other threads:[~2011-04-02 8:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1300949648-15078-1-git-send-email-horms@verge.net.au>
[not found] ` <1300949648-15078-2-git-send-email-horms@verge.net.au>
2011-03-24 9:10 ` [PATCH] mmc, AT91: fix init fequency problem Prchal Jiří
2011-03-24 10:20 ` [PATCH 1/2] ALSA: ASoc: TLV320AIC3X: ad SPI and clock on GPIO2 or BCLK Prchal Jiří
2011-04-02 8:26 ` Mark Brown [this message]
2011-04-04 7:49 ` [alsa-devel] " Prchal Jiří
2011-04-04 8:03 ` Mark Brown
2011-04-04 8:01 ` [PATCH] ALSA: ASoc: new functions snd_soc_7_8_* Prchal Jiří
2011-04-04 8:05 ` Mark Brown
2011-03-24 10:43 ` [PATCH 2/2] ALSA: ASoc: putting together AT91SAM9260 and TLV320AIC3X Prchal Jiří
2011-03-24 20:07 ` Ryan Mallon
2011-04-04 8:57 ` Prchal Jiří
2011-04-04 20:07 ` Ryan Mallon
2011-04-04 9:10 ` [PATCH] ARCH arm: adding new board: CDU Prchal Jiří
2011-04-04 9:16 ` Russell King - ARM Linux
2011-04-04 9:24 ` Russell King - ARM Linux
2011-04-04 20:25 ` Ryan Mallon
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=20110402082604.GE21737@sirena.org.uk \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=alsa-devel@vger.kernel.org \
--cc=jiri.prchal@aksignal.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=vbarinov@embeddedalley.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®