Skip to content

Commit

Permalink
ALSA: hda: Gate ELD usage only by whether ELD is valid
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stephen Warren authored and Takashi Iwai committed Jun 6, 2011
1 parent 59c5f46 commit c3d5210
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/pci/hda/patch_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo,
*codec_pars = *hinfo;

eld = &spec->sink_eld[idx];
if (!static_hdmi_pcm && eld->eld_valid && eld->sad_count > 0) {
if (!static_hdmi_pcm && eld->eld_valid) {
hdmi_eld_update_pcm_info(eld, hinfo, codec_pars);
if (hinfo->channels_min > hinfo->channels_max ||
!hinfo->rates || !hinfo->formats)
Expand Down

0 comments on commit c3d5210

Please sign in to comment.