mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mohan Kumar D <mkumard@nvidia.com>
To: Takashi Iwai <tiwai@suse.de>
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, 5 Apr 2022 11:35:03 +0530	[thread overview]
Message-ID: <a6964809-ad10-aca8-0776-011c9e6b318d@nvidia.com> (raw)
In-Reply-To: <s5hfsms843u.wl-tiwai@suse.de>


On 4/5/2022 11:27 AM, Takashi Iwai wrote:
> External email: Use caution opening links or attachments
>
>
> 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?
The reason is, the Jack poll thread implemented in hda_codec.c runs only 
when HDACODEC is in runtime resume state. But the problem trying resolve 
here is something opposite, bcaz when hdacodec is in runtime resume 
state unsol event would work but not during suspend state. So either 
need to make some changes on hda_codec.c specific to tegra or make it on 
tegra specific driver. So I went with second option.
>
>
> 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;
>

  reply	other threads:[~2022-04-05  6:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-05  3:26 Mohan Kumar
2022-04-05  5:57 ` Takashi Iwai
2022-04-05  6:05   ` Mohan Kumar D [this message]
2022-04-05  6:33     ` Takashi Iwai
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=a6964809-ad10-aca8-0776-011c9e6b318d@nvidia.com \
    --to=mkumard@nvidia.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=spujar@nvidia.com \
    --cc=thierry.reding@gmail.com \
    --cc=tiwai@suse.com \
    --cc=tiwai@suse.de \
    /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

all inboxes | Powered by JetHome®