From: Vinod Koul <vinod.koul@intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, intel-gfx@lists.freedesktop.org,
daniel.vetter@intel.com,
David Henningsson <david.henningsson@canonical.com>
Subject: Re: [PATCH 1/4] drm/i915: Add audio hotplug info struct
Date: Thu, 23 Jul 2015 09:13:21 +0530 [thread overview]
Message-ID: <20150723034321.GA23525@localhost> (raw)
In-Reply-To: <s5hd1zkx7bi.wl-tiwai@suse.de>
On Wed, Jul 22, 2015 at 10:31:45PM +0200, Takashi Iwai wrote:
> > > That depends on the device we register this with. Actually this makes more
> > > sense to me :)
> > >
> > > If we register with struct device *audio_dev, which in this case would be
> > > the codec device we create while probing the bus. This way you are linking i915
> > > ops to the codec device. Ofcourse hdac_device has bus pointer but you can
> > > invoke device callback without even searching for the device :)
> >
> > It would require some extra setup, so I skipped it (at least for now).
> >
> > I e, in order to detect codecs, we need to call hdac_i915 functions to
> > turn the power well on. And in order to connect the codec to the
> > i915_audio_component, we need to have detected a codec.
Yes that is true but when driver registers the callback you can assign the
callback to i915 component, so afterwards the call from i915 lands up in
codec. If not registered we have default bus handler :)
> > Which, now that I think of it, actually gives an interesting potential
> > race condition, in case the following happens:
> >
> > 1) Monitor is plugged in at boot time
> > 2) i915 initializes
> > 3) hda starts initializing and sets up the audio component
> > 4) i915 finishes initialization and as part of that, calls the hotplug
> > notify to let hda know that the monitor is plugged in. However, at this
> > point, hda has not finished initialization yet, so there are no codecs
> > that listen for this information.
> >
> > Anyhow, this is not a problem really yet, but it might be if we ever
> > decide to not write the ELD to the hardware.
>
> For avoid such a problem, maybe we need two ops, one for notification
> and one for getting the assigned data. At the initialization time,
> the audio driver queries the assigned status and data. When a hotplug
> happens, it's just notified. That is, it simply replaces the current
> unsol event and the ELD data read via two ops.
Yeah, I do favour adding new ops so that we can query the current values and
setup whenever driver probes
--
~Vinod
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-07-23 3:41 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-21 7:57 [PATCH 0/4] i915 to call hda driver on HDMI plug/unplug David Henningsson
2015-07-21 7:57 ` [PATCH 1/4] drm/i915: Add audio hotplug info struct David Henningsson
2015-07-22 8:22 ` Takashi Iwai
2015-07-22 8:50 ` David Henningsson
2015-07-22 8:55 ` Takashi Iwai
2015-07-22 14:13 ` Vinod Koul
2015-07-22 17:52 ` David Henningsson
2015-07-22 20:31 ` Takashi Iwai
2015-07-23 3:43 ` Vinod Koul [this message]
2015-07-23 6:17 ` David Henningsson
2015-07-23 6:25 ` David Henningsson
2015-07-23 10:02 ` Takashi Iwai
2015-07-21 7:57 ` [PATCH 2/4] drm/i915: Call audio hotplug notify function David Henningsson
2015-07-21 9:14 ` Daniel Vetter
2015-07-21 14:26 ` David Henningsson
2015-07-21 7:57 ` [PATCH 3/4] ALSA: hda - Dispatch incoming HDMI hotplug i915 callback David Henningsson
2015-07-22 8:30 ` Takashi Iwai
2015-07-22 13:56 ` Vinod Koul
2015-07-22 14:01 ` Takashi Iwai
2015-07-21 7:57 ` [PATCH 4/4] ALSA: hda - Wake the codec up on hotplug notify events David Henningsson
2015-07-21 17:37 ` [PATCH 0/4] i915 to call hda driver on HDMI plug/unplug R, Durgadoss
2015-07-22 8:50 ` Takashi Iwai
2015-07-22 15:53 ` David Henningsson
-- strict thread matches above, loose matches on Subject: below --
2015-07-22 15:28 [PATCH v2 " David Henningsson
2015-07-22 15:28 ` [PATCH 1/4] drm/i915: Add audio hotplug info struct David Henningsson
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=20150723034321.GA23525@localhost \
--to=vinod.koul@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=daniel.vetter@intel.com \
--cc=david.henningsson@canonical.com \
--cc=intel-gfx@lists.freedesktop.org \
--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