From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Tomoya MORINAGA <tomoya.rohm@gmail.com>
Cc: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>,
alsa-devel@alsa-project.org, Lars-Peter Clausen <lars@metafoo.de>,
Mike Frysinger <vapier@gentoo.org>,
qi.wang@intel.com, Takashi Iwai <tiwai@suse.de>,
linux-kernel@vger.kernel.org, yong.y.wang@intel.com,
kok.howg.ewe@intel.com, Daniel Mack <zonque@gmail.com>,
Liam Girdwood <lrg@ti.com>,
joel.clark@intel.com
Subject: Re: [PATCH 1/3 v5] sound/soc/codecs: add LAPIS Semiconductor ML26124
Date: Tue, 20 Dec 2011 10:40:47 +0000 [thread overview]
Message-ID: <20111220104047.GE2866@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1324349144-12784-1-git-send-email-tomoya.rohm@gmail.com>
On Tue, Dec 20, 2011 at 11:45:42AM +0900, Tomoya MORINAGA wrote:
> + switch (level) {
> + case SND_SOC_BIAS_ON:
> + /* VMID ON */
> + snd_soc_update_bits(codec, ML26124_PW_REF_PW_MNG,
> + ML26124_VMID, ML26124_VMID);
> + msleep(500);
> + case SND_SOC_BIAS_PREPARE:
You're missing a break here.
> +static int ml26124_pcm_trigger(struct snd_pcm_substream *substream,
> + int cmd, struct snd_soc_dai *codec_dai)
> +{
> + struct snd_soc_codec *codec = codec_dai->codec;
> +
> + if (cmd == SNDRV_PCM_TRIGGER_STOP) {
> + snd_soc_update_bits(codec, ML26124_REC_PLYBAK_RUN, 0x3, 0);
> + return 0;
> + } else if (cmd == SNDRV_PCM_TRIGGER_START) {
> + if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
Use switch statements, though frankly I'd be astonished if this code
actually runs as the trigger() callback is called in atomic context and
the register I/O functionality needs interrupts. How have you tested
this code?
> + .reg_cache_size = ML26134_CACHESIZE,
> + .reg_word_size = sizeof(u8),
> + .reg_cache_default = ml26124_reg,
New drivers really should use regmap rather than the ASoC cache code.
next prev parent reply other threads:[~2011-12-20 10:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-20 2:45 [PATCH 1/3 v5] sound/soc/codecs: add LAPIS Semiconductor ML26124 Tomoya MORINAGA
2011-12-20 2:45 ` [PATCH 2/3 v4] sound/soc/lapis: add machine driver for ML7213 Carrier Board Tomoya MORINAGA
2011-12-20 10:45 ` Mark Brown
2011-12-20 2:45 ` [PATCH 3/3 v2] sound/soc/lapis: add platform driver for ML7213 IOH I2S Tomoya MORINAGA
2011-12-20 13:23 ` Mark Brown
2011-12-21 11:22 ` Tomoya MORINAGA
2011-12-22 0:58 ` Mark Brown
2011-12-22 8:10 ` Tomoya MORINAGA
2011-12-22 10:39 ` Mark Brown
2011-12-26 6:33 ` Tomoya MORINAGA
2011-12-26 12:12 ` Mark Brown
2011-12-27 1:25 ` Tomoya MORINAGA
2011-12-27 17:33 ` Mark Brown
2011-12-20 10:40 ` Mark Brown [this message]
2011-12-22 8:31 ` [PATCH 1/3 v5] sound/soc/codecs: add LAPIS Semiconductor ML26124 Tomoya MORINAGA
2011-12-22 10:50 ` Mark Brown
2011-12-20 10:42 ` 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=20111220104047.GE2866@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=dp@opensource.wolfsonmicro.com \
--cc=joel.clark@intel.com \
--cc=kok.howg.ewe@intel.com \
--cc=lars@metafoo.de \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.com \
--cc=qi.wang@intel.com \
--cc=tiwai@suse.de \
--cc=tomoya.rohm@gmail.com \
--cc=vapier@gentoo.org \
--cc=yong.y.wang@intel.com \
--cc=zonque@gmail.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;
as well as URLs for NNTP newsgroup(s).