Re: [Intel-gfx] [RFC PATCH v2 0/8] Add support for Legacy Hdmi audio

2016-11-11 Thread Mark Brown
On Thu, Nov 10, 2016 at 10:35:09AM -0600, Pierre-Louis Bossart wrote:
> On 11/9/16 7:19 AM, Mark Brown wrote:

> > None of which is at all unusal.  The Intel hardware really doesn't seem
> > like the sort of special snowflake that people appear to believe it to
> > be.

> I am not sure if this reply was British humor, sarcasm or a proposal? Again

I'm not particularly trying to be funny here, I'm just saying that
without having seen any of the code involved (I got CCed in part way
through this thread...) this sounds like fairly normal HDMI hardware so
it's hard to understand why it can't use the framework code (perhaps
with a bit of extension).  It does seem to be an unfortunate pattern
with HDMI in particular that people seem to see their hardware as
needing to use a separate implementation of everything which gets a bit
frustrating.

> the hardware for Baytrail and Cherrytrail is very simple, the display
> subsystem exposes a DMA interface with a 4 descriptors pointing to buffers
> in system memory and a window of registers to enable DMA transfers and
> signal interrupts for DMA events. Rather than adding ALSA related code in
> the i915 driver, the proposal is to create a subdevice that is given access
> to the relevant register window and a matching driver in sound/x86 that
> would take care of creating a card and implementing ALSA-related
> initializations and buffer/periods management. The interaction between the

That all sounds totally sensible - I think the only real issue here is
exactly what the ALSA subdevice ends up looking like.

> two gfx and audio parts is based on a very limited set of pdata variables
> and callbacks. From the gfx perspective this minimizes the code changes and
> dependencies on ALSA.

Sure, and that's what the hdmi-codec interface was supposed to be doing
as well.

> The hdmi-codec interface seems to assume an ASoC implementation which seems
> over-engineered in this case. There is no specific power management issues,
> no real need for cpu- or codec-dai and not physical link such as I2S/SPDIF.
> The only thing that seems directly useful if the pdata part which I already
> had. If I missed anything I am all ears.

If it's doing the same thing as hdmi-codec then simply not adding
another implementation of essentially the same thing ought to be a win.

If the problem is that it's a bit too much work to fill in the dummy
DAIs then let's just make it easier to instantiate them and a
simple-card to tie everything together.

> Note that I am not trying to solve HDAudio-gfx interaction, just to get
> audio support for baytrail and cherrytrail compute sticks in the mainline.
> I've been porting patches to help users since 4.4, starting from the work
> Canonical did and internal patches, and it gets tiring. At this point I am

Like I say I've not seen these patches (if they're not currently ASoC
patches that's not surprising), I don't know why they've not been
accepted so I can't really comment on that.

> looking for either agreement to proceed with the solution suggested in these
> patches which works fine with minimal impacts to either the drm or alsa
> domains, or an actual useful/pragmatic counter-proposal. If there is a grand
> plan of transition to a unified TBD interface for all HDMI cases then I
> would ask that this is done in a second step after the audio functionality
> is added.

Like I say there's probably room for some helpers for setting this up in
simpler cases but even without them it is very common to end up with
dummy ASoC devices so I'm not sure I'd say they're impractical.  It'd be
good to at least have a concrete assessment of why it's unreasonably
difficult.

I don't have a particularly strong opinion either way on merging the
current code as it is, if there's a commitment to fixing it up then
that's the main thing.


signature.asc
Description: PGP signature
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [RFC PATCH v2 0/8] Add support for Legacy Hdmi audio

2016-11-10 Thread Pierre-Louis Bossart

On 11/9/16 7:19 AM, Mark Brown wrote:

On Sun, Nov 06, 2016 at 11:42:31PM -0700, Pierre-Louis Bossart wrote:


I am all for convergence when it makes sense but I don't see how
hdmi-codec.h provides equivalent functionality for BYT/CHT with what was
suggested in this patchset -derived from VED patches- and discussed earlier
with intel-gfx folks, specifically how LPE pipe interrupts are
masked/unmasked and passed to the audio driver? The BYT/CHT HDMI


Without knowing what these things are it's hard to comment but it does
seem that if Intel has a reasonable use case for them then so too will
other vendors at some point.


functionality is also not modeled as an ASoC codec - which seems a
dependency from the comments in hdmi-codec.h - since it's really part of the
i915 hardware and exposed only as a set of registers+DMA, without any serial
link interface typically needed for an external device or the internal
HDAudio-display link.


None of which is at all unusal.  The Intel hardware really doesn't seem
like the sort of special snowflake that people appear to believe it to
be.


