dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai-l3A5Bk7waGM@public.gmane.org>
To: Daniel Vetter <daniel-/w4YWyX8dFk@public.gmane.org>
Cc: "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>,
	"Qu, Jim" <Jim.Qu-5C7GfCeVMHo@public.gmane.org>,
	"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	Alex Deucher
	<alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"Deucher,
	Alexander" <Alexander.Deucher-5C7GfCeVMHo@public.gmane.org>
Subject: Re: [alsa-devel]	答复: [PATCH] vgaswitchroo: set audio client id according to bound gpu client id
Date: Mon, 09 Jul 2018 17:58:20 +0200	[thread overview]
Message-ID: <s5hpnzwcsf7.wl-tiwai@suse.de> (raw)
In-Reply-To: <20180709155643.GE3008-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>

On Mon, 09 Jul 2018 17:56:43 +0200,
Daniel Vetter wrote:
> 
> On Mon, Jul 09, 2018 at 05:04:22PM +0200, Takashi Iwai wrote:
> > On Mon, 09 Jul 2018 15:58:51 +0200,
> > Alex Deucher wrote:
> > > 
> > > On Mon, Jul 9, 2018 at 6:16 AM, Qu, Jim <Jim.Qu@amd.com> wrote:
> > > > Hi Lukas,
> > > >
> > > > Thanks to your explanation, and see comments in line.
> > > >
> > > >
> > > > Do you need to runtime resume the HDA controller even if user space isn't
> > > > streaming audio?  Why, and in which situation exactly?
> > > >
> > > > Jim: OEM system uses pactl to queiry audio card and audio output sink, since the audio has power down by runtime pm, so the audio card and output sink are all unavailable. they could not select the available HDMI audio for audio playing.
> > > >
> > > > You're saying above that the HDA controller isn't runtime resumed on
> > > > hotplug of a display.  Is that necessary to retrieve ELD or something?
> > > > I'm not sure if there's code in the HDA driver to acquire a runtime PM
> > > > ref on HPD, but maybe it's necessary.  Or maybe the code is there but
> > > > somehow no HPD interrupt is received by the HDA driver?
> > > >
> > > > Jim: So far, I do not find any code about audio response HPD in kernel. the HPD interrupt will sent to user mode via uevent, not sure whether audio user mode driver can receive the event or not.
> > > 
> > > On the gfx side at least, we can get a hotplug event via ACPI
> > > (depending on the OEM design) if displays are attached/detached while
> > > the dGPU is powered down.  I suppose the gfx driver could call into
> > > the audio driver during one of those events.  On the gfx side at least
> > > we just generate the gfx hotplug event and let userspace deal with it.
> > 
> > IMO, a more proper way would be to have the direct communication
> > between the graphics driver and the audio driver like i915 driver
> > does.  Then the audio driver can get plug/unplug event at more
> > accurate timing without races.
> > 
> > (Though, it will cause another mess wrt the weak module dependency,
> >  but it's another story :)
> 
> Just don't do what snd-hda-intel did and instead implement the component
> stuff properly :-)

A patch is welcome :)


thanks,

Takashi

