From: Cezary Rojewski <cezary.rojewski@intel.com>
To: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Cc: Fabio Estevam <festevam@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Igor Opaniuk <igor.opaniuk@toradex.com>,
Marcel Ziswiler <marcel.ziswiler@toradex.com>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>,
Jaroslav Kysela <perex@perex.cz>, Sasha Levin <sashal@kernel.org>,
Mark Brown <broonie@kernel.org>, Takashi Iwai <tiwai@suse.com>,
Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [PATCH v6 2/6] ASoC: sgtl5000: Improve VAG power and mute control
Date: Fri, 19 Jul 2019 13:19:31 +0200 [thread overview]
Message-ID: <a4bcf146-4e5a-09be-599e-0ba12113d128@intel.com> (raw)
In-Reply-To: <20190719100524.23300-3-oleksandr.suvorov@toradex.com>
On 2019-07-19 12:05, Oleksandr Suvorov wrote:
> VAG power control is improved to fit the manual [1]. This patch fixes as
> minimum one bug: if customer muxes Headphone to Line-In right after boot,
> the VAG power remains off that leads to poor sound quality from line-in.
>
> I.e. after boot:
> - Connect sound source to Line-In jack;
> - Connect headphone to HP jack;
> - Run following commands:
> $ amixer set 'Headphone' 80%
> $ amixer set 'Headphone Mux' LINE_IN
>
> Change VAG power on/off control according to the following algorithm:
> - turn VAG power ON on the 1st incoming event.
> - keep it ON if there is any active VAG consumer (ADC/DAC/HP/Line-In).
> - turn VAG power OFF when there is the latest consumer's pre-down event
> come.
> - always delay after VAG power OFF to avoid pop.
> - delay after VAG power ON if the initiative consumer is Line-In, this
> prevents pop during line-in muxing.
>
> According to the data sheet [1], to avoid any pops/clicks,
> the outputs should be muted during input/output
> routing changes.
>
> [1] https://www.nxp.com/docs/en/data-sheet/SGTL5000.pdf
>
> Cc: stable@vger.kernel.org
> Fixes: 9b34e6cc3bc2 ("ASoC: Add Freescale SGTL5000 codec support")
> Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
> Reviewed-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> Reviewed-by: Fabio Estevam <festevam@gmail.com>
>
> ---
>
> Changes in v6:
> - Code optimization
You went crazy with that description (u16 mute_mask[]) :)
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
next prev parent reply other threads:[~2019-07-19 11:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-19 10:05 [PATCH v6 0/6] VAG power control improvement for sgtl5000 codec Oleksandr Suvorov
2019-07-19 10:05 ` [PATCH v6 1/6] ASoC: Define a set of DAPM pre/post-up events Oleksandr Suvorov
2019-07-19 10:05 ` [PATCH v6 2/6] ASoC: sgtl5000: Improve VAG power and mute control Oleksandr Suvorov
2019-07-19 11:19 ` Cezary Rojewski [this message]
2019-07-19 10:05 ` [PATCH v6 3/6] ASoC: sgtl5000: Fix definition of VAG Ramp Control Oleksandr Suvorov
2019-07-19 10:05 ` [PATCH v6 4/6] ASoC: sgtl5000: add ADC mute control Oleksandr Suvorov
2019-07-19 10:05 ` [PATCH v6 5/6] ASoC: sgtl5000: Fix of unmute outputs on probe Oleksandr Suvorov
2019-07-19 10:05 ` [PATCH v6 6/6] ASoC: sgtl5000: Fix charge pump source assignment Oleksandr Suvorov
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=a4bcf146-4e5a-09be-599e-0ba12113d128@intel.com \
--to=cezary.rojewski@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=festevam@gmail.com \
--cc=igor.opaniuk@toradex.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel.ziswiler@toradex.com \
--cc=oleksandr.suvorov@toradex.com \
--cc=perex@perex.cz \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
--cc=tiwai@suse.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).