diff options
author | Sayak Ghosh Choudhury <sayakc@nvidia.com> | 2012-01-31 21:05:05 +0530 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2012-02-13 06:24:34 -0800 |
commit | a07c190b888b947ed848e158d95dab1ddf6bd575 (patch) | |
tree | 2c2d9c5cc6b1255ce800a364d22f869ef76754b4 /sound/pci/hda/hda_codec.c | |
parent | d7ba2218517e3860c6db52e907a929aafe832fa5 (diff) |
ALSA:hda: add alsa control for query of device
alsa control is added to facilitate querying ac3 decode capability of
connected device. ac3 decode capability of the connected device is
updated in the ELD buffer. That information is updated in the
ALSA control structure.
Bug 909141
Bug 904553
Bug 920831
Change-Id: I81af196fc5dd85c5c87691393cf2f079611f9b47
Signed-off-by: Sayak Ghosh Choudhury <sayakc@nvidia.com>
Reviewed-on: http://git-master/r/83067
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Scott Peterson <speterson@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 23a9c2eca982..93f979db5a2e 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -2840,6 +2840,15 @@ static int snd_hda_spdif_out_switch_put(struct snd_kcontrol *kcontrol, return change; } +static int snd_hda_hdmi_decode_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct hda_codec *codec = snd_kcontrol_chip(kcontrol); + + ucontrol->value.integer.value[0] = codec->ac3dec_capable; + return 0; +} + static struct snd_kcontrol_new dig_mixes[] = { { .access = SNDRV_CTL_ELEM_ACCESS_READ, @@ -2869,6 +2878,12 @@ static struct snd_kcontrol_new dig_mixes[] = { .get = snd_hda_spdif_out_switch_get, .put = snd_hda_spdif_out_switch_put, }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "AC3 Decode Capability", + .info = snd_ctl_boolean_mono_info, + .get = snd_hda_hdmi_decode_get, + }, { } /* end */ }; |