From: Mark Brown <broonie@kernel.org>
To: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org, vinod.koul@intel.com,
patches@opensource.wolfsonmicro.com, lgirdwood@gmail.com,
tiwai@suse.de
Subject: Re: [PATCH 1/1] ALSA: compress_core: Ensure device is stopped when stream closed
Date: Fri, 26 Apr 2013 16:38:48 +0100 [thread overview]
Message-ID: <20130426153848.GA5019@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20130426135627.GB27501@opensource.wolfsonmicro.com>
[-- Attachment #1.1: Type: text/plain, Size: 958 bytes --]
On Fri, Apr 26, 2013 at 02:56:27PM +0100, Richard Fitzgerald wrote:
> >> + if ((data->stream.runtime->state == SNDRV_PCM_STATE_RUNNING) ||
> >> + (data->stream.runtime->state == SNDRV_PCM_STATE_PAUSED))
> >> + data->stream.ops->trigger(&data->stream, SNDRV_PCM_TRIGGER_STOP);
> >> +
> >A switch statement would be more idiomatic for this sort of thing.
> >
> This follows the general style used in other functions in the
> source file. I'm happy to upload a version that uses a switch
> instead if that's preferred.
Well, it doesn't quite follow the same style as the code generally does:
if (stream->runtime->state == SNDRV_PCM_STATE_PAUSED ||
stream->runtime->state == SNDRV_PCM_STATE_OPEN) {
with fewer () and different indentation to what you have above... being
consistent with the rest of the file is best, though it would be nice to
update the file to do this sort of thing with switches.
[-- 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:[~2013-04-26 15:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-26 13:47 [PATCH 1/1] ALSA: compress_core: Ensure device is stopped when stream closed Richard Fitzgerald
2013-04-26 13:48 ` Mark Brown
2013-04-26 13:56 ` Richard Fitzgerald
2013-04-26 15:38 ` Mark Brown [this message]
2013-04-26 16:42 ` Vinod Koul
2013-04-29 9:36 ` Richard Fitzgerald
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=20130426153848.GA5019@opensource.wolfsonmicro.com \
--to=broonie@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=lgirdwood@gmail.com \
--cc=patches@opensource.wolfsonmicro.com \
--cc=rf@opensource.wolfsonmicro.com \
--cc=tiwai@suse.de \
--cc=vinod.koul@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.