All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai-l3A5Bk7waGM@public.gmane.org>
To: jimqu <jimqu-5C7GfCeVMHo@public.gmane.org>
Cc: "Qu, Jim" <Jim.Qu-5C7GfCeVMHo@public.gmane.org>,
	"alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org"
	<alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org>,
	"dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: y4T�TCH 4/4] drm/amdgpu: Add audio component support
Date: Wed, 25 Jul 2018 10:20:15 +0200	[thread overview]
Message-ID: <s5hr2jrwwu8.wl-tiwai@suse.de> (raw)
In-Reply-To: <16a47d85-4d09-2087-1959-fd9a039140c9-5C7GfCeVMHo@public.gmane.org>

On Wed, 25 Jul 2018 10:02:34 +0200,
jimqu wrote:
> 
> 
> 
> On 2018年07月25日 13:46, Takashi Iwai wrote:
> > On Wed, 25 Jul 2018 07:38:37 +0200,
> > Qu, Jim wrote:
> >> Jim: Just like Alex said, we want driver can get eld info when hotplug in new device. amdgpu driver is a bit difference from radeon driver, it is not a suitable place to call notify() function in *_audio_enable() , since they are not in the hotplug process context like them in radeon driver, but the mode setting.
> >>
> >> IMO, the right place to call notify() function is also in the amdgpu_connector_xxxx_detect() in amdgpu_connector.c.
> > Hm, but by the modesetting, it actually enables / disables the audio
> > as well, no?  If so, the notifier is exactly for that purpose.  The
> > audio driver needs to know not only about the physical connection but
> > whether the audio can be actually driven.
> >
> > That is, even if the monitor is connected, the audio won't come out if
> > the mode is off.  That is equivalent with the unplugged state for the
> > audio driver.
> >
> > The i915 driver deals with the notifier just like the above, so the
> > behavior is intentional.
> >
> >
> > thanks,
> >
> > Takashi
> 
> I am afraid if device hotplug out, how is audio state if it follow up
> eld info? Since the modesetting is never performed for the display
> which is plugged out, so there is no notify() call on it.

In principle, the HDMI audio just needs to follows the video state,
and it doesn't need to care actual physical connections.  As long as
video can go out, it's fine, audio can, too.  When video is disabled
(even if connected), audio can't be used as well, so it must follow to
off, too.  The notifier is used to follow this video state change.

Practically seen, the user-space shall switch off the video
accordingly upon hot unplug, then the audio notifier is sent, and the
audio gets off, too.


thanks,

Takashi
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2018-07-25  8:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-23 14:50 [PATCH 0/4] drm_audio_component support for AMD/ATI HDMI codecs Takashi Iwai
     [not found] ` <20180723145030.25133-1-tiwai-l3A5Bk7waGM@public.gmane.org>
2018-07-23 14:50   ` [PATCH 1/4] ALSA: hda/hdmi: Use single mutex unlock in error paths Takashi Iwai
2018-07-23 14:50   ` [PATCH 2/4] ALSA: hda/hdmi: Allow audio component for AMD/ATI HDMI Takashi Iwai
2018-07-23 14:50   ` [PATCH 3/4] drm/radeon: Add audio component support Takashi Iwai
     [not found]     ` <20180723145030.25133-4-tiwai-l3A5Bk7waGM@public.gmane.org>
2018-07-25  3:32       ` 答复: " Qu, Jim
2018-07-23 14:50   ` [PATCH 4/4] drm/amdgpu: " Takashi Iwai
2018-07-25  5:38     ` 答复: " Qu, Jim
2018-07-23 20:53 ` [PATCH 0/4] drm_audio_component support for AMD/ATI HDMI codecs Alex Deucher
     [not found]   ` <CADnq5_MJf-+Xp5177oTf1M2z1ytrGXM1CYG_fyoh7+WQ5bPAPQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-07-24  5:19     ` Takashi Iwai
     [not found] ` <DM3PR12MB0873B23B1B964A05FD647AF599540-4hRkV8tDpBiYEITDcfEJ8AdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-07-25  5:28   ` 答复: [PATCH 3/4] drm/radeon: Add audio component support Takashi Iwai
     [not found]     ` <s5h8t5zyjch.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
2018-07-25  5:40       ` jimqu
     [not found] ` <DM3PR12MB087322334203C27EB7C151E499540-4hRkV8tDpBiYEITDcfEJ8AdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-07-25  5:46   ` 答复: [PATCH 4/4] drm/amdgpu: " Takashi Iwai
2018-07-25  8:02     ` jimqu
     [not found]       ` <16a47d85-4d09-2087-1959-fd9a039140c9-5C7GfCeVMHo@public.gmane.org>
2018-07-25  8:20         ` Takashi Iwai [this message]
2018-07-27  4:55           ` y4T�TCH " jimqu

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=s5hr2jrwwu8.wl-tiwai@suse.de \
    --to=tiwai-l3a5bk7wagm@public.gmane.org \
    --cc=Jim.Qu-5C7GfCeVMHo@public.gmane.org \
    --cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=jimqu-5C7GfCeVMHo@public.gmane.org \
    /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.