alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Kai Chieh Chuang <kaichieh.chuang@mediatek.com>
To: alsa-devel@alsa-project.org, broonie@kernel.org
Cc: lgirdwood@gmail.com, chipeng.chang@mediatek.com,
	kaichieh.chuang@mediatek.com
Subject: Re: DPCM: skip DAPM_STREAM_STOP event to BE, if still used by other FE
Date: Sun, 5 Jun 2016 14:58:59 +0800	[thread overview]
Message-ID: <1465109939.29781.2.camel@mtkswgap22> (raw)

> If this isn't happening that seems like a bug, I'm a bit surprised
> nobody else ran into it?  Shouldn't the counts of stream events that
> happen be symmetric (ie, we get as many stops as starts), or are we
> possibly missing some from things being switched in and out or
something?

This idea is same as the DPCM BE state control, in

int dpcm_be_dai_hw_free(..)
{
......
                /* do not free hw if this BE is used by other FE */
                if (be->dpcm[stream].users > 1)
                        continue;

and

int dpcm_be_dai_shutdown(...)
{
....
                if (--be->dpcm[stream].users != 0)
                        continue;

The BE receiving SND_SOC_DAPM_STREAM_STOP event, while still used by a
FE who is in STREAM_START state. The DAPM will just inactive BE related
widget/dai without checking. This just doesn't seems right.

And the last FE using the BE calls in to dpcm_fe_dai_shutdown(), will
run the process normally.


Actually, i trace the log, when one of the FE sent stop event to "still
in use BE", the BE power state will not be changed. Until the system
goes into
SNDRV_CTL_POWER_D3cold, the BE will be shutdown (i did set the
ignore_suspend=1). I didn't check why the BE is not turned off at the
point when receiving the stop event.

I'm also curious why no one seems to have the same issue. Probably there
is not much DPCM architecture system yet on the Linux?

             reply	other threads:[~2016-06-05  6:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-05  6:58 Kai Chieh Chuang [this message]
     [not found] ` <1466749294.16718.1.camel@mtkswgap22>
2016-06-29 19:04   ` DPCM: skip DAPM_STREAM_STOP event to BE, if still used by other FE Mark Brown
2016-06-29 19:08 ` Mark Brown
     [not found]   ` <1467599214.21156.2.camel@mtkswgap22>
2016-07-04  9:11     ` Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2016-05-31  5:45 Kai Chieh Chuang
2016-06-03  0:18 ` Mark Brown
2016-05-24  5:13 Chuang Eric
2016-05-24  5:06 srv_kaichieh.chaung

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=1465109939.29781.2.camel@mtkswgap22 \
    --to=kaichieh.chuang@mediatek.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=chipeng.chang@mediatek.com \
    --cc=lgirdwood@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).