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>
ALSA: hda: Allow multple SPDIF controls per codec

    Currently, the data that backs the kcontrols created by
    snd_hda_create_spdif_out_ctls is stored directly in struct hda_codec. When
    multiple sets of these controls are stored, they will all manipulate the
    same data, causing confusion. Instead, store an array of this data, one
    copy per converter, to isolate the controls.

    This patch would cause a behavioural change in the case where
    snd_hda_create_spdif_out_ctls was called multiple times for a single codec.
    As best I can tell, this is never the case for any codec.

    This will be relevant at least for some HDMI audio codecs, such as the
    NVIDIA GeForce 520 and Intel Ibex Peak. A future change will modify the
    driver's handling of those codecs to create multiple PCMs per codec. Note
    that this issue isn't affected by whether one creates a PCM-per-converter
    or PCM-per-pin; there are multiple of both within a single codec in both
    of those codecs.

    Note that those codecs don't currently create multiple PCMs for the codec
    due to the default HW mux state of all pins being to point at the same
    converter, hence there is only a single converter routed to any pin, and
    hence only a single PCM.

    Signed-off-by: Stephen Warren <swarren@nvidia.com>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>