* [PATCH] ASoC: Intel: avs: Remove component->set_jack() on suspend/resume
@ 2024-11-28 12:27 Marek Maslanka
2024-11-28 12:55 ` Cezary Rojewski
0 siblings, 1 reply; 5+ messages in thread
From: Marek Maslanka @ 2024-11-28 12:27 UTC (permalink / raw)
To: LKML
Cc: Marek Maslanka, Cezary Rojewski, Liam Girdwood, Peter Ujfalusi,
Bard Liao, Ranjani Sridharan, Kai Vehmanen, Pierre-Louis Bossart,
Mark Brown, Jaroslav Kysela, Takashi Iwai,
Amadeusz Sławiński, alsa-devel, linux-sound
Removed calls to component->set_jack() during suspend/resume to fix an issue where an inserted jack
is not detected after resuming from suspend if the jack was inserted before suspend. This problem is
caused by calls to the sound/soc/codecs/da7219-aad.c:da7219_aad_jack_det() function during resume,
which forces the jack insertion state to be unplugged.
Signed-off-by: Marek Maslanka <mmaslanka@google.com>
---
sound/soc/intel/avs/boards/da7219.c | 17 -----------------
1 file changed, 17 deletions(-)
diff --git a/sound/soc/intel/avs/boards/da7219.c b/sound/soc/intel/avs/boards/da7219.c
index 80c0a1a956542..daf53ca490a14 100644
--- a/sound/soc/intel/avs/boards/da7219.c
+++ b/sound/soc/intel/avs/boards/da7219.c
@@ -211,21 +211,6 @@ static int avs_create_dai_link(struct device *dev, const char *platform_name, in
return 0;
}
-static int avs_card_suspend_pre(struct snd_soc_card *card)
-{
- struct snd_soc_dai *codec_dai = snd_soc_card_get_codec_dai(card, DA7219_DAI_NAME);
-
- return snd_soc_component_set_jack(codec_dai->component, NULL, NULL);
-}
-
-static int avs_card_resume_post(struct snd_soc_card *card)
-{
- struct snd_soc_dai *codec_dai = snd_soc_card_get_codec_dai(card, DA7219_DAI_NAME);
- struct snd_soc_jack *jack = snd_soc_card_get_drvdata(card);
-
- return snd_soc_component_set_jack(codec_dai->component, jack, NULL);
-}
-
static int avs_da7219_probe(struct platform_device *pdev)
{
struct snd_soc_dai_link *dai_link;
@@ -257,8 +242,6 @@ static int avs_da7219_probe(struct platform_device *pdev)
card->name = "avs_da7219";
card->dev = dev;
card->owner = THIS_MODULE;
- card->suspend_pre = avs_card_suspend_pre;
- card->resume_post = avs_card_resume_post;
card->dai_link = dai_link;
card->num_links = 1;
card->controls = card_controls;
--
2.47.0.338.g60cca15819-goog
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] ASoC: Intel: avs: Remove component->set_jack() on suspend/resume
2024-11-28 12:27 [PATCH] ASoC: Intel: avs: Remove component->set_jack() on suspend/resume Marek Maslanka
@ 2024-11-28 12:55 ` Cezary Rojewski
2024-11-28 15:12 ` [PATCH v2] ASoC: Intel: avs: da7219: Remove suspend_pre() and resume_post() Marek Maslanka
0 siblings, 1 reply; 5+ messages in thread
From: Cezary Rojewski @ 2024-11-28 12:55 UTC (permalink / raw)
To: Marek Maslanka, LKML
Cc: Liam Girdwood, Peter Ujfalusi, Bard Liao, Ranjani Sridharan,
Kai Vehmanen, Pierre-Louis Bossart, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Amadeusz Sławiński, alsa-devel,
linux-sound
On 2024-11-28 1:27 PM, Marek Maslanka wrote:
> Removed calls to component->set_jack() during suspend/resume to fix an issue where an inserted jack
> is not detected after resuming from suspend if the jack was inserted before suspend. This problem is
> caused by calls to the sound/soc/codecs/da7219-aad.c:da7219_aad_jack_det() function during resume,
> which forces the jack insertion state to be unplugged.
The code looks good, let's work on title and message a bit. Note, I'd
suggest the message to meet 72chars-per-line so it's cohesive with the
rest of the avs-driver log.
Title, I'd suggest:
ASoC: Intel: avs: da7219: Remove suspend_pre() and resume_post()
Message, please note that any [PATCH] is only a suggestion, "Removed"
implies something has already been done. That is certainly not the case
until the subsystem maintainer, here, Mark, merges the change.
What I'd so is: shortly state the problem, remove "what", leave "why".
The rest is answered by title while the code tells the rest of the story.
Kind regards,
Czarek
> Signed-off-by: Marek Maslanka <mmaslanka@google.com>
>
> ---
> sound/soc/intel/avs/boards/da7219.c | 17 -----------------
> 1 file changed, 17 deletions(-)
>
> diff --git a/sound/soc/intel/avs/boards/da7219.c b/sound/soc/intel/avs/boards/da7219.c
> index 80c0a1a956542..daf53ca490a14 100644
> --- a/sound/soc/intel/avs/boards/da7219.c
> +++ b/sound/soc/intel/avs/boards/da7219.c
> @@ -211,21 +211,6 @@ static int avs_create_dai_link(struct device *dev, const char *platform_name, in
> return 0;
> }
>
> -static int avs_card_suspend_pre(struct snd_soc_card *card)
> -{
> - struct snd_soc_dai *codec_dai = snd_soc_card_get_codec_dai(card, DA7219_DAI_NAME);
> -
> - return snd_soc_component_set_jack(codec_dai->component, NULL, NULL);
> -}
> -
> -static int avs_card_resume_post(struct snd_soc_card *card)
> -{
> - struct snd_soc_dai *codec_dai = snd_soc_card_get_codec_dai(card, DA7219_DAI_NAME);
> - struct snd_soc_jack *jack = snd_soc_card_get_drvdata(card);
> -
> - return snd_soc_component_set_jack(codec_dai->component, jack, NULL);
> -}
> -
> static int avs_da7219_probe(struct platform_device *pdev)
> {
> struct snd_soc_dai_link *dai_link;
> @@ -257,8 +242,6 @@ static int avs_da7219_probe(struct platform_device *pdev)
> card->name = "avs_da7219";
> card->dev = dev;
> card->owner = THIS_MODULE;
> - card->suspend_pre = avs_card_suspend_pre;
> - card->resume_post = avs_card_resume_post;
> card->dai_link = dai_link;
> card->num_links = 1;
> card->controls = card_controls;
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH v2] ASoC: Intel: avs: da7219: Remove suspend_pre() and resume_post()
2024-11-28 12:55 ` Cezary Rojewski
@ 2024-11-28 15:12 ` Marek Maslanka
2024-11-28 15:31 ` Mark Brown
2024-12-02 13:30 ` Mark Brown
0 siblings, 2 replies; 5+ messages in thread
From: Marek Maslanka @ 2024-11-28 15:12 UTC (permalink / raw)
To: LKML
Cc: Marek Maslanka, Cezary Rojewski, Liam Girdwood, Peter Ujfalusi,
Bard Liao, Ranjani Sridharan, Kai Vehmanen, Pierre-Louis Bossart,
Mark Brown, Jaroslav Kysela, Takashi Iwai,
Amadeusz Sławiński, alsa-devel, linux-sound
The presence of a plugged jack is not detected after resuming the device if the jack was plugged
before the device was suspended. This problem is caused by calling the
sound/soc/codecs/da7219-aad.c:da7219_aad_jack_det() function on resume, which forces the jack
insertion state to be unplugged.
Signed-off-by: Marek Maslanka <mmaslanka@google.com>
---
Changes in v2:
- Rephrase commit title and message as suggested in v1
- Link to v1: https://lore.kernel.org/all/20241128122732.1205732-1-mmaslanka@google.com/
---
sound/soc/intel/avs/boards/da7219.c | 17 -----------------
1 file changed, 17 deletions(-)
diff --git a/sound/soc/intel/avs/boards/da7219.c b/sound/soc/intel/avs/boards/da7219.c
index 80c0a1a956542..daf53ca490a14 100644
--- a/sound/soc/intel/avs/boards/da7219.c
+++ b/sound/soc/intel/avs/boards/da7219.c
@@ -211,21 +211,6 @@ static int avs_create_dai_link(struct device *dev, const char *platform_name, in
return 0;
}
-static int avs_card_suspend_pre(struct snd_soc_card *card)
-{
- struct snd_soc_dai *codec_dai = snd_soc_card_get_codec_dai(card, DA7219_DAI_NAME);
-
- return snd_soc_component_set_jack(codec_dai->component, NULL, NULL);
-}
-
-static int avs_card_resume_post(struct snd_soc_card *card)
-{
- struct snd_soc_dai *codec_dai = snd_soc_card_get_codec_dai(card, DA7219_DAI_NAME);
- struct snd_soc_jack *jack = snd_soc_card_get_drvdata(card);
-
- return snd_soc_component_set_jack(codec_dai->component, jack, NULL);
-}
-
static int avs_da7219_probe(struct platform_device *pdev)
{
struct snd_soc_dai_link *dai_link;
@@ -257,8 +242,6 @@ static int avs_da7219_probe(struct platform_device *pdev)
card->name = "avs_da7219";
card->dev = dev;
card->owner = THIS_MODULE;
- card->suspend_pre = avs_card_suspend_pre;
- card->resume_post = avs_card_resume_post;
card->dai_link = dai_link;
card->num_links = 1;
card->controls = card_controls;
--
2.47.0.338.g60cca15819-goog
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH v2] ASoC: Intel: avs: da7219: Remove suspend_pre() and resume_post()
2024-11-28 15:12 ` [PATCH v2] ASoC: Intel: avs: da7219: Remove suspend_pre() and resume_post() Marek Maslanka
@ 2024-11-28 15:31 ` Mark Brown
2024-12-02 13:30 ` Mark Brown
1 sibling, 0 replies; 5+ messages in thread
From: Mark Brown @ 2024-11-28 15:31 UTC (permalink / raw)
To: Marek Maslanka
Cc: LKML, Cezary Rojewski, Liam Girdwood, Peter Ujfalusi, Bard Liao,
Ranjani Sridharan, Kai Vehmanen, Pierre-Louis Bossart,
Jaroslav Kysela, Takashi Iwai, Amadeusz Sławiński,
alsa-devel, linux-sound
[-- Attachment #1: Type: text/plain, Size: 655 bytes --]
On Thu, Nov 28, 2024 at 03:12:32PM +0000, Marek Maslanka wrote:
> The presence of a plugged jack is not detected after resuming the device if the jack was plugged
> before the device was suspended. This problem is caused by calling the
> sound/soc/codecs/da7219-aad.c:da7219_aad_jack_det() function on resume, which forces the jack
> insertion state to be unplugged.
Please don't send new patches in reply to old patches or serieses, this
makes it harder for both people and tools to understand what is going
on - it can bury things in mailboxes and make it difficult to keep track
of what current patches are, both for the new patches and the old ones.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] ASoC: Intel: avs: da7219: Remove suspend_pre() and resume_post()
2024-11-28 15:12 ` [PATCH v2] ASoC: Intel: avs: da7219: Remove suspend_pre() and resume_post() Marek Maslanka
2024-11-28 15:31 ` Mark Brown
@ 2024-12-02 13:30 ` Mark Brown
1 sibling, 0 replies; 5+ messages in thread
From: Mark Brown @ 2024-12-02 13:30 UTC (permalink / raw)
To: LKML, Marek Maslanka
Cc: Cezary Rojewski, Liam Girdwood, Peter Ujfalusi, Bard Liao,
Ranjani Sridharan, Kai Vehmanen, Pierre-Louis Bossart,
Jaroslav Kysela, Takashi Iwai, Amadeusz Sławiński,
alsa-devel, linux-sound
On Thu, 28 Nov 2024 15:12:32 +0000, Marek Maslanka wrote:
> The presence of a plugged jack is not detected after resuming the device if the jack was plugged
> before the device was suspended. This problem is caused by calling the
> sound/soc/codecs/da7219-aad.c:da7219_aad_jack_det() function on resume, which forces the jack
> insertion state to be unplugged.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: Intel: avs: da7219: Remove suspend_pre() and resume_post()
commit: 04c319e05d0b08cc789db7abccce0fcb13dbab16
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-12-02 13:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-28 12:27 [PATCH] ASoC: Intel: avs: Remove component->set_jack() on suspend/resume Marek Maslanka
2024-11-28 12:55 ` Cezary Rojewski
2024-11-28 15:12 ` [PATCH v2] ASoC: Intel: avs: da7219: Remove suspend_pre() and resume_post() Marek Maslanka
2024-11-28 15:31 ` Mark Brown
2024-12-02 13:30 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox