From: Mark Brown <broonie@kernel.org>
To: RongJun Ying <rjying@gmail.com>
Cc: alsa-devel@alsa-project.org, Takashi Iwai <tiwai@suse.de>,
Liam Girdwood <lgirdwood@gmail.com>,
workgroup.linux@csr.com, Rongjun Ying <rongjun.ying@csr.com>
Subject: Re: [PATCH 1/2] ASoC: sirf: Add sirf audio hub driver for sharing same register address space
Date: Wed, 19 Mar 2014 18:25:34 +0000 [thread overview]
Message-ID: <20140319182534.GT11706@sirena.org.uk> (raw)
In-Reply-To: <1394707111-9539-2-git-send-email-rongjun.ying@csr.com>
[-- Attachment #1.1: Type: text/plain, Size: 1717 bytes --]
On Thu, Mar 13, 2014 at 06:38:30PM +0800, RongJun Ying wrote:
> @@ -283,9 +jc83,10 @@ static int sirf_audio_codec_trigger(struct snd_pcm_substream *substream,
> int cmd,
> struct snd_soc_dai *dai)
> {
> - int playback = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;
> struct snd_soc_codec *codec = dai->codec;
> u32 val = 0;
> + if (substream->stream != SNDRV_PCM_STREAM_PLAYBACK)
> + return 0;
>
> /*
> * This is a workaround, When stop playback,
> @@ -299,15 +300,13 @@ static int sirf_audio_codec_trigger(struct snd_pcm_substream *substream,
> case SNDRV_PCM_TRIGGER_START:
> case SNDRV_PCM_TRIGGER_RESUME:
> case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
> - if (playback)
> - val = IC_HSLEN | IC_HSREN;
> + val = IC_HSLEN | IC_HSREN;
> break;
> default:
> return -EINVAL;
> }
>
> - if (playback)
> - snd_soc_update_bits(codec, AUDIO_IC_CODEC_CTRL0,
> + snd_soc_update_bits(codec, AUDIO_IC_CODEC_CTRL0,
> IC_HSLEN | IC_HSREN, val);
> return 0;
> }
All the changes in this file appear to be unrelated stylistic changes.
They're fine but you should do such things as separate commits, this
makes things harder to review.
> +/* This regmap is shared all child audio drivers */
> +struct regmap *regmap;
Why is this a global variable? I'd expect it to be in the driver data
for the device. This is also a global symbol so would at the very least
would need better namespacing.
> +
> +static const struct regmap_config sirf_audio_regmap_config =
> + .reg_bits =
> + .val_bits = 32,
> + .cache_type = REGCACHE_NONE,
None is the default.
Looking at this code I'm not clear how the function devices get
instantiated?
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2014-03-19 18:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-13 10:38 [PATCH 0/2] ASoC: sirf: Add sirf audio hub driver and use it RongJun Ying
2014-03-13 10:38 ` [PATCH 1/2] ASoC: sirf: Add sirf audio hub driver for sharing same register address space RongJun Ying
2014-03-19 18:25 ` Mark Brown [this message]
2014-03-13 10:38 ` [PATCH 2/2] Documentation: Describe the SiRF audio hub Device Tree bindings RongJun Ying
2014-03-19 18:55 ` 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=20140319182534.GT11706@sirena.org.uk \
--to=broonie@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=lgirdwood@gmail.com \
--cc=rjying@gmail.com \
--cc=rongjun.ying@csr.com \
--cc=tiwai@suse.de \
--cc=workgroup.linux@csr.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