All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"kernel@stlinux.com" <kernel@stlinux.com>,
	"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	Takashi Sakamoto <o-takashi@sakamocchi.jp>,
	"broonie@kernel.org" <broonie@kernel.org>,
	Jyri Sarha <jsarha@ti.com>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH 2/2] ASoC: hdmi-codec: add channel mapping control
Date: Mon, 12 Dec 2016 10:54:27 +0100	[thread overview]
Message-ID: <s5hmvg1jwvg.wl-tiwai@suse.de> (raw)
In-Reply-To: <d9d775e9-b077-ae53-6b3f-6c4d6f40c0c3@st.com>

On Mon, 12 Dec 2016 10:38:45 +0100,
Arnaud Pouliquen wrote:
> 
> 
> 
> On 12/11/2016 07:09 AM, Takashi Sakamoto wrote:
> > On Dec 9 2016 01:37, Arnaud Pouliquen wrote:
> >> Add user interface to provide channel mapping.
> >> In a first step this control is read only.
> >>
> >> As TLV type, the control provides all configurations available for
> >> HDMI sink(ELD), and provides current channel mapping selected by codec
> >> based on ELD and number of channels specified by user on open.
> >> When control is called before the number of the channel is specified
> >> (i.e. hw_params is set), it returns all channels set to UNKNOWN.
> >>
> >> Notice that SNDRV_CTL_TLVT_CHMAP_FIXED is used for all mappings,
> >> as no information is available from HDMI driver to allow channel swapping.
> >>
> >> Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
> >> ---
> >>  sound/soc/codecs/hdmi-codec.c | 346 +++++++++++++++++++++++++++++++++++++++++-
> >>  1 file changed, 345 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c
> >> index f27d115..0cb83a3 100644
> >> --- a/sound/soc/codecs/hdmi-codec.c
> >> +++ b/sound/soc/codecs/hdmi-codec.c
> >> @@ -18,12 +18,137 @@
> >>  #include <sound/pcm.h>
> >>  #include <sound/pcm_params.h>
> >>  #include <sound/soc.h>
> >> +#include <sound/tlv.h>
> >>  #include <sound/pcm_drm_eld.h>
> >>  #include <sound/hdmi-codec.h>
> >>  #include <sound/pcm_iec958.h>
> >>
> >>  #include <drm/drm_crtc.h> /* This is only to get MAX_ELD_BYTES */
> >>
> >> +#define HDMI_MAX_SPEAKERS  8
> >> +
> >> +/*
> >> + * CEA speaker placement for HDMI 1.4:
> >> + *
> >> + *  FL  FLC   FC   FRC   FR   FRW
> >> + *
> >> + *                                  LFE
> >> + *
> >> + *  RL  RLC   RC   RRC   RR
> >> + *
> >> + *  Speaker placement has to be extended to support HDMI 2.0
> >> + */
> >> +enum hdmi_codec_cea_spk_placement {
> >> +	FL  = (1 <<  0),	/* Front Left           */
> >> +	FC  = (1 <<  1),	/* Front Center         */
> >> +	FR  = (1 <<  2),	/* Front Right          */
> >> +	FLC = (1 <<  3),	/* Front Left Center    */
> >> +	FRC = (1 <<  4),	/* Front Right Center   */
> >> +	RL  = (1 <<  5),	/* Rear Left            */
> >> +	RC  = (1 <<  6),	/* Rear Center          */
> >> +	RR  = (1 <<  7),	/* Rear Right           */
> >> +	RLC = (1 <<  8),	/* Rear Left Center     */
> >> +	RRC = (1 <<  9),	/* Rear Right Center    */
> >> +	LFE = (1 << 10),	/* Low Frequency Effect */
> >> +};
> > 
> > BIT() macro in "linux/bitops.h" is available.
> will be corrected in a v2

One slight caution: BIT() expands to an unsigned long type.


Takashi
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-12-12  9:54 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-08 16:37 [PATCH 0/2] Generic HDMI codec: Add channel mapping control Arnaud Pouliquen
2016-12-08 16:37 ` [PATCH 1/2] DRM: add help to get ELD speaker allocation Arnaud Pouliquen
2017-01-20 15:29   ` Applied "DRM: add help to get ELD speaker allocation" to the asoc tree Mark Brown
2016-12-08 16:37 ` [PATCH 2/2] ASoC: hdmi-codec: add channel mapping control Arnaud Pouliquen
2016-12-11  6:09   ` Takashi Sakamoto
2016-12-12  9:38     ` Arnaud Pouliquen
2016-12-12  9:54       ` Takashi Iwai [this message]
2016-12-12 12:12         ` Takashi Sakamoto
2016-12-12 12:55           ` Takashi Iwai
2016-12-12 14:05             ` Takashi Sakamoto
2016-12-12 15:12               ` Arnaud Pouliquen
2016-12-12 12:03       ` Takashi Sakamoto
2016-12-12 13:46         ` Arnaud Pouliquen
2016-12-13 13:23           ` Takashi Sakamoto
2016-12-13 13:58             ` Takashi Sakamoto
2016-12-13 14:49               ` Arnaud Pouliquen
2016-12-12 17:16         ` Arnaud Pouliquen
2016-12-08 20:52 ` [PATCH 0/2] Generic HDMI codec: Add " Takashi Sakamoto
2016-12-08 21:13   ` Takashi Sakamoto
2016-12-09 14:06     ` Arnaud Pouliquen
2016-12-11  1:16       ` Takashi Sakamoto

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=s5hmvg1jwvg.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=arnaud.pouliquen@st.com \
    --cc=broonie@kernel.org \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jsarha@ti.com \
    --cc=kernel@stlinux.com \
    --cc=lgirdwood@gmail.com \
    --cc=o-takashi@sakamocchi.jp \
    /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 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.