diff options
author | Varun Wadekar <vwadekar@nvidia.com> | 2012-04-11 12:38:06 +0530 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2012-04-11 12:38:06 +0530 |
commit | bf72785a2354d1fbb8b136b145020912d04182d9 (patch) | |
tree | 2f1bb311314a1ad348e266a5e23b9e45e02d6574 /sound/pci/hda/hda_eld.c | |
parent | f5907f1236b1fff3ea32ce3cbbf96a21e3e2880a (diff) |
ALSA:hda: add alsa control for query of device
alsa control is added to facilitate querying dts decode capability of
connected device. dts decode capability of the connected device is
updated in the ELD buffer. That information is updated in the
ALSA control structure. In addition to that, the code is amended to
handle other pass through decoder mode support.
Bug 943017
Change-Id: If8da7dfb24be3b86592191f5586b70492282b438
Signed-off-by: Sayak Ghosh Choudhury <sayakc@nvidia.com>
Reviewed-on: http://git-master/r/91813
Reviewed-by: Scott Peterson <speterson@nvidia.com>
Conflicts:
sound/pci/hda/hda_eld.c
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Diffstat (limited to 'sound/pci/hda/hda_eld.c')
-rw-r--r-- | sound/pci/hda/hda_eld.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c index 224f5051a406..3d09e2cdf89e 100644 --- a/sound/pci/hda/hda_eld.c +++ b/sound/pci/hda/hda_eld.c @@ -437,6 +437,15 @@ int snd_hdmi_get_eld(struct hdmi_eld *eld, /* set ELD buffer */ buf = eld->eld_buffer; + codec->recv_dec_cap = 0; + for (i = 0; i < eld->sad_count; i++) { + if (eld->sad[i].format == AUDIO_CODING_TYPE_AC3) { + codec->recv_dec_cap |= (1 << AUDIO_CODING_TYPE_AC3); + } else if (eld->sad[i].format == AUDIO_CODING_TYPE_DTS) { + codec->recv_dec_cap |= (1 << AUDIO_CODING_TYPE_DTS); + } + } + for (i = 0; i < size; i++) { unsigned int val = hdmi_get_eld_data(codec, nid, i); /* @@ -465,11 +474,6 @@ int snd_hdmi_get_eld(struct hdmi_eld *eld, } ret = hdmi_update_eld(eld, buf, size); - codec->ac3dec_capable = false; - for (i = 0; i < eld->sad_count; i++) { - if (eld->sad[i].format == AUDIO_CODING_TYPE_AC3) - codec->ac3dec_capable = true; - } error: return ret; |