I am not sure if this reply was British humor, sarcasm or a proposal? 
Again the hardware for Baytrail and Cherrytrail is very simple, the 
display subsystem exposes a DMA interface with a 4 descriptors pointing 
to buffers in system memory and a window of registers to enable DMA 
transfers and signal interrupts for DMA events. Rather than adding ALSA 
related code in the i915 driver, the proposal is to create a subdevice 
that is given access to the relevant register window and a matching 
driver in sound/x86 that would take care of creating a card and 
implementing ALSA-related initializations and buffer/periods management. 
The interaction between the two gfx and audio parts is based on a very 
limited set of pdata variables and callbacks. From the gfx perspective 
this minimizes the code changes and dependencies on ALSA.
The hdmi-codec interface seems to assume an ASoC implementation which 
seems over-engineered in this case. There is no specific power 
management issues, no real need for cpu- or codec-dai and not physical 
link such as I2S/SPDIF. The only thing that seems directly useful if the 
pdata part which I already had. If I missed anything I am all ears.


Note that I am not trying to solve HDAudio-gfx interaction, just to get 
audio support for baytrail and cherrytrail compute sticks in the 
mainline. I've been porting patches to help users since 4.4, starting 
from the work Canonical did and internal patches, and it gets tiring. At 
this point I am looking for either agreement to proceed with the 
solution suggested in these patches which works fine with minimal 
impacts to either the drm or alsa domains, or an actual useful/pragmatic 
counter-proposal. If there is a grand plan of transition to a unified 
TBD interface for all HDMI cases then I would ask that this is done in a 
second step after the audio functionality is added.

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [RFC PATCH v2 0/8] Add support for Legacy Hdmi audio

2016-11-09 Thread Mark Brown
On Sun, Nov 06, 2016 at 11:42:31PM -0700, Pierre-Louis Bossart wrote:

> I am all for convergence when it makes sense but I don't see how
> hdmi-codec.h provides equivalent functionality for BYT/CHT with what was
> suggested in this patchset -derived from VED patches- and discussed earlier
> with intel-gfx folks, specifically how LPE pipe interrupts are
> masked/unmasked and passed to the audio driver? The BYT/CHT HDMI

Without knowing what these things are it's hard to comment but it does
seem that if Intel has a reasonable use case for them then so too will
other vendors at some point.

> functionality is also not modeled as an ASoC codec - which seems a
> dependency from the comments in hdmi-codec.h - since it's really part of the
> i915 hardware and exposed only as a set of registers+DMA, without any serial
> link interface typically needed for an external device or the internal
> HDAudio-display link.

None of which is at all unusal.  The Intel hardware really doesn't seem
like the sort of special snowflake that people appear to believe it to
be.


signature.asc
Description: PGP signature
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [RFC PATCH v2 0/8] Add support for Legacy Hdmi audio

2016-11-06 Thread Pierre-Louis Bossart

On 11/3/16 5:01 PM, Daniel Vetter wrote:

On Sat, Oct 1, 2016 at 2:22 AM, Jerome Anand  wrote:

Legacy Hdmi audio drivers are added.
Added support for audio/ gfx interface using irq chip framework


