From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Hans de Goede <hdegoede@redhat.com>,
Liam Girdwood <liam.r.girdwood@linux.intel.com>,
Mark Brown <broonie@kernel.org>, Bard Liao <bardliao@realtek.com>,
Oder Chiou <oder_chiou@realtek.com>
Cc: alsa-devel@alsa-project.org, Carlo Caione <carlo@endlessm.com>
Subject: Re: [PATCH 4/5] ASoC: Intel: bytcr_rt5651: Disable jack-detect over suspend/resume
Date: Mon, 9 Jul 2018 17:57:37 -0500 [thread overview]
Message-ID: <c5ead62d-0d0c-d720-30fc-a1a7187227c4@linux.intel.com> (raw)
In-Reply-To: <20180704225935.7902-4-hdegoede@redhat.com>
On 07/04/2018 05:59 PM, Hans de Goede wrote:
> Disable jack-detection and thus the codec IRQ over suspend/resume.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> ---
> sound/soc/intel/boards/bytcr_rt5651.c | 49 ++++++++++++++++++++++++---
> 1 file changed, 44 insertions(+), 5 deletions(-)
>
> diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
> index 5301205496be..2a8f86dfe4cb 100644
> --- a/sound/soc/intel/boards/bytcr_rt5651.c
> +++ b/sound/soc/intel/boards/bytcr_rt5651.c
> @@ -676,6 +676,48 @@ static struct snd_soc_dai_link byt_rt5651_dais[] = {
> };
>
> /* SoC card */
> +static char byt_rt5651_codec_name[SND_ACPI_I2C_ID_LEN];
> +static char byt_rt5651_codec_aif_name[12]; /* = "rt5651-aif[1|2]" */
> +static char byt_rt5651_cpu_dai_name[10]; /* = "ssp[0|2]-port" */
> +static char byt_rt5651_long_name[40]; /* = "bytcr-rt5651-*-mic[-swapped-hp]" */
> +
> +static int byt_rt5651_suspend(struct snd_soc_card *card)
> +{
> + struct snd_soc_component *component;
> +
> + if (!BYT_RT5651_JDSRC(byt_rt5651_quirk))
> + return 0;
> +
> + list_for_each_entry(component, &card->component_dev_list, card_list) {
> + if (!strcmp(component->name, byt_rt5651_codec_name)) {
> + dev_dbg(component->dev, "disabling jack detect before suspend\n");
> + snd_soc_component_set_jack(component, NULL, NULL);
> + break;
> + }
> + }
> +
> + return 0;
> +}
> +
> +static int byt_rt5651_resume(struct snd_soc_card *card)
> +{
> + struct byt_rt5651_private *priv = snd_soc_card_get_drvdata(card);
> + struct snd_soc_component *component;
> +
> + if (!BYT_RT5651_JDSRC(byt_rt5651_quirk))
> + return 0;
> +
> + list_for_each_entry(component, &card->component_dev_list, card_list) {
> + if (!strcmp(component->name, byt_rt5651_codec_name)) {
> + dev_dbg(component->dev, "re-enabling jack detect after resume\n");
> + snd_soc_component_set_jack(component, &priv->jack, NULL);
> + break;
> + }
> + }
> +
> + return 0;
> +}
> +
> static struct snd_soc_card byt_rt5651_card = {
> .name = "bytcr-rt5651",
> .owner = THIS_MODULE,
> @@ -686,13 +728,10 @@ static struct snd_soc_card byt_rt5651_card = {
> .dapm_routes = byt_rt5651_audio_map,
> .num_dapm_routes = ARRAY_SIZE(byt_rt5651_audio_map),
> .fully_routed = true,
> + .suspend_pre = byt_rt5651_suspend,
> + .resume_post = byt_rt5651_resume,
> };
>
> -static char byt_rt5651_codec_name[SND_ACPI_I2C_ID_LEN];
> -static char byt_rt5651_codec_aif_name[12]; /* = "rt5651-aif[1|2]" */
> -static char byt_rt5651_cpu_dai_name[10]; /* = "ssp[0|2]-port" */
> -static char byt_rt5651_long_name[40]; /* = "bytcr-rt5651-*-mic[-swapped-hp]" */
> -
> static const struct x86_cpu_id baytrail_cpu_ids[] = {
> { X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_SILVERMONT1 }, /* Valleyview */
> {}
next prev parent reply other threads:[~2018-07-09 22:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-04 22:59 [PATCH 1/5] ASoC: rt5651: Fix workqueue cancel vs irq free race on remove Hans de Goede
2018-07-04 22:59 ` [PATCH 2/5] ASoC: rt5651: Allow disabling jack-detect by calling set_jack(NULL) Hans de Goede
2018-07-10 18:16 ` Applied "ASoC: rt5651: Allow disabling jack-detect by calling set_jack(NULL)" to the asoc tree Mark Brown
2018-07-04 22:59 ` [PATCH 3/5] ASoC: rt5651: Add button press support Hans de Goede
2018-07-10 18:16 ` Applied "ASoC: rt5651: Add button press support" to the asoc tree Mark Brown
2018-07-04 22:59 ` [PATCH 4/5] ASoC: Intel: bytcr_rt5651: Disable jack-detect over suspend/resume Hans de Goede
2018-07-09 22:57 ` Pierre-Louis Bossart [this message]
2018-07-10 18:16 ` Applied "ASoC: Intel: bytcr_rt5651: Disable jack-detect over suspend/resume" to the asoc tree Mark Brown
2018-07-04 22:59 ` [PATCH 5/5] ASoC: Intel: bytcr_rt5651: Reporting button presses Hans de Goede
2018-07-09 22:58 ` Pierre-Louis Bossart
2018-07-10 18:16 ` Applied "ASoC: Intel: bytcr_rt5651: Reporting button presses" to the asoc tree Mark Brown
2018-07-10 18:16 ` Applied "ASoC: rt5651: Fix workqueue cancel vs irq free race on remove" " Mark Brown
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=c5ead62d-0d0c-d720-30fc-a1a7187227c4@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=bardliao@realtek.com \
--cc=broonie@kernel.org \
--cc=carlo@endlessm.com \
--cc=hdegoede@redhat.com \
--cc=liam.r.girdwood@linux.intel.com \
--cc=oder_chiou@realtek.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).