From: Takashi Iwai <tiwai@suse.de>
To: Mohan Kumar <mkumard@nvidia.com>
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
spujar@nvidia.com, tiwai@suse.com, jonathanh@nvidia.com,
thierry.reding@gmail.com, linux-tegra@vger.kernel.org
Subject: Re: [PATCH] ALSA: hda/tegra: Fix hda Jack detection
Date: Tue, 05 Apr 2022 07:57:09 +0200 [thread overview]
Message-ID: <s5hfsms843u.wl-tiwai@suse.de> (raw)
In-Reply-To: <20220405032607.8489-1-mkumard@nvidia.com>
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@nvidia.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;
WARNING: multiple messages have this Message-ID (diff)
From: Takashi Iwai <tiwai@suse.de>
To: Mohan Kumar <mkumard@nvidia.com>
Cc: <tiwai@suse.com>, <perex@perex.cz>, <thierry.reding@gmail.com>,
<jonathanh@nvidia.com>, <spujar@nvidia.com>,
<alsa-devel@alsa-project.org>, <linux-tegra@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ALSA: hda/tegra: Fix hda Jack detection
Date: Tue, 05 Apr 2022 07:57:09 +0200 [thread overview]
Message-ID: <s5hfsms843u.wl-tiwai@suse.de> (raw)
In-Reply-To: <20220405032607.8489-1-mkumard@nvidia.com>
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@nvidia.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;
next prev parent reply other threads:[~2022-04-05 5:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-05 3:26 [PATCH] ALSA: hda/tegra: Fix hda Jack detection Mohan Kumar
2022-04-05 3:26 ` Mohan Kumar
2022-04-05 5:57 ` Takashi Iwai [this message]
2022-04-05 5:57 ` Takashi Iwai
2022-04-05 6:05 ` Mohan Kumar D
2022-04-05 6:05 ` Mohan Kumar D
2022-04-05 6:33 ` Takashi Iwai
2022-04-05 6:33 ` Takashi Iwai
2022-04-06 4:44 ` Mohan Kumar D
2022-04-06 4:44 ` Mohan Kumar D
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=s5hfsms843u.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mkumard@nvidia.com \
--cc=spujar@nvidia.com \
--cc=thierry.reding@gmail.com \
--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 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.