Just discussed this with Rakesh here at LPC and also with Mark Brown
and since earlier this years there's no a standard way to do this in
include/sound/hdmi-codec.h. I think it'd be good to port this over to
this new interface before merging. And if it makes sense (and ofc
afterwards when there's time) to port over the existing
i915_component.h to hdmi-codec.h.


I am all for convergence when it makes sense but I don't see how 
hdmi-codec.h provides equivalent functionality for BYT/CHT with what was 
suggested in this patchset -derived from VED patches- and discussed 
earlier with intel-gfx folks, specifically how LPE pipe interrupts are 
masked/unmasked and passed to the audio driver? The BYT/CHT HDMI 
functionality is also not modeled as an ASoC codec - which seems a 
dependency from the comments in hdmi-codec.h - since it's really part of 
the i915 hardware and exposed only as a set of registers+DMA, without 
any serial link interface typically needed for an external device or the 
internal HDAudio-display link.


___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [RFC PATCH v2 0/8] Add support for Legacy Hdmi audio

2016-11-03 Thread Daniel Vetter
On Sat, Oct 1, 2016 at 2:22 AM, Jerome Anand  wrote:
> Legacy Hdmi audio drivers are added.
> Added support for audio/ gfx interface using irq chip framework

Just discussed this with Rakesh here at LPC and also with Mark Brown
and since earlier this years there's no a standard way to do this in
include/sound/hdmi-codec.h. I think it'd be good to port this over to
this new interface before merging. And if it makes sense (and ofc
afterwards when there's time) to port over the existing
i915_component.h to hdmi-codec.h.

Cheers, Daniel

>
> Jerome Anand (8):
>   drm/i915: setup bridge for HDMI LPE audio driver
>   ALSA: add shell for Intel HDMI LPE audio driver
>   ALSA: Add support for hdmi audio driver
>   drm/i915: Add support for enabling/disabling hdmi audio interrupts
>   drm/i915: Add support for audio driver notifications
>   hdmi_audio: Improve position reporting Using a hw register to
> calculate sub-period position reports.
>   hdmi_audio: Fixup some monitor
>   hdmi_audio: continue audio playback even when display resolution
> changes
>
>  drivers/gpu/drm/i915/Makefile  |3 +
>  drivers/gpu/drm/i915/i915_drv.c|   13 +-
>  drivers/gpu/drm/i915/i915_drv.h|   22 +
>  drivers/gpu/drm/i915/i915_irq.c|   83 ++
>  drivers/gpu/drm/i915/i915_reg.h|3 +
>  drivers/gpu/drm/i915/intel_audio.c |8 +
>  drivers/gpu/drm/i915/intel_drv.h   |2 +
>  drivers/gpu/drm/i915/intel_hdmi.c  |   18 +-
>  drivers/gpu/drm/i915/intel_lpe_audio.c |  406 +++
>  include/drm/intel_lpe_audio.h  |   46 +
>  sound/Kconfig  |2 +
>  sound/Makefile |2 +-
>  sound/x86/Kconfig  |   16 +
>  sound/x86/Makefile |   10 +
>  sound/x86/intel_hdmi_audio.c   | 1929 
> 
>  sound/x86/intel_hdmi_audio.h   |  201 
>  sound/x86/intel_hdmi_audio_if.c|  551 +
>  sound/x86/intel_hdmi_lpe_audio.c   |  626 +++
>  sound/x86/intel_hdmi_lpe_audio.h   |  692 
>  19 files changed, 4629 insertions(+), 4 deletions(-)
>  create mode 100644 drivers/gpu/drm/i915/intel_lpe_audio.c
>  create mode 100644 include/drm/intel_lpe_audio.h
>  create mode 100644 sound/x86/Kconfig
>  create mode 100644 sound/x86/Makefile
>  create mode 100644 sound/x86/intel_hdmi_audio.c
>  create mode 100644 sound/x86/intel_hdmi_audio.h
>  create mode 100644 sound/x86/intel_hdmi_audio_if.c
>  create mode 100644 sound/x86/intel_hdmi_lpe_audio.c
>  create mode 100644 sound/x86/intel_hdmi_lpe_audio.h
>
> --
> 2.9.3
>
> base-commit: 2fbc239494fa3883e164cc89d35f54d22f0c9e1f
> ___
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [RFC PATCH v2 0/8] Add support for Legacy Hdmi audio

2016-10-12 Thread Jerome Anand
Legacy Hdmi audio drivers are added.
Added support for audio/ gfx interface using irq chip framework

Jerome Anand (8):
  drm/i915: setup bridge for HDMI LPE audio driver
  ALSA: add shell for Intel HDMI LPE audio driver
  ALSA: Add support for hdmi audio driver
  drm/i915: Add support for enabling/disabling hdmi audio interrupts
  drm/i915: Add support for audio driver notifications
  hdmi_audio: Improve position reporting Using a hw register to
calculate sub-period position reports.
  hdmi_audio: Fixup some monitor
  hdmi_audio: continue audio playback even when display resolution
changes

 drivers/gpu/drm/i915/Makefile  |3 +
 drivers/gpu/drm/i915/i915_drv.c|   13 +-
 drivers/gpu/drm/i915/i915_drv.h|   22 +
 drivers/gpu/drm/i915/i915_irq.c|   83 ++
 drivers/gpu/drm/i915/i915_reg.h|3 +
 drivers/gpu/drm/i915/intel_audio.c |8 +
 drivers/gpu/drm/i915/intel_drv.h   |2 +
 drivers/gpu/drm/i915/intel_hdmi.c  |   18 +-
 drivers/gpu/drm/i915/intel_lpe_audio.c |  406 +++
 include/drm/intel_lpe_audio.h  |   46 +
 sound/Kconfig  |2 +
 sound/Makefile |2 +-
 sound/x86/Kconfig  |   16 +
 sound/x86/Makefile |   10 +
 sound/x86/intel_hdmi_audio.c   | 1929 
 sound/x86/intel_hdmi_audio.h   |  201 
 sound/x86/intel_hdmi_audio_if.c|  551 +
 sound/x86/intel_hdmi_lpe_audio.c   |  626 +++
 sound/x86/intel_hdmi_lpe_audio.h   |  692 
 19 files changed, 4629 insertions(+), 4 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/intel_lpe_audio.c
 create mode 100644 include/drm/intel_lpe_audio.h
 create mode 100644 sound/x86/Kconfig
 create mode 100644 sound/x86/Makefile
 create mode 100644 sound/x86/intel_hdmi_audio.c
 create mode 100644 sound/x86/intel_hdmi_audio.h
 create mode 100644 sound/x86/intel_hdmi_audio_if.c
 create mode 100644 sound/x86/intel_hdmi_lpe_audio.c
 create mode 100644 sound/x86/intel_hdmi_lpe_audio.h

-- 
2.9.3

base-commit: 2fbc239494fa3883e164cc89d35f54d22f0c9e1f
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx