From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: "N, Harshapriya" <harshapriya.n@intel.com>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"broonie@kernel.org" <broonie@kernel.org>
Cc: "Lu, Brent" <brent.lu@intel.com>,
"Gopal, Vamshi Krishna" <vamshi.krishna.gopal@intel.com>
Subject: Re: [PATCH v2] ASoC: Intel: boards: eve: Fix DMIC records zero
Date: Thu, 30 Jul 2020 15:10:45 -0500 [thread overview]
Message-ID: <4773a165-ac6d-36a0-2105-169e2d79a327@linux.intel.com> (raw)
In-Reply-To: <BY5PR11MB43079D50776444A1C0FBAD57FD710@BY5PR11MB4307.namprd11.prod.outlook.com>
>>>>> case SND_SOC_DAPM_POST_PMD:
>>>>> - clk_disable_unprepare(priv->mclk);
>>>>> - clk_disable_unprepare(priv->sclk);
>>>>> + if (__clk_is_enabled(priv->mclk))
>>>>> + clk_disable_unprepare(priv->mclk);
>>>>> +
>>>>
>>>> [1] this seems wrong in case you have two SSPs working, and stop one.
>>>> This would turn off the mclk while one of the two SSPs is still working.
>>> For this platform we use either headset or dmic.
>>> There is no way we can record simultaneously using different devices.
>>> So disabling mclk might not be harmful here. But this case will always be true
>> too :).
>>
>> Maybe CRAS prevents you from recording on two inputs, but it looks like you
>> have independent front-ends so in theory couldn't you record at the alsa hw:
>> device level? Is this really mutually exclusive at the hardware level?
> True. Its not mutually exclusive at hardware level. the following might be safe
> if (!__clk_is_enabled(priv->sclk0)) && (!__clk_is_enabled(priv->sclk1))
> clk_disable_unprepare(priv->mclk);
I don't understand DAPM well-enough to know if these independent
platform clock control routines are serialized by design or if this
could be racy?
next prev parent reply other threads:[~2020-07-30 20:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-30 17:26 [PATCH v2] ASoC: Intel: boards: eve: Fix DMIC records zero Harsha Priya
2020-07-30 17:36 ` Pierre-Louis Bossart
2020-07-30 18:27 ` N, Harshapriya
2020-07-30 18:38 ` Pierre-Louis Bossart
2020-07-30 19:43 ` N, Harshapriya
2020-07-30 20:10 ` Pierre-Louis Bossart [this message]
2020-07-30 18:40 ` Lu, Brent
2020-07-30 19:45 ` N, Harshapriya
2020-08-13 17:01 ` N, Harshapriya
2020-07-30 20:16 ` kernel test robot
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=4773a165-ac6d-36a0-2105-169e2d79a327@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=brent.lu@intel.com \
--cc=broonie@kernel.org \
--cc=harshapriya.n@intel.com \
--cc=vamshi.krishna.gopal@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 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).