All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Generic HDMI codec: Add channel mapping control
@ 2016-12-14 15:16 Arnaud Pouliquen
  2016-12-14 15:16 ` [PATCH v2 1/4] DRM: add help to get ELD speaker allocation Arnaud Pouliquen
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Arnaud Pouliquen @ 2016-12-14 15:16 UTC (permalink / raw)
  To: alsa-devel, dri-devel
  Cc: kernel, Takashi Iwai, lgirdwood, Jyri Sarha, Takashi Sakamoto,
	David Airlie, broonie, Daniel Vetter

Aim of this patch is to add  'Playback Channel Map' control to export 
audio capabilities in term of HDMI sink speakers allocation.

V2:
In this version I use chmap helper functions from pcm_lib.c. 
It is quite tricky to use it from ASoC due to the relation chip of the controls
with the pcm runtime.
After several tries, my conclusion is that it must be handled in ASoC DAI driver.
Main reason is that the DAI driver can not provide snd_pcm_chmap struct
through kcontrol structure. But this induces that soc-core provides pcm runtime
structure to DAI driver during probe.

Base on this conclusion. I reworked my patches by adding 2 
new patches in patch-set
1)  ALSA pcm: allow non constant snd_pcm_chmap_elem
   This patch allows to handle non constant channel mapping. As ELD
   information can change during runtime it is mandatory to properly 
   handle the feature.
   In term of compatibility with legacy it should be straightforward,
   as update just consists in suppressing the 'const' constraint.

2)  ASoC: core: add optional pcm_new callback for DAI driver
    This is the only way i found to be able to use 
    snd_pcm_add_chmap_ctls and associated controls helper functions.
    From my point of view, this is the more simple way to add relationship
    between DAI and associated pcm devices.
   Notice that this patch, if accepted, makes the following one obsolete,
   as it also answer to the associated topic:
  [PATCH v5 0/2] ALSA controls management using index/device/sub-devices fields
  (http://www.spinics.net/lists/alsa-devel/msg57639.html).

If you estimate that this it not reasonable i will come back to my first version.

V1:
This patch follow discussion initiates here: 
[RFC] ASOC: HDMI audio info frame speaker allocation
http://www.spinics.net/lists/alsa-devel/msg57363.html

The code is fully inspired from HDA driver.
On hw_param, HDMI sink speaker capabilities are exported via TLV ops
and  a CEA allocation is choson, based on ELD information and the number of
channels requested by user.

Mains differences with HDA implementation are:
 - Control is read only
 - Channel swap is not supported. Consequence is that unused channel in
   the mid of CEA audio infoframe channel mapping are considered as
   active.
   example for channel allocation 0x02: FL, FR, 0, FC)
	This configuration is only available for a 4 channels stream.
  - Channel allocation table has been reordered and HDMI 2.0 is not
    supported.

Arnaud Pouliquen (4):
  DRM: add help to get ELD speaker allocation
  ALSA pcm: allow non constant snd_pcm_chmap_elem
  ASoC: core: add optional pcm_new callback for DAI driver
  ASoC: hdmi-codec: add channel mapping control

 include/drm/drm_edid.h        |  13 ++
 include/sound/pcm.h           |   4 +-
 include/sound/soc-dai.h       |   3 +
 sound/core/pcm_lib.c          |   6 +-
 sound/soc/codecs/hdmi-codec.c | 310 +++++++++++++++++++++++++++++++++++++++++-
 sound/soc/soc-core.c          |  28 ++++
 6 files changed, 358 insertions(+), 6 deletions(-)

-- 
1.9.1

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

end of thread, other threads:[~2017-01-20 15:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-14 15:16 [PATCH v2 0/4] Generic HDMI codec: Add channel mapping control Arnaud Pouliquen
2016-12-14 15:16 ` [PATCH v2 1/4] DRM: add help to get ELD speaker allocation Arnaud Pouliquen
2016-12-19  9:09   ` Jani Nikula
2016-12-19  9:42     ` Daniel Vetter
2016-12-28 15:58       ` [alsa-devel] " Takashi Iwai
2016-12-14 15:16 ` [PATCH v2 2/4] ALSA pcm: allow non constant snd_pcm_chmap_elem Arnaud Pouliquen
2016-12-14 15:16 ` [PATCH v2 3/4] ASoC: core: add optional pcm_new callback for DAI driver Arnaud Pouliquen
2017-01-20 15:29   ` Applied "ASoC: core: add optional pcm_new callback for DAI driver" to the asoc tree Mark Brown
2016-12-14 15:16 ` [PATCH v2 4/4] ASoC: hdmi-codec: add channel mapping control Arnaud Pouliquen
2016-12-19 11:07   ` [STLinux Kernel] " Arnaud Pouliquen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.