From: Mark Brown <broonie@opensource•wolfsonmicro.com>
To: Grant Likely <grant.likely@secretlab•ca>
Cc: liam.girdwood@wolfsonmicro•com, alsa-devel@alsa-project•org,
timur@freescale•com, linuxppc-dev@ozlabs•org
Subject: Re: [alsa-devel] [PATCH 3/3] ALSA SoC: Add Texas Instruments TLV320AIC26 codec driver
Date: Fri, 4 Jul 2008 21:49:27 +0100 [thread overview]
Message-ID: <20080704204927.GC20719@sirena.org.uk> (raw)
In-Reply-To: <20080701235340.16923.48024.stgit@trillian.secretlab.ca>
On Tue, Jul 01, 2008 at 05:53:40PM -0600, Grant Likely wrote:
> +static ssize_t aic26_keyclick_show(struct device *dev,
> + struct device_attribute *attr, char *buf)
> +{
> + struct aic26 *aic26 = dev_get_drvdata(dev);
> + int val, amp, freq, len;
> +
> + val = aic26_reg_read_cache(&aic26->codec, AIC26_REG_AUDIO_CTRL2);
> + amp = (val >> 12) & 0x7;
> + freq = (125 << ((val >> 8) & 0x7)) >> 1;
> + len = 2 * (1 +((val >> 8) & 0xf));
> +
> + return sprintf(buf, "amp=%x freq=%iHz len=%iclks\n", amp, freq, len);
> +}
It might be nice if these parameters were exposed as controls if they
can be configured, though obviously that's not essential.
> + /* Tell the of_soc helper about this codec */
> + of_snd_soc_register_codec(&aic26_soc_codec_dev, aic26, &aic26_dai,
> + spi->dev.archdata.of_node);
Does this need to be ifdefed out if of_snd_soc_register_codec() is not
in use or is the function stubbed out if it's not in use? Stubbing it
out would be cleaner.
next prev parent reply other threads:[~2008-07-04 20:49 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-01 23:53 [PATCH 1/3] ALSA SoC: Add OpenFirmware helper for matching bus and codec drivers Grant Likely
2008-07-01 23:53 ` [PATCH 2/3] ALSA SoC: Add mpc5200-psc I2S driver Grant Likely
2008-07-02 10:34 ` [alsa-devel] " Liam Girdwood
2008-07-02 13:51 ` Jon Smirl
2008-07-03 16:28 ` Grant Likely
2008-07-04 11:03 ` Timur Tabi
2008-07-04 14:41 ` Grant Likely
2008-07-05 1:28 ` David Gibson
2008-07-02 15:19 ` Jon Smirl
2008-07-03 16:30 ` Grant Likely
2008-07-06 17:56 ` Jon Smirl
2008-07-07 10:59 ` Mark Brown
2008-07-07 13:23 ` Jon Smirl
2008-07-12 6:26 ` Grant Likely
2008-07-07 16:32 ` Jon Smirl
2008-07-12 6:30 ` Grant Likely
2008-07-09 8:22 ` new to sound world
2008-07-01 23:53 ` [PATCH 3/3] ALSA SoC: Add Texas Instruments TLV320AIC26 codec driver Grant Likely
2008-07-02 10:48 ` [alsa-devel] " Liam Girdwood
2008-07-12 6:00 ` Grant Likely
2008-07-12 17:36 ` Mark Brown
2008-07-12 18:13 ` Grant Likely
2008-07-17 23:31 ` Grant Likely
2008-07-18 9:58 ` Mark Brown
2008-07-18 16:14 ` Grant Likely
2008-07-02 13:52 ` Jon Smirl
2008-07-02 16:08 ` Liam Girdwood
2008-07-04 20:49 ` Mark Brown [this message]
2008-07-04 23:44 ` Grant Likely
2008-07-02 9:50 ` [alsa-devel] [PATCH 1/3] ALSA SoC: Add OpenFirmware helper for matching bus and codec drivers Takashi Iwai
2008-07-02 15:48 ` Grant Likely
2008-07-02 15:57 ` Liam Girdwood
2008-07-02 13:50 ` Jon Smirl
2008-07-02 15:27 ` Jon Smirl
2008-07-03 16:33 ` Grant Likely
2008-07-04 11:05 ` Timur Tabi
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=20080704204927.GC20719@sirena.org.uk \
--to=broonie@opensource$(echo .)wolfsonmicro.com \
--cc=alsa-devel@alsa-project$(echo .)org \
--cc=grant.likely@secretlab$(echo .)ca \
--cc=liam.girdwood@wolfsonmicro$(echo .)com \
--cc=linuxppc-dev@ozlabs$(echo .)org \
--cc=timur@freescale$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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