[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111220104047.GE2866@opensource.wolfsonmicro.com>
Date: Tue, 20 Dec 2011 10:40:47 +0000
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: Tomoya MORINAGA <tomoya.rohm@...il.com>
Cc: Liam Girdwood <lrg@...com>, Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.de>,
Lars-Peter Clausen <lars@...afoo.de>,
Dimitris Papastamos <dp@...nsource.wolfsonmicro.com>,
Mike Frysinger <vapier@...too.org>,
Daniel Mack <zonque@...il.com>, alsa-devel@...a-project.org,
linux-kernel@...r.kernel.org, qi.wang@...el.com,
yong.y.wang@...el.com, joel.clark@...el.com, kok.howg.ewe@...el.com
Subject: Re: [PATCH 1/3 v5] sound/soc/codecs: add LAPIS Semiconductor ML26124
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists