diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/hda_eld.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c index 47ef8aa4a844..009031fae2ba 100644 --- a/sound/pci/hda/hda_eld.c +++ b/sound/pci/hda/hda_eld.c | |||
@@ -598,21 +598,19 @@ void hdmi_eld_update_pcm_info(struct hdmi_eld *eld, struct hda_pcm_stream *pcm, | |||
598 | { | 598 | { |
599 | int i; | 599 | int i; |
600 | 600 | ||
601 | pcm->rates = 0; | 601 | /* assume basic audio support (the basic audio flag is not in ELD; |
602 | pcm->formats = 0; | 602 | * however, all audio capable sinks are required to support basic |
603 | pcm->maxbps = 0; | 603 | * audio) */ |
604 | pcm->channels_max = 0; | 604 | pcm->rates = SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000; |
605 | pcm->formats = SNDRV_PCM_FMTBIT_S16_LE; | ||
606 | pcm->maxbps = 16; | ||
607 | pcm->channels_max = 2; | ||
605 | for (i = 0; i < eld->sad_count; i++) { | 608 | for (i = 0; i < eld->sad_count; i++) { |
606 | struct cea_sad *a = &eld->sad[i]; | 609 | struct cea_sad *a = &eld->sad[i]; |
607 | pcm->rates |= a->rates; | 610 | pcm->rates |= a->rates; |
608 | if (a->channels > pcm->channels_max) | 611 | if (a->channels > pcm->channels_max) |
609 | pcm->channels_max = a->channels; | 612 | pcm->channels_max = a->channels; |
610 | if (a->format == AUDIO_CODING_TYPE_LPCM) { | 613 | if (a->format == AUDIO_CODING_TYPE_LPCM) { |
611 | if (a->sample_bits & AC_SUPPCM_BITS_16) { | ||
612 | pcm->formats |= SNDRV_PCM_FMTBIT_S16_LE; | ||
613 | if (pcm->maxbps < 16) | ||
614 | pcm->maxbps = 16; | ||
615 | } | ||
616 | if (a->sample_bits & AC_SUPPCM_BITS_20) { | 614 | if (a->sample_bits & AC_SUPPCM_BITS_20) { |
617 | pcm->formats |= SNDRV_PCM_FMTBIT_S32_LE; | 615 | pcm->formats |= SNDRV_PCM_FMTBIT_S32_LE; |
618 | if (pcm->maxbps < 20) | 616 | if (pcm->maxbps < 20) |