> -Daniel
> 
> > 
> > 
> > thanks,
> > 
> > Takashi
> > 
> > 
> > > 
> > > Alex
> > > 
> > > >
> > > > Thanks
> > > > JimQu
> > > >
> > > > ________________________________________
> > > > 发件人: Lukas Wunner <lukas@wunner.de>
> > > > 发送时间: 2018年7月9日 17:27
> > > > 收件人: Qu, Jim
> > > > 抄送: alsa-devel@alsa-project.org; dri-devel@lists.freedesktop.org; Deucher, Alexander; amd-gfx@lists.freedesktop.org
> > > > 主题: Re: [PATCH] vgaswitchroo: set audio client id according to bound gpu client id
> > > >
> > > > On Mon, Jul 09, 2018 at 08:52:33AM +0000, Qu, Jim wrote:
> > > >> Now, I found the audio device will auto suspend even if the gpu is active,
> > > >> and if I plug in a HDMI device it also do not resume back.
> > > >>
> > > >> 1. Did you encounter similar issue before?
> > > >> 2. audio will auto suspend as default at beginning of boot, is it expect
> > > >> behaviour?
> > > >
> > > > Yes, that's expected.  Once you start streaming audio to attached displays,
> > > > user space opens the codec device and this causes the HDA controller to
> > > > runtime resume.  If the discrete GPU is suspended at that moment, it will
> > > > be powered on and kept powered on as long as user space is streaming audio.
> > > >
> > > > Do you need to runtime resume the HDA controller even if user space isn't
> > > > streaming audio?  Why, and in which situation exactly?
> > > >
> > > > You're saying above that the HDA controller isn't runtime resumed on
> > > > hotplug of a display.  Is that necessary to retrieve ELD or something?
> > > > I'm not sure if there's code in the HDA driver to acquire a runtime PM
> > > > ref on HPD, but maybe it's necessary.  Or maybe the code is there but
> > > > somehow no HPD interrupt is received by the HDA driver?
> > > >
> > > > Thanks,
> > > >
> > > > Lukas
> > > > _______________________________________________
> > > > dri-devel mailing list
> > > > dri-devel@lists.freedesktop.org
> > > > https://lists.freedesktop.org/mailman/listinfo/dri-devel
> > > _______________________________________________
> > > Alsa-devel mailing list
> > > Alsa-devel@alsa-project.org
> > > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
> 
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2018-07-09 15:58 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1530166933-21655-1-git-send-email-Jim.Qu@amd.com>
2018-06-28 12:43 ` [PATCH] vgaswitchroo: set audio client id according to bound gpu client id Alex Deucher
     [not found]   ` <CADnq5_NcNfMD9UDN17c-513rD--kQY7nzw6OTgimV0pVqLjbOg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-06-29  7:39     ` 答复: " Qu, Jim
2018-06-29  8:06       ` Lukas Wunner
     [not found]         ` <20180629080634.GA7357-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2018-06-29  8:55           ` 答复: " Qu, Jim
     [not found]             ` <DM3PR12MB08737DC9FB94BB6F3AEF5634994E0-4hRkV8tDpBiYEITDcfEJ8AdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-06-29  9:21               ` Lukas Wunner
     [not found]                 ` <20180629092138.GA11849-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2018-06-29 10:40                   ` Qu, Jim
2018-06-29 11:11                     ` Lukas Wunner
2018-07-09  8:52                       ` 答复: " Qu, Jim
     [not found]                         ` <DM3PR12MB0873FEC702770190057B49F799440-4hRkV8tDpBiYEITDcfEJ8AdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-07-09  9:27                           ` Lukas Wunner
     [not found]                             ` <20180709092759.GA3649-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2018-07-09 10:16                               ` 答复: " Qu, Jim
     [not found]                                 ` <DM3PR12MB087309CBC2CD3A934327EBCE99440-4hRkV8tDpBiYEITDcfEJ8AdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-07-09 13:58                                   ` Alex Deucher
     [not found]                                     ` <CADnq5_OpZz=AgNomX7+5BzeN77CRZT7mXDT7kn620TE-OjqS0w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-07-09 15:04                                       ` [alsa-devel] " Takashi Iwai
2018-07-09 15:47                                         ` [alsa-devel] ??????: " Lukas Wunner
2018-07-09 15:52                                           ` Takashi Iwai
2018-07-09 15:59                                             ` Alex Deucher
2018-07-09 16:02                                               ` Takashi Iwai
     [not found]                                             ` <s5hsh4scsoe.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
2018-07-09 16:06                                               ` [alsa-devel] " Lukas Wunner
2018-07-09 16:15                                                 ` Alex Deucher
     [not found]                                                   ` <CADnq5_OqsZyMJx5TCqdr4iydzVyb3UHtqadvuq0szG+kNPe9dg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-07-09 17:04                                                     ` Takashi Iwai
     [not found]                                           ` <20180709154734.GA30496-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2018-07-09 15:53                                             ` 答复: " Qu, Jim
2018-07-09 15:57                                               ` Takashi Iwai
2018-07-09 16:03                                                 ` 答复: " Alex Deucher
2018-07-09 17:06                                                   ` 答复: [alsa-devel] " Takashi Iwai
     [not found]                                         ` <s5hr2kco3gp.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
2018-07-09 15:56                                           ` [alsa-devel] 答复: " Daniel Vetter
     [not found]                                             ` <20180709155643.GE3008-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2018-07-09 15:58                                               ` Takashi Iwai [this message]
2018-07-09 16:05                                                 ` 答复: " Qu, Jim
     [not found]                                                   ` <DM3PR12MB0873E9DD8B7448CB8A6829DA99440-4hRkV8tDpBiYEITDcfEJ8AdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-07-09 17:09                                                     ` Takashi Iwai
2018-07-10  7:44                                                       ` 答复: " Qu, Jim
2018-07-10  7:50                                                         ` Qu, Jim
     [not found]                                                   ` <DM3PR12MB0873205E27A9241DB3B10EA5995B0-4hRkV8tDpBiYEITDcfEJ8AdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-07-10  8:01                                                     ` Takashi Iwai
     [not found]                                                       ` <s5hr2kbr03k.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
2018-07-10  9:13                                                         ` jimqu
     [not found]                                                           ` <a37f08e7-734e-977c-597f-46d5c3ec34bc-5C7GfCeVMHo@public.gmane.org>
2018-07-10  9:50                                                             ` Takashi Iwai
2018-07-10 11:11                                                               ` jimqu
     [not found]                                                                 ` <733011b9-1880-76a8-d00f-076591e93c53-5C7GfCeVMHo@public.gmane.org>
2018-07-10 11:21                                                                   ` Takashi Iwai
2018-07-11  7:19                                                                     ` 答复: 答复: " Takashi Iwai
     [not found]                                                                       ` <s5hfu0qp7cv.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
2018-07-11  8:41                                                                         ` 答复: 答复: [alsa-devel] " jimqu
     [not found]                                                                           ` <1936c752-f858-2caf-35e7-98bea431fb7c-5C7GfCeVMHo@public.gmane.org>
2018-07-11  9:04                                                                             ` Takashi Iwai
     [not found]                                                                               ` <s5h1scap2h2.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
2018-07-11  9:26                                                                                 ` jimqu
2018-07-11  9:53                                                                                   ` Takashi Iwai
     [not found]                                                                                     ` <s5h601mayk0.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
2018-07-11 10:21                                                                                       ` jimqu
2018-07-11 11:12                                                                                         ` Takashi Iwai
     [not found]                                                                                           ` <s5hwou29gce.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
2018-07-13 15:07                                                                                             ` Takashi Iwai
2018-07-14 12:03                                                                                               ` jimqu
2018-07-14 16:31                                                                                                 ` Takashi Iwai
     [not found]                                                                                                   ` <s5hy3edlqxw.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
2018-07-15 14:36                                                                                                     ` Alex Deucher
2018-07-16 15:10                                                                                                       ` Harry Wentland
     [not found]                                                                                                         ` <84b8615e-9de1-a279-e103-55367e2f0f85-5C7GfCeVMHo@public.gmane.org>
2018-07-16 15:25                                                                                                           ` Takashi Iwai
2018-07-16 16:56                                                                                                             ` Alex Deucher
2018-07-09 14:02                                   ` Alex Deucher
     [not found]                                     ` <CADnq5_PS_ZO2Y35HHnp3DcvN9wopQGavpDtMNCuuz4A1mDnD7g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-07-09 15:09                                       ` [alsa-devel] " Takashi Iwai

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=s5hpnzwcsf7.wl-tiwai@suse.de \
    --to=tiwai-l3a5bk7wagm@public.gmane.org \
    --cc=Alexander.Deucher-5C7GfCeVMHo@public.gmane.org \
    --cc=Jim.Qu-5C7GfCeVMHo@public.gmane.org \
    --cc=alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=daniel-/w4YWyX8dFk@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).