summaryrefslogtreecommitdiff
path: root/sound/pci
diff options
context:
space:
mode:
authorSumit Bhattacharya <sumitb@nvidia.com>2012-04-05 18:01:40 +0530
committerVarun Wadekar <vwadekar@nvidia.com>2012-05-04 19:16:16 +0530
commit7fcd821ffe649c88f5eecf0062ffb0a319beef93 (patch)
treee872ba82a676b864870aae4b7e5a42e76dadd9e7 /sound/pci
parentee605bc4f2e6fe6c5c8ec5a5602979e7ab0cf696 (diff)
ALSA: HDA: set max_channel only based on LPCM capability
Set maximum supported channels of HDA driver based on the LPCM channel capability of the HDMI device. This is needed because user space decides number of PCM channels to be sent to kernel based on this information. Bug 960940 Change-Id: I59ae3b7d47dcf26f697bfb0877ca24556f0ab1fa Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-on: http://git-master/r/94831 Reviewed-on: http://git-master/r/98783 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Scott Peterson <speterson@nvidia.com> Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/hda_eld.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c
index 64d7c6436a46..92ba18687dff 100644
--- a/sound/pci/hda/hda_eld.c
+++ b/sound/pci/hda/hda_eld.c
@@ -747,10 +747,11 @@ void snd_hdmi_eld_update_pcm_info(struct hdmi_eld *eld,
channels_max = 2;
for (i = 0; i < eld->sad_count; i++) {
struct cea_sad *a = &eld->sad[i];
+
rates |= a->rates;
- if (a->channels > channels_max)
- channels_max = a->channels;
if (a->format == AUDIO_CODING_TYPE_LPCM) {
+ if (a->channels > channels_max)
+ channels_max = a->channels;
if (a->sample_bits & AC_SUPPCM_BITS_20) {
formats |= SNDRV_PCM_FMTBIT_S32_LE;
if (maxbps < 20)