From: Nicolin Chen <b42378@freescale.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, broonie@kernel.org, lgirdwood@gmail.com
Subject: Re: [PATCH] ASoC: soc-pcm: Use valid condition for snd_soc_dai_digital_mute() in hw_free()
Date: Mon, 2 Dec 2013 18:39:48 +0800 [thread overview]
Message-ID: <20131202103948.GA8609@MrMyself> (raw)
In-Reply-To: <s5hli038t5g.wl%tiwai@suse.de>
On Mon, Dec 02, 2013 at 11:05:31AM +0100, Takashi Iwai wrote:
> At Mon, 2 Dec 2013 17:34:34 +0800,
> Nicolin Chen wrote:
> >
> > The snd_soc_dai_digital_mute() here will be never executed because we only
> > decrease codec->active in snd_soc_close(). Thus correct it.
>
> A couple of minor problems by this approach:
>
> - snd_soc_dai_digital_mute() will be called twice in the normal PCM
> close path.
>
> - In full duplex mode where both playback/capture streams share the
> same codec, one of the directions won't be handled correctly because
> codec->active is incremented/decremented twice (once for each
> direction).
>
Thank you for the comments. I didn't look at the whole board.
Please Drop this patch.
Thank you.
Nicolin Chen
>
> Takashi
>
> >
> > Signed-off-by: Nicolin Chen <b42378@freescale.com>
> > ---
> > sound/soc/soc-pcm.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
> > index 22af038..7d19117 100644
> > --- a/sound/soc/soc-pcm.c
> > +++ b/sound/soc/soc-pcm.c
> > @@ -689,7 +689,7 @@ static int soc_pcm_hw_free(struct snd_pcm_substream *substream)
> > }
> >
> > /* apply codec digital mute */
> > - if (!codec->active)
> > + if (codec->active == 1)
> > snd_soc_dai_digital_mute(codec_dai, 1, substream->stream);
> >
> > /* free any machine hw params */
> > --
> > 1.8.4
> >
> >
>
next prev parent reply other threads:[~2013-12-02 10:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-02 9:34 [PATCH] ASoC: soc-pcm: Use valid condition for snd_soc_dai_digital_mute() in hw_free() Nicolin Chen
2013-12-02 10:05 ` Takashi Iwai
2013-12-02 10:39 ` Nicolin Chen [this message]
2013-12-02 12:19 ` Mark Brown
2013-12-02 15:25 ` Nicolin Chen
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=20131202103948.GA8609@MrMyself \
--to=b42378@freescale.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=tiwai@suse.de \
/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.