All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Subhransu S. Prusty" <subhransu.s.prusty@intel.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, lgirdwood@gmail.com, patches.audio@intel.com,
	broonie@kernel.org, Vinod Koul <vinod.koul@intel.com>,
	"Subhransu S. Prusty" <subhransu.s.prusty@intel.com>
Subject: [PATCH v2 1/9] ASoC: hdac_hdmi: parse eld for channel map capability
Date: Tue, 12 Apr 2016 15:26:09 +0530	[thread overview]
Message-ID: <1460454977-30057-2-git-send-email-subhransu.s.prusty@intel.com> (raw)
In-Reply-To: <1460454977-30057-1-git-send-email-subhransu.s.prusty@intel.com>

This patch parses ELD speaker allocation data block to find
sink's chmap capability.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 sound/soc/codecs/hdac_hdmi.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
index aaa038f..81ac173 100644
--- a/sound/soc/codecs/hdac_hdmi.c
+++ b/sound/soc/codecs/hdac_hdmi.c
@@ -60,11 +60,17 @@ struct hdac_hdmi_cvt {
 	struct hdac_hdmi_cvt_params params;
 };
 
+/* Currently only spk_alloc, more to be added */
+struct hdac_hdmi_parsed_eld {
+	u8 spk_alloc;
+};
+
 struct hdac_hdmi_eld {
 	bool	monitor_present;
 	bool	eld_valid;
 	int	eld_size;
 	char    eld_buffer[ELD_MAX_SIZE];
+	struct	hdac_hdmi_parsed_eld info;
 };
 
 struct hdac_hdmi_pin {
@@ -1008,6 +1014,12 @@ static int hdac_hdmi_add_cvt(struct hdac_ext_device *edev, hda_nid_t nid)
 	return hdac_hdmi_query_cvt_params(&edev->hdac, cvt);
 }
 
+static void hdac_hdmi_parse_eld(struct hdac_ext_device *edev,
+			struct hdac_hdmi_pin *pin)
+{
+	pin->eld.info.spk_alloc = pin->eld.eld_buffer[DRM_ELD_SPEAKER];
+}
+
 static void hdac_hdmi_present_sense(struct hdac_hdmi_pin *pin, int repoll)
 {
 	struct hdac_ext_device *edev = pin->edev;
@@ -1065,6 +1077,7 @@ static void hdac_hdmi_present_sense(struct hdac_hdmi_pin *pin, int repoll)
 
 				snd_jack_report(pcm->jack, SND_JACK_AVOUT);
 			}
+			hdac_hdmi_parse_eld(edev, pin);
 
 			print_hex_dump_bytes("ELD: ", DUMP_PREFIX_OFFSET,
 					pin->eld.eld_buffer, pin->eld.eld_size);
-- 
1.9.1

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

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-12  9:56 [PATCH v2 0/9] ASoC: hdac_hdmi: Add multichannel support Subhransu S. Prusty
2016-04-12  9:56 ` Subhransu S. Prusty [this message]
2016-04-28 17:55   ` Applied "ASoC: hdac_hdmi: parse eld for channel map capability" to the asoc tree Mark Brown
2016-04-12  9:56 ` [PATCH v2 2/9] ALSA: hda - add helper to get channels from cap bits Subhransu S. Prusty
2016-04-12 10:10   ` Takashi Iwai
2016-04-12 13:38     ` Subhransu S. Prusty
2016-04-12  9:56 ` [PATCH v2 3/9] ASoC: hdac_hdmi: Add multichannel support Subhransu S. Prusty
2016-04-12  9:56 ` [PATCH v2 4/9] ASoC: skl_rt286: Fix to support hdmi channel map support Subhransu S. Prusty
2016-04-28 17:55   ` Applied "ASoC: skl_rt286: Fix to support hdmi channel map support" to the asoc tree Mark Brown
2016-04-12  9:56 ` [PATCH v2 5/9] ASoC: Intel: boards: Update skl_nau88l25_max98357a driver to support chmap Subhransu S. Prusty
2016-04-28 17:55   ` Applied "ASoC: Intel: boards: Update skl_nau88l25_max98357a driver to support chmap" to the asoc tree Mark Brown
2016-04-12  9:56 ` [PATCH v2 6/9] ASoC: Intel: boards: Update skl_nau88l25_ssm4567 driver to support chmap Subhransu S. Prusty
2016-04-28 17:55   ` Applied "ASoC: Intel: boards: Update skl_nau88l25_ssm4567 driver to support chmap" to the asoc tree Mark Brown
2016-04-12  9:56 ` [PATCH v2 7/9] ASoC: hdac_hdmi: Register chmap controls and ops Subhransu S. Prusty
2016-04-12  9:56 ` [PATCH v2 8/9] ASoC: Intel: Skylake: Add multichannel support for HDMI Subhransu S. Prusty
2016-04-12  9:56 ` [PATCH v2 9/9] ASoC: Intel: Skylake: Update channel map based on runtime params Subhransu S. Prusty

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=1460454977-30057-2-git-send-email-subhransu.s.prusty@intel.com \
    --to=subhransu.s.prusty@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=patches.audio@intel.com \
    --cc=tiwai@suse.de \
    --cc=vinod.koul@intel.com \
    /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.