aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2011-06-01 13:14:16 -0400
committerTakashi Iwai <tiwai@suse.de>2011-06-06 06:48:45 -0400
commitc3d52105753dafdf2d993e540cc3192f23447dac (patch)
tree1a348788a855175707e830dd68e2689db741f22e
parent59c5f46fbe01a00eedf54a23789634438bb80603 (diff)
ALSA: hda: Gate ELD usage only by whether ELD is valid
It's perfectly valid for an ELD to contain no SADs. This simply means that only basic audio is supoprted. In this case, we still want to limit a PCM's capabilities based on the ELD. History: * Originally, ELD application was limited solely by sad_count>0, which was used to check that an ELD had been read. * Later, eld_valid was added to the conditions to satisfy. This change removes the original sad_count>0 check, which when squashed with the above two changes ends up replacing if (sad_count) with if (eld_valid). Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/hda/patch_hdmi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index bd0ae697f9c4..8ccec72a8f0c 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -816,7 +816,7 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo,
816 *codec_pars = *hinfo; 816 *codec_pars = *hinfo;
817 817
818 eld = &spec->sink_eld[idx]; 818 eld = &spec->sink_eld[idx];
819 if (!static_hdmi_pcm && eld->eld_valid && eld->sad_count > 0) { 819 if (!static_hdmi_pcm && eld->eld_valid) {
820 hdmi_eld_update_pcm_info(eld, hinfo, codec_pars); 820 hdmi_eld_update_pcm_info(eld, hinfo, codec_pars);
821 if (hinfo->channels_min > hinfo->channels_max || 821 if (hinfo->channels_min > hinfo->channels_max ||
822 !hinfo->rates || !hinfo->formats) 822 !hinfo->rates || !hinfo->formats)