mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
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>
This commit is contained in:
parent
4aedb9465f
commit
36ed34662f
1 changed files with 4 additions and 4 deletions
|
@ -626,20 +626,20 @@ static void snd_intelhad_prog_dip(struct snd_pcm_substream *substream,
|
||||||
u8 checksum = 0;
|
u8 checksum = 0;
|
||||||
u32 info_frame;
|
u32 info_frame;
|
||||||
int channels;
|
int channels;
|
||||||
|
int ca;
|
||||||
|
|
||||||
channels = substream->runtime->channels;
|
channels = substream->runtime->channels;
|
||||||
|
|
||||||
had_write_register(intelhaddata, AUD_CNTL_ST, ctrl_state.regval);
|
had_write_register(intelhaddata, AUD_CNTL_ST, ctrl_state.regval);
|
||||||
|
|
||||||
|
ca = snd_intelhad_channel_allocation(intelhaddata, channels);
|
||||||
if (intelhaddata->dp_output) {
|
if (intelhaddata->dp_output) {
|
||||||
info_frame = DP_INFO_FRAME_WORD1;
|
info_frame = DP_INFO_FRAME_WORD1;
|
||||||
frame2.regval = 1;
|
frame2.regval = (substream->runtime->channels - 1) | (ca << 24);
|
||||||
} else {
|
} else {
|
||||||
info_frame = HDMI_INFO_FRAME_WORD1;
|
info_frame = HDMI_INFO_FRAME_WORD1;
|
||||||
frame2.regx.chnl_cnt = substream->runtime->channels - 1;
|
frame2.regx.chnl_cnt = substream->runtime->channels - 1;
|
||||||
|
frame3.regx.chnl_alloc = ca;
|
||||||
frame3.regx.chnl_alloc = snd_intelhad_channel_allocation(
|
|
||||||
intelhaddata, channels);
|
|
||||||
|
|
||||||
/* Calculte the byte wide checksum for all valid DIP words */
|
/* Calculte the byte wide checksum for all valid DIP words */
|
||||||
for (i = 0; i < BYTES_PER_WORD; i++)
|
for (i = 0; i < BYTES_PER_WORD; i++)
|
||||||
|
|
Loading…
Add table
Reference in a new issue