[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <s5hfsms843u.wl-tiwai@suse.de>
Date: Tue, 05 Apr 2022 07:57:09 +0200
From: Takashi Iwai <tiwai@...e.de>
To: Mohan Kumar <mkumard@...dia.com>
Cc: <tiwai@...e.com>, <perex@...ex.cz>, <thierry.reding@...il.com>,
<jonathanh@...dia.com>, <spujar@...dia.com>,
<alsa-devel@...a-project.org>, <linux-tegra@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ALSA: hda/tegra: Fix hda Jack detection
On Tue, 05 Apr 2022 05:26:07 +0200,
Mohan Kumar wrote:
>
> Tegra HDA Jack detection logic doesn't work when the HDACODEC
> in runtime suspended state as unsol event won't be triggered
> during D3 state. As pulseaudio server in userspace rely on the
> jack mixer control status to show the audio devices in gui and
> any display sink device hotplug event during D3 state will never
> updates the jack status which will result in no audio device option
> available in userspace settings.
>
> The possible option available to resolve this issue for multiple
> tegra platforms is to use Jack polling method for every 5 seconds.
> Also to make Jack detection work seamlessly the Jack worker thread
> needs to run continuously after HDA sound card registered
> irrespective of whether HDMI sink device connected or not, but the
> Jack state update call happens only when Codec is not powered on.
>
> Signed-off-by: Mohan Kumar <mkumard@...dia.com>
Hmm, any reason not to use the standard jackpoll stuff that is already
implemented in HD-audio controller side? That is, doesn't the
following oneliner work instead?
thanks,
Takashi
-- 8< --
--- a/sound/pci/hda/hda_tegra.c
+++ b/sound/pci/hda/hda_tegra.c
@@ -421,6 +421,7 @@ static int hda_tegra_create(struct snd_card *card,
chip->driver_type = driver_caps & 0xff;
chip->dev_index = 0;
INIT_LIST_HEAD(&chip->pcm_list);
+ chip->jackpoll_interval = msecs_to_jiffies(5000);
chip->codec_probe_mask = -1;
Powered by blists - more mailing lists