diff options
author | Takashi Iwai <tiwai@suse.de> | 2017-02-02 11:06:38 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-02-03 11:37:34 -0500 |
commit | 36ed34662f1944ebf553b30fcba1abab1703d125 (patch) | |
tree | a8b506e48e86bbadd6dd8ec9ca4e545f0d15a493 /sound/x86 | |
parent | 4aedb9465f717a8393bb5f40581eb7942af12506 (diff) |
ALSA: x86: Set CA bits for DisplayPort too
This is a guess work. Usually the DP audio info frame is just 8-bit
shifted from HDMI AI, so let's try to put CA in DIP frame 2 [24-31].
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/x86')
-rw-r--r-- | sound/x86/intel_hdmi_audio.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c index f49520117dd6..24a18b88c927 100644 --- a/sound/x86/intel_hdmi_audio.c +++ b/sound/x86/intel_hdmi_audio.c | |||
@@ -626,20 +626,20 @@ static void snd_intelhad_prog_dip(struct snd_pcm_substream *substream, | |||
626 | u8 checksum = 0; | 626 | u8 checksum = 0; |
627 | u32 info_frame; | 627 | u32 info_frame; |
628 | int channels; | 628 | int channels; |
629 | int ca; | ||
629 | 630 | ||
630 | channels = substream->runtime->channels; | 631 | channels = substream->runtime->channels; |
631 | 632 | ||
632 | had_write_register(intelhaddata, AUD_CNTL_ST, ctrl_state.regval); | 633 | had_write_register(intelhaddata, AUD_CNTL_ST, ctrl_state.regval); |
633 | 634 | ||
635 | ca = snd_intelhad_channel_allocation(intelhaddata, channels); | ||
634 | if (intelhaddata->dp_output) { | 636 | if (intelhaddata->dp_output) { |
635 | info_frame = DP_INFO_FRAME_WORD1; | 637 | info_frame = DP_INFO_FRAME_WORD1; |
636 | frame2.regval = 1; | 638 | frame2.regval = (substream->runtime->channels - 1) | (ca << 24); |
637 | } else { | 639 | } else { |
638 | info_frame = HDMI_INFO_FRAME_WORD1; | 640 | info_frame = HDMI_INFO_FRAME_WORD1; |
639 | frame2.regx.chnl_cnt = substream->runtime->channels - 1; | 641 | frame2.regx.chnl_cnt = substream->runtime->channels - 1; |
640 | 642 | frame3.regx.chnl_alloc = ca; | |
641 | frame3.regx.chnl_alloc = snd_intelhad_channel_allocation( | ||
642 | intelhaddata, channels); | ||
643 | 643 | ||
644 | /* Calculte the byte wide checksum for all valid DIP words */ | 644 | /* Calculte the byte wide checksum for all valid DIP words */ |
645 | for (i = 0; i < BYTES_PER_WORD; i++) | 645 | for (i = 0; i < BYTES_PER_WORD; i++) |