public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* Need your advice: Add a new communication inteface between HD-Audio and Gfx drivers for hotplug notification/ELD update
@ 2014-01-21 12:35 Lin, Mengdong
  2014-01-21 13:10 ` Daniel Vetter
  0 siblings, 1 reply; 22+ messages in thread
From: Lin, Mengdong @ 2014-01-21 12:35 UTC (permalink / raw)
  To: Takashi Iwai (tiwai@suse.de), Barnes, Jesse,
	Daniel Vetter (daniel@ffwll.ch), Zanoni, Paulo R
  Cc: alsa-devel@alsa-project.org, intel-gfx@lists.freedesktop.org

Dear audio and gfx stakeholders,

We hope to add a new interface between audio and gfx driver, for gfx driver to notify audio about HDMI/DP hot-plug and ELD update.
Would you please share some comments on the proposal below?

Background of this issue: On Intel Haswell/Broadwell platforms, there is a HW restriction that after the display HD-Audio controller is in D3,
it cannot be waken up by HDMI/DP hot-plug. Consequently, although the gfx driver can still detect the HDMI/DP hot-plug,
audio driver has no idea about this and cannot notify user space whether the external HDMI/DP monitor is available for audio playback,
because the audio controller cannot wake up to D0 and receive HW unsolicited event about hot-plug from the audio codec.
This limitation will affect user space to decide whether we can output audio over HDMI/DP.

To solve the above limitation, Takashi suggested to add a new communication interface between audio and gfx driver: create a common object
containing the ops registered by both graphics and audio drivers, then communicate through it, something like vga_switcheroo.

Is it okay to create this kernel object in i915 driver?

I915 can export an API like "display_register_audio_client" for audio driver to register a client and hot-plug notification ops.

I915 can also call some API like "display_register_gfx_client" itself and register ops for audio driver to query monitor presence and ELD info on a specific port.
It would be faster for audio driver than quering ELD by command/response over the HD-A bus, thus avoid delay in i915 mode set.
This will also avoid waking up the audio devices unnecessarily if the user space does not really want to use HDMI/DP for audio playback.

Whenever i195 enables/disables audio on a port in modeset, it can call some API like "display_set_audio_state()" on this kernel object and trigger notifications to the audio driver.

When the audio driver is probed (in the delayed probe stage), it can request i915 API symbol to register the audio client for this communication kernel object.
Since the 1st i915 mode set may happen before audio driver registers the ops, we'll let audio driver check ELD once after registering the audio client ops.
And for the platforms which uses this communication interface, we can disable unsolicited event for HDMI/DP hot-plug in the audio driver.

We hope to hear your feedback and start to work out more details.

Thanks & Best Regards
Mengdong

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2014-02-20  5:15 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-21 12:35 Need your advice: Add a new communication inteface between HD-Audio and Gfx drivers for hotplug notification/ELD update Lin, Mengdong
2014-01-21 13:10 ` Daniel Vetter
2014-01-21 13:11   ` Daniel Vetter
2014-01-22 12:48   ` Lin, Mengdong
2014-01-22 14:18     ` Daniel Vetter
2014-01-22 15:04       ` [Intel-gfx] " Rob Clark
2014-01-22 15:20         ` Daniel Vetter
2014-01-22 15:45           ` Rob Clark
2014-01-22 17:23             ` Takashi Iwai
2014-01-22 18:15               ` [Intel-gfx] " Rob Clark
2014-01-22 17:19       ` Takashi Iwai
2014-01-23  6:35         ` Lin, Mengdong
2014-01-23  7:57           ` Takashi Iwai
2014-01-23  8:13             ` Jaroslav Kysela
2014-01-23  8:26             ` Daniel Vetter
2014-01-24  8:23               ` Raymond Yau
2014-01-24 17:38                 ` [alsa-devel] " Alex Deucher
2014-02-18 13:58               ` Lin, Mengdong
2014-02-18 14:22                 ` Ville Syrjälä
2014-02-19  9:08                   ` Lin, Mengdong
2014-02-19 11:29                     ` Ville Syrjälä
2014-02-20  5:15                       ` Lin, Mengdong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox