All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marian Postevca <posteuca@mutex.one>
To: Mark Brown <broonie@kernel.org>
Cc: 沈一超 <zhuning0077@gmail.com>,
	yangxiaohua <yangxiaohua@everest-semi.com>,
	"Zhu Ning" <zhuning@everest-semi.com>,
	"Takashi Iwai" <tiwai@suse.com>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Jaroslav Kysela" <perex@perex.cz>,
	linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org
Subject: Re: [PATCH 3/4] ASoC: amd: acp: Add machine driver that enables sound for systems with a ES8336 codec
Date: Fri, 18 Aug 2023 00:09:19 +0300	[thread overview]
Message-ID: <87zg2pxtog.fsf@mutex.one> (raw)
In-Reply-To: <ZCRCqJ7oG6oefo9g@sirena.org.uk>


Sorry for taking so long to look into this.
I think I understand why sound doesn't work if suspending with
headphones inserted.
When the jack is inserted, function
es8316_enable_micbias_for_mic_gnd_short_detect() is called and 3 pins
are enabled: Bias, Analog power, Mic Bias.

Since these 3 are supplies, the loop for_each_card_widgets() in
dapm_power_widgets() will always force the target_bias_level to be
SND_SOC_BIAS_STANDBY. So the codec component will never enter
SND_SOC_BIAS_OFF bias level.

When a suspend happens (with the headphones inserted) in
snd_soc_suspend(), in the for_each_rtd_components() loop, since the
bias level is SND_SOC_BIAS_STANDBY and dapm->idle_bias_off is true the
codec's suspend/resume functions are not called. Because of this the
codec stops running correctly.

Now I'm not sure what a proper fix would be. Enabling idle_bias_on in
struct snd_soc_component_driver fixes this issue. Would enabling
this option have any unwanted side effects?

  reply	other threads:[~2023-08-17 21:10 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-20 20:35 [PATCH 0/4] ASoC: amd: acp: Add sound support for a line of HUAWEI laptops Marian Postevca
2023-03-20 20:35 ` [PATCH 1/4] ASoC: es8316: Enable support for S32 LE format and MCLK div by 2 Marian Postevca
2023-03-20 20:43   ` Mark Brown
2023-03-20 20:43     ` Mark Brown
2023-03-21 17:09     ` Marian Postevca
2023-03-21 17:09       ` Marian Postevca
2023-03-21 17:21       ` Mark Brown
2023-03-21 17:21         ` Mark Brown
2023-03-20 20:35 ` [PATCH 2/4] ASoC: amd: acp: Add support for splitting the codec specific code from the ACP driver Marian Postevca
2023-03-20 20:35 ` [PATCH 3/4] ASoC: amd: acp: Add machine driver that enables sound for systems with a ES8336 codec Marian Postevca
2023-03-20 20:54   ` Mark Brown
2023-03-20 20:54     ` Mark Brown
2023-03-21 22:17     ` Marian Postevca
2023-03-21 22:17       ` Marian Postevca
2023-03-22  1:58       ` Pierre-Louis Bossart
2023-03-22 13:07       ` Mark Brown
2023-03-22 13:07         ` Mark Brown
2023-03-22 20:48         ` Marian Postevca
2023-03-22 20:48           ` Marian Postevca
2023-03-22 21:27           ` Mark Brown
2023-03-22 21:27             ` Mark Brown
2023-03-27 21:20             ` Marian Postevca
2023-03-27 21:20               ` Marian Postevca
2023-03-29 13:52               ` Mark Brown
2023-03-29 13:52                 ` Mark Brown
2023-08-17 21:09                 ` Marian Postevca [this message]
2023-08-17 21:47                   ` Mark Brown
2023-08-17 22:20                     ` Marian Postevca
2023-08-18 12:52                       ` Mark Brown
2023-08-20  9:32                         ` Marian Postevca
2023-08-21 14:09                           ` Mark Brown
2023-03-21  0:54   ` kernel test robot
2023-03-20 20:35 ` [PATCH 4/4] ASoC: amd: acp: Improve support for speaker power events Marian Postevca
2023-03-20 21:01   ` Mark Brown
2023-03-20 21:01     ` Mark Brown
2023-03-22 21:01     ` Marian Postevca
2023-03-22 21:01       ` Marian Postevca
2023-03-22 21:35       ` Mark Brown
2023-03-22 21:35         ` Mark Brown
2023-03-23  1:56 [PATCH 3/4] ASoC: amd: acp: Add machine driver that enables sound for systems with a ES8336 codec 沈一超
2023-03-23  1:56 ` 沈一超
2023-03-23 13:54 ` Mark Brown
2023-03-23 13:54   ` Mark Brown
2023-03-24  1:54 Zhu Ning
2023-03-24  1:54 ` Zhu Ning
2023-03-29 14:01 ` Mark Brown
2023-03-29 14:01   ` Mark Brown
2023-08-18  7:58 Zhu Ning

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=87zg2pxtog.fsf@mutex.one \
    --to=posteuca@mutex.one \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=yangxiaohua@everest-semi.com \
    --cc=zhuning0077@gmail.com \
    --cc=zhuning@everest-semi.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.