Add get_eld audio component for i915/HD-audio

Submitted by Takashi Iwai on Nov. 30, 2015, 1:37 p.m.

Details

Reviewer None
Submitted Nov. 30, 2015, 1:37 p.m.
Last Updated Dec. 8, 2015, 5:42 p.m.
Revision 5

Cover Letter(s)

Revision 1
      Hi,

this is a patchset to add get_eld op to audio component for
communicating more directly between i915 and HD-audio.  Currently, the
HDMI/DP audio status and ELD are notified and obtained via the
hardware-level communication over HD-audio unsolicited event and
verbs although the graphics driver holds the exactly same
information.  As we already have a notification via audio component,
this is another step forward; the audio driver fetches directly the
audio status and ELD via the new component op.

The initial draft was posted to alsa-devel as an RFC some weeks ago,
and this is a revised version, posted to both i915 and alsa-devel for
review.

The current patchset is found in sound git tree test/hdmi-jack
branch.


Takashi

Takashi Iwai (7):
  drm/i915: Remove superfluous NULL check
  drm/i915: Add get_eld audio component
  drm/i915: refactoring audio component functions
  ALSA: hda - Split ELD update code from hdmi_present_sense()
  ALSA: hda - Use component ops for i915 HDMI/DP audio jack handling
  ALSA: hda - Do zero-clear in snd_hdmi_parse_eld() itself
  ALSA: hda - Skip ELD notification during PM process

 drivers/gpu/drm/i915/intel_audio.c |  75 ++++++++++----
 drivers/gpu/drm/i915/intel_drv.h   |   1 +
 include/drm/i915_component.h       |   3 +
 sound/pci/hda/hda_eld.c            |   1 +
 sound/pci/hda/patch_hdmi.c         | 195 ++++++++++++++++++++++++++-----------
 5 files changed, 200 insertions(+), 75 deletions(-)
    
Revision 2
      Hi,

this is a revised patchset to add get_eld op to audio component for
communicating more directly between i915 and HD-audio.  Currently, the
HDMI/DP audio status and ELD are notified and obtained via the
hardware-level communication over HD-audio unsolicited event and
verbs although the graphics driver holds the exactly same
information.  As we already have a notification via audio component,
this is another step forward; the audio driver fetches directly the
audio status and ELD via the new component op.

The patch still doesn't follow the recent kernel doc comment changes
in i915_component.h.  I'll rebase once when I get the steady branch in
drm tree.

The current patchset is found in sound git tree test/hdmi-jack
branch.


Takashi

===

v1->v2: 
* Use modeset lock for get_eld lock, drop av mutex
* Return the expected size from get_eld, not the copied size
* Add reverse map from a port number to the encoder
* Deferred invocation of get_eld from the eld_notify in HDA side
* A bit more code refactoring in HDA side
* Move audio component accessors to hdac_i915.c


Takashi Iwai (9):
  drm/i915: Remove superfluous NULL check
  drm/i915: Add get_eld audio component
  drm/i915: refactoring audio component functions
  drm/i915: Add reverse mapping between port and intel_encoder
  ALSA: hda - Split ELD update code from hdmi_present_sense()
  ALSA: hda - Use component ops for i915 HDMI/DP audio jack handling
  ALSA: hda - Do zero-clear in snd_hdmi_parse_eld() itself
  ALSA: hda - Skip ELD notification during PM process
  ALSA: hda - Move audio component accesses to hdac_i915.c

 drivers/gpu/drm/i915/i915_drv.h    |   2 +
 drivers/gpu/drm/i915/intel_audio.c |  59 ++++++---
 drivers/gpu/drm/i915/intel_ddi.c   |   1 +
 drivers/gpu/drm/i915/intel_dp.c    |   1 +
 drivers/gpu/drm/i915/intel_drv.h   |   1 +
 drivers/gpu/drm/i915/intel_hdmi.c  |   2 +
 include/drm/i915_component.h       |   6 +
 include/sound/hda_i915.h           |  14 +++
 sound/hda/hdac_i915.c              |  66 +++++++++++
 sound/pci/hda/hda_eld.c            |   1 +
 sound/pci/hda/patch_hdmi.c         | 237 +++++++++++++++++++++++++------------
 11 files changed, 294 insertions(+), 96 deletions(-)
    
Revision 4
      Hi,

this is the third revision of the patchset to add get_eld op to audio
component for communicating more directly between i915 and HD-audio.
Currently, the HDMI/DP audio status and ELD are notified and obtained
via the hardware-level communication over HD-audio unsolicited event
and verbs although the graphics driver holds the exactly same
information.  As we already have a notification via audio component,
this is another step forward; the audio driver fetches directly the
audio status and ELD via the new component op.

A few patches have been dropped from this patchset as they were
already applied individually beforehand.  Also, two cleanup patches
for i915 were squashed into one patch.

The current patchset is found in sound git tree test/hdmi-jack
branch.


thanks,

Takashi

===

v2->v3:
* Track drm_connector for easier ELD retrieval, remove superfluous
  audio_enabled flag instead
* Back to av_mutex
* Adapt the earlier applied preliminary patches
* Direct invocation of get_eld now instead of deferred call, as we
  have no longer deadlocks
* Rebase to drm-next, update get_eld documentation for new kernel doc

v1->v2: 
* Use modeset lock for get_eld lock, drop av mutex
* Return the expected size from get_eld, not the copied size
* Add reverse map from a port number to the encoder
* Deferred invocation of get_eld from the eld_notify in HDA side
* A bit more code refactoring in HDA side
* Move audio component accessors to hdac_i915.c

Takashi Iwai (4):
  drm/i915: Add get_eld audio component
  drm/i915: Add reverse mapping between port and intel_encoder
  ALSA: hda - Use component ops for i915 HDMI/DP audio jack handling
  ALSA: hda - Move audio component accesses to hdac_i915.c

 drivers/gpu/drm/i915/i915_drv.h    |   2 +
 drivers/gpu/drm/i915/intel_audio.c |  59 +++++++++++++++------
 drivers/gpu/drm/i915/intel_ddi.c   |   1 +
 drivers/gpu/drm/i915/intel_dp.c    |   1 +
 drivers/gpu/drm/i915/intel_drv.h   |   2 +
 drivers/gpu/drm/i915/intel_hdmi.c  |   2 +
 include/drm/i915_component.h       |  14 +++++
 include/sound/hda_i915.h           |  14 +++++
 sound/hda/hdac_i915.c              |  66 +++++++++++++++++++++++
 sound/pci/hda/patch_hdmi.c         | 104 ++++++++++++++++++++++++++++++-------
 10 files changed, 229 insertions(+), 36 deletions(-)
    

Revisions

SERIES REVISION LOOKS STRANGE. Please double-check patch list and the ordering before proceeding.

Patches download mbox

Tests

HEAD is now at 4bfcbca drm-intel-nightly: 2015y-11m-30d-10h-56m-08s UTC integration manifest
Applying: drm/i915: Remove superfluous NULL check
Applying: drm/i915: Add get_eld audio component
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0002 drm/i915: Add get_eld